Openbravo Issue Tracking System - Retail Modules
View Issue Details
0030741Retail ModulesLayaway orderpublic2015-09-02 13:502015-10-20 10:10
malsasua 
mario_castello 
highmajoralways
closedfixed 
20Community Appliance
RR15Q3 
RR15Q4 
guilleaer
No
0030741: when layaway is paid, the shipment can be created wrongly
when a layaway is paid, the shipments lines can be created with incorrect quantities.
no steps to reproduce, but checking the code:

. in this line[1], the order lines in var "lineReferences" are loaded sorted by the function getOrderLineList()
[1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/ed027ed9e893/src/org/openbravo/retail/posterminal/OrderLoader.java#l235 [^]

. in this line[2], the order lines in var orderLines are loaded from the Json
[2] https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/ed027ed9e893/src/org/openbravo/retail/posterminal/OrderLoader.java#l899 [^]

and the JSON is retrieved from POS, and in POS the lines are loaded with this SQL (without order by):
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/ed027ed9e893/src/org/openbravo/retail/posterminal/PaidReceipts.java#l91 [^]


To create the shipment lines, the qty is retrieved from var lineReferences:
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/ed027ed9e893/src/org/openbravo/retail/posterminal/OrderLoader.java#l903 [^]

and the rest of info of line is retrieved from var
orderlines.getJSONObject(i):
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/ed027ed9e893/src/org/openbravo/retail/posterminal/OrderLoader.java#l1028 [^]

And the elements can be ordered distinct in the two arrays


Module script should be done
No tags attached.
depends on backport 0030981RR15Q3.2 closed mario_castello when layaway is paid, the shipment can be created wrongly 
depends on backport 0030982RR15Q2.6 closed mario_castello when layaway is paid, the shipment can be created wrongly 
Issue History
2015-09-02 13:50malsasuaNew Issue
2015-09-02 13:50malsasuaAssigned To => Retail
2015-09-02 13:50malsasuaResolution time => 1443823200
2015-09-02 13:50malsasuaTriggers an Emergency Pack => No
2015-09-08 15:58mario_castelloAssigned ToRetail => mario_castello
2015-09-08 20:30mario_castelloStatusnew => scheduled
2015-09-14 22:17hgbotCheckin
2015-09-14 22:17hgbotNote Added: 0080391
2015-09-14 22:17hgbotStatusscheduled => resolved
2015-09-14 22:17hgbotResolutionopen => fixed
2015-09-14 22:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6cdf3bede0b50d62d4e6b57057011b8ab92aaf95 [^]
2015-09-24 23:57hgbotCheckin
2015-09-24 23:57hgbotNote Added: 0080628
2015-09-25 11:02OrekariaReview Assigned To => guilleaer
2015-09-28 16:54guilleaerNote Added: 0080669
2015-09-28 16:54guilleaerStatusresolved => new
2015-09-28 16:54guilleaerResolutionfixed => open
2015-09-29 19:19hgbotCheckin
2015-09-29 19:19hgbotNote Added: 0080722
2015-09-29 19:19hgbotStatusnew => resolved
2015-09-29 19:19hgbotResolutionopen => fixed
2015-09-29 19:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6cdf3bede0b50d62d4e6b57057011b8ab92aaf95 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/eee715f8f9d4f46fbe864fa75b47d172bd50b882 [^]
2015-09-29 23:03hgbotCheckin
2015-09-29 23:03hgbotNote Added: 0080728
2015-09-30 07:51guilleaerNote Added: 0080729
2015-09-30 07:51guilleaerStatusresolved => closed
2015-09-30 07:51guilleaerFixed in Version => RR15Q4
2015-09-30 09:28marvintmStatusclosed => new
2015-09-30 09:28marvintmResolutionfixed => open
2015-09-30 09:28marvintmFixed in VersionRR15Q4 =>
2015-09-30 09:28marvintmStatusnew => acknowledged
2015-09-30 09:28marvintmStatusacknowledged => scheduled
2015-09-30 09:28marvintmStatusscheduled => resolved
2015-09-30 09:28marvintmResolutionopen => fixed
2015-09-30 09:28marvintmStatusresolved => new
2015-09-30 09:28marvintmResolutionfixed => open
2015-09-30 09:28marvintmStatusnew => acknowledged
2015-09-30 09:28marvintmStatusacknowledged => scheduled
2015-09-30 09:29marvintmStatusscheduled => resolved
2015-09-30 09:29marvintmFixed in Version => RR15Q4
2015-09-30 09:29marvintmResolutionopen => fixed
2015-09-30 09:29marvintmStatusresolved => closed
2015-10-20 10:10hgbotCheckin
2015-10-20 10:10hgbotNote Added: 0081112

Notes
(0080391)
hgbot   
2015-09-14 22:17   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 6cdf3bede0b50d62d4e6b57057011b8ab92aaf95
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Mon Sep 14 10:25:06 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/6cdf3bede0b50d62d4e6b57057011b8ab92aaf95 [^]

Fixed issue 30741: Create lineReferences list based on json lines

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0080628)
hgbot   
2015-09-24 23:57   
Repository: tools/automation/pi-mobile
Changeset: 9b75bf2b864288c11cd1d9cd279431bce0d234fd
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Thu Sep 24 15:57:08 2015 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/9b75bf2b864288c11cd1d9cd279431bce0d234fd [^]

Related to issue 30741: Automation test to verify the quantity of each line in shipmnet

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I30741_LayawayVerifyShipmentLineQuantity.java
---
(0080669)
guilleaer   
2015-09-28 16:54   
The fix is not valid because you can have several lines with the same product. In that case the fix is not working.

Use GPS handheld (not grouped product to test)

I've been able to create a wrong shipment generating a layaway like that:

GPS handheld -> 1units
Adhesive body warmer -> 2units
GPS handheld -> 3units

After pay the layaway the shipments amounts will be wrong (both shipments lines qty for product GPS handheld will be one)
(0080722)
hgbot   
2015-09-29 19:19   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: eee715f8f9d4f46fbe864fa75b47d172bd50b882
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Sep 29 11:18:51 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/eee715f8f9d4f46fbe864fa75b47d172bd50b882 [^]

Fixed issue 30741: Restore to previous change and sort the list by lineNo

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0080728)
hgbot   
2015-09-29 23:03   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dc96c55f48c1f9d1134a87d33ea102cd2457a34e
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Sep 29 15:02:08 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dc96c55f48c1f9d1134a87d33ea102cd2457a34e [^]

Related to issue 30741: Change the Collection.sort with load the ordered lines

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0080729)
guilleaer   
2015-09-30 07:51   
tested and verified
(0081112)
hgbot   
2015-10-20 10:10   
Repository: tools/automation/pi-mobile
Changeset: 75aa963034ff5e71b0b1d70b3a93f570722b4486
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Tue Oct 20 10:03:21 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/75aa963034ff5e71b0b1d70b3a93f570722b4486 [^]

Related to issue 30741: Deactivated the 'I30741_LayawayVerifyShipmentLineQuantity' test until fixed

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/layaway/I30741_LayawayVerifyShipmentLineQuantity.java
---