Bank Reconciliation Statement Print Format
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
new file mode 100644
index 0000000..91e07ab
--- /dev/null
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.html
@@ -0,0 +1,46 @@
+<h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2>
+<h4 class="text-center">{%= filters.account %}</h3>
+<hr>
+<table class="table table-bordered">
+ <thead>
+ <tr>
+ <th style="width: 15%">{%= __("Posting Date") %}</th>
+ <th style="width: 15%">{%= __("Journal Voucher") %}</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>
+ </tr>
+ </thead>
+ <tbody>
+ {% for(var i=0, l=data.length; i<l; i++) { %}
+ {% if (data[i].posting_date) { %}
+ <tr>
+ <td>{%= dateutil.str_to_user(data[i].posting_date) %}</td>
+ <td>{%= data[i].journal_voucher %}</td>
+ <td>{%= __("Against") %}: {%= data[i].against_account %}
+ {% if (data[i].reference) { %}
+ <br>{%= __("Reference") %}: {%= data[i].reference %}
+ {% if (data[i].ref_date) { %}
+ <br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i].ref_date) %}
+ {% } %}
+ {% } %}
+ {% if (data[i].clearance_date) { %}
+ <br>{%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i].clearance_date) %}
+ {% } %}
+ </td>
+ <td style="text-align: right">{%= format_currency(data[i].debit) %}</td>
+ <td style="text-align: right">{%= format_currency(data[i].credit) %}</td>
+ </tr>
+ {% } else { %}
+ <tr>
+ <td></td>
+ <td></td>
+ <td>{%= data[i].journal_voucher %}</td>
+ <td style="text-align: right">{%= format_currency(data[i].debit) %}</td>
+ <td style="text-align: right">{%= format_currency(data[i].credit) %}</td>
+ </tr>
+ {% } %}
+ {% } %}
+ </tbody>
+</table>
+<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
index e87fbd3..119de09 100644
--- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -19,28 +19,29 @@
total_debit, total_credit = 0,0
for d in data:
- total_debit += flt(d[4])
- total_credit += flt(d[5])
+ total_debit += flt(d[2])
+ total_credit += flt(d[3])
bank_bal = flt(balance_as_per_company) - flt(total_debit) + flt(total_credit)
data += [
get_balance_row("Balance as per company books", balance_as_per_company),
- ["", "", "", "Amounts not reflected in bank", total_debit, total_credit],
+ ["", "Amounts not reflected in bank", total_debit, total_credit, "", "", "", ""],
get_balance_row("Balance as per bank", bank_bal)
]
return columns, data
def get_columns():
- return ["Journal Voucher:Link/Journal Voucher:140", "Posting Date:Date:100",
- "Clearance Date:Date:110", "Against Account:Link/Account:200",
- "Debit:Currency:120", "Credit:Currency:120"
+ return ["Posting Date:Date:100", "Journal Voucher:Link/Journal Voucher:200",
+ "Debit:Currency:120", "Credit:Currency:120",
+ "Against Account:Link/Account:200", "Reference::100", "Ref Date:Date:110", "Clearance Date:Date:110"
]
def get_entries(filters):
entries = frappe.db.sql("""select
- jv.name, jv.posting_date, jv.clearance_date, jvd.against_account, jvd.debit, jvd.credit
+ jv.posting_date, jv.name, jvd.debit, jvd.credit,
+ jvd.against_account, jv.cheque_no, jv.cheque_date, jv.clearance_date
from
`tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv
where jvd.parent = jv.name and jv.docstatus=1
@@ -52,6 +53,6 @@
def get_balance_row(label, amount):
if amount > 0:
- return ["", "", "", label, amount, 0]
+ return ["", label, amount, 0, "", "", "", ""]
else:
- return ["", "", "", label, 0, amount]
+ return ["", label, 0, amount, "", "", "", ""]