mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
fix: discount accounting
This commit is contained in:
@@ -3456,7 +3456,7 @@ def add_income_discount_loss(pe, doc, total_discount_percent) -> float:
|
|||||||
{
|
{
|
||||||
"account": frappe.get_cached_value("Company", pe.company, "default_discount_account"),
|
"account": frappe.get_cached_value("Company", pe.company, "default_discount_account"),
|
||||||
"cost_center": pe.cost_center or frappe.get_cached_value("Company", pe.company, "cost_center"),
|
"cost_center": pe.cost_center or frappe.get_cached_value("Company", pe.company, "cost_center"),
|
||||||
"amount": flt(base_loss_on_income, precision),
|
"amount": flt(base_loss_on_income, precision) * -1,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -3490,7 +3490,7 @@ def add_tax_discount_loss(pe, doc, total_discount_percentage) -> float:
|
|||||||
"account": account,
|
"account": account,
|
||||||
"cost_center": pe.cost_center
|
"cost_center": pe.cost_center
|
||||||
or frappe.get_cached_value("Company", pe.company, "cost_center"),
|
or frappe.get_cached_value("Company", pe.company, "cost_center"),
|
||||||
"amount": flt(loss, precision),
|
"amount": flt(loss, precision) * -1,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user