Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0046429 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | always | 2021-04-29 17:31 | 2021-06-02 09:24 | |||
Reporter | vmromanos | View Status | public | |||||
Assigned To | rqueralta | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | RR21Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0046429: External Order Loader in cross store mode | |||||||
Description | The external order loader is failing when trying to work in a cross store environment. See this example: { "messageId": "MessageId0144", "channel": "External", "posTerminal": "Magento", "data": [ { "currency": "EUR", "payment": 135, "step": "create", "grossAmount": 135, "netAmount": 111.57, "documentStatus": "NC", "businessPartner": "WVG/C0002", "completeTicket": true, "organization": "B5DE96143D6642228E3B9DEC69886A47", "documentType": "91133D5715FA429C875334DB798D57A1", "transactionDocument": "91133D5715FA429C875334DB798D57A1", "warehouse" : "0B3E1D8D0FCB44FB81EA1A3FF158B086", "lines": [ { "product": "WVG/L0014", "qty": 1, "grossAmount": 135, "netAmount": 111.57, "taxAmount": 23.43, "taxLines": { "Entregas IVA 21%": { "rate": 21, "netAmount": 111.57, "taxAmount": 23.43 } } }, ], "taxes": { "Entregas IVA 21%": { "rate": 21, "grossAmount": 135, "netAmount": 111.57, "taxAmount": 23.43 } } } ] } We have registered a sale in "Magento" posTerminal, and we want to load a ticket in Posets Store with the Posets Store Warehouse, but linked to the Magento posTerminal. This is a common scenario when working with e-commerce and OMS, where the sale happens in an e-commerce solution and the order will be delivered by a different organization within the cross store. If we try to load this JSON with the External Order Loader, it will fail with the following error: "Value 0B3E1D8D0FCB44FB81EA1A3FF158B086 does not resolve to an instance of Warehouse" Note that 0B3E1D8D0FCB44FB81EA1A3FF158B086 is the Posets Warehouse Id. However, if we try to manually enter the ticket in the ERP it will work fine. The problem is when the external order loader tries to find the warehouse [ExternalOrderLoader.resolve()]. In that moment it automatically adds a filter by the organization's natural tree to search for the warehouse from the provided ID. This looks OK, but the organization is taken from the posTerminal one (in our case Magento), so it fails because Posets is a Magento's sibling. | |||||||
Steps To Reproduce | Try to load the above JSON using the External Order Loader. An error "Value 0B3E1D8D0FCB44FB81EA1A3FF158B086 does not resolve to an instance of Warehouse" is returned | |||||||
Proposed Solution | Two possible solution I see. Please evaluate them internally and decide the best approach: 1. If an organization is passed as part of the json file, use this organization to filter by its natural tree when resolving a json property. 2. Take the posTerminal organization and search for the related cross store organization. If defined, take it as the one for the filter. I attached a proposed solution for the second option | |||||||
Tags | DemoImprovementProgram | |||||||
Attached Files | crossStore_ExternalOrderLoader.diff [^] (1,073 bytes) 2021-04-29 17:31 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Issue History | |||
Date Modified | Username | Field | Change |
2021-04-29 17:31 | vmromanos | New Issue | |
2021-04-29 17:31 | vmromanos | Assigned To | => Retail |
2021-04-29 17:31 | vmromanos | File Added: crossStore_ExternalOrderLoader.diff | |
2021-04-29 17:31 | vmromanos | Triggers an Emergency Pack | => No |
2021-04-29 17:51 | marvintm | Resolution time | => 1621461600 |
2021-05-04 07:31 | ranjith_qualiantech_com | Assigned To | Retail => ranjith_qualiantech_com |
2021-05-04 07:32 | ranjith_qualiantech_com | Status | new => scheduled |
2021-05-10 07:20 | ranjith_qualiantech_com | Assigned To | ranjith_qualiantech_com => Retail |
2021-05-10 16:03 | rqueralta | Assigned To | Retail => rqueralta |
2021-05-13 05:58 | hgbot | Note Added: 0128052 | |
2021-05-24 06:42 | marvintm | Resolution time | 1621461600 => 1622066400 |
2021-05-26 22:02 | hgbot | Note Added: 0128688 | |
2021-05-27 11:59 | xplacesc | Tag Attached: DemoImprovementProgram | |
2021-06-01 00:31 | hgbot | Note Added: 0128826 | |
2021-06-01 15:13 | hgbot | Note Added: 0128863 | |
2021-06-01 22:28 | hgbot | Note Added: 0128892 | |
2021-06-02 09:24 | hgbot | Resolution | open => fixed |
2021-06-02 09:24 | hgbot | Status | scheduled => closed |
2021-06-02 09:24 | hgbot | Fixed in Version | => RR21Q3 |
2021-06-02 09:24 | hgbot | Note Added: 0128921 | |
2021-06-02 09:24 | hgbot | Note Added: 0128922 |
Copyright © 2000 - 2009 MantisBT Group |