[Fix] System allocated grand total amount instead of non zero rounded total for advanced entry in the sales invoice
This commit is contained in:
parent
64b4d98778
commit
6cc2f52fa4
@ -405,7 +405,8 @@ class AccountsController(TransactionBase):
|
|||||||
if d.against_order:
|
if d.against_order:
|
||||||
allocated_amount = flt(d.amount)
|
allocated_amount = flt(d.amount)
|
||||||
else:
|
else:
|
||||||
allocated_amount = min(self.grand_total - advance_allocated, d.amount)
|
amount = self.rounded_total or self.grand_total
|
||||||
|
allocated_amount = min(amount - advance_allocated, d.amount)
|
||||||
advance_allocated += flt(allocated_amount)
|
advance_allocated += flt(allocated_amount)
|
||||||
|
|
||||||
self.append("advances", {
|
self.append("advances", {
|
||||||
|
Loading…
Reference in New Issue
Block a user