Date Description Ref Maturity date Due Paid Maturity Li. [[ repeatIn(objects,'o') ]] [[ setLang(o.lang) ]] [[ repeatIn(adr_get(o, 'invoice'),'addr') ]] [[ o.title.name or '' ]] [[ o.name ]] [[ addr['street'] ]] [[ addr['street2'] or removeParentNode('para') ]] [[ addr['zip'] ]] [[ addr['city'] ]] [[ addr['state_id'] or removeParentNode('para')]] [[ addr['country_id'] ]] VAT: [[ o.vat or removeParentNode('para') ]] Document: Customer account statement Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] Customer Ref: [[ o.ref or ' ']] Dear Sir/Madam, [[ message(o, company) ]] Best regards. Date Description Ref Maturity date Due Paid Maturity Li.
[[repeatIn(getLines(o), 'line') ]] [[ formatLang(line['date'],date=True) ]] [[ line['name'] ]] [[ line['ref'] ]] [[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]] [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] [[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit'], currency_obj=company.currency_id) ] [[ line['blocked'] and 'X' or '' ]]
Sub-Total : [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)), currency_obj=company.currency_id) ]] Balance : [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0)), currency_obj=company.currency_id) ]] Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0)), currency_obj=company.currency_id) ]].