fix: incorrect outstanding for invoice
This commit is contained in:
parent
9aea017990
commit
71f6f78d94
@ -132,7 +132,7 @@ def distribute_gl_based_on_cost_center_allocation(gl_map, precision=None):
|
|||||||
for sub_cost_center, percentage in cost_center_allocation.get(cost_center, {}).items():
|
for sub_cost_center, percentage in cost_center_allocation.get(cost_center, {}).items():
|
||||||
gle = copy.deepcopy(d)
|
gle = copy.deepcopy(d)
|
||||||
gle.cost_center = sub_cost_center
|
gle.cost_center = sub_cost_center
|
||||||
for field in ("debit", "credit", "debit_in_account_currency", "credit_in_company_currency"):
|
for field in ("debit", "credit", "debit_in_account_currency", "credit_in_account_currency"):
|
||||||
gle[field] = flt(flt(d.get(field)) * percentage / 100, precision)
|
gle[field] = flt(flt(d.get(field)) * percentage / 100, precision)
|
||||||
new_gl_map.append(gle)
|
new_gl_map.append(gle)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user