[fixes] outstanding for jv
This commit is contained in:
parent
bc97cbfedb
commit
4bb0eee411
@ -160,9 +160,9 @@ class DocType:
|
||||
def update_outstanding_amt(self):
|
||||
# get final outstanding amt
|
||||
bal = flt(sql("""select sum(debit) - sum(credit) from `tabGL Entry`
|
||||
where against_voucher=%s and against_voucher_type=%s
|
||||
and ifnull(is_cancelled,'No') = 'No'""",
|
||||
(self.doc.against_voucher, self.doc.against_voucher_type))[0][0] or 0.0)
|
||||
where against_voucher=%s and against_voucher_type=%s and account = %s
|
||||
and ifnull(is_cancelled,'No') = 'No'""", (self.doc.against_voucher,
|
||||
self.doc.against_voucher_type, self.doc.account))[0][0] or 0.0)
|
||||
|
||||
if self.doc.against_voucher_type == 'Purchase Invoice':
|
||||
bal = -bal
|
||||
|
Loading…
x
Reference in New Issue
Block a user