fix: Use default Cost Center of the Company for additional discount (#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
(cherry picked from commit 4ada5a488e)
This commit is contained in:
@@ -1406,7 +1406,7 @@ class AccountsController(TransactionBase):
|
|||||||
"account": self.additional_discount_account,
|
"account": self.additional_discount_account,
|
||||||
"against": supplier_or_customer,
|
"against": supplier_or_customer,
|
||||||
dr_or_cr: self.base_discount_amount,
|
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,
|
item=self,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user