How can I force the field to reject 0 (! = 0)?


Accept only positive and negative
Reject zero

Can anyone help !

1 Like

frappe.ui.form.on(“Sales Invoice Item”, “field name”, function(frm, cdt, cdn) {
var row = locals[cdt][cdn];
If (row.rate == 0){
//show alert or ur code
}

});
Field name as rate in example

2 Likes