[fixes] add setting to mark cheque account pay only
This commit is contained in:
parent
2fc0ffad34
commit
81501ddc6d
@ -20,6 +20,10 @@ frappe.ui.form.on('Cheque Print Template', {
|
||||
background-image: url({{ scanned_cheque }});\
|
||||
background-repeat: no-repeat;\
|
||||
background-size: cover;">\
|
||||
<span style="top: {{ acc_pay_dist_from_top_edge }}cm;\
|
||||
left: {{ acc_pay_dist_from_left_edge }}cm;\
|
||||
border-bottom: solid 1px;border-top:solid 1px;\
|
||||
position: absolute;"> {{ message_to_show || __("Account Pay Only") }} </span>\
|
||||
<span style="top: {{ date_dist_from_top_edge }}cm;\
|
||||
left: {{ date_dist_from_left_edge }}cm;\
|
||||
position: absolute;"> {{ frappe.datetime.obj_to_user() }} </span>\
|
||||
|
@ -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",
|
||||
|
@ -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 = """
|
||||
<div style="position: relative; top:%(starting_position_from_top_edge)scm">
|
||||
<div style="width:%(cheque_width)scm;height:%(cheque_height)scm;">
|
||||
<span style="top: {{ %(acc_pay_dist_from_top_edge)s }}cm; left: {{ %(acc_pay_dist_from_left_edge)s }}cm;
|
||||
border-bottom: solid 1px;border-top:solid 1px; position: absolute;">
|
||||
%(message_to_show)s
|
||||
</span>
|
||||
<span style="top:%(date_dist_from_top_edge)s cm; left:%(date_dist_from_left_edge)scm;
|
||||
position: absolute;">
|
||||
{{doc.cheque_date or '' }}
|
||||
</span>
|
||||
<span style="top:%(acc_no_dist_from_top_edge)scm;left:%(acc_no_dist_from_left_edge)scm;
|
||||
position: absolute;">
|
||||
{{ doc.account_no or "Account No" }}
|
||||
{{ doc.account_no }}
|
||||
</span>
|
||||
<span style="top:%(payer_name_from_top_edge)scm;left: %(payer_name_from_left_edge)scm;
|
||||
position: absolute;">
|
||||
@ -58,6 +63,9 @@ def create_or_update_cheque_print_format(template_name):
|
||||
"starting_position_from_top_edge": doc.starting_position_from_top_edge \
|
||||
if doc.cheque_size == "A4" else 0.0,
|
||||
"cheque_width": doc.cheque_width, "cheque_height": doc.cheque_height,
|
||||
"acc_pay_dist_from_top_edge": doc.acc_pay_dist_from_top_edge,
|
||||
"acc_pay_dist_from_left_edge": doc.acc_pay_dist_from_left_edge,
|
||||
"message_to_show": doc.message_to_show if doc.message_to_show else _("Account Pay Only"),
|
||||
"date_dist_from_top_edge": doc.date_dist_from_top_edge,
|
||||
"date_dist_from_left_edge": doc.date_dist_from_left_edge,
|
||||
"acc_no_dist_from_top_edge": doc.acc_no_dist_from_top_edge,
|
||||
|
@ -0,0 +1,6 @@
|
||||
#Cheque Print
|
||||
|
||||
** Whats is Cheque Print? **
|
||||
|
||||
You can choose to print Cheques at the time of making payments to Creditors/ parties during Voucher Entry i.e., directly from the Payment Vouchers and Inter-bank payment or transfers through Contra Vouchers.
|
||||
|
@ -13,3 +13,4 @@ post-dated-cheque-entry
|
||||
update-stock-option-in-sales-invoice
|
||||
what-is-the-differences-of-total-and-valuation-in-tax-and-charges
|
||||
withdrawing-salary-from-owners-equity-account
|
||||
cheque-print
|
Loading…
x
Reference in New Issue
Block a user