From 066ae8e4c4dc38932bd6b64ba5db1c39ddf6e82f Mon Sep 17 00:00:00 2001 From: Saurabh Date: Tue, 5 Jul 2016 12:41:20 +0530 Subject: [PATCH] [fix] make cheque print compatible with payment entry --- .../cheque_print_template/cheque_print_template.py | 12 ++++++------ erpnext/config/accounts.py | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py index 14543c40ea..a6cc8baa9c 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py @@ -15,7 +15,7 @@ def create_or_update_cheque_print_format(template_name): if not frappe.db.exists("Print Format", template_name): cheque_print = frappe.new_doc("Print Format") cheque_print.update({ - "doc_type": "Journal Entry", + "doc_type": "Payment Entry", "standard": "No", "custom_format": 1, "print_format_type": "Server", @@ -35,24 +35,24 @@ def create_or_update_cheque_print_format(template_name): - {{doc.cheque_date or '' }} + {{doc.reference_date or '' }} - {{ doc.account_no }} + {{ doc.account_no or '' }} - {{doc.pay_to_recd_from}} + {{doc.party}} - {{doc.total_amount_in_words}} + {{frappe.utils.money_in_words(doc.base_paid_amount or doc.base_received_amount)}} - {{doc.get_formatted("total_amount")}} + {{doc.get_formatted("base_paid_amount") or doc.get_formatted("base_received_amount")}} diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py index e93f0176f6..4bb65e8291 100644 --- a/erpnext/config/accounts.py +++ b/erpnext/config/accounts.py @@ -236,6 +236,11 @@ def get_data(): "name": "Asset Movement", "description": _("Transfer an asset from one warehouse to another") }, + { + "type": "doctype", + "name": "Cheque Print Template", + "description": _("Setup cheque dimensions for printing") + }, ] }, {