mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
mandatory depends on for cheque no and date, fix typo
This commit is contained in:
@@ -122,11 +122,8 @@ frappe.ui.form.on("Journal Entry", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
voucher_type: function(frm){
|
voucher_type: function(frm){
|
||||||
frm.toggle_reqd("cheque_no", frm.doc.voucher_type=="Bank Entry");
|
|
||||||
frm.toggle_reqd("cheque_date", frm.doc.voucher_type=="Bank Entry");
|
|
||||||
|
|
||||||
if(!frm.doc.company) return;
|
if(!frm.doc.company) return;
|
||||||
if(frm.)
|
|
||||||
|
|
||||||
if((!(frm.doc.accounts || []).length) || ((frm.doc.accounts || []).length==1 && !frm.doc.accounts[0].account)) {
|
if((!(frm.doc.accounts || []).length) || ((frm.doc.accounts || []).length==1 && !frm.doc.accounts[0].account)) {
|
||||||
if(in_list(["Bank Entry", "Cash Entry"], frm.doc.voucher_type)) {
|
if(in_list(["Bank Entry", "Cash Entry"], frm.doc.voucher_type)) {
|
||||||
|
|||||||
@@ -159,6 +159,7 @@
|
|||||||
"in_global_search": 1,
|
"in_global_search": 1,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Reference Number",
|
"label": "Reference Number",
|
||||||
|
"mandatory_depends_on": "eval:doc.voucher_type == \"Bank Entry\"",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "cheque_no",
|
"oldfieldname": "cheque_no",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
@@ -168,6 +169,7 @@
|
|||||||
"fieldname": "cheque_date",
|
"fieldname": "cheque_date",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"label": "Reference Date",
|
"label": "Reference Date",
|
||||||
|
"mandatory_depends_on": "eval:doc.voucher_type == \"Bank Entry\"",
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "cheque_date",
|
"oldfieldname": "cheque_date",
|
||||||
"oldfieldtype": "Date",
|
"oldfieldtype": "Date",
|
||||||
@@ -501,7 +503,7 @@
|
|||||||
"idx": 176,
|
"idx": 176,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-04-26 04:48:31.753820",
|
"modified": "2020-04-26 13:04:05.230155",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Journal Entry",
|
"name": "Journal Entry",
|
||||||
|
|||||||
Reference in New Issue
Block a user