Change the Logical Warehouse on POST  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Change the Logical Warehouse on POST

Postby mike.waugh » Fri Mar 27, 2020 5:11 pm

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?
mike.waugh
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Wed Feb 26, 2020 1:36 pm

Re: Change the Logical Warehouse on POST

Postby Mike.Sheen » Fri Mar 27, 2020 6:04 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Change the Logical Warehouse on POST

Postby gkov3 » Mon Jun 19, 2023 3:44 pm

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
gkov3
Occasional Contributor
Occasional Contributor
 
Posts: 13
Joined: Tue Nov 11, 2014 4:10 pm
Location: Melbourne, VIC
Topics Solved: 1

Re: Change the Logical Warehouse on POST  Topic is solved

Postby Mike.Sheen » Mon Jun 19, 2023 4:41 pm

Hi Goran,

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

Logged as DEV-10061.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to REST API

Who is online

Users browsing this forum: No registered users and 1 guest