[solved] 'in words' for custom created Rounded total


please tell me somebody how to round off nearest 100 on ‘grand total’ in sales order?


in validate function, i have written

self.rounded_total = round(self.net_total,-2)

But it shows the ‘in words’ incorrectly…
I understand that i have to write the custom round and in words function in client side to update it correctly…

in .js file I put the code below.

frappe.ui.form.on("Sales Order Item", "refresh", function(frm, cdt, cdn) 
	cur_frm.set_value("grand_total", Math.round(total*100)/100); 

But this won’t round to nearest 100 and so no correct ‘in words’…

If anyone know how to show custom round function in rounded total and also ‘in words’ kindly help me…

For rounded total use:

For total in words use:

1 Like


Thank You so much…