Page 1 of 1

Change the Logical Warehouse on POST

PostPosted: Fri Mar 27, 2020 5:11 pm
by mike.waugh
Hi

Env: Jiwa 7.2.1.0 / SQL 2012

How do we change the Logical Warehouse when we POST a new Sales Order, Purchase Order, GRN, Bookins?

Re: Change the Logical Warehouse on POST

PostPosted: Fri Mar 27, 2020 6:04 pm
by Mike.Sheen
mike.waugh wrote:Hi

Env: Jiwa 7.2.1.0 / SQL 2012

How do we change the Logical Warehouse when we POST a new Sales Order, Purchase Order, GRN, Bookins?


You provide the Logical Warehouse ID in the DTO.

For sales orders it's the LogicalID property.

For purchase orders it's the LogicalWarehouseResidingInRecID property.

For GRN's it's the LogicalWarehouseID property.

At least we're inconsistently inconsistent with our property naming!


If you don't provide the logical warehouse in the DTO, the last warehouse the user logged into will be used.

You can set the users current logical warehouse by performing a PATCH on /LogicalWarehouses/Current.

Re: Change the Logical Warehouse on POST

PostPosted: Mon Jun 19, 2023 3:44 pm
by gkov3
Hi Mike,

I am having the issue with posting a GRN to non-default user Warehouse.

If a PO is created e.g. Warehouse A, and the user's current warehouse is a Warehouse B, I am unable to force GRN to be posted to Warehouse A.

It will always post to the default warehouse of the API user, so in GRN line items there will be expected quantity of 0 which is incorrect.

I have tried, changing the current default user warehouse prior posting GRN with no success.

Tried creating a new GRN from PO lines and then patching the GRN's logical warehouse prior filling the line details with no luck.

So I ended up creating another endpoint in API (ASPluris) which is a copy of Jiwa's
GoodsReceivedNoteCREATEFromPOLinesRequest
handler that:
* grabs Logical Warehouse from a PO
* set it as the current user warehouse once the instance of the Manager is created.
* save the GRN.

Jiwa 7.2.1. Rest API 7.2.1.41


Regards,

Goran

Re: Change the Logical Warehouse on POST  Topic is solved

PostPosted: Mon Jun 19, 2023 4:41 pm
by Mike.Sheen
Hi Goran,

I have just tested this and I can confirm the behaviour you are reporting.

Logged as DEV-10061.

Mike