fix: Use parent cost center for Sales and Purchase Invoice

This commit is contained in:
Deepesh Garg 2022-04-21 13:26:44 +05:30
parent 0ac11a5b30
commit c42547d40f
2 changed files with 6 additions and 2 deletions

View File

@ -1369,7 +1369,9 @@ class PurchaseInvoice(BuyingController):
if (
not self.is_internal_transfer() and self.rounding_adjustment and self.base_rounding_adjustment
):
round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(self.company)
round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(
self.company, "Purchase Invoice", self.name
)
gl_entries.append(
self.get_gl_dict(

View File

@ -1466,7 +1466,9 @@ class SalesInvoice(SellingController):
and self.base_rounding_adjustment
and not self.is_internal_transfer()
):
round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(self.company)
round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(
self.company, "Sales Invoice", self.name
)
gl_entries.append(
self.get_gl_dict(