How to add a column in child table which can show the total of other column?

@Anjalijangid try 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;
frm.refresh_field(“items”);
}
})
i take wrong fieldname total_cbm instead of custom_total_cbm

1 Like

instead of item use the field name of total cbm

Its working now, But cant not change decimal values
I need three values after decimal

image

@Anjalijangid go to field properties set precision 3

I have zero knowledge of coding. :no_mouth:

Done, still same issue

Frappe Community is here for the assistance :star_struck:

1 Like

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

@Anjalijangid done

Not working, its still showing 6 only

image

@Anjalijangid row.custom_total_cbm = (row.cbm * row.qty).toFixed(3);

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

2 Likes

image

@Anjalijangid remove quote with “” in frm.refresh_field("items’')

try currency instead of float and add precision

Total CBM can not be in currency !!

image