fix: Write Off section visibility for non POS Invoices
(cherry picked from commit 9f5d613c78)
# Conflicts:
# erpnext/accounts/doctype/sales_invoice/sales_invoice.json
This commit is contained in:
@@ -2090,7 +2090,7 @@
|
||||
{
|
||||
"collapsible": 1,
|
||||
"collapsible_depends_on": "write_off_amount",
|
||||
"depends_on": "grand_total",
|
||||
"depends_on": "is_pos",
|
||||
"fieldname": "write_off_section",
|
||||
"fieldtype": "Section Break",
|
||||
"hide_days": 1,
|
||||
@@ -2109,7 +2109,11 @@
|
||||
"link_fieldname": "consolidated_invoice"
|
||||
}
|
||||
],
|
||||
<<<<<<< HEAD
|
||||
"modified": "2022-10-11 13:07:36.488095",
|
||||
=======
|
||||
"modified": "2022-11-15 09:33:47.870616",
|
||||
>>>>>>> 9f5d613c78 (fix: Write Off section visibility for non POS Invoices)
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
|
||||
@@ -1300,7 +1300,11 @@ class SalesInvoice(SellingController):
|
||||
|
||||
def make_write_off_gl_entry(self, gl_entries):
|
||||
# write off entries, applicable if only pos
|
||||
if self.write_off_account and flt(self.write_off_amount, self.precision("write_off_amount")):
|
||||
if (
|
||||
self.is_pos
|
||||
and self.write_off_account
|
||||
and flt(self.write_off_amount, self.precision("write_off_amount"))
|
||||
):
|
||||
write_off_account_currency = get_account_currency(self.write_off_account)
|
||||
default_cost_center = frappe.get_cached_value("Company", self.company, "cost_center")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user