refactor: disable discount accounting on Buying module(PI)

This commit is contained in:
ruthra kumar 2022-08-23 11:36:00 +05:30
parent 17b9bfd249
commit a956e20f29

View File

@ -575,7 +575,6 @@ class PurchaseInvoice(BuyingController):
self.make_supplier_gl_entry(gl_entries)
self.make_item_gl_entries(gl_entries)
self.make_discount_gl_entries(gl_entries)
if self.check_asset_cwip_enabled():
self.get_asset_gl_entry(gl_entries)
@ -807,7 +806,7 @@ class PurchaseInvoice(BuyingController):
)
if not item.is_fixed_asset:
dummy, amount = self.get_amount_and_base_amount(item, enable_discount_accounting)
dummy, amount = self.get_amount_and_base_amount(item, None)
else:
amount = flt(item.base_net_amount + item.item_tax_amount, item.precision("base_net_amount"))
@ -1165,7 +1164,7 @@ class PurchaseInvoice(BuyingController):
)
for tax in self.get("taxes"):
amount, base_amount = self.get_tax_amounts(tax, enable_discount_accounting)
amount, base_amount = self.get_tax_amounts(tax, None)
if tax.category in ("Total", "Valuation and Total") and flt(base_amount):
account_currency = get_account_currency(tax.account_head)