added recurring print format to sales/purchase invoice and order
This commit is contained in:
parent
d1605c5cb2
commit
e2d8dd0663
@ -224,3 +224,4 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
|
|||||||
else
|
else
|
||||||
cur_frm.pformat.print_heading = __("Purchase Invoice");
|
cur_frm.pformat.print_heading = __("Purchase Invoice");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -926,12 +926,21 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:doc.is_recurring==1",
|
||||||
|
"fieldname": "recurring_print_format",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Recurring Print Format",
|
||||||
|
"options": "Print Format",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-16 16:46:47.308287",
|
"modified": "2015-06-22 07:30:06.743438",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
@ -392,8 +392,6 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cur_frm.set_query("debit_to", function(doc) {
|
cur_frm.set_query("debit_to", function(doc) {
|
||||||
return{
|
return{
|
||||||
filters: [
|
filters: [
|
||||||
|
@ -1227,6 +1227,15 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 0
|
"read_only": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:doc.is_recurring==1",
|
||||||
|
"fieldname": "recurring_print_format",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Recurring Print Format",
|
||||||
|
"options": "Print Format",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "against_income_account",
|
"fieldname": "against_income_account",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
@ -1244,7 +1253,7 @@
|
|||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-16 16:45:06.618286",
|
"modified": "2015-06-22 06:39:22.072544",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Sales Invoice",
|
"name": "Sales Invoice",
|
||||||
|
@ -868,12 +868,21 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:doc.is_recurring==1",
|
||||||
|
"fieldname": "recurring_print_format",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Recurring Print Format",
|
||||||
|
"options": "Print Format",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"modified": "2015-06-15 15:38:56.794601",
|
"modified": "2015-06-22 07:30:36.259753",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Buying",
|
"module": "Buying",
|
||||||
"name": "Purchase Order",
|
"name": "Purchase Order",
|
||||||
|
@ -124,7 +124,7 @@ def send_notification(new_rv):
|
|||||||
frappe.sendmail(new_rv.notification_email_address,
|
frappe.sendmail(new_rv.notification_email_address,
|
||||||
subject= _("New {0}: #{1}").format(new_rv.doctype, new_rv.name),
|
subject= _("New {0}: #{1}").format(new_rv.doctype, new_rv.name),
|
||||||
message = _("Please find attached {0} #{1}").format(new_rv.doctype, new_rv.name),
|
message = _("Please find attached {0} #{1}").format(new_rv.doctype, new_rv.name),
|
||||||
attachments = [frappe.attach_print(new_rv.doctype, new_rv.name, file_name=new_rv.name)])
|
attachments = [frappe.attach_print(new_rv.doctype, new_rv.name, file_name=new_rv.name, print_format=new_rv.recurring_print_format)])
|
||||||
|
|
||||||
def notify_errors(doc, doctype, party, owner):
|
def notify_errors(doc, doctype, party, owner):
|
||||||
from frappe.utils.user import get_system_managers
|
from frappe.utils.user import get_system_managers
|
||||||
|
@ -37,6 +37,16 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
if(this.frm.fields_dict["items"]) {
|
if(this.frm.fields_dict["items"]) {
|
||||||
this["items_remove"] = this.calculate_taxes_and_totals;
|
this["items_remove"] = this.calculate_taxes_and_totals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.frm.fields_dict["recurring_print_format"]) {
|
||||||
|
this.frm.set_query("recurring_print_format", function(doc) {
|
||||||
|
return{
|
||||||
|
filters: [
|
||||||
|
['Print Format', 'doc_type', '=', cur_frm.doctype],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onload_post_render: function() {
|
onload_post_render: function() {
|
||||||
@ -782,3 +792,5 @@ frappe.ui.form.on(cur_frm.doctype, "discount_amount", function(frm) {
|
|||||||
cur_frm.cscript.set_dynamic_labels();
|
cur_frm.cscript.set_dynamic_labels();
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -183,5 +183,3 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
|||||||
cur_frm.email_doc(frappe.boot.notification_settings.sales_order_message);
|
cur_frm.email_doc(frappe.boot.notification_settings.sales_order_message);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
;
|
|
||||||
|
@ -1074,13 +1074,22 @@
|
|||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print_hide": 1
|
"print_hide": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "eval:doc.is_recurring==1",
|
||||||
|
"fieldname": "recurring_print_format",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Recurring Print Format",
|
||||||
|
"options": "Print Format",
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-file-text",
|
"icon": "icon-file-text",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"modified": "2015-06-15 15:36:38.898462",
|
"modified": "2015-06-22 07:29:24.379272",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Sales Order",
|
"name": "Sales Order",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user