Merge pull request #16109 from rohitwaghchaure/while_pulling_advanced_entry_system_uses_grand_total
[Fix] System allocated grand total amount instead of non zero rounded total for advanced entry in the sales invoice
This commit is contained in:
commit
e4cc062cf1
@ -412,7 +412,8 @@ class AccountsController(TransactionBase):
|
||||
if d.against_order:
|
||||
allocated_amount = flt(d.amount)
|
||||
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)
|
||||
|
||||
self.append("advances", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user