Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039067Retail ModulesWeb POSpublic2018-07-30 15:522018-09-12 21:33
gorka_gil 
gorka_gil 
normalmajoralways
closedfixed 
5
 
RR18Q4 
marvintm
No
0039067: isDelivered not set when using cancel and replace
When doing a cancel and replace, and adding more lines, the isDelivered property is not set.
Test of pi-mobile: CancelAndRplReturn

1- Create ticket with 2 lines
2- Open again the ticket, and choose in the menu: cancel and replace
3- Add two more lines, and pay the ticket

Go to the backend database and run this query:
select documentno, isdelivered, docstatus, grandtotal, created from c_order order by created desc limit 3;

The 3rd line will be the original ticket that has the isDelivered to true.

The 2nd line will have the new ticket that has 2 lines canceled and 2 new lines, and because has 2 new lines the isDelived should be set to true since has shipments.

As rule: the order should have set the isDelivered to true always that at least has a shipment that don't have set the field isNettingShipment to true.
No tags attached.
Issue History
2018-07-30 15:52gorka_gilNew Issue
2018-07-30 15:52gorka_gilAssigned To => Retail
2018-07-30 15:52gorka_gilTriggers an Emergency Pack => No
2018-07-30 15:55gorka_gilAssigned ToRetail => gorka_gil
2018-07-30 15:56gorka_gilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17472#r17472
2018-08-09 17:55hgbotCheckin
2018-08-09 17:55hgbotNote Added: 0106270
2018-08-09 17:55hgbotStatusnew => resolved
2018-08-09 17:55hgbotResolutionopen => fixed
2018-08-09 17:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9bcad65c8197cf6192532e3129a51101debe3e0c [^]
2018-08-23 11:29marvintmNote Added: 0106462
2018-08-23 11:29marvintmStatusresolved => new
2018-08-23 11:29marvintmResolutionfixed => open
2018-08-27 14:08gorka_gilNote Added: 0106495
2018-08-27 14:08gorka_gilStatusnew => scheduled
2018-08-27 14:08gorka_gilStatusscheduled => resolved
2018-08-27 14:08gorka_gilResolutionopen => fixed
2018-08-27 14:31gorka_gilStatusresolved => new
2018-08-27 14:31gorka_gilResolutionfixed => open
2018-08-27 14:33gorka_gilNote Added: 0106498
2018-08-30 15:05hgbotCheckin
2018-08-30 15:05hgbotNote Added: 0106542
2018-08-30 15:06hgbotCheckin
2018-08-30 15:06hgbotNote Added: 0106543
2018-08-30 15:07hgbotCheckin
2018-08-30 15:07hgbotNote Added: 0106544
2018-08-30 15:10gorka_gilStatusnew => scheduled
2018-08-30 15:10gorka_gilStatusscheduled => resolved
2018-08-30 15:10gorka_gilResolutionopen => fixed
2018-09-07 09:53hgbotCheckin
2018-09-07 09:53hgbotNote Added: 0106638
2018-09-07 09:54hgbotCheckin
2018-09-07 09:54hgbotNote Added: 0106639
2018-09-12 17:37marvintmReview Assigned To => marvintm
2018-09-12 17:37marvintmStatusresolved => closed
2018-09-12 17:37marvintmFixed in Version => RR18Q4
2018-09-12 21:33hudsonbotCheckin
2018-09-12 21:33hudsonbotNote Added: 0106721
2018-09-12 21:33hudsonbotCheckin
2018-09-12 21:33hudsonbotNote Added: 0106726

Notes
(0106270)
hgbot   
2018-08-09 17:55   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 9bcad65c8197cf6192532e3129a51101debe3e0c
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Mon Jul 30 17:49:01 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/9bcad65c8197cf6192532e3129a51101debe3e0c [^]

[Verified Returns Refactor] Fixes issue 39067: fix isDelivered flag when using cancel and replace

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0106462)
marvintm   
2018-08-23 11:29   
Fix cannot be correct, the logic added is functionally useless:

- if (line.getGoodsShipmentLine() != null) {
+ if (!hasShipment && line.getMaterialMgmtShipmentInOutLineList().size() > 0) {
                 hasShipment = true;
               }
hasShipment is initially false. The condition "&& !hasShipment" has been added, which initially will always be true because hasShipment is always false initially. The only thing the if does is change hasShipment to true. Therefore, the logic initially doesn't prevent the execution of "hasShipment=true", and the only thing it does afterwards is prevent it being executed again, but those subsequent executions would have made no difference.

This needs to be reviewed, maybe we don't need any further fix, but in any case, the current change should be removed as it is confusing.
(0106495)
gorka_gil   
2018-08-27 14:08   
hasShipment is only to not execute the query in case of not need.

the real change is:
  line.getGoodsShipmentLine()
vs:
  line.getMaterialMgmtShipmentInOutLineList().size()
(0106498)
gorka_gil   
2018-08-27 14:33   
Asier is doing a fix in a different way
(0106542)
hgbot   
2018-08-30 15:05   
Repository: erp/devel/pi
Changeset: 1cadd83c2d38acc6ed70329fb9a3746e5465091e
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Aug 27 13:19:45 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1cadd83c2d38acc6ed70329fb9a3746e5465091e [^]

Related to issue 39067: The delivered property is not being correctly set for C&R

If the canceled order was delivered and the associateShipmentToNewReceipt preference is set, the new order will also be delivered. Instead of doing a query, the delivered status is checked to know the previous status.
A netting shipment doesn't count as delivered.

---
M src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java
---
(0106543)
hgbot   
2018-08-30 15:06   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d5a69c1b8ed3b88c88d03173ea654cec71edaebd
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Aug 27 13:21:36 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d5a69c1b8ed3b88c88d03173ea654cec71edaebd [^]

Related to issue 39067: The delivered property is not being correctly set for C&R

Set the delivered property depending on the createShipment variable.
If the C&R process changes the order's delivered status, it is done into the CancelAndReplaceUtils class.

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0106544)
hgbot   
2018-08-30 15:07   
Repository: tools/automation/pi-mobile
Changeset: 206da9600c9be7696cb5347800480553fd3a5079
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Aug 29 09:06:12 2018 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/206da9600c9be7696cb5347800480553fd3a5079 [^]

Related to issue 39067: Automated test modified

---
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/RetailOrderLoaderTest.java
---
(0106638)
hgbot   
2018-09-07 09:53   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 68ccf3bf2db45aebe006ab7d2ee60e05210ea2be
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Sep 03 15:29:51 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/68ccf3bf2db45aebe006ab7d2ee60e05210ea2be [^]

Related to issue 39067: Change in the isDelivered flag

It is set to true when the full ticket is delivered.

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0106639)
hgbot   
2018-09-07 09:54   
Repository: erp/devel/pi
Changeset: 2d2e28bdaba749c1e86da86f51d3a79f83d95149
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Mon Sep 03 15:32:44 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2d2e28bdaba749c1e86da86f51d3a79f83d95149 [^]

Related to issue 39067: Change in the isDelivered flag

All canceled order have now the isDelivered flag to true (both canceled and cancelling orders).

---
M src/org/openbravo/erpCommon/businessUtility/CancelAndReplaceUtils.java
---
(0106721)
hudsonbot   
2018-09-12 21:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad75d3cb1744 [^]
Maturity status: Test
(0106726)
hudsonbot   
2018-09-12 21:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad75d3cb1744 [^]
Maturity status: Test