Skip to content

Commit

Permalink
fix: Use parent cost center for Sales and Purchase Invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 committed Apr 21, 2022
1 parent 0ac11a5 commit c42547d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,9 @@ def make_gle_for_rounding_adjustment(self, gl_entries):
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(
Expand Down
4 changes: 3 additions & 1 deletion erpnext/accounts/doctype/sales_invoice/sales_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,9 @@ def make_gle_for_rounding_adjustment(self, gl_entries):
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(
Expand Down

0 comments on commit c42547d

Please sign in to comment.