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

View File

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