From 2fc0ffad347b91f6ed162c9a54694aee55a641dd Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 16 May 2016 15:48:21 +0530 Subject: [PATCH] [fixes] js templating to get cheque print view --- .../cheque_print_template.js | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) 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 2a4dec13a6..cd55c16be3 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.js @@ -12,37 +12,40 @@ frappe.ui.form.on('Cheque Print Template', { }).addClass("btn-primary"); $(frm.fields_dict.cheque_print_preview.wrapper).empty() - - $("
\ -
\ +
"+ frappe.datetime.obj_to_user() +" \ - Acc. No. \ - Payer Name \ - Amount in Words \ - 1000 \ - Signatory Name \ + width: {{ amt_in_word_width }}cm;\ + line-height: {{ amt_in_words_line_spacing }}cm;\ + word-wrap: break-word;"> Amount in Words \ + 1000 \ + Signatory Name \
\ -
").appendTo(frm.fields_dict.cheque_print_preview.wrapper) +
'; + + $(frappe.render(template, frm.doc)).appendTo(frm.fields_dict.cheque_print_preview.wrapper) } } });