fix: Use parent cost center for Sales and Purchase Invoice

(cherry picked from commit c42547d40f)
This commit is contained in:
Deepesh Garg
2022-04-21 13:26:44 +05:30
committed by mergify-bot
parent a2d95fc62b
commit fe9f32946c
2 changed files with 6 additions and 2 deletions

View File

@@ -1317,7 +1317,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

@@ -1473,7 +1473,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(