cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Service Layer Warehouse Code Issue for Sales Order Drafts

jun_dolor
Participant
458

We encounter an issue with the Service Layer when creating a Sales Order draft. Specifically, the warehouse code for items in the draft can differ from the warehouse code in the base Sales Quotation. Although our JSON request includes the updated warehouse code, the Service Layer call appears to default to the warehouse code from the Sales Quotation when generating the draft.

Here is a sample JSON for the Sales Order draft. The WhsCode value (NV00002) varies from the base Sales Quotation WhsCode  (WV00002)

{"CardCode":"ABC105","NumAtCard":"ABC20240710","DocDueDate":"2024-07-15","DocDate":"2024-07-10","TaxDate":"2024-07-10","DocumentLines":[{"LineNum":2,"ItemCode":"Itm23","Quantity":12.000000,"Price":74.290000,"Currency":"PHP","VatGroup":"OVAT-V","WhsCode":"NV00002","AcctCode":"40000100","DocDate":"2024-07-09","BaseLine":2,"BaseEntry":3000,"BaseType":23,"BaseRef":351000,},{"LineNum":3,"ItemCode":"Itm37","Quantity":20.000000,"Price":139.780000,"Currency":"PHP","VatGroup":"OVAT-V","WhsCode":"NV00002","AcctCode":"40000100","DocDate":"2024-07-09","BaseLine":3,"BaseEntry":300,"BaseType":23,"BaseRef":351000}]}

The Sales Order draft created from the Service Layer call has the WhsCode WV00002.

Assistance in resolving this matter will be highly appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

jun_dolor
Participant
0 Likes

The Service Layer did not update the Warehouse Code because I used the field name WhsCode as the JSON key. I replaced the key with WarehouseCode in the JSON request and the Service Layer updated the Sales Order Warehouse code.