Performance in Ledger Report, footer was being generated on every voucher
This commit is contained in:
parent
ac11133f97
commit
5ff11d9c6b
@ -82,12 +82,12 @@ def build_report(request, info):
|
|||||||
'Type': VoucherType.by_id(voucher.type).name, 'Narration': voucher.narration, 'Debit': debit,
|
'Type': VoucherType.by_id(voucher.type).name, 'Narration': voucher.narration, 'Debit': debit,
|
||||||
'Credit': credit, 'Running': running, 'Posted': voucher.posted})
|
'Credit': credit, 'Running': running, 'Posted': voucher.posted})
|
||||||
|
|
||||||
info['Footer'] = {'Date': finish_date, 'Name': 'Closing Balance', 'Type': 'Closing Balance',
|
info['Footer'] = {'Date': finish_date, 'Name': 'Closing Balance', 'Type': 'Closing Balance',
|
||||||
'Narration': '', 'Debit': "\u20B9 {0:,.2f}".format(totalDebit),
|
'Narration': '', 'Debit': "\u20B9 {0:,.2f}".format(totalDebit),
|
||||||
'Credit': "\u20B9 {0:,.2f}".format(totalCredit),
|
'Credit': "\u20B9 {0:,.2f}".format(totalCredit),
|
||||||
'Running': "\u20B9 {0:,.2f}".format(abs(runningTotal)) + (
|
'Running': "\u20B9 {0:,.2f}".format(abs(runningTotal)) + (
|
||||||
' Dr' if runningTotal >= 0 else ' Cr'),
|
' Dr' if runningTotal >= 0 else ' Cr'),
|
||||||
'Posted': True}
|
'Posted': True}
|
||||||
|
|
||||||
|
|
||||||
def opening_balance(ledgerID, start_date):
|
def opening_balance(ledgerID, start_date):
|
||||||
|
Loading…
Reference in New Issue
Block a user