diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js index cd55c16be36..dea3af67724 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js @@ -20,6 +20,10 @@ frappe.ui.form.on('Cheque Print Template', { background-image: url({{ scanned_cheque }});\ background-repeat: no-repeat;\ background-size: cover;">\ + {{ message_to_show || __("Account Pay Only") }} \ {{ frappe.datetime.obj_to_user() }} \ diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json index 19b5a93fd35..9cec920637c 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.json @@ -214,6 +214,31 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "fieldname": "scanned_cheque", + "fieldtype": "Attach", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Scanned Cheque", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -242,14 +267,92 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, - "fieldname": "scanned_cheque", - "fieldtype": "Attach", + "fieldname": "is_account_payable", + "fieldtype": "Check", "hidden": 0, "ignore_user_permissions": 0, "ignore_xss_filter": 0, "in_filter": 0, "in_list_view": 0, - "label": "Scanned Cheque", + "label": "Is Account Payable", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "depends_on": "eval:doc.is_account_payable", + "fieldname": "acc_pay_dist_from_top_edge", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Distance from top edge", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "2", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "depends_on": "eval:doc.is_account_payable", + "fieldname": "acc_pay_dist_from_left_edge", + "fieldtype": "Float", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Distance from left edge", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "2", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "depends_on": "eval:doc.is_account_payable", + "fieldname": "message_to_show", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "Message to show", "length": 0, "no_copy": 0, "permlevel": 0, @@ -343,6 +446,7 @@ "allow_on_submit": 0, "bold": 0, "collapsible": 0, + "depends_on": "", "fieldname": "date_dist_from_left_edge", "fieldtype": "Float", "hidden": 0, @@ -898,7 +1002,7 @@ "issingle": 0, "istable": 0, "max_attachments": 1, - "modified": "2016-05-16 12:32:26.649060", + "modified": "2016-05-19 13:30:26.754096", "modified_by": "Administrator", "module": "Accounts", "name": "Cheque Print Template", 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 eb3e3d5e4a8..14543c40eac 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document +from frappe import _ class ChequePrintTemplate(Document): pass @@ -28,13 +29,17 @@ def create_or_update_cheque_print_format(template_name): cheque_print.html = """