2
0
mirror of https://github.com/frappe/books.git synced 2025-01-22 22:58:28 +00:00

fix: Item Rate validation

This commit is contained in:
Faris Ansari 2020-02-03 19:34:12 +05:30
parent 7d4d2e6c50
commit ce864c5d0c

View File

@ -93,7 +93,14 @@ module.exports = {
fieldname: 'rate',
label: 'Rate',
fieldtype: 'Currency',
placeholder: '0.00'
placeholder: '0.00',
validate(value) {
if (!value) {
throw new frappe.errors.ValidationError(
'Rate must be greater than 0'
);
}
}
}
],
quickEditFields: ['rate', 'unit', 'itemType', 'tax', 'description'],