mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 12:25:09 +00:00
Merge pull request #32966 from frappe/mergify/bp/version-14-hotfix/pr-32962
fix: Write Off section visibility for non POS Invoices (backport #32962)
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,7 @@
|
||||
"link_fieldname": "consolidated_invoice"
|
||||
}
|
||||
],
|
||||
"modified": "2022-10-11 13:07:36.488095",
|
||||
"modified": "2022-11-15 09:33:47.870616",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
@@ -2165,4 +2165,4 @@
|
||||
"title_field": "title",
|
||||
"track_changes": 1,
|
||||
"track_seen": 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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