Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0052466
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajoralways2023-05-16 18:422023-06-20 09:19
ReporterkchoperenaView Statuspublic 
Assigned Tosreehari 
PriorityhighResolutionfixedFixed in VersionRR23Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Statusapproved
Review Assigned To
OBNetwork customerGold
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0052466: ExternalOrderLoader fails updating or shipping if the BP has 2 shipping address with the same name and only one for invoicing

DescriptionThe ExternalOrderLoader has some checks regarding the business partner address information. There is a logic that throws an error when a customer has a shipping address and not an invoicing address

The error happens before this check. We are trying to obtain wrongly the addresses

Situation
The customer has:
   - 1 invoicing address
   - 2 shipping address with the same business partner location name

As the getAddressIdFromAddressName is wrongly checking the size of location list to return the first one, the ExternalOrderLoader is throwing an exception:

throw new OBException("Invoice location is missing for bp " + bpId + " for order json " + orderJson + " while shipping location is defined");
Steps To Reproduce1.- In Web POS, create a new customer with different invoices for shipping and invoicing
2.- Create exactly the same address for shipping an assign it to the ticket
3.- Complete the ticket
4.- Using any REST tool, update the created order using the ExternalOrderLoader. You can also create it or whatever. The key is to use the same customer

RESULT:
The next error message will be received in the response ->

Invoice location is missing for bp 04326D2A5A03701125298C8796043335 for order json
Proposed SolutionCheck in ExternalOrderLoader/getAddressIdFromAddressName method, that the size of result list is bigger than 0 instead of 1
TagsNo tags attached.
Attached Filesdiff file icon patch52466.diff [^] (606 bytes) 2023-05-16 18:43 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0150969)
hgbot (developer)
2023-06-09 07:16

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1237 [^]
(0151349)
hgbot (developer)
2023-06-20 09:19

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1237 [^]
(0151350)
hgbot (developer)
2023-06-20 09:19

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 40a730eb6974eda9c438a5605167059627383d9d
Author: Sreehari Venkataraman <sreehari@qualiantech.com>
Date: 20-06-2023 06:19:01
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/40a730eb6974eda9c438a5605167059627383d9d [^]

Fixes ISSUE-52466: Added address validation in ExternalOrderLoader
*added isActive checks in query
*added method overloading for getAddressIdFromAddressName
*Handled null Boolean exception using BooleanUtils

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
---

- Issue History
Date Modified Username Field Change
2023-05-16 18:42 kchoperena New Issue
2023-05-16 18:42 kchoperena Assigned To => Triage Platform Conn
2023-05-16 18:42 kchoperena OBNetwork customer => Gold
2023-05-16 18:42 kchoperena Triggers an Emergency Pack => No
2023-05-16 18:43 kchoperena File Added: patch52466.diff
2023-05-18 17:13 adrianromero Assigned To Triage Platform Conn => Retail
2023-05-19 08:57 sreehari Assigned To Retail => sreehari
2023-05-19 08:58 sreehari Status new => scheduled
2023-06-09 07:16 hgbot Merge Request Status => open
2023-06-09 07:16 hgbot Note Added: 0150969
2023-06-20 09:10 hgbot Merge Request Status open => approved
2023-06-20 09:19 hgbot Resolution open => fixed
2023-06-20 09:19 hgbot Status scheduled => closed
2023-06-20 09:19 hgbot Note Added: 0151349
2023-06-20 09:19 hgbot Fixed in Version => RR23Q3
2023-06-20 09:19 hgbot Note Added: 0151350


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker