Skip to content

Commit

Permalink
fix: Use default Cost Center of the Company for additional discount (#…
Browse files Browse the repository at this point in the history
…37234)

fix: Set cost center as default company cost center 

When Discount Accounting in enabled in Selling Settings, use Company default Cost Center while making GL entries for additional_discount_account
  • Loading branch information
vr-greycube authored Sep 27, 2023
1 parent 8c5fcb8 commit 4ada5a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ def make_discount_gl_entries(self, gl_entries):
"account": self.additional_discount_account,
"against": supplier_or_customer,
dr_or_cr: self.base_discount_amount,
"cost_center": self.cost_center,
"cost_center": self.cost_center or erpnext.get_default_cost_center(self.company),
},
item=self,
)
Expand Down

0 comments on commit 4ada5a4

Please sign in to comment.