chore: Update allow on submit for Sales Invoice fields

This commit is contained in:
Deepesh Garg
2022-10-17 16:48:13 +05:30
parent 30da6ab2c1
commit e626107d3d
5 changed files with 32 additions and 15 deletions

View File

@@ -143,6 +143,12 @@ var get_payment_mode_account = function(frm, mode_of_payment, callback) {
cur_frm.cscript.account_head = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (doc.docstatus == 1) {
// Should not trigger any changes on change post submit
return;
}
if(!d.charge_type && d.account_head){
frappe.msgprint(__("Please select Charge Type first"));
frappe.model.set_value(cdt, cdn, "account_head", "");