on 2024 Dec 24 5:58 AM
hello:
I encountered an error while updating my PurchaseDownPayments using the service layer, prompting "Unallowed item cost [DPO1. INMPrice][line: 1]"
My steps are as follows:
1. A PurchaseDownPayments was added, POST :https://IP:50000/b1s/v1/PurchaseDownPayments,code:
{
"DocDate":"2024-12-24",
"U_HBYID":"YFK2412240004",
"DocumentLines":[
{
"InventoryQuantity":20,
"TaxTotal":28.99,
"ItemCode":"111020031",
"VatGroup":"J2",
"LineNum":1,
"BaseType":-1,
"Price":11.150442,
"PriceAfterVAT":12.6,
"LineTotal":223.01,
"GrossTotal":252,
"LastBuyInmPrice": 0.0,
"StockInmPrice": 0.0,
"UnitsOfMeasurment":1
},
{
"InventoryQuantity":30,
"TaxTotal":34.51,
"ItemCode":"111020031",
"VatGroup":"J2",
"LineNum":2,
"BaseType":-1,
"Price":8.849558,
"PriceAfterVAT":10,
"LineTotal":265.49,
"GrossTotal":300,
"LastBuyInmPrice": 0.0,
"StockInmPrice": 0.0,
"UnitsOfMeasurment":1
}
],
"TaxDate":"2024-12-24",
"Comments":"",
"BPL_IDAssignedToInvoice":1,
"DownPaymentType":"dptRequest",
"CardCode":"S0000006",
"DocDueDate":"2024-12-24",
"DocTotal":552
}2. I changed the ratio to 80% in the client
3. I used the service layer for patch update, PATCH :https://IP:50000/b1s/v1/PurchaseDownPayments,code:
{
"DocDate":"2024-12-24",
"U_HBYID":"YFK2412240004",
"DocumentLines":[
{
"InventoryQuantity":20,
"TaxTotal":28.99,
"ItemCode":"111020031",
"VatGroup":"J2",
"LineNum":1,
"BaseType":-1,
"Price":11.150442,
"PriceAfterVAT":12.6,
"LineTotal":223.01,
"GrossTotal":252,
"LastBuyInmPrice": 0.0,
"StockInmPrice": 0.0,
"UnitsOfMeasurment":1
},
{
"InventoryQuantity":30,
"TaxTotal":34.51,
"ItemCode":"111020031",
"VatGroup":"J2",
"LineNum":2,
"BaseType":-1,
"Price":8.849558,
"PriceAfterVAT":10,
"LineTotal":265.49,
"GrossTotal":300,
"LastBuyInmPrice": 0.0,
"StockInmPrice": 0.0,
"UnitsOfMeasurment":1
}
],
"TaxDate":"2024-12-24",
"Comments":"",
"BPL_IDAssignedToInvoice":1,
"DownPaymentType":"dptRequest",
"CardCode":"S0000006",
"DocDueDate":"2024-12-24",
"DocTotal":552
}
Then I got an error and the version I was using was 2411.
The above operations I can directly operate in the client successfully.
Request clarification before answering.
Hi shine_chen,
Can you check the LineTotal value in the JSON request?
It can be caused by the incorrect LineTotal value which you are trying to set.
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 29 | |
| 15 | |
| 15 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.