fix: Purchase Invoice Form Cleanup (#21230)
* fix: Purchase Invoice Form Cleanup
* fix: Made Supplier field mandatory
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
index 3af236c..0e09454 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json
@@ -13,23 +13,18 @@
"supplier_name",
"tax_id",
"due_date",
- "is_paid",
- "is_return",
- "apply_tds",
"column_break1",
"company",
"posting_date",
"posting_time",
"set_posting_time",
+ "is_paid",
+ "is_return",
+ "apply_tds",
"amended_from",
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
- "sb_14",
- "on_hold",
- "release_date",
- "cb_17",
- "hold_comment",
"supplier_invoice_details",
"bill_no",
"column_break_15",
@@ -137,10 +132,15 @@
"terms",
"printing_settings",
"letter_head",
- "group_same_items",
- "column_break_112",
"select_print_heading",
+ "column_break_112",
+ "group_same_items",
"language",
+ "sb_14",
+ "on_hold",
+ "release_date",
+ "cb_17",
+ "hold_comment",
"more_info",
"credit_to",
"party_account_currency",
@@ -190,6 +190,7 @@
"oldfieldtype": "Link",
"options": "Supplier",
"print_hide": 1,
+ "reqd": 1,
"search_index": 1
},
{
@@ -1232,6 +1233,7 @@
"print_hide": 1
},
{
+ "collapsible": 1,
"fieldname": "subscription_section",
"fieldtype": "Section Break",
"label": "Subscription Section",
diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
index db3f72a..c0a47d5 100644
--- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
+++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
@@ -12,15 +12,11 @@
"item_name",
"description_section",
"description",
- "item_group",
"brand",
- "image_section",
+ "col_break7",
+ "item_group",
"image",
"image_view",
- "manufacture_details",
- "manufacturer",
- "column_break_13",
- "manufacturer_part_no",
"quantity_and_rate",
"received_qty",
"qty",
@@ -55,20 +51,19 @@
"item_tax_amount",
"landed_cost_voucher_amount",
"rm_supp_cost",
- "item_weight_details",
- "weight_per_unit",
- "total_weight",
- "column_break_38",
- "weight_uom",
"warehouse_section",
"warehouse",
- "rejected_warehouse",
"from_warehouse",
"quality_inspection",
- "batch_no",
- "col_br_wh",
"serial_no",
+ "col_br_wh",
+ "rejected_warehouse",
+ "batch_no",
"rejected_serial_no",
+ "manufacture_details",
+ "manufacturer",
+ "column_break_13",
+ "manufacturer_part_no",
"accounting",
"expense_account",
"col_break5",
@@ -92,6 +87,11 @@
"po_detail",
"purchase_receipt",
"pr_detail",
+ "item_weight_details",
+ "weight_per_unit",
+ "total_weight",
+ "column_break_38",
+ "weight_uom",
"accounting_dimensions_section",
"project",
"dimension_col_break",
@@ -558,9 +558,10 @@
"print_hide": 1
},
{
+ "fetch_from": "item_code.item_group",
+ "fetch_if_empty": 1,
"fieldname": "item_group",
- "fieldtype": "Link",
- "hidden": 1,
+ "fieldtype": "Data",
"label": "Item Group",
"oldfieldname": "item_group",
"oldfieldtype": "Link",
@@ -722,12 +723,6 @@
},
{
"collapsible": 1,
- "fieldname": "image_section",
- "fieldtype": "Section Break",
- "label": "Image"
- },
- {
- "collapsible": 1,
"fieldname": "accounting_dimensions_section",
"fieldtype": "Section Break",
"label": "Accounting Dimensions"
@@ -737,6 +732,7 @@
"fieldtype": "Column Break"
},
{
+ "collapsible": 1,
"fieldname": "manufacture_details",
"fieldtype": "Section Break",
"label": "Manufacture"
@@ -771,6 +767,11 @@
"ignore_user_permissions": 1,
"label": "Supplier Warehouse",
"options": "Warehouse"
+ },
+ {
+ "collapsible": 1,
+ "fieldname": "col_break7",
+ "fieldtype": "Column Break"
}
],
"idx": 1,