Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
56eed7500d
@ -208,15 +208,17 @@ def get_data(rows, company_abbr):
|
|||||||
for acc_idx in xrange(len(accounts)):
|
for acc_idx in xrange(len(accounts)):
|
||||||
col_idx = len(columns) + acc_idx
|
col_idx = len(columns) + acc_idx
|
||||||
if flt(r[col_idx]) != 0:
|
if flt(r[col_idx]) != 0:
|
||||||
acc_dict[accounts[acc_idx]] = r[col_idx]
|
if not acc_dict.get(accounts[acc_idx]):
|
||||||
|
acc_dict[accounts[acc_idx]] = 0
|
||||||
|
acc_dict[accounts[acc_idx]] += flt(r[col_idx])
|
||||||
if flt(r[col_idx]) > 0:
|
if flt(r[col_idx]) > 0:
|
||||||
total_debit += flt(r[col_idx])
|
total_debit += flt(r[col_idx])
|
||||||
else:
|
else:
|
||||||
total_credit += abs(flt(r[col_idx]))
|
total_credit += abs(flt(r[col_idx]))
|
||||||
|
|
||||||
d['total_debit'] = total_debit
|
d['total_debit'] = total_debit
|
||||||
d['total_credit'] = total_credit
|
d['total_credit'] = total_credit
|
||||||
|
|
||||||
data.append([d, acc_dict])
|
data.append([d, acc_dict])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user