[fix] update bank recon statement printing for payment entries

This commit is contained in:
robert schouten 2016-11-17 14:33:28 +08:00
parent aa68058910
commit a943535520
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
<thead>
<tr>
<th style="width: 15%">{%= __("Posting Date") %}</th>
<th style="width: 15%">{%= __("Journal Entry") %}</th>
<th style="width: 15%">{%= __("Payment Entry") %}</th>
<th style="width: 40%">{%= __("Reference") %}</th>
<th style="width: 15%; text-align: right;">{%= __("Debit") %}</th>
<th style="width: 15%; text-align: right;">{%= __("Credit") %}</th>
@ -19,10 +19,10 @@
{% if (data[i]["posting_date"]) { %}
<tr>
<td>{%= dateutil.str_to_user(data[i]["posting_date"]) %}</td>
<td>{%= data[i]["journal_entry"] %}</td>
<td>{%= data[i]["payment_entry"] %}</td>
<td>{%= __("Against") %}: {%= data[i]["against_account"] %}
{% if (data[i]["reference"]) { %}
<br>{%= __("Reference") %}: {%= data[i]["reference"] %}
{% if (data[i]["reference_no"]) { %}
<br>{%= __("Reference") %}: {%= data[i]["reference_no"] %}
{% if (data[i]["ref_date"]) { %}
<br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i]["ref_date"]) %}
{% } %}
@ -38,7 +38,7 @@
<tr>
<td></td>
<td></td>
<td>{%= data[i]["journal_entry"] %}</td>
<td>{%= data[i]["payment_entry"] %}</td>
<td style="text-align: right">{%= format_currency(data[i]["debit"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit"]) %}</td>
</tr>

View File

@ -129,7 +129,7 @@ def get_entries(filters):
reference_no, reference_date as ref_date,
if(paid_to=%(account)s, received_amount, 0) as debit,
if(paid_from=%(account)s, paid_amount, 0) as credit,
posting_date, party as against_account, clearance_date,
posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
from `tabPayment Entry`
where