From b286fc99b854bbe45034ffe19e8641c88a397653 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 10 Apr 2019 16:16:30 +0530 Subject: [PATCH] fix: don't assign the advance payment entries if Allocate Advances Automatically is disabled --- .../purchase_invoice/purchase_invoice.json | 146 ++++++++++++++- .../doctype/sales_invoice/sales_invoice.json | 174 +++++++++++++++++- .../doctype/purchase_order/purchase_order.py | 4 +- .../doctype/sales_order/sales_order.py | 3 +- 4 files changed, 323 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 41b3c13a3b..9ee9c1ecc8 100755 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -21,6 +21,7 @@ "collapsible": 0, "columns": 0, "default": "{supplier_name}", + "fetch_if_empty": 0, "fieldname": "title", "fieldtype": "Data", "hidden": 1, @@ -54,6 +55,7 @@ "collapsible": 0, "columns": 0, "default": "", + "fetch_if_empty": 0, "fieldname": "naming_series", "fieldtype": "Select", "hidden": 0, @@ -88,6 +90,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "supplier", "fieldtype": "Link", "hidden": 0, @@ -124,6 +127,7 @@ "columns": 0, "depends_on": "supplier", "fetch_from": "supplier.supplier_name", + "fetch_if_empty": 0, "fieldname": "supplier_name", "fieldtype": "Data", "hidden": 0, @@ -159,6 +163,7 @@ "collapsible": 0, "columns": 0, "fetch_from": "supplier.tax_id", + "fetch_if_empty": 0, "fieldname": "tax_id", "fieldtype": "Read Only", "hidden": 0, @@ -192,6 +197,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "due_date", "fieldtype": "Date", "hidden": 0, @@ -225,6 +231,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "is_paid", "fieldtype": "Check", "hidden": 0, @@ -258,6 +265,7 @@ "collapsible": 0, "columns": 0, "default": "0", + "fetch_if_empty": 0, "fieldname": "is_return", "fieldtype": "Check", "hidden": 0, @@ -291,6 +299,7 @@ "collapsible": 0, "columns": 0, "default": "", + "fetch_if_empty": 0, "fieldname": "apply_tds", "fieldtype": "Check", "hidden": 0, @@ -323,6 +332,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break1", "fieldtype": "Column Break", "hidden": 0, @@ -355,6 +365,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "company", "fieldtype": "Link", "hidden": 0, @@ -387,6 +398,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "cost_center", "fieldtype": "Link", "hidden": 0, @@ -421,6 +433,7 @@ "collapsible": 0, "columns": 0, "default": "Today", + "fetch_if_empty": 0, "fieldname": "posting_date", "fieldtype": "Date", "hidden": 0, @@ -454,6 +467,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "posting_time", "fieldtype": "Time", "hidden": 0, @@ -489,6 +503,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:doc.docstatus==0", + "fetch_if_empty": 0, "fieldname": "set_posting_time", "fieldtype": "Check", "hidden": 0, @@ -521,6 +536,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "amended_from", "fieldtype": "Link", "hidden": 0, @@ -556,6 +572,7 @@ "collapsible": 1, "collapsible_depends_on": "eval:doc.on_hold", "columns": 0, + "fetch_if_empty": 0, "fieldname": "sb_14", "fieldtype": "Section Break", "hidden": 0, @@ -589,6 +606,7 @@ "collapsible": 0, "columns": 0, "default": "0", + "fetch_if_empty": 0, "fieldname": "on_hold", "fieldtype": "Check", "hidden": 0, @@ -623,6 +641,7 @@ "columns": 0, "depends_on": "eval:doc.on_hold", "description": "Once set, this invoice will be on hold till the set date", + "fetch_if_empty": 0, "fieldname": "release_date", "fieldtype": "Date", "hidden": 0, @@ -655,6 +674,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "cb_17", "fieldtype": "Column Break", "hidden": 0, @@ -687,6 +707,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:doc.on_hold", + "fetch_if_empty": 0, "fieldname": "hold_comment", "fieldtype": "Small Text", "hidden": 0, @@ -720,6 +741,7 @@ "collapsible": 1, "collapsible_depends_on": "bill_no", "columns": 0, + "fetch_if_empty": 0, "fieldname": "supplier_invoice_details", "fieldtype": "Section Break", "hidden": 0, @@ -753,6 +775,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "bill_no", "fieldtype": "Data", "hidden": 0, @@ -786,6 +809,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_15", "fieldtype": "Column Break", "hidden": 0, @@ -817,6 +841,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "bill_date", "fieldtype": "Date", "hidden": 0, @@ -851,6 +876,7 @@ "collapsible": 0, "columns": 0, "depends_on": "return_against", + "fetch_if_empty": 0, "fieldname": "returns", "fieldtype": "Section Break", "hidden": 0, @@ -884,6 +910,7 @@ "collapsible": 0, "columns": 0, "depends_on": "return_against", + "fetch_if_empty": 0, "fieldname": "return_against", "fieldtype": "Link", "hidden": 0, @@ -917,6 +944,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_addresses", "fieldtype": "Section Break", "hidden": 0, @@ -949,6 +977,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "supplier_address", "fieldtype": "Link", "hidden": 0, @@ -982,6 +1011,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "address_display", "fieldtype": "Small Text", "hidden": 0, @@ -1013,6 +1043,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_person", "fieldtype": "Link", "hidden": 0, @@ -1045,6 +1076,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_display", "fieldtype": "Small Text", "hidden": 0, @@ -1076,6 +1108,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_mobile", "fieldtype": "Small Text", "hidden": 0, @@ -1107,6 +1140,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_email", "fieldtype": "Small Text", "hidden": 0, @@ -1138,6 +1172,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "col_break_address", "fieldtype": "Column Break", "hidden": 0, @@ -1170,6 +1205,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "shipping_address", "fieldtype": "Link", "hidden": 0, @@ -1203,6 +1239,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "shipping_address_display", "fieldtype": "Small Text", "hidden": 0, @@ -1235,6 +1272,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "currency_and_price_list", "fieldtype": "Section Break", "hidden": 0, @@ -1267,6 +1305,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "currency", "fieldtype": "Link", "hidden": 0, @@ -1302,6 +1341,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "conversion_rate", "fieldtype": "Float", "hidden": 0, @@ -1336,6 +1376,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break2", "fieldtype": "Column Break", "hidden": 0, @@ -1366,6 +1407,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "buying_price_list", "fieldtype": "Link", "hidden": 0, @@ -1398,6 +1440,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "price_list_currency", "fieldtype": "Link", "hidden": 0, @@ -1430,6 +1473,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "plc_conversion_rate", "fieldtype": "Float", "hidden": 0, @@ -1462,6 +1506,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "ignore_pricing_rule", "fieldtype": "Check", "hidden": 0, @@ -1493,6 +1538,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "sec_warehouse", "fieldtype": "Section Break", "hidden": 0, @@ -1525,6 +1571,7 @@ "collapsible": 0, "columns": 0, "depends_on": "update_stock", + "fetch_if_empty": 0, "fieldname": "set_warehouse", "fieldtype": "Link", "hidden": 0, @@ -1560,6 +1607,7 @@ "columns": 0, "depends_on": "update_stock", "description": "Warehouse where you are maintaining stock of rejected items", + "fetch_if_empty": 0, "fieldname": "rejected_warehouse", "fieldtype": "Link", "hidden": 0, @@ -1593,6 +1641,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "col_break_warehouse", "fieldtype": "Column Break", "hidden": 0, @@ -1625,6 +1674,7 @@ "collapsible": 0, "columns": 0, "default": "No", + "fetch_if_empty": 0, "fieldname": "is_subcontracted", "fieldtype": "Select", "hidden": 0, @@ -1659,6 +1709,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:doc.is_subcontracted==\"Yes\"", + "fetch_if_empty": 0, "fieldname": "supplier_warehouse", "fieldtype": "Link", "hidden": 0, @@ -1694,6 +1745,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "items_section", "fieldtype": "Section Break", "hidden": 0, @@ -1728,6 +1780,7 @@ "collapsible": 0, "columns": 0, "default": "0", + "fetch_if_empty": 0, "fieldname": "update_stock", "fieldtype": "Check", "hidden": 0, @@ -1760,6 +1813,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "scan_barcode", "fieldtype": "Data", "hidden": 0, @@ -1792,6 +1846,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "items", "fieldtype": "Table", "hidden": 0, @@ -1828,6 +1883,7 @@ "collapsible_depends_on": "supplied_items", "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "raw_materials_supplied", "fieldtype": "Section Break", "hidden": 0, @@ -1860,6 +1916,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "supplied_items", "fieldtype": "Table", "hidden": 0, @@ -1893,6 +1950,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_26", "fieldtype": "Section Break", "hidden": 0, @@ -1923,6 +1981,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_qty", "fieldtype": "Float", "hidden": 0, @@ -1955,6 +2014,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_total", "fieldtype": "Currency", "hidden": 0, @@ -1989,6 +2049,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "base_net_total", "fieldtype": "Currency", "hidden": 0, @@ -2023,6 +2084,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_28", "fieldtype": "Column Break", "hidden": 0, @@ -2053,6 +2115,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total", "fieldtype": "Currency", "hidden": 0, @@ -2086,6 +2149,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "net_total", "fieldtype": "Currency", "hidden": 0, @@ -2120,6 +2184,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_net_weight", "fieldtype": "Float", "hidden": 0, @@ -2152,6 +2217,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes_section", "fieldtype": "Section Break", "hidden": 0, @@ -2185,6 +2251,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes_and_charges", "fieldtype": "Link", "hidden": 0, @@ -2219,6 +2286,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_49", "fieldtype": "Column Break", "hidden": 0, @@ -2250,6 +2318,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "shipping_rule", "fieldtype": "Link", "hidden": 0, @@ -2283,6 +2352,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_51", "fieldtype": "Section Break", "hidden": 0, @@ -2314,6 +2384,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes", "fieldtype": "Table", "hidden": 0, @@ -2348,6 +2419,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "sec_tax_breakup", "fieldtype": "Section Break", "hidden": 0, @@ -2380,6 +2452,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "other_charges_calculation", "fieldtype": "Text", "hidden": 0, @@ -2412,6 +2485,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "totals", "fieldtype": "Section Break", "hidden": 0, @@ -2445,6 +2519,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_taxes_and_charges_added", "fieldtype": "Currency", "hidden": 0, @@ -2479,6 +2554,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_taxes_and_charges_deducted", "fieldtype": "Currency", "hidden": 0, @@ -2513,6 +2589,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_total_taxes_and_charges", "fieldtype": "Currency", "hidden": 0, @@ -2547,6 +2624,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_40", "fieldtype": "Column Break", "hidden": 0, @@ -2578,6 +2656,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes_and_charges_added", "fieldtype": "Currency", "hidden": 0, @@ -2612,6 +2691,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes_and_charges_deducted", "fieldtype": "Currency", "hidden": 0, @@ -2646,6 +2726,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_taxes_and_charges", "fieldtype": "Currency", "hidden": 0, @@ -2680,6 +2761,7 @@ "collapsible": 1, "collapsible_depends_on": "discount_amount", "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_44", "fieldtype": "Section Break", "hidden": 0, @@ -2713,6 +2795,7 @@ "collapsible": 0, "columns": 0, "default": "Grand Total", + "fetch_if_empty": 0, "fieldname": "apply_discount_on", "fieldtype": "Select", "hidden": 0, @@ -2746,6 +2829,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_discount_amount", "fieldtype": "Currency", "hidden": 0, @@ -2779,6 +2863,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_46", "fieldtype": "Column Break", "hidden": 0, @@ -2810,6 +2895,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "additional_discount_percentage", "fieldtype": "Float", "hidden": 0, @@ -2842,6 +2928,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "discount_amount", "fieldtype": "Currency", "hidden": 0, @@ -2875,6 +2962,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_49", "fieldtype": "Section Break", "hidden": 0, @@ -2906,6 +2994,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_grand_total", "fieldtype": "Currency", "hidden": 0, @@ -2940,6 +3029,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_rounding_adjustment", "fieldtype": "Currency", "hidden": 0, @@ -2974,6 +3064,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:!doc.disable_rounded_total", + "fetch_if_empty": 0, "fieldname": "base_rounded_total", "fieldtype": "Currency", "hidden": 0, @@ -3008,6 +3099,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "base_in_words", "fieldtype": "Data", "hidden": 0, @@ -3041,6 +3133,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break8", "fieldtype": "Column Break", "hidden": 0, @@ -3073,6 +3166,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "grand_total", "fieldtype": "Currency", "hidden": 0, @@ -3107,6 +3201,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "rounding_adjustment", "fieldtype": "Currency", "hidden": 0, @@ -3141,6 +3236,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:!doc.disable_rounded_total", + "fetch_if_empty": 0, "fieldname": "rounded_total", "fieldtype": "Currency", "hidden": 0, @@ -3174,6 +3270,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "in_words", "fieldtype": "Data", "hidden": 0, @@ -3207,6 +3304,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_advance", "fieldtype": "Currency", "hidden": 0, @@ -3241,6 +3339,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "outstanding_amount", "fieldtype": "Currency", "hidden": 0, @@ -3276,6 +3375,7 @@ "collapsible": 0, "columns": 0, "depends_on": "grand_total", + "fetch_if_empty": 0, "fieldname": "disable_rounded_total", "fieldtype": "Check", "hidden": 0, @@ -3310,6 +3410,7 @@ "collapsible_depends_on": "paid_amount", "columns": 0, "depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)", + "fetch_if_empty": 0, "fieldname": "payments_section", "fieldtype": "Section Break", "hidden": 0, @@ -3342,6 +3443,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "mode_of_payment", "fieldtype": "Link", "hidden": 0, @@ -3375,6 +3477,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "cash_bank_account", "fieldtype": "Link", "hidden": 0, @@ -3408,6 +3511,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "col_br_payments", "fieldtype": "Column Break", "hidden": 0, @@ -3440,6 +3544,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_paid", + "fetch_if_empty": 0, "fieldname": "paid_amount", "fieldtype": "Currency", "hidden": 0, @@ -3473,6 +3578,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_paid_amount", "fieldtype": "Currency", "hidden": 0, @@ -3508,6 +3614,7 @@ "collapsible_depends_on": "write_off_amount", "columns": 0, "depends_on": "grand_total", + "fetch_if_empty": 0, "fieldname": "write_off", "fieldtype": "Section Break", "hidden": 0, @@ -3540,6 +3647,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "write_off_amount", "fieldtype": "Currency", "hidden": 0, @@ -3572,6 +3680,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_write_off_amount", "fieldtype": "Currency", "hidden": 0, @@ -3605,6 +3714,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_61", "fieldtype": "Column Break", "hidden": 0, @@ -3637,6 +3747,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:flt(doc.write_off_amount)!=0", + "fetch_if_empty": 0, "fieldname": "write_off_account", "fieldtype": "Link", "hidden": 0, @@ -3670,6 +3781,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:flt(doc.write_off_amount)!=0", + "fetch_if_empty": 0, "fieldname": "write_off_cost_center", "fieldtype": "Link", "hidden": 0, @@ -3703,6 +3815,7 @@ "collapsible": 1, "collapsible_depends_on": "advances", "columns": 0, + "fetch_if_empty": 0, "fieldname": "advances_section", "fieldtype": "Section Break", "hidden": 0, @@ -3736,6 +3849,8 @@ "bold": 0, "collapsible": 0, "columns": 0, + "default": "1", + "fetch_if_empty": 0, "fieldname": "allocate_advances_automatically", "fieldtype": "Check", "hidden": 0, @@ -3769,6 +3884,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:!doc.allocate_advances_automatically", + "fetch_if_empty": 0, "fieldname": "get_advances", "fieldtype": "Button", "hidden": 0, @@ -3802,6 +3918,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "advances", "fieldtype": "Table", "hidden": 0, @@ -3837,6 +3954,7 @@ "collapsible": 1, "collapsible_depends_on": "eval:(!doc.is_return)", "columns": 0, + "fetch_if_empty": 0, "fieldname": "payment_schedule_section", "fieldtype": "Section Break", "hidden": 0, @@ -3869,6 +3987,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "payment_terms_template", "fieldtype": "Link", "hidden": 0, @@ -3902,6 +4021,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "payment_schedule", "fieldtype": "Table", "hidden": 0, @@ -3936,6 +4056,7 @@ "collapsible": 1, "collapsible_depends_on": "terms", "columns": 0, + "fetch_if_empty": 0, "fieldname": "terms_section_break", "fieldtype": "Section Break", "hidden": 0, @@ -3968,6 +4089,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "tc_name", "fieldtype": "Link", "hidden": 0, @@ -4000,6 +4122,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "terms", "fieldtype": "Text Editor", "hidden": 0, @@ -4031,6 +4154,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "printing_settings", "fieldtype": "Section Break", "hidden": 0, @@ -4063,6 +4187,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "letter_head", "fieldtype": "Link", "hidden": 0, @@ -4096,6 +4221,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "group_same_items", "fieldtype": "Check", "hidden": 0, @@ -4128,6 +4254,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_112", "fieldtype": "Column Break", "hidden": 0, @@ -4159,6 +4286,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "select_print_heading", "fieldtype": "Link", "hidden": 0, @@ -4193,6 +4321,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "language", "fieldtype": "Data", "hidden": 0, @@ -4225,6 +4354,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "more_info", "fieldtype": "Section Break", "hidden": 0, @@ -4259,6 +4389,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "credit_to", "fieldtype": "Link", "hidden": 0, @@ -4293,6 +4424,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "party_account_currency", "fieldtype": "Link", "hidden": 1, @@ -4328,6 +4460,7 @@ "columns": 0, "default": "No", "description": "", + "fetch_if_empty": 0, "fieldname": "is_opening", "fieldtype": "Select", "hidden": 0, @@ -4362,6 +4495,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "against_expense_account", "fieldtype": "Small Text", "hidden": 1, @@ -4395,6 +4529,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_63", "fieldtype": "Column Break", "hidden": 0, @@ -4426,6 +4561,7 @@ "collapsible": 0, "columns": 0, "default": "Draft", + "fetch_if_empty": 0, "fieldname": "status", "fieldtype": "Select", "hidden": 0, @@ -4459,6 +4595,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "inter_company_invoice_reference", "fieldtype": "Link", "hidden": 0, @@ -4492,6 +4629,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "remarks", "fieldtype": "Small Text", "hidden": 0, @@ -4525,6 +4663,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "subscription_section", "fieldtype": "Section Break", "hidden": 0, @@ -4559,6 +4698,7 @@ "columns": 0, "depends_on": "", "description": "Start date of current invoice's period", + "fetch_if_empty": 0, "fieldname": "from_date", "fieldtype": "Date", "hidden": 0, @@ -4592,6 +4732,7 @@ "columns": 0, "depends_on": "", "description": "End date of current invoice's period", + "fetch_if_empty": 0, "fieldname": "to_date", "fieldtype": "Date", "hidden": 0, @@ -4623,6 +4764,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_114", "fieldtype": "Column Break", "hidden": 0, @@ -4654,6 +4796,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "auto_repeat", "fieldtype": "Link", "hidden": 0, @@ -4688,6 +4831,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval: doc.auto_repeat", + "fetch_if_empty": 0, "fieldname": "update_auto_repeat_reference", "fieldtype": "Button", "hidden": 0, @@ -4726,7 +4870,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2019-01-07 16:51:59.800081", + "modified": "2019-04-10 16:08:22.288425", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json index 077d99512a..7f7e6f981a 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json @@ -22,6 +22,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "customer_section", "fieldtype": "Section Break", "hidden": 0, @@ -55,6 +56,7 @@ "collapsible": 0, "columns": 0, "default": "{customer_name}", + "fetch_if_empty": 0, "fieldname": "title", "fieldtype": "Data", "hidden": 1, @@ -88,6 +90,7 @@ "collapsible": 0, "columns": 0, "default": "", + "fetch_if_empty": 0, "fieldname": "naming_series", "fieldtype": "Select", "hidden": 0, @@ -122,6 +125,7 @@ "bold": 1, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "customer", "fieldtype": "Link", "hidden": 0, @@ -158,6 +162,7 @@ "columns": 0, "depends_on": "customer", "fetch_from": "customer.customer_name", + "fetch_if_empty": 0, "fieldname": "customer_name", "fieldtype": "Data", "hidden": 0, @@ -192,6 +197,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "tax_id", "fieldtype": "Data", "hidden": 0, @@ -224,6 +230,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "project", "fieldtype": "Link", "hidden": 0, @@ -258,6 +265,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "is_pos", "fieldtype": "Check", "hidden": 0, @@ -292,6 +300,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_pos", + "fetch_if_empty": 0, "fieldname": "pos_profile", "fieldtype": "Link", "hidden": 0, @@ -325,6 +334,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "offline_pos_name", "fieldtype": "Data", "hidden": 1, @@ -358,6 +368,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "is_return", "fieldtype": "Check", "hidden": 0, @@ -390,6 +401,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break1", "fieldtype": "Column Break", "hidden": 0, @@ -421,6 +433,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "company", "fieldtype": "Link", "hidden": 0, @@ -455,6 +468,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "cost_center", "fieldtype": "Link", "hidden": 0, @@ -489,6 +503,7 @@ "collapsible": 0, "columns": 0, "default": "Today", + "fetch_if_empty": 0, "fieldname": "posting_date", "fieldtype": "Date", "hidden": 0, @@ -522,6 +537,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "posting_time", "fieldtype": "Time", "hidden": 0, @@ -556,6 +572,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:doc.docstatus==0", + "fetch_if_empty": 0, "fieldname": "set_posting_time", "fieldtype": "Check", "hidden": 0, @@ -588,6 +605,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "due_date", "fieldtype": "Date", "hidden": 0, @@ -621,6 +639,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "amended_from", "fieldtype": "Link", "hidden": 0, @@ -656,6 +675,7 @@ "collapsible": 0, "columns": 0, "depends_on": "return_against", + "fetch_if_empty": 0, "fieldname": "returns", "fieldtype": "Section Break", "hidden": 0, @@ -689,6 +709,7 @@ "collapsible": 0, "columns": 0, "depends_on": "return_against", + "fetch_if_empty": 0, "fieldname": "return_against", "fieldtype": "Link", "hidden": 0, @@ -722,6 +743,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_21", "fieldtype": "Column Break", "hidden": 0, @@ -754,6 +776,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval: doc.is_return && doc.return_against", + "fetch_if_empty": 0, "fieldname": "update_billed_amount_in_sales_order", "fieldtype": "Check", "hidden": 0, @@ -787,6 +810,7 @@ "collapsible": 1, "collapsible_depends_on": "po_no", "columns": 0, + "fetch_if_empty": 0, "fieldname": "customer_po_details", "fieldtype": "Section Break", "hidden": 0, @@ -819,6 +843,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "po_no", "fieldtype": "Data", "hidden": 0, @@ -851,6 +876,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_23", "fieldtype": "Column Break", "hidden": 0, @@ -882,6 +908,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "po_date", "fieldtype": "Date", "hidden": 0, @@ -915,6 +942,7 @@ "collapsible": 1, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "address_and_contact", "fieldtype": "Section Break", "hidden": 0, @@ -947,6 +975,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "customer_address", "fieldtype": "Link", "hidden": 0, @@ -979,6 +1008,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "address_display", "fieldtype": "Small Text", "hidden": 0, @@ -1010,6 +1040,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_person", "fieldtype": "Link", "hidden": 0, @@ -1042,6 +1073,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_display", "fieldtype": "Small Text", "hidden": 0, @@ -1073,6 +1105,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_mobile", "fieldtype": "Small Text", "hidden": 1, @@ -1104,6 +1137,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "contact_email", "fieldtype": "Data", "hidden": 1, @@ -1136,6 +1170,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "territory", "fieldtype": "Link", "hidden": 0, @@ -1169,6 +1204,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "col_break4", "fieldtype": "Column Break", "hidden": 0, @@ -1200,6 +1236,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "shipping_address_name", "fieldtype": "Link", "hidden": 0, @@ -1233,6 +1270,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "shipping_address", "fieldtype": "Small Text", "hidden": 0, @@ -1265,6 +1303,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "company_address", "fieldtype": "Link", "hidden": 0, @@ -1298,6 +1337,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "company_address_display", "fieldtype": "Small Text", "hidden": 1, @@ -1331,6 +1371,7 @@ "collapsible": 1, "columns": 0, "depends_on": "customer", + "fetch_if_empty": 0, "fieldname": "currency_and_price_list", "fieldtype": "Section Break", "hidden": 0, @@ -1363,6 +1404,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "currency", "fieldtype": "Link", "hidden": 0, @@ -1398,6 +1440,7 @@ "collapsible": 0, "columns": 0, "description": "Rate at which Customer Currency is converted to customer's base currency", + "fetch_if_empty": 0, "fieldname": "conversion_rate", "fieldtype": "Float", "hidden": 0, @@ -1432,6 +1475,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break2", "fieldtype": "Column Break", "hidden": 0, @@ -1463,6 +1507,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "selling_price_list", "fieldtype": "Link", "hidden": 0, @@ -1497,6 +1542,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "price_list_currency", "fieldtype": "Link", "hidden": 0, @@ -1530,6 +1576,7 @@ "collapsible": 0, "columns": 0, "description": "Rate at which Price list currency is converted to customer's base currency", + "fetch_if_empty": 0, "fieldname": "plc_conversion_rate", "fieldtype": "Float", "hidden": 0, @@ -1562,6 +1609,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "ignore_pricing_rule", "fieldtype": "Check", "hidden": 0, @@ -1593,6 +1641,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "sec_warehouse", "fieldtype": "Section Break", "hidden": 0, @@ -1625,6 +1674,7 @@ "collapsible": 0, "columns": 0, "depends_on": "update_stock", + "fetch_if_empty": 0, "fieldname": "set_warehouse", "fieldtype": "Link", "hidden": 0, @@ -1658,6 +1708,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "items_section", "fieldtype": "Section Break", "hidden": 0, @@ -1691,6 +1742,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "update_stock", "fieldtype": "Check", "hidden": 0, @@ -1724,6 +1776,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "scan_barcode", "fieldtype": "Data", "hidden": 0, @@ -1756,6 +1809,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "items", "fieldtype": "Table", "hidden": 0, @@ -1790,6 +1844,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "packing_list", "fieldtype": "Section Break", "hidden": 0, @@ -1822,6 +1877,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "packed_items", "fieldtype": "Table", "hidden": 0, @@ -1854,6 +1910,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "product_bundle_help", "fieldtype": "HTML", "hidden": 0, @@ -1887,6 +1944,7 @@ "collapsible_depends_on": "eval:doc.total_billing_amount > 0", "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "time_sheet_list", "fieldtype": "Section Break", "hidden": 0, @@ -1919,6 +1977,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "timesheets", "fieldtype": "Table", "hidden": 0, @@ -1953,6 +2012,7 @@ "collapsible": 0, "columns": 0, "default": "0", + "fetch_if_empty": 0, "fieldname": "total_billing_amount", "fieldtype": "Currency", "hidden": 0, @@ -1985,6 +2045,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_30", "fieldtype": "Section Break", "hidden": 0, @@ -2015,6 +2076,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_qty", "fieldtype": "Float", "hidden": 0, @@ -2047,6 +2109,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_total", "fieldtype": "Currency", "hidden": 0, @@ -2080,6 +2143,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_net_total", "fieldtype": "Currency", "hidden": 0, @@ -2114,6 +2178,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_32", "fieldtype": "Column Break", "hidden": 0, @@ -2144,6 +2209,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total", "fieldtype": "Currency", "hidden": 0, @@ -2177,6 +2243,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "net_total", "fieldtype": "Currency", "hidden": 0, @@ -2209,6 +2276,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_net_weight", "fieldtype": "Float", "hidden": 0, @@ -2241,6 +2309,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes_section", "fieldtype": "Section Break", "hidden": 0, @@ -2274,6 +2343,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes_and_charges", "fieldtype": "Link", "hidden": 0, @@ -2308,6 +2378,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_38", "fieldtype": "Column Break", "hidden": 0, @@ -2338,6 +2409,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "shipping_rule", "fieldtype": "Link", "hidden": 0, @@ -2371,6 +2443,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_40", "fieldtype": "Section Break", "hidden": 0, @@ -2401,6 +2474,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "taxes", "fieldtype": "Table", "hidden": 0, @@ -2435,6 +2509,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "sec_tax_breakup", "fieldtype": "Section Break", "hidden": 0, @@ -2467,6 +2542,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "other_charges_calculation", "fieldtype": "Text", "hidden": 0, @@ -2499,6 +2575,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_43", "fieldtype": "Section Break", "hidden": 0, @@ -2529,6 +2606,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_total_taxes_and_charges", "fieldtype": "Currency", "hidden": 0, @@ -2563,6 +2641,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_47", "fieldtype": "Column Break", "hidden": 0, @@ -2594,6 +2673,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_taxes_and_charges", "fieldtype": "Currency", "hidden": 0, @@ -2628,6 +2708,7 @@ "collapsible_depends_on": "", "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "loyalty_points_redemption", "fieldtype": "Section Break", "hidden": 0, @@ -2661,6 +2742,7 @@ "collapsible": 0, "columns": 0, "depends_on": "redeem_loyalty_points", + "fetch_if_empty": 0, "fieldname": "loyalty_points", "fieldtype": "Int", "hidden": 0, @@ -2694,6 +2776,7 @@ "collapsible": 0, "columns": 0, "depends_on": "redeem_loyalty_points", + "fetch_if_empty": 0, "fieldname": "loyalty_amount", "fieldtype": "Currency", "hidden": 0, @@ -2727,6 +2810,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "redeem_loyalty_points", "fieldtype": "Check", "hidden": 0, @@ -2759,6 +2843,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_77", "fieldtype": "Column Break", "hidden": 0, @@ -2792,6 +2877,7 @@ "columns": 0, "depends_on": "", "fetch_from": "customer.loyalty_program", + "fetch_if_empty": 0, "fieldname": "loyalty_program", "fieldtype": "Link", "hidden": 0, @@ -2826,6 +2912,7 @@ "collapsible": 0, "columns": 0, "depends_on": "redeem_loyalty_points", + "fetch_if_empty": 0, "fieldname": "loyalty_redemption_account", "fieldtype": "Link", "hidden": 0, @@ -2860,6 +2947,7 @@ "collapsible": 0, "columns": 0, "depends_on": "redeem_loyalty_points", + "fetch_if_empty": 0, "fieldname": "loyalty_redemption_cost_center", "fieldtype": "Link", "hidden": 0, @@ -2894,6 +2982,7 @@ "collapsible": 1, "collapsible_depends_on": "discount_amount", "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_49", "fieldtype": "Section Break", "hidden": 0, @@ -2927,6 +3016,7 @@ "collapsible": 0, "columns": 0, "default": "Grand Total", + "fetch_if_empty": 0, "fieldname": "apply_discount_on", "fieldtype": "Select", "hidden": 0, @@ -2960,6 +3050,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_discount_amount", "fieldtype": "Currency", "hidden": 0, @@ -2993,6 +3084,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_51", "fieldtype": "Column Break", "hidden": 0, @@ -3023,6 +3115,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "additional_discount_percentage", "fieldtype": "Float", "hidden": 0, @@ -3055,6 +3148,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "discount_amount", "fieldtype": "Currency", "hidden": 0, @@ -3087,6 +3181,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "totals", "fieldtype": "Section Break", "hidden": 0, @@ -3120,6 +3215,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_grand_total", "fieldtype": "Currency", "hidden": 0, @@ -3154,6 +3250,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_rounding_adjustment", "fieldtype": "Currency", "hidden": 0, @@ -3187,6 +3284,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_rounded_total", "fieldtype": "Currency", "hidden": 0, @@ -3222,6 +3320,7 @@ "collapsible": 0, "columns": 0, "description": "In Words will be visible once you save the Sales Invoice.", + "fetch_if_empty": 0, "fieldname": "base_in_words", "fieldtype": "Data", "hidden": 0, @@ -3255,6 +3354,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break5", "fieldtype": "Column Break", "hidden": 0, @@ -3287,6 +3387,7 @@ "bold": 1, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "grand_total", "fieldtype": "Currency", "hidden": 0, @@ -3321,6 +3422,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "rounding_adjustment", "fieldtype": "Currency", "hidden": 0, @@ -3354,6 +3456,7 @@ "bold": 1, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "rounded_total", "fieldtype": "Currency", "hidden": 0, @@ -3388,6 +3491,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "in_words", "fieldtype": "Data", "hidden": 0, @@ -3421,6 +3525,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_advance", "fieldtype": "Currency", "hidden": 0, @@ -3455,6 +3560,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "outstanding_amount", "fieldtype": "Currency", "hidden": 0, @@ -3490,6 +3596,7 @@ "collapsible": 1, "collapsible_depends_on": "advances", "columns": 0, + "fetch_if_empty": 0, "fieldname": "advances_section", "fieldtype": "Section Break", "hidden": 0, @@ -3523,6 +3630,8 @@ "bold": 0, "collapsible": 0, "columns": 0, + "default": "1", + "fetch_if_empty": 0, "fieldname": "allocate_advances_automatically", "fieldtype": "Check", "hidden": 0, @@ -3556,6 +3665,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:!doc.allocate_advances_automatically", + "fetch_if_empty": 0, "fieldname": "get_advances", "fieldtype": "Button", "hidden": 0, @@ -3589,6 +3699,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "advances", "fieldtype": "Table", "hidden": 0, @@ -3624,6 +3735,7 @@ "collapsible": 1, "collapsible_depends_on": "eval:(!doc.is_pos && !doc.is_return)", "columns": 0, + "fetch_if_empty": 0, "fieldname": "payment_schedule_section", "fieldtype": "Section Break", "hidden": 0, @@ -3657,6 +3769,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:(!doc.is_pos && !doc.is_return)", + "fetch_if_empty": 0, "fieldname": "payment_terms_template", "fieldtype": "Link", "hidden": 0, @@ -3691,6 +3804,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:(!doc.is_pos && !doc.is_return)", + "fetch_if_empty": 0, "fieldname": "payment_schedule", "fieldtype": "Table", "hidden": 0, @@ -3726,6 +3840,7 @@ "collapsible_depends_on": "", "columns": 0, "depends_on": "eval:doc.is_pos===1||(doc.advances && doc.advances.length>0)", + "fetch_if_empty": 0, "fieldname": "payments_section", "fieldtype": "Section Break", "hidden": 0, @@ -3759,6 +3874,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_pos", + "fetch_if_empty": 0, "fieldname": "cash_bank_account", "fieldtype": "Link", "hidden": 1, @@ -3794,6 +3910,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval:doc.is_pos===1", + "fetch_if_empty": 0, "fieldname": "payments", "fieldtype": "Table", "hidden": 0, @@ -3827,6 +3944,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_84", "fieldtype": "Section Break", "hidden": 0, @@ -3858,6 +3976,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_paid_amount", "fieldtype": "Currency", "hidden": 0, @@ -3891,6 +4010,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_86", "fieldtype": "Column Break", "hidden": 0, @@ -3923,6 +4043,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval: doc.is_pos || doc.redeem_loyalty_points", + "fetch_if_empty": 0, "fieldname": "paid_amount", "fieldtype": "Currency", "hidden": 0, @@ -3957,6 +4078,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break_88", "fieldtype": "Section Break", "hidden": 0, @@ -3989,6 +4111,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_pos", + "fetch_if_empty": 0, "fieldname": "base_change_amount", "fieldtype": "Currency", "hidden": 0, @@ -4022,6 +4145,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_90", "fieldtype": "Column Break", "hidden": 0, @@ -4054,6 +4178,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_pos", + "fetch_if_empty": 0, "fieldname": "change_amount", "fieldtype": "Currency", "hidden": 0, @@ -4088,6 +4213,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_pos", + "fetch_if_empty": 0, "fieldname": "account_for_change_amount", "fieldtype": "Link", "hidden": 0, @@ -4123,6 +4249,7 @@ "collapsible_depends_on": "write_off_amount", "columns": 0, "depends_on": "grand_total", + "fetch_if_empty": 0, "fieldname": "column_break4", "fieldtype": "Section Break", "hidden": 0, @@ -4156,6 +4283,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "write_off_amount", "fieldtype": "Currency", "hidden": 0, @@ -4188,6 +4316,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "base_write_off_amount", "fieldtype": "Currency", "hidden": 0, @@ -4222,6 +4351,7 @@ "collapsible": 0, "columns": 0, "depends_on": "is_pos", + "fetch_if_empty": 0, "fieldname": "write_off_outstanding_amount_automatically", "fieldtype": "Check", "hidden": 0, @@ -4254,6 +4384,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "column_break_74", "fieldtype": "Column Break", "hidden": 0, @@ -4286,6 +4417,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "write_off_account", "fieldtype": "Link", "hidden": 0, @@ -4319,6 +4451,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "write_off_cost_center", "fieldtype": "Link", "hidden": 0, @@ -4352,6 +4485,7 @@ "collapsible": 1, "collapsible_depends_on": "terms", "columns": 0, + "fetch_if_empty": 0, "fieldname": "terms_section_break", "fieldtype": "Section Break", "hidden": 0, @@ -4385,6 +4519,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "tc_name", "fieldtype": "Link", "hidden": 0, @@ -4419,6 +4554,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "terms", "fieldtype": "Text Editor", "hidden": 0, @@ -4452,6 +4588,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "edit_printing_settings", "fieldtype": "Section Break", "hidden": 0, @@ -4484,6 +4621,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "letter_head", "fieldtype": "Link", "hidden": 0, @@ -4518,6 +4656,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "group_same_items", "fieldtype": "Check", "hidden": 0, @@ -4550,6 +4689,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "language", "fieldtype": "Data", "hidden": 0, @@ -4582,6 +4722,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_84", "fieldtype": "Column Break", "hidden": 0, @@ -4613,6 +4754,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "select_print_heading", "fieldtype": "Link", "hidden": 0, @@ -4648,6 +4790,7 @@ "collapsible": 1, "columns": 0, "depends_on": "customer", + "fetch_if_empty": 0, "fieldname": "more_information", "fieldtype": "Section Break", "hidden": 0, @@ -4680,6 +4823,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "inter_company_invoice_reference", "fieldtype": "Link", "hidden": 0, @@ -4714,6 +4858,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "customer_group", "fieldtype": "Link", "hidden": 1, @@ -4747,6 +4892,7 @@ "collapsible": 0, "columns": 0, "depends_on": "", + "fetch_if_empty": 0, "fieldname": "campaign", "fieldtype": "Link", "hidden": 0, @@ -4781,6 +4927,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "col_break23", "fieldtype": "Column Break", "hidden": 0, @@ -4813,6 +4960,7 @@ "collapsible": 0, "columns": 0, "default": "Draft", + "fetch_if_empty": 0, "fieldname": "status", "fieldtype": "Select", "hidden": 0, @@ -4846,6 +4994,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "source", "fieldtype": "Link", "hidden": 0, @@ -4880,6 +5029,7 @@ "bold": 0, "collapsible": 1, "columns": 0, + "fetch_if_empty": 0, "fieldname": "more_info", "fieldtype": "Section Break", "hidden": 0, @@ -4914,6 +5064,7 @@ "collapsible": 0, "columns": 0, "description": "", + "fetch_if_empty": 0, "fieldname": "debit_to", "fieldtype": "Link", "hidden": 0, @@ -4948,6 +5099,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "party_account_currency", "fieldtype": "Link", "hidden": 1, @@ -4983,6 +5135,7 @@ "columns": 0, "default": "No", "description": "", + "fetch_if_empty": 0, "fieldname": "is_opening", "fieldtype": "Select", "hidden": 0, @@ -5017,6 +5170,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "c_form_applicable", "fieldtype": "Select", "hidden": 0, @@ -5049,6 +5203,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "c_form_no", "fieldtype": "Link", "hidden": 0, @@ -5081,6 +5236,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break8", "fieldtype": "Column Break", "hidden": 0, @@ -5112,6 +5268,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "remarks", "fieldtype": "Small Text", "hidden": 0, @@ -5146,6 +5303,7 @@ "collapsible": 1, "collapsible_depends_on": "sales_partner", "columns": 0, + "fetch_if_empty": 0, "fieldname": "sales_team_section_break", "fieldtype": "Section Break", "hidden": 0, @@ -5179,6 +5337,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "sales_partner", "fieldtype": "Link", "hidden": 0, @@ -5213,6 +5372,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break10", "fieldtype": "Column Break", "hidden": 0, @@ -5245,6 +5405,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "commission_rate", "fieldtype": "Float", "hidden": 0, @@ -5278,6 +5439,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "total_commission", "fieldtype": "Currency", "hidden": 0, @@ -5313,6 +5475,7 @@ "collapsible": 1, "collapsible_depends_on": "sales_team", "columns": 0, + "fetch_if_empty": 0, "fieldname": "section_break2", "fieldtype": "Section Break", "hidden": 0, @@ -5344,6 +5507,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "sales_team", "fieldtype": "Table", "hidden": 0, @@ -5378,6 +5542,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "subscription_section", "fieldtype": "Section Break", "hidden": 0, @@ -5412,6 +5577,7 @@ "columns": 0, "depends_on": "", "description": "", + "fetch_if_empty": 0, "fieldname": "from_date", "fieldtype": "Date", "hidden": 0, @@ -5445,6 +5611,7 @@ "columns": 0, "depends_on": "", "description": "", + "fetch_if_empty": 0, "fieldname": "to_date", "fieldtype": "Date", "hidden": 0, @@ -5476,6 +5643,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "column_break_140", "fieldtype": "Column Break", "hidden": 0, @@ -5507,6 +5675,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "auto_repeat", "fieldtype": "Link", "hidden": 0, @@ -5541,6 +5710,7 @@ "collapsible": 0, "columns": 0, "depends_on": "eval: doc.auto_repeat", + "fetch_if_empty": 0, "fieldname": "update_auto_repeat_reference", "fieldtype": "Button", "hidden": 0, @@ -5573,6 +5743,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "against_income_account", "fieldtype": "Small Text", "hidden": 1, @@ -5606,6 +5777,7 @@ "bold": 0, "collapsible": 0, "columns": 0, + "fetch_if_empty": 0, "fieldname": "pos_total_qty", "fieldtype": "Float", "hidden": 1, @@ -5644,7 +5816,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2019-02-18 18:56:51.265257", + "modified": "2019-04-10 16:10:34.266458", "modified_by": "Administrator", "module": "Accounts", "name": "Sales Invoice", diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 720160676f..e259c04ace 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -379,7 +379,9 @@ def make_purchase_invoice(source_name, target_doc=None): def postprocess(source, target): set_missing_values(source, target) #Get the advance paid Journal Entries in Purchase Invoice Advance - target.set_advances() + + if target.get("allocate_advances_automatically"): + target.set_advances() def update_item(obj, target, source_parent): target.amount = flt(obj.amount) - flt(obj.billed_amt) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 2345762233..8e81c13357 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -612,7 +612,8 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False): def postprocess(source, target): set_missing_values(source, target) #Get the advance paid Journal Entries in Sales Invoice Advance - target.set_advances() + if target.get("allocate_advances_automatically"): + target.set_advances() def set_missing_values(source, target): target.is_pos = 0