Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033961Retail ModulesWeb POSpublic2016-09-13 11:442016-12-08 18:04
marvintm 
asiermartirena 
urgentmajoralways
closedfixed 
5
 
RR17Q1 
marvintm
No
No
0033961: Keeping track of deleted tickets is generating incorrect data
Since 16Q2, it is possible to configure the Openbravo instance so that relevant deleted tickets are synchronized to the backend:

http://wiki.openbravo.com/wiki/Projects:Keep_Track_Of_Deleted_Ticket_Lines [^]

The idea is that these tickets would be changed so that their ordered quantity is set to zero. This works correctly, but there are several parts of the ticket which should be changed, and currently are not being set correctly. Specifically:

- Taxes (at both document and line level) should be zero, and currently are not.
- Totals at line level (both net and gross) should be zero, and currently are not.
- Discount information should also be discussed.

- Activate the functionality to keep track of deleted tickets, creating a preference for property "Web POS Save Removed Tickets"
- Create a ticket in the Web POS. Add some lines to it.
- Delete the ticket via the "Delete ticket" button.
- Check the ticket in the backend, and verify that tax information is not empty, and line totals are not zero.
Currently there is code in the OrderLoader that zeroes the totals of the header, and also the quantity of the lines. I believe a better approach would be to change the functionality so that the ticket in the client side is modified, by setting the quantity of each line to zero, and then recomputing the ticket using the existing calculateReceipt function in the client side.

In this way, the code would be much cleaner, the OrderLoader would not need to even know about the functionality, and would just save the modified ticket as it is.
No tags attached.
depends on backport 0034187RR16Q4 closed asiermartirena Keeping track of deleted tickets is generating incorrect data 
depends on backport 0034709RR16Q3.4 closed ranjith_qualiantech_com Keeping track of deleted tickets is generating incorrect data 
Issue History
2016-09-13 11:44marvintmNew Issue
2016-09-13 11:44marvintmAssigned To => Retail
2016-09-13 11:44marvintmOBNetwork customer => No
2016-09-13 11:44marvintmTriggers an Emergency Pack => No
2016-09-13 11:45marvintmAssigned ToRetail => eduardo_Argal
2016-09-27 12:08hgbotCheckin
2016-09-27 12:08hgbotNote Added: 0090295
2016-09-27 12:08hgbotStatusnew => resolved
2016-09-27 12:08hgbotResolutionopen => fixed
2016-09-27 12:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/97c95e2c63c9c9b72f43085bf624a58c6b32a41d [^]
2016-09-27 12:10hgbotCheckin
2016-09-27 12:10hgbotNote Added: 0090296
2016-09-27 12:12hgbotCheckin
2016-09-27 12:12hgbotNote Added: 0090297
2016-09-27 14:12hgbotCheckin
2016-09-27 14:12hgbotNote Added: 0090302
2016-09-29 15:42marvintmAssigned Toeduardo_Argal => asiermartirena
2016-10-10 18:39marvintmNote Added: 0090520
2016-10-10 18:39marvintmStatusresolved => new
2016-10-10 18:39marvintmResolutionfixed => open
2016-10-11 12:50asiermartirenaStatusnew => scheduled
2016-10-26 08:54hgbotCheckin
2016-10-26 08:54hgbotNote Added: 0090888
2016-10-26 08:55hgbotCheckin
2016-10-26 08:55hgbotNote Added: 0090889
2016-12-07 17:54marvintmStatusscheduled => resolved
2016-12-07 17:54marvintmFixed in Version => RR17Q1
2016-12-07 17:54marvintmResolutionopen => fixed
2016-12-08 09:23marvintmStatusresolved => new
2016-12-08 09:23marvintmResolutionfixed => open
2016-12-08 09:23marvintmFixed in VersionRR17Q1 =>
2016-12-08 09:23marvintmStatusnew => scheduled
2016-12-08 09:23marvintmStatusscheduled => resolved
2016-12-08 09:23marvintmResolutionopen => fixed
2016-12-08 18:04marvintmReview Assigned To => marvintm
2016-12-08 18:04marvintmStatusresolved => closed
2016-12-08 18:04marvintmFixed in Version => RR17Q1

Notes
(0090295)
hgbot   
2016-09-27 12:08   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 97c95e2c63c9c9b72f43085bf624a58c6b32a41d
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Sep 27 12:07:45 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/97c95e2c63c9c9b72f43085bf624a58c6b32a41d [^]

Fixed issue 33961: Delete tickets was generating wrong data

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
M web/org.openbravo.retail.posterminal/js/closecash/model/cashup-model.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0090296)
hgbot   
2016-09-27 12:10   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: ec86993441f360d60a0e2e05c4a1ed43fe63c4a8
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Sep 27 12:10:18 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/ec86993441f360d60a0e2e05c4a1ed43fe63c4a8 [^]

Related to issue 33961: Calculate receipt used to generate errors with lines with qty 0

---
M web/org.openbravo.retail.discounts/js/promotion-manual.js
---
(0090297)
hgbot   
2016-09-27 12:12   
Repository: tools/automation/pi-mobile
Changeset: 818cf988e366a59c2c07539e2926c41a31946d82
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Sep 27 12:12:17 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/818cf988e366a59c2c07539e2926c41a31946d82 [^]

Related to issue 33961: Modified test to the code changes

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/DeleteTicket.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/DeleteTicketWithDeletedLines.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I33759_DeleteReceiptLinesToZero.java
---
(0090302)
hgbot   
2016-09-27 14:12   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2880ac1e1cd0a4afbc049fa2c03787c1083a07e3
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Sep 27 14:11:42 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2880ac1e1cd0a4afbc049fa2c03787c1083a07e3 [^]

Related to issue 33961: Changes property names and comments

---
M web/org.openbravo.retail.posterminal/js/closecash/model/cashup-model.js
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0090520)
marvintm   
2016-10-10 18:39   
It seems there are problems with at least one discount rule. For example, create a ticket with three units of "GPS Handheld". Delete it, and verify that it fails in the following line:

    if (oldDiscountedLinePrice < OB.DEC.div(totalDiscount, line.getQty())) {
      totalDiscount = OB.DEC.mul(oldDiscountedLinePrice, line.getQty());
    }

Of the discount rule with id: 697A7AB9FD9C4EE0A3E891D3D3CCA0A7
(0090888)
hgbot   
2016-10-26 08:54   
Repository: erp/pmods/org.openbravo.retail.discounts
Changeset: 893bc9cbf8290af3ba08b1f9def517932cdbbc97
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Oct 26 08:54:00 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.discounts/rev/893bc9cbf8290af3ba08b1f9def517932cdbbc97 [^]

Related to issue 33961: fixed problem deleting ticket with promotion discount

---
M web/org.openbravo.retail.discounts/js/promotion-discount.js
---
(0090889)
hgbot   
2016-10-26 08:55   
Repository: tools/automation/pi-mobile
Changeset: 9fb461b8cb58d5df40f8d6699e3c80e801d6d271
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Oct 26 08:55:31 2016 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/9fb461b8cb58d5df40f8d6699e3c80e801d6d271 [^]

Related to issue 33961: Automated test for deleting tickets with a promotion discount

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I34187_DeleteTicketWithPercentageDiscount.java
---