mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
Merge pull request #39927 from barredterra/bt-precision-v14
This commit is contained in:
@@ -41,9 +41,10 @@ class BankTransaction(StatusUpdater):
|
|||||||
else:
|
else:
|
||||||
allocated_amount = 0.0
|
allocated_amount = 0.0
|
||||||
|
|
||||||
amount = abs(flt(self.withdrawal) - flt(self.deposit))
|
unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit)) - allocated_amount
|
||||||
self.db_set("allocated_amount", flt(allocated_amount))
|
|
||||||
self.db_set("unallocated_amount", amount - flt(allocated_amount))
|
self.db_set("allocated_amount", flt(allocated_amount, self.precision("allocated_amount")))
|
||||||
|
self.db_set("unallocated_amount", flt(unallocated_amount, self.precision("unallocated_amount")))
|
||||||
self.reload()
|
self.reload()
|
||||||
self.set_status(update=True)
|
self.set_status(update=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user