Set default Sales Order quantity to zero

Does anyone know how to set up default quantity in sales order to zero? thanks
Many thanks

Hi @GGR,

Please try it.

frappe.ui.form.on('Sales Order Item', {
	item_code: function(frm, cdt, cdn) {
		var row = locals[cdt][cdn];
		setTimeout(() => {
		    frappe.model.set_value(cdt, cdn, 'qty', 0);
		}, 100);

But you should add qty compulsory because without qty Sales Order can’t be saved.

I hope this helps.

Thank You!

Not working Sir, I think need backend changing

Which version of frappe and ERPNext you are on?

But it worked on my side in version 14.

Please check it.

Thank You!