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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035741
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2017-04-10 12:382017-12-15 14:49
ReporterasiermartirenaView Statuspublic 
Assigned Toasiermartirena 
PriorityhighResolutionfixedFixed in VersionRR18Q1
StatusclosedFix in branchFixed in SCM revision2e1a0d0d1e2d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression levelProduction - QA Approved
Regression date2016-11-21
Regression introduced in releaseRR17Q1
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5f071a4d8d3e [^]
Triggers an Emergency PackNo
Summary

0035741: Deleted lines are not correctly stored in backend

DescriptionWhen having the save removed lines property activated for web pos, the deleted lines are not correctly saved in backend.

Initially (in the reported commit) only was a problem when removing multiple lines. The lines net and gross amounts were not correctly updated (were not set to 0). Now, also is failing when deleting a single line. I haven't found the commit which causes this second regression.
Steps To ReproduceEnable the 'delete line' functionality.

Delete a line and check that the data is not correctly saved.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035544 closedadrianromero [SER-QA 2610] Divide by 0 error in taxes calculation when deleting a line in a receipt with an especial configuration 
related to defect 0035797 closedmario_castello [SER-QA 2949] Deleted ticket does not store service lines deleted 
related to defect 0038342 closedranjith_qualiantech_com [RR18Q2] Tax labels are not removed when all lines of a receipt are deleted 

-  Notes
(0096035)
hgbot (developer)
2017-04-13 05:32

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2d8ca4ee2032917285875bee8ea931a02b8fc2aa
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed Apr 12 13:56:37 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2d8ca4ee2032917285875bee8ea931a02b8fc2aa [^]

Fixed issue 0035741: Deleted lines are not correctly stored in backend

- Refactor the hook OBPOS_PreDeleteLine that call the function deleteLines in all case
- Refactor the function deleteLines that executed always to delete one line or multiple lines at a time
- Moved some code to new function removesLines that control de deleted lines and the callback
- Set the line propertys and call calculateReceipt before executed the delete lines process

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
---
(0096036)
hgbot (developer)
2017-04-13 05:35

Repository: tools/automation/pi-mobile
Changeset: d22df88ce399f9eb3b7235aefe629d40284b7259
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Apr 11 11:14:25 2017 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/d22df88ce399f9eb3b7235aefe629d40284b7259 [^]

Verifies issue 35741: Added automated test 'I35741_VerifyOrderWithDeleteLine'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I35741_VerifyOrderWithDeleteLine.java
---
(0096037)
hgbot (developer)
2017-04-13 05:35

Repository: tools/automation/pi-mobile
Changeset: 6eb9b19e0cba6966ac8ffd04221a4cc4f4d6ebf5
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Apr 11 11:26:49 2017 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/6eb9b19e0cba6966ac8ffd04221a4cc4f4d6ebf5 [^]

Verifies issue 35741: Added automated test 'I35741_VerifyOrderWithDeleteMultiLine'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I35741_VerifyOrderWithDeleteMultiLine.java
---
(0096049)
adrianromero (manager)
2017-04-18 10:23
edited on: 2017-04-18 18:23

After this fix, when deleting a receipt that has lines with products and services associated to products. In the backed the deleted receipt is stored with the product lines with quantity 0, but services lines are completely deleted, do not appear in the backend. It is expected to appear with quantity 0 too.

Actually this issue has not been introduced by this fix, is has been reported as issue 35741.

(0096050)
adrianromero (manager)
2017-04-18 10:25

Because the code involved in this fix is very close to the fix of issue 35544. It has to be verified when fixing this issue that issue 35544 continues working properly and the deleted receipt is properly stored in the backend.
(0096056)
adrianromero (manager)
2017-04-18 18:30

After this fix when deleting a line with services and then deleting the receipt or adding another product and completing the receipt, in the backend the deleted product line is stored with quantity 0 (OK) but the deleted service line is stored with quantity 1 (Wrong)
(0096070)
hgbot (developer)
2017-04-19 21:36

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2e1a0d0d1e2d3b670ffed5d45a800c3683c94d83
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed Apr 19 11:10:10 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2e1a0d0d1e2d3b670ffed5d45a800c3683c94d83 [^]

Fixed issue 0035741: Deleted lines are not correctly stored in backend

- Create two new function OB.DATA.LineTaxesIncPrice and OB.DATA.LineTaxesExcPrice to call caculate line taxes for one line of the receipt
- Added validation that prevent delete lines when the preference save remove ticket is active

---
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0096071)
hgbot (developer)
2017-04-19 21:38

Repository: tools/automation/pi-mobile
Changeset: 136aea1d415ca5068d0404c70dfcb5fe8ff03463
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Wed Apr 19 11:13:24 2017 -0600
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/136aea1d415ca5068d0404c70dfcb5fe8ff03463 [^]

Verifies issue 35741: Added automated test 'I35741_VerifyRemoveLinesWithServices'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I35741_VerifyRemoveLinesWithServices.java
---
(0096776)
marvintm (manager)
2017-05-25 09:35

The approach to fix this issue is not correct. The component in the Web POS which computes lines and the receipt in general is calculateReceipt (with its corresponding calculateTaxes and applyPromotions). If we start adding logic which either fixes wrong computed parts, or sets properties which are missed because calculateReceipt is missing, then we will end up with duplicated logic which is very difficult to maintain.
(0100342)
hgbot (developer)
2017-11-08 12:09

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 02ee988eebc384991a819e59e8e5bf8c21478a60
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Nov 07 16:14:39 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/02ee988eebc384991a819e59e8e5bf8c21478a60 [^]

Related to issue 35741: Refactored 'Delete Lines' process

Refactored the delete lines process in order to have a better performance and be able to save correctly the deleted lines.

Now, there's a new API that must always be called in order to remove a single or multiple lines. The new function is the function 'deleteLinesFromOrder' located in the order. Using this new API is possible to control the asynchronous flows and we are able to do the delete lines process executing the 'calculateReceipt' process only once, getting a notable performance improvement.

The lines are now marked to be deleted, and in the final callback are removed at once.

The old delete line process is still alive, but a warning is added in the console telling that the flow is deprecated and that when deleting a line, the related services won't also be removed (they will be updated during the final quantity rules process, but will not be stored in the deleted lines array and won't be available is pressing the undo button).

---
M web/org.openbravo.retail.posterminal/js/components/order.js
M web/org.openbravo.retail.posterminal/js/data/dataordertaxes.js
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboardorder.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/pointofsale.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customeraddress/components/sharedcomponents.js
---
(0100343)
hgbot (developer)
2017-11-08 12:09

Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: 16530c26b30dc9068ea57363df96c8d118fd50fa
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Nov 08 09:17:22 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/16530c26b30dc9068ea57363df96c8d118fd50fa [^]

Related to issue 35741: Refactored delete complementary lines process.

Due to the 'Delete Lines' refactor, the delete process of the complementary lines must also be refactored. Now, instead of listening to the remove triggers, there is a new hook which is executed for each line that is going to be deleted. The related lines to the original line are also deleted or cleared, depending of the choice the user has done. This process now can run with asynchrony.

---
M src/org/openbravo/retail/complementary/ComplementaryProductsComponentProvider.java
M web/org.openbravo.retail.complementary/js/hooks/hookPostUndo_DeleteLine.js
M web/org.openbravo.retail.complementary/js/hooks/hookPreDeleteLine.js
M web/org.openbravo.retail.complementary/js/hooks/hookRenderOrderLine.js
A web/org.openbravo.retail.complementary/js/hooks/hookPostDeleteRelatedServices.js
---
(0101011)
hgbot (developer)
2017-12-13 14:18

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: da139c823f4750dd002a2a4fc48e658613a07187
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Dec 13 14:17:17 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/da139c823f4750dd002a2a4fc48e658613a07187 [^]

Related to issue 35741: Code review.

Support asynchrony in the setUndo function.
Remove in the deleteLine API the lines even if the relation comes from external modules.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0101012)
hgbot (developer)
2017-12-13 14:18

Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: 2d8621e0bf16098eaf128b61efc97e9ca5cabe3f
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Dec 12 09:12:40 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/2d8621e0bf16098eaf128b61efc97e9ca5cabe3f [^]

Related to issue 35741: Code review.

During the delete lines process, complementary products are removed in the delete line API, not from the external complementary module. In this module, the lines to remove are just added to the array to remove.

---
M web/org.openbravo.retail.complementary/js/hooks/hookPostDeleteRelatedServices.js
---
(0101018)
hgbot (developer)
2017-12-13 16:53

Repository: erp/pmods/org.openbravo.retail.stockvalidation
Changeset: b3bc8a42fd65ed30a21651428873846ec60515b7
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Dec 13 16:53:15 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockvalidation/rev/b3bc8a42fd65ed30a21651428873846ec60515b7 [^]

Related to issue 35741: Used the new refactored delete lines API

---
M web/org.openbravo.retail.stockvalidation/js/modals.js
---
(0101020)
hgbot (developer)
2017-12-13 17:38

Repository: erp/pmods/org.openbravo.retail.selfcheckout
Changeset: e3d2e2c92aca3cda77d5b52d3959cf60ccb84246
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Wed Dec 13 17:38:29 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/e3d2e2c92aca3cda77d5b52d3959cf60ccb84246 [^]

Related to issue 35741: Used the new delete lines API in the selfcheckout module

---
M web/org.openbravo.retail.selfcheckout/source/models/orderAPI.js
---

- Issue History
Date Modified Username Field Change
2017-04-10 12:38 asiermartirena New Issue
2017-04-10 12:38 asiermartirena Assigned To => Retail
2017-04-10 12:38 asiermartirena Regression level => Production - Confirmed Stable
2017-04-10 12:38 asiermartirena Regression date => 2016-11-21
2017-04-10 12:38 asiermartirena Regression introduced in release => RR16Q4
2017-04-10 12:38 asiermartirena Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5f071a4d8d3e [^]
2017-04-10 12:38 asiermartirena Triggers an Emergency Pack => No
2017-04-10 12:45 asiermartirena Regression level Production - Confirmed Stable => Production - QA Approved
2017-04-10 12:45 asiermartirena Regression introduced in release RR16Q4 => RR17Q1
2017-04-10 21:14 mario_castello Assigned To Retail => mario_castello
2017-04-11 17:54 mario_castello Status new => acknowledged
2017-04-11 17:54 mario_castello Status acknowledged => scheduled
2017-04-13 05:32 hgbot Checkin
2017-04-13 05:32 hgbot Note Added: 0096035
2017-04-13 05:32 hgbot Status scheduled => resolved
2017-04-13 05:32 hgbot Resolution open => fixed
2017-04-13 05:32 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2d8ca4ee2032917285875bee8ea931a02b8fc2aa [^]
2017-04-13 05:35 hgbot Checkin
2017-04-13 05:35 hgbot Note Added: 0096036
2017-04-13 05:35 hgbot Checkin
2017-04-13 05:35 hgbot Note Added: 0096037
2017-04-18 10:20 adrianromero Relationship added related to 0035544
2017-04-18 10:23 adrianromero Note Added: 0096049
2017-04-18 10:23 adrianromero Status resolved => new
2017-04-18 10:23 adrianromero Resolution fixed => open
2017-04-18 10:25 adrianromero Note Added: 0096050
2017-04-18 18:21 adrianromero Relationship added related to 0035797
2017-04-18 18:22 mario_castello Status new => acknowledged
2017-04-18 18:22 mario_castello Status acknowledged => scheduled
2017-04-18 18:23 adrianromero Note Edited: 0096049 View Revisions
2017-04-18 18:30 adrianromero Note Added: 0096056
2017-04-19 21:36 hgbot Checkin
2017-04-19 21:36 hgbot Note Added: 0096070
2017-04-19 21:36 hgbot Status scheduled => resolved
2017-04-19 21:36 hgbot Resolution open => fixed
2017-04-19 21:36 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2d8ca4ee2032917285875bee8ea931a02b8fc2aa [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2e1a0d0d1e2d3b670ffed5d45a800c3683c94d83 [^]
2017-04-19 21:38 hgbot Checkin
2017-04-19 21:38 hgbot Note Added: 0096071
2017-04-28 11:24 guilleaer Review Assigned To => guilleaer
2017-04-28 11:24 guilleaer Status resolved => closed
2017-04-28 11:24 guilleaer Fixed in Version => RR17Q3
2017-05-25 09:35 marvintm Note Added: 0096776
2017-05-25 09:35 marvintm Status closed => new
2017-05-25 09:35 marvintm Resolution fixed => open
2017-05-25 09:35 marvintm Fixed in Version RR17Q3 =>
2017-05-25 09:35 marvintm Status new => scheduled
2017-05-25 09:35 marvintm Assigned To mario_castello => Retail
2017-07-19 13:35 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2017-07-26 16:06 ranjith_qualiantech_com Assigned To ranjith_qualiantech_com => Retail
2017-07-26 16:06 ranjith_qualiantech_com Status scheduled => acknowledged
2017-08-01 08:30 marvintm Status acknowledged => scheduled
2017-08-07 09:47 marvintm Priority immediate => high
2017-11-08 12:09 hgbot Checkin
2017-11-08 12:09 hgbot Note Added: 0100342
2017-11-08 12:09 hgbot Checkin
2017-11-08 12:09 hgbot Note Added: 0100343
2017-11-08 15:37 asiermartirena Status scheduled => resolved
2017-11-08 15:37 asiermartirena Resolution open => fixed
2017-11-10 13:09 aaroncalero Assigned To Retail => asiermartirena
2017-11-21 11:24 asiermartirena Review Assigned To guilleaer => marvintm
2017-12-13 14:18 hgbot Checkin
2017-12-13 14:18 hgbot Note Added: 0101011
2017-12-13 14:18 hgbot Checkin
2017-12-13 14:18 hgbot Note Added: 0101012
2017-12-13 16:53 hgbot Checkin
2017-12-13 16:53 hgbot Note Added: 0101018
2017-12-13 17:38 hgbot Checkin
2017-12-13 17:38 hgbot Note Added: 0101020
2017-12-15 14:49 marvintm Status resolved => closed
2017-12-15 14:49 marvintm Fixed in Version => RR18Q1
2018-09-12 08:39 ranjith_qualiantech_com Relationship added related to 0038342


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker