Open TheBestPessimist opened 5 years ago
It seems this issue sometimes happens even for positive values:
curl 'https://dev614.metasfresh.com/rest/api/window/540322/1000025/AD_Tab-540779/quickInput/33' -X PATCH --data-binary '[{"op":"replace","path":"Qty","value":"222"}]'
resp: [{"id":"33","fieldsByName":{"Qty":{"field":"Qty","value":222,"widgetType":"Integer","validStatus":{"valid":true,"initialValue":false,"fieldName":"Qty"}}}}]
curl 'https://dev614.metasfresh.com/rest/api/window/540322/1000025/AD_Tab-540779/quickInput/33' -X PATCH --data-binary '[{"op":"replace","path":"Qty","value":""}]' <---- wrong
resp: [{"id":"33","fieldsByName":{"Qty":{"field":"Qty","value":null,"widgetType":"Integer","validStatus":{"valid":false,"initialValue":true,"reason":"Mandatory field Qty not filled","fieldName":"Qty"}}}}]
curl 'https://dev614.metasfresh.com/rest/api/window/540322/1000025/AD_Tab-540779/quickInput/33/complete' -X POST -H 'Content-Length: 0'
resp: {"timestamp":"2019-07-24T15:11:57.084+02:00[Europe/Berlin]","status":500,"error":"Internal Server Error","exception":"org.adempiere.exceptions.AdempiereException","message":"IllegalArgumentException: new or null rowId is not accepted: null","trace":[removed]
What is different here is that the qty here is ""
(empty string) whereas the qty in the original issue is "0"
.
Entering negative values is not possible for any of our number fields. Do we want to change that ? @metas-ts @metas-mk
Is this a bug or feature request?
bug
What is the current behavior?
Cannot add negative qty in batch entry.
Which are the steps to reproduce?
It seems that frontend always sends a second request when pressing enter on the
Qty
field (before thehttp://localhost:8080/rest/api/window/540322/1000023/AD_Tab-540779/quickInput/26/complete
request).qty
request is identical to the firstqty
requests hasvalue: "0"
instead of the user-typed value.See the requests log:
What is the expected or desired behavior?
Can add products with negative qty.