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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027904
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajorhave not tried2014-10-17 14:332015-01-15 19:27
ReporternaiaramartinezView Statuspublic 
Assigned Tomario_castello 
PrioritynormalResolutionfixedFixed in Versionpi
StatusclosedFix in branchpiFixed in SCM revisionf2e1ff005d0d
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToOrekaria
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027904: Weird behaviour in lines when executing preorderSave hook and it stops the synchronization

DescriptionWhen the shyncronziation is stopped (using args.cancellation=true in PreOrderSave Hook), and trying to continue with the synchronization of the order... the lines that were in the order are not taken into account, and the price of those lines become 0.
Steps To ReproducePreorderSave hook is used to validate the data of the lines. Imagine, when selling 'gift cards and vouchers' before saving and creating the instance of the GC/Voucher, it is nice to have a validation to check if the ID is in used for another GC/Voucher or not.

In the case of the ID is in used for another GC/Voucher, the synchronization should be stopped, the user should change the ID of the voucher and user should be able to continue with the synchronization. But this behaviour is not working correctly.

Steps to reproduce:

Install 'gift cards and vouchers' module, and apply the patch is attached to the issue.

Login as 'The White Valley Group Admin'.
Go to Products and select 'Alpine skiing backpack 27 L'. Open it in form view and modify the following information:
    - gift Card Type: Gift voucher
    - Grouped Product: No

Login in the webPOs and create a new order. Add 'Alpine skiing backpack 27 L' to the order. In the popup write in ID field: 1
Pay and complete the order.


Now, open the develpers tool and uncomment the following code:
// gcids.push({
// gcid: '1'
// });

The previous code is adding the code 1 to the list of ids to check in the backend if it is already in use. Since we create a voucher with id 1, now that the code is uncommented, the preOrderSave won't do the synchronization with the backend.


Create a new order. Add 'Alpine skiing backpack 27 L' and in the ID write something different to 1 (in the previous code is already writing 1). Pay it and see that an error is shown because the id 1 is already in use.

Notice that 'Done' button is disabled (this could be another issue).
Then, click again in the line and notice that 'done' button is enabled again. Click in 'Done' button and notice that the price of 'Alpine skiing backpack 27 L', the tax amount, the total amount... all of them are 0. Using this hook, we should be able to fix the data (in this case the ID of the voucher) and be able to process the order, but there is a bug that is not allowing to continue with the process.


TagsNo tags attached.
Attached Filesdiff file icon PreOrderSaveHookError.diff [^] (10,402 bytes) 2014-10-17 14:33 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0027864 closedOrekaria Closing a Layaway adds a new blank receipt to the pile with no reason 

-  Notes
(0073460)
hgbot (developer)
2015-01-13 15:15

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f2e1ff005d0ddc043bc30043c06a141f917651f0
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Tue Jan 13 08:13:40 2015 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f2e1ff005d0ddc043bc30043c06a141f917651f0 [^]

fixed issue 27904: Weird behaviour in lines when executing preorderSave hook and it stops the synchronization

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---

- Issue History
Date Modified Username Field Change
2014-10-17 14:33 naiaramartinez New Issue
2014-10-17 14:33 naiaramartinez Assigned To => marvintm
2014-10-17 14:33 naiaramartinez File Added: PreOrderSaveHookError.diff
2014-10-17 14:33 naiaramartinez Triggers an Emergency Pack => No
2015-01-09 19:37 mario_castello Assigned To marvintm => mario_castello
2015-01-09 19:37 mario_castello Status new => scheduled
2015-01-09 19:37 mario_castello fix_in_branch => pi
2015-01-12 16:29 malsasua Relationship added related to 0027864
2015-01-13 15:15 hgbot Checkin
2015-01-13 15:15 hgbot Note Added: 0073460
2015-01-13 15:15 hgbot Status scheduled => resolved
2015-01-13 15:15 hgbot Resolution open => fixed
2015-01-13 15:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f2e1ff005d0ddc043bc30043c06a141f917651f0 [^]
2015-01-15 19:27 Orekaria Review Assigned To => Orekaria
2015-01-15 19:27 Orekaria Status resolved => closed
2015-01-15 19:27 Orekaria Fixed in Version => pi


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker