mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
refactor: checkbox to toggle parent doc cost center preference
(cherry picked from commit 4ccce93394)
This commit is contained in:
@@ -1450,7 +1450,7 @@ class SalesInvoice(SellingController):
|
||||
and not self.is_internal_transfer()
|
||||
):
|
||||
round_off_account, round_off_cost_center = get_round_off_account_and_cost_center(
|
||||
self.company, "Sales Invoice", self.name
|
||||
self.company, "Sales Invoice", self.name, self.use_company_roundoff_cost_center
|
||||
)
|
||||
|
||||
gl_entries.append(
|
||||
@@ -1462,7 +1462,9 @@ class SalesInvoice(SellingController):
|
||||
self.rounding_adjustment, self.precision("rounding_adjustment")
|
||||
),
|
||||
"credit": flt(self.base_rounding_adjustment, self.precision("base_rounding_adjustment")),
|
||||
"cost_center": self.cost_center or round_off_cost_center,
|
||||
"cost_center": round_off_cost_center
|
||||
if self.use_company_roundoff_cost_center
|
||||
else (self.cost_center or round_off_cost_center),
|
||||
},
|
||||
item=self,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user