Hi,
Why is the amount field precision to 2 decimal places but the unit cost to more than that.
Here's an example to illustrate my point. I'm creating an A/P invoice with the following create DTO:
{
"companyId": 2147470000,
"vendorId": 2147469945,
"date": "2024-10-09T12:32:03.48Z",
"invoiceNumber": "test",
"dueDate": "2024-11-08T12:32:03.48Z",
"amount": 274.9999,
"lines": [
{
"salesItemId": 2147469938,
"description": "test",
"quantity1": 33,
"quantity2": 0,
"unitCost": 8.3333,
"amount": 274.9999,
"notation": "633922"
}
]
}
but I get the error:
{
"message": "Invalid Request",
"errors": [
{
"key": "DatabaseError",
"message": "The selected row has incomplete data"
}
]
}
when I decrease the precision of the amount field like so:
{
"companyId": 2147470000,
"vendorId": 2147469945,
"date": "2024-10-09T12:32:03.48Z",
"invoiceNumber": "test",
"dueDate": "2024-11-08T12:32:03.48Z",
"amount": 274.9999,
"lines": [
{
"salesItemId": 2147469938,
"description": "test",
"quantity1": 33,
"quantity2": 0,
"unitCost": 8.33333,
"amount": 274.99,
"notation": "633922"
}
]
}
(notice that amount is now 274.99 instead of 274.9999)
My request is successful (200 status code).