mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 02:14:48 +00:00
fix: Use parent cost center for Sales and Purchase Invoice
This commit is contained in:
@@ -1369,7 +1369,9 @@ class PurchaseInvoice(BuyingController):
|
|||||||
if (
|
if (
|
||||||
not self.is_internal_transfer() and self.rounding_adjustment and self.base_rounding_adjustment
|
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(
|
gl_entries.append(
|
||||||
self.get_gl_dict(
|
self.get_gl_dict(
|
||||||
|
|||||||
@@ -1466,7 +1466,9 @@ class SalesInvoice(SellingController):
|
|||||||
and self.base_rounding_adjustment
|
and self.base_rounding_adjustment
|
||||||
and not self.is_internal_transfer()
|
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(
|
gl_entries.append(
|
||||||
self.get_gl_dict(
|
self.get_gl_dict(
|
||||||
|
|||||||
Reference in New Issue
Block a user