fix: account setting seperation gl discount account creation
This commit is contained in:
parent
f058755ad3
commit
f3fa6ac4c2
@ -1079,9 +1079,14 @@ class AccountsController(TransactionBase):
|
|||||||
return amount, base_amount
|
return amount, base_amount
|
||||||
|
|
||||||
def make_discount_gl_entries(self, gl_entries):
|
def make_discount_gl_entries(self, gl_entries):
|
||||||
enable_discount_accounting = cint(
|
if self.doctype == "Purchase Invoice":
|
||||||
frappe.db.get_single_value("Selling Settings", "enable_discount_accounting")
|
enable_discount_accounting = cint(
|
||||||
)
|
frappe.db.get_single_value("Buying Settings", "enable_discount_accounting")
|
||||||
|
)
|
||||||
|
elif self.doctype == "Sales Invoice":
|
||||||
|
enable_discount_accounting = cint(
|
||||||
|
frappe.db.get_single_value("Selling Settings", "enable_discount_accounting")
|
||||||
|
)
|
||||||
|
|
||||||
if enable_discount_accounting:
|
if enable_discount_accounting:
|
||||||
if self.doctype == "Purchase Invoice":
|
if self.doctype == "Purchase Invoice":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user