I need the rate column must be filled and not be null.
How to achieve this?By code or Changes in setting…?
I need the rate column must be filled and not be null.
How to achieve this?By code or Changes in setting…?
You can extend the validation of the record with a custom script on the Purchase Order. Something like this:
frappe.ui.form.on('Purchase Order', {
validate: function(frm) {
// check if each item has a rate != 0
var items = cur_frm.doc.items;
var rates_ok = true;
items.forEach(function(entry) {
if (entry.rate == 0) {
rates_ok = false;
}
});
if (!rates_ok)) {
frappe.msgprint( __("Please set valid rates"), __("Validation") );
frappe.validated=false;
}
}
});
Hope this helps.
This doesn’t work ,I want the Rate column should be filled before submitting on Purchase order Item table.
Open doctype list and select purchase order item
select rate and check as mandatory field.
If it work mark as solution.
I already made Mandatory but ,Doesn’t works