refactor: replace with new method in purchase invoice

This commit is contained in:
ruthra kumar 2023-06-16 11:34:11 +05:30
parent 5e1cd1f227
commit 7e94a1c51b

View File

@ -536,6 +536,7 @@ class PurchaseInvoice(BuyingController):
merge_entries=False,
from_repost=from_repost,
)
self.make_exchange_gain_loss_journal()
elif self.docstatus == 2:
provisional_entries = [a for a in gl_entries if a.voucher_type == "Purchase Receipt"]
make_reverse_gl_entries(voucher_type=self.doctype, voucher_no=self.name)
@ -580,7 +581,6 @@ class PurchaseInvoice(BuyingController):
self.get_asset_gl_entry(gl_entries)
self.make_tax_gl_entries(gl_entries)
self.make_exchange_gain_loss_gl_entries(gl_entries)
self.make_internal_transfer_gl_entries(gl_entries)
gl_entries = make_regional_gl_entries(gl_entries, self)