on 2025 May 27 11:12 AM
Hello,
We have made a software that uses ServiceLayer to create Invoice from Delivery or SalesOrder. But now, a new customer reported that he got a NotFound error when trying to create an Invoice from Delivery, and here is the http request:
POST https://example.com/sl/b1s/v1/Invoices
Content is:
{
"CardCode": "C00001",
"DocEntry": 0,
"DocObjectCode": 0,
"DocNum": 0,
"TrackingNumber": "123456789123",
"PickRemark": "",
"DocumentLines": [
{
"BaseEntry": 33,
"LineNum": 0,
"BaseLine": 0,
"BaseType": 15,
"WarehouseCode": "02",
"ItemCode": "012.34.A-B",
"Quantity": 1.0,
"RemainingOpenQuantity": 0.0,
"UoMCode": "",
"CommodityClassification": 0,
"CountryOrg": "",
"BatchNumbers": [],
"SerialNumbers": [],
"TaxCode": "TAXON",
"Price": 0.0
}
],
"DocumentAdditionalExpenses": [
{
"LineNum": 0,
"ExpenseCode": 5,
"LineTotal": 15.98,
"Remarks": "// SomeExpense Canada Post Expedited Parcel",
"TaxCode": "TAXON",
"BaseDocEntry": null,
"BaseDocLine": null,
"BaseDocType": null
}
],
"DocumentPackages": [
{
"Number": 1,
"DocumentPackageItems": [
{
"ItemCode": "012.34.A-B",
"Quantity": 1.0,
"MeasureUnit": "",
"UoMEntry": -1,
"UnitsOfMeasurement": 1.0
}
],
"Type": "Box"
}
],
"DownPaymentsToDraw": [],
"B1S_ReplaceCollectionsOnPatch": false,
"U_V33SB_ShopifyOrderId": "123456789",
"U_V33SB_ShopifyRefundId": "",
"U_V33SB_TrackingUpdated": "N",
"U_V33SB_ShopifyFulfillmentId": "",
"U_V33_BranchName": "ABCDEFG",
"U_IdocsComments": "",
"U_V33SB_EXTERNALORDERID": "",
"U_UpdateIDocs": "",
"U_IsInvoiceFullyPaid": "",
"U_V33_StarShipFreight": "15.98"
}The error is No matching record found (ODBC -2028).
But they do have an expense whose Expenses Code is 5:
{
"Name" : "ShopifyDifference",
"RevenuesAccount" : "_SYS00000000834",
"ExpenseAccount" : "_SYS00000000834",
"TaxLiable" : "tNO",
"FixedAmountRevenues" : 0.0,
"FixedAmountExpenses" : 0.0,
"OutputVATGroup" : null,
"InputVATGroup" : null,
"DistributionMethod" : "aed_None",
"Includein1099" : "tNO",
"FreightOffsetAccount" : null,
"WTLiable" : "N",
"ExpensCode" : 5,
"ExpenseExemptedAccount" : null,
"RevenuesExemptedAccount" : null,
"DistributionRule" : "",
"DrawingMethod" : "dmTotal",
"FreightType" : "ftShipping",
"Stock" : "tNO",
"LastPurchasePrice" : "tNO",
"Project" : null,
"DistributionRule2" : "",
"DistributionRule3" : "",
"DistributionRule4" : "",
"DistributionRule5" : "",
"DataVersion" : 1,
"SAFTProductType" : "saftpt_Services"
}But it seems I don't set the Additional Expense properly in my environment (Maybe you can give some help about this).
Could you give me some help about this NotFound problem? Thanks a lot!
Request clarification before answering.
| User | Count |
|---|---|
| 39 | |
| 22 | |
| 21 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.