Openbravo Issue Tracking System - Modules
View Issue Details
0049779ModulesAdvanced Warehouse Operationspublic2022-07-11 14:462022-08-02 14:18
avicente 
Triage Omni WMS 
highmajoralways
closedinvalid 
5
 
 
vmromanos
0049779: Distribution Order API bug when close DOi after update "qtyIssued"
When a DOi is closed through the API afte updating the "qtyIssued", the corresponding DOr is not closed, see the following video with audio https://drive.google.com/file/d/17sis3CcV4oKwLKkTkOGhyt4kBgzfdjU1/view [^]
1. Create a DOi through the API.
2. Update the "qtyIssued" for the previously created DOi through the API.
3. Close the previously created DOi through the API.
BUG: The mirrow DOr is not closed --> AVI 20220713: it is NOT a BUT, see https://issues.openbravo.com/view.php?id=49779#c139270 [^]

4. Close the mirrow DOr through the API.
BUG: a new DOr and a new DOi are created instead to close the existing DOr. --> AVI 20220713: Now, a record is uniquely identifies using following 3 properties: 1. documentNo; 2. Organization; 3. isIssue.
In that case, It is not possible to close a DOr from the API if it has the same documentNo that the DOi (preference: Copy Document Number in Distribution Orders=Y) and received qty <> issued qty. It should be a way to do that.


See the following video with audio https://drive.google.com/file/d/17sis3CcV4oKwLKkTkOGhyt4kBgzfdjU1/view [^]
FASH
related to feature request 0049426 closed Triage Omni WMS Openbravo ERP Openbravo API to support Distribution Order 
Issue History
2022-07-11 14:46avicenteNew Issue
2022-07-11 14:46avicenteAssigned To => Triage Omni WMS
2022-07-11 14:49avicenteTag Attached: FASH
2022-07-11 14:49avicenteRelationship addedrelated to 0049426
2022-07-12 15:52prakashmurugesan88Note Added: 0139270
2022-07-13 15:12avicenteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24481#r24481
2022-08-02 14:18vmromanosReview Assigned To => vmromanos
2022-08-02 14:18vmromanosNote Added: 0139815
2022-08-02 14:18vmromanosStatusnew => closed
2022-08-02 14:18vmromanosResolutionopen => invalid
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0139270)
prakashmurugesan88   
2022-07-12 15:52   
Mirrow DOr will not be closed if there is pending received,

Following is the logic,
// order==receipt: always close the referenced order which is an issue
// order==issue: only close the receipt (referenced) order if all are received

https://gitlab.com/openbravo/product/mods/org.openbravo.distributionorder/-/blob/master/src/org/openbravo/distributionorder/erpCommon/utility/ProcessDistributionOrderUtil.java#L461 [^]
(0139815)
vmromanos   
2022-08-02 14:18   
I reviewed your video. I think it's working as expected:

1. The DOr is not closed automatically because there is something pending to be received (you sent 5 units but you didn't receive them yet). If everything sent in the DOi is already received, then the DOr would be automatically closed.
If you really want to close the DOr you need to manually close it (but not through the DOi close)...

2. And related to this, in the second part of the video (1:52) the system is creating a CLOSED DOr because there is no DOr in the EUR_Sandro_FR organization (so the process creates a new one). You did change the isIssue property [OK], but you missed to change the organization.