Merge pull request #5531 from saurabh6790/cheque_print_fixes
[fixes] set default values to cheque print and set background image o…
This commit is contained in:
commit
0420833a59
@ -17,7 +17,6 @@ frappe.ui.form.on('Cheque Print Template', {
|
|||||||
var template = '<div style="position: relative; overflow-x: scroll;">\
|
var template = '<div style="position: relative; overflow-x: scroll;">\
|
||||||
<div id="cheque_preview" style="width: {{ cheque_width }}cm; \
|
<div id="cheque_preview" style="width: {{ cheque_width }}cm; \
|
||||||
height: {{ cheque_height }}cm;\
|
height: {{ cheque_height }}cm;\
|
||||||
background-image: url({{ scanned_cheque }});\
|
|
||||||
background-repeat: no-repeat;\
|
background-repeat: no-repeat;\
|
||||||
background-size: cover;">\
|
background-size: cover;">\
|
||||||
<span style="top: {{ acc_pay_dist_from_top_edge }}cm;\
|
<span style="top: {{ acc_pay_dist_from_top_edge }}cm;\
|
||||||
@ -50,6 +49,10 @@ frappe.ui.form.on('Cheque Print Template', {
|
|||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
$(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper)
|
$(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper)
|
||||||
|
|
||||||
|
if (frm.doc.scanned_cheque) {
|
||||||
|
$(frm.fields_dict.cheque_print_preview.wrapper).find("#cheque_preview").css('background-image', 'url(' + frm.doc.scanned_cheque + ')');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -116,6 +116,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "Regular",
|
||||||
"fieldname": "cheque_size",
|
"fieldname": "cheque_size",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -168,6 +169,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "20.00",
|
||||||
"fieldname": "cheque_width",
|
"fieldname": "cheque_width",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -193,6 +195,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "9.00",
|
||||||
"fieldname": "cheque_height",
|
"fieldname": "cheque_height",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -218,6 +221,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "",
|
||||||
"fieldname": "scanned_cheque",
|
"fieldname": "scanned_cheque",
|
||||||
"fieldtype": "Attach",
|
"fieldtype": "Attach",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -267,6 +271,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "1",
|
||||||
"fieldname": "is_account_payable",
|
"fieldname": "is_account_payable",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -292,6 +297,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "1.00",
|
||||||
"depends_on": "eval:doc.is_account_payable",
|
"depends_on": "eval:doc.is_account_payable",
|
||||||
"fieldname": "acc_pay_dist_from_top_edge",
|
"fieldname": "acc_pay_dist_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
@ -318,6 +324,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "9.00",
|
||||||
"depends_on": "eval:doc.is_account_payable",
|
"depends_on": "eval:doc.is_account_payable",
|
||||||
"fieldname": "acc_pay_dist_from_left_edge",
|
"fieldname": "acc_pay_dist_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
@ -344,6 +351,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "Acc. Payee",
|
||||||
"depends_on": "eval:doc.is_account_payable",
|
"depends_on": "eval:doc.is_account_payable",
|
||||||
"fieldname": "message_to_show",
|
"fieldname": "message_to_show",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
@ -421,6 +429,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "1.00",
|
||||||
"fieldname": "date_dist_from_top_edge",
|
"fieldname": "date_dist_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -446,6 +455,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "15.00",
|
||||||
"depends_on": "",
|
"depends_on": "",
|
||||||
"fieldname": "date_dist_from_left_edge",
|
"fieldname": "date_dist_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
@ -497,6 +507,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "2.00",
|
||||||
"fieldname": "payer_name_from_top_edge",
|
"fieldname": "payer_name_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -522,6 +533,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "3.00",
|
||||||
"fieldname": "payer_name_from_left_edge",
|
"fieldname": "payer_name_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -597,6 +609,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "3.00",
|
||||||
"fieldname": "amt_in_words_from_top_edge",
|
"fieldname": "amt_in_words_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -622,6 +635,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "4.00",
|
||||||
"fieldname": "amt_in_words_from_left_edge",
|
"fieldname": "amt_in_words_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -647,6 +661,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "15.00",
|
||||||
"fieldname": "amt_in_word_width",
|
"fieldname": "amt_in_word_width",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -672,6 +687,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "0.50",
|
||||||
"fieldname": "amt_in_words_line_spacing",
|
"fieldname": "amt_in_words_line_spacing",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -722,6 +738,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "3.50",
|
||||||
"fieldname": "amt_in_figures_from_top_edge",
|
"fieldname": "amt_in_figures_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -747,6 +764,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "16.00",
|
||||||
"fieldname": "amt_in_figures_from_left_edge",
|
"fieldname": "amt_in_figures_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -822,6 +840,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "5.00",
|
||||||
"fieldname": "acc_no_dist_from_top_edge",
|
"fieldname": "acc_no_dist_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -847,6 +866,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "4.00",
|
||||||
"fieldname": "acc_no_dist_from_left_edge",
|
"fieldname": "acc_no_dist_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -897,6 +917,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "6.00",
|
||||||
"fieldname": "signatory_from_top_edge",
|
"fieldname": "signatory_from_top_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -922,6 +943,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "15.00",
|
||||||
"fieldname": "signatory_from_left_edge",
|
"fieldname": "signatory_from_left_edge",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -996,13 +1018,14 @@
|
|||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
"in_dialog": 0,
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 1,
|
"max_attachments": 1,
|
||||||
"modified": "2016-05-19 13:30:26.754096",
|
"modified": "2016-06-23 20:19:11.694932",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Cheque Print Template",
|
"name": "Cheque Print Template",
|
||||||
|
Loading…
Reference in New Issue
Block a user