X-Git-Url: https://git.cyclocoop.org/?p=burette%2Faccount_financial_report_webkit.git;a=blobdiff_plain;f=report%2Ftemplates%2Fgrouped_by_curr_open_invoices_inclusion.mako.html;fp=report%2Ftemplates%2Fgrouped_by_curr_open_invoices_inclusion.mako.html;h=91c49e47aaa86b00e6db8e582bc8ad5dbf4a4412;hp=0000000000000000000000000000000000000000;hb=cddef38e342c880228694525c45df3f7dd8c2148;hpb=bffd331c220385010fe9abad9e228fc2004a293a diff --git a/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html b/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html new file mode 100644 index 0000000..91c49e4 --- /dev/null +++ b/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html @@ -0,0 +1,173 @@ +## -*- coding: utf-8 -*- +<%page args="account, formatLang" /> +%if account.grouped_ledger_lines and account.partners_order: + <% + account_total_debit = 0.0 + account_total_credit = 0.0 + account_balance_cumul = 0.0 + account_balance_cumul_curr = 0.0 + %> + %for partner_name, p_id, p_ref, p_name in account.partners_order: +
${account.code} - ${account.name} -- ${partner_name or _('No Partner')}
+ + + + %for curr, grouped_lines in account.grouped_ledger_lines.get(p_id, []): + <% + total_debit = 0.0 + total_credit = 0.0 + cumul_balance = 0.0 + cumul_balance_curr = 0.0 + + part_cumul_balance = 0.0 + part_cumul_balance_curr = 0.0 + %> +
+
+ ${curr or company.currency_id.name} +
+
+
+ ## date +
${_('Date')}
+ ## period +
${_('Period')}
+ ## move +
${_('Entry')}
+ ## journal +
${_('Journal')}
+ ## move reference +
${_('Reference')}
+ ## label +
${_('Label')}
+ ## reconcile +
${_('Rec.')}
+ ## maturity +
${_('Due Date')}
+ ## debit +
${_('Debit')}
+ ## credit +
${_('Credit')}
+ ## balance cumulated +
${_('Cumul. Bal.')}
+ ## currency balance +
${_('Curr. Balance')}
+ ## curency code +
${_('Curr.')}
+
+
+
+ <% + total_debit = 0.0 + total_credit = 0.0 + %> + <%! + def amount(text): + return text.replace('-', '‑') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers) + %> + %for line in grouped_lines: + <% + total_debit += line.get('debit') or 0.0 + total_credit += line.get('credit') or 0.0 + + label_elements = [line.get('lname') or ''] + if line.get('invoice_number'): + label_elements.append("(%s)" % (line['invoice_number'],)) + label = ' '.join(label_elements) + %> +
+ ## date +
${formatLang(line.get('ldate') or '', date=True)}
+ ## period +
${line.get('period_code') or ''}
+ ## move +
${line.get('move_name') or ''}
+ ## journal +
${line.get('jcode') or ''}
+ ## move reference +
${line.get('lref') or ''}
+ ## label +
${label}
+ ## reconcile +
${line.get('rec_name') or ''}
+ ## maturity date +
${formatLang(line.get('date_maturity') or '', date=True)}
+ ## debit +
${formatLang(line.get('debit') or 0.0) | amount }
+ ## credit +
${formatLang(line.get('credit') or 0.0) | amount }
+ ## balance cumulated + <% cumul_balance += line.get('balance') or 0.0 %> +
${formatLang(cumul_balance) | amount }
+ ## currency balance +
${formatLang(line.get('amount_currency') or 0.0) | amount }
+ ## curency code +
${line.get('currency_code') or ''}
+
+ %endfor +
+ ## date +
+ ## period +
+ ## move +
+ ## journal +
+ ## move reference +
+ ## label +
${_('Cumulated Balance on Partner')}
+ ## reconcile +
+ ## maturity date +
+ ## debit +
${formatLang(total_debit) | amount }
+ ## credit +
${formatLang(total_credit) | amount }
+ ## balance cumulated +
${formatLang(cumul_balance) | amount }
+ %if account.currency_id: + ## currency balance +
${formatLang(cumul_balance_curr) | amount }
+ %else: +
${ u'-' }
+ %endif + ## curency code +
${ account.currency_id.name if account.currency_id else u'' }
+
+
+
+ <% + account_total_debit += total_debit + account_total_credit += total_credit + account_balance_cumul += cumul_balance + account_balance_cumul_curr += cumul_balance_curr + %> + %endfor +%endfor +
+
+
${account.code} - ${account.name}
+ ## label +
${_("Cumulated Balance on Account")}
+ ## debit +
${ formatLang(account_total_debit) | amount }
+ ## credit +
${ formatLang(account_total_credit) | amount }
+ ## balance cumulated +
${ formatLang(account_balance_cumul) | amount }
+ ## currency balance cumulated + %if account.currency_id: +
${ formatLang(account_balance_cumul_curr) | amount }
+ %else: +
${ u'-' }
+ %endif + ## curency code +
${ account.currency_id.name if account.currency_id else u'' }
+
+
+ +%endif