cur_frm.cscript.rate = function(doc, cdt, cdn) {
var charge = frappe.get_doc(cdt, cdn);
var amount = (doc.basic_cost * charge.rate)/100 ;
frappe.model.set_value(cdt, cdn, “tax_amount”, amount);
}
Now i want to set the value in one of Doctype field “total” earlier i have use following script
frappe.set_value(“charges_total”,frm.doc.charges_total + charge.tax_amount);
But it’s not working i think it never get the object of Doctype
Can anyone tell me the script for that please…!