mirror of
https://github.com/Danneschs/platbik.git
synced 2026-05-06 09:08:57 +02:00
bug fix: item price in purchase can now be more than 0 (used for foreign currencies)
This commit is contained in:
parent
43b7ff082f
commit
4c75d08486
@ -46,7 +46,7 @@ function getItemColumns(handleDelete, isEditable, currencyFormat, errorColor) {
|
|||||||
|
|
||||||
const validatePrice = (value) => {
|
const validatePrice = (value) => {
|
||||||
const val = Number(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) => {
|
const validateAmount = (value) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user