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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033961
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2016-09-13 11:442016-12-08 18:04
ReportermarvintmView Statuspublic 
Assigned Toasiermartirena 
PriorityurgentResolutionfixedFixed in VersionRR17Q1
StatusclosedFix in branchFixed in SCM revision97c95e2c63c9
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Status
Review Assigned Tomarvintm
OBNetwork customerNo
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033961: Keeping track of deleted tickets is generating incorrect data

DescriptionSince 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.

Steps To Reproduce- 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.
Proposed SolutionCurrently 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0034187RR16Q4 closedasiermartirena Keeping track of deleted tickets is generating incorrect data 
depends on backport 0034709RR16Q3.4 closedranjith_qualiantech_com Keeping track of deleted tickets is generating incorrect data 

-  Notes
(0090295)
hgbot (developer)
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 (developer)
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 (developer)
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 (developer)
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 (viewer)
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 (developer)
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 (developer)
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
---

- Issue History
Date Modified Username Field Change
2016-09-13 11:44 marvintm New Issue
2016-09-13 11:44 marvintm Assigned To => Retail
2016-09-13 11:44 marvintm OBNetwork customer => No
2016-09-13 11:44 marvintm Triggers an Emergency Pack => No
2016-09-13 11:45 marvintm Assigned To Retail => eduardo_Argal
2016-09-27 12:08 hgbot Checkin
2016-09-27 12:08 hgbot Note Added: 0090295
2016-09-27 12:08 hgbot Status new => resolved
2016-09-27 12:08 hgbot Resolution open => fixed
2016-09-27 12:08 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/97c95e2c63c9c9b72f43085bf624a58c6b32a41d [^]
2016-09-27 12:10 hgbot Checkin
2016-09-27 12:10 hgbot Note Added: 0090296
2016-09-27 12:12 hgbot Checkin
2016-09-27 12:12 hgbot Note Added: 0090297
2016-09-27 14:12 hgbot Checkin
2016-09-27 14:12 hgbot Note Added: 0090302
2016-09-29 15:42 marvintm Assigned To eduardo_Argal => asiermartirena
2016-10-10 18:39 marvintm Note Added: 0090520
2016-10-10 18:39 marvintm Status resolved => new
2016-10-10 18:39 marvintm Resolution fixed => open
2016-10-11 12:50 asiermartirena Status new => scheduled
2016-10-26 08:54 hgbot Checkin
2016-10-26 08:54 hgbot Note Added: 0090888
2016-10-26 08:55 hgbot Checkin
2016-10-26 08:55 hgbot Note Added: 0090889
2016-12-07 17:54 marvintm Status scheduled => resolved
2016-12-07 17:54 marvintm Fixed in Version => RR17Q1
2016-12-07 17:54 marvintm Resolution open => fixed
2016-12-08 09:23 marvintm Status resolved => new
2016-12-08 09:23 marvintm Resolution fixed => open
2016-12-08 09:23 marvintm Fixed in Version RR17Q1 =>
2016-12-08 09:23 marvintm Status new => scheduled
2016-12-08 09:23 marvintm Status scheduled => resolved
2016-12-08 09:23 marvintm Resolution open => fixed
2016-12-08 18:04 marvintm Review Assigned To => marvintm
2016-12-08 18:04 marvintm Status resolved => closed
2016-12-08 18:04 marvintm Fixed in Version => RR17Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker