fix: Refactor for Print Format changes (#17242)
- Rename Server to Jinja - Rename Js to JS
This commit is contained in:
parent
89d3aaf349
commit
733ff48d51
@ -18,14 +18,14 @@ def create_or_update_cheque_print_format(template_name):
|
||||
"doc_type": "Payment Entry",
|
||||
"standard": "No",
|
||||
"custom_format": 1,
|
||||
"print_format_type": "Server",
|
||||
"print_format_type": "Jinja",
|
||||
"name": template_name
|
||||
})
|
||||
else:
|
||||
cheque_print = frappe.get_doc("Print Format", template_name)
|
||||
|
||||
|
||||
doc = frappe.get_doc("Cheque Print Template", template_name)
|
||||
|
||||
|
||||
cheque_print.html = """
|
||||
<style>
|
||||
.print-format {
|
||||
@ -91,9 +91,9 @@ def create_or_update_cheque_print_format(template_name):
|
||||
"signatory_from_top_edge": doc.signatory_from_top_edge,
|
||||
"signatory_from_left_edge": doc.signatory_from_left_edge
|
||||
}
|
||||
|
||||
|
||||
cheque_print.save(ignore_permissions=True)
|
||||
|
||||
|
||||
frappe.db.set_value("Cheque Print Template", template_name, "has_print_format", 1)
|
||||
|
||||
|
||||
return cheque_print
|
||||
|
@ -28,7 +28,7 @@ frappe.ui.form.on('POS Profile', {
|
||||
return {
|
||||
filters: [
|
||||
['Print Format', 'doc_type', '=', 'Sales Invoice'],
|
||||
['Print Format', 'print_format_type', '=', 'Server'],
|
||||
['Print Format', 'print_format_type', '=', 'Jinja'],
|
||||
]
|
||||
};
|
||||
});
|
||||
@ -42,7 +42,7 @@ frappe.ui.form.on('POS Profile', {
|
||||
});
|
||||
|
||||
frm.set_query("print_format", function() {
|
||||
return { filters: { doc_type: "Sales Invoice", print_format_type: "Js"} };
|
||||
return { filters: { doc_type: "Sales Invoice", print_format_type: "JS"} };
|
||||
});
|
||||
|
||||
frappe.db.get_value('POS Settings', 'POS Settings', 'use_pos_in_offline_mode', (r) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user