bug fix: item price in purchase can now be more than 0 (used for foreign currencies)

This commit is contained in:
Danesh 2026-04-22 17:46:59 +02:00
parent 43b7ff082f
commit 4c75d08486

View File

@ -46,7 +46,7 @@ function getItemColumns(handleDelete, isEditable, currencyFormat, errorColor) {
const validatePrice = (value) => {
const val = Number(value);
return isNaN(val) || val < 1 || !/^\d+(\.\d{1,2})?$/.test(value) || val > 999_999;
return isNaN(val) || val <= 0 || !/^\d+(\.\d{1,2})?$/.test(value) || val > 999_999;
};
const validateAmount = (value) => {