1
0
forked from test/crm

fix: do not show qty and other fields

(cherry picked from commit 8507c204819f0064b5faccbe6f48562c99831bc7)
This commit is contained in:
Shariq Ansari 2025-05-12 16:45:45 +05:30 committed by Mergify
parent 8ba79722d9
commit d70a0e1979
2 changed files with 4 additions and 8 deletions

View File

@ -43,7 +43,6 @@
"bold": 1, "bold": 1,
"fieldname": "discount_percentage", "fieldname": "discount_percentage",
"fieldtype": "Percent", "fieldtype": "Percent",
"in_list_view": 1,
"label": "Discount %" "label": "Discount %"
}, },
{ {
@ -73,10 +72,9 @@
"bold": 1, "bold": 1,
"fieldname": "amount", "fieldname": "amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount", "label": "Amount",
"options": "currency", "options": "currency",
"reqd": 1 "read_only": 1
}, },
{ {
"bold": 1, "bold": 1,
@ -84,7 +82,6 @@
"description": "Amount after discount", "description": "Amount after discount",
"fieldname": "net_amount", "fieldname": "net_amount",
"fieldtype": "Currency", "fieldtype": "Currency",
"in_list_view": 1,
"label": "Net Amount", "label": "Net Amount",
"options": "currency" "options": "currency"
}, },
@ -98,9 +95,9 @@
}, },
{ {
"bold": 1, "bold": 1,
"default": "1",
"fieldname": "qty", "fieldname": "qty",
"fieldtype": "Float", "fieldtype": "Float",
"in_list_view": 1,
"label": "Quantity" "label": "Quantity"
} }
], ],
@ -108,7 +105,7 @@
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"istable": 1, "istable": 1,
"links": [], "links": [],
"modified": "2025-04-28 14:41:38.735793", "modified": "2025-05-12 16:41:00.280290",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "FCRM", "module": "FCRM",
"name": "CRM Products", "name": "CRM Products",

View File

@ -156,8 +156,7 @@ export function getScript(doctype, view = 'Form') {
const { getFields } = getMeta(data.doctype) const { getFields } = getMeta(data.doctype)
let fields = getFields() let fields = getFields()
let field = fields.find((f) => f.fieldname === parentField) let field = fields.find((f) => f.fieldname === parentField)
dt = field.options dt = field?.options?.replace(/\s+/g, '')
dt = dt.replace(/\s+/g, '')
if (!idx && dt) { if (!idx && dt) {
idx = this.find((r) => r.constructor.name === dt)?.currentRowIdx idx = this.find((r) => r.constructor.name === dt)?.currentRowIdx