share the image of your doctype properties
Go to the customize form of your child table doctype and select that particular that field and find the field
find this field and select as per requirements
Not working, its still showing 6 only
Where to add this ???
@Anjalijangid try this code frappe.ui.form.on(‘Quotation’, {
validate: function(frm,cdt,cdn) {
let row = locals[cdt][cdn];
row.custom_total_cbm = (row.cbm * row.qty).toFixed(3);
frm.refresh_field(“items”);
}
})
i take wrong fieldname total_cbm instead of custom_total_cbm
try currency instead of float and add precision
Total CBM can not be in currency !!
frappe.ui.form.on("Quotation", {
validate: function(frm,cdt,cdn) {
let row = locals[cdt][cdn];
row.custom_total_cbm = (row.cbm * row.qty).toFixed(3);
frm.refresh_field("items");
}
})
please add this code in your client script
Copy and paste this script in direct client script box without any other place.
not working
what is the field type of cbm
I’m not sure why there are so many discussions on such a small topic, especially since this information is already available in “Frappe Forum.” I could have looked it up myself. There are 40+ discussions about a small client script, which is interesting
Please check your field name and set it in the script.
frappe.ui.form.on('Quotation', {
validate: function(frm) {
$.each(frm.doc.items || [], function(i, d) {
frappe.model.set_value(d.doctype, d.name, 'custom_total_cbm', d.cbm * d.qty);
});
},
});
@Anjalijangid, Everyone here is new but they are also trying to learn, so you should be patient and try a little yourself