Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031150Retail ModulesLayaway orderpublic2015-10-14 16:442015-10-26 09:28
aaroncalero 
marvintm 
highmajoralways
closedfixed 
5
 
RR16Q1 
guilleaer
No
0031150: Triggers stay disabled when a layaway is voided with pending payments
When a layaway is voided in web pos, and a payment is added before tapping the Done button (which should not be possible), when the Done button is finally tapped to void the layaway, a server-side error is raised and the application triggers are not enabled.
Login in web pos.
Open an existing layaway (Menu > Layaways).
Void the layaway (Menu > Void this layaway).
Add a payment
Tap on Done.
Verify the server log: An application error is raised and the triggers are not enabled.
No tags attached.
depends on backport 0031173RR15Q4 closed marvintm Triggers stay disabled when a layaway is voided with pending payments 
related to defect 0032464RR16Q2 closed marvintm When using Void Layaway, it's possible that triggers in the application may be disabled 
causes defect 0031462 closed mario_castello [RR15Q4] The status of a layaway does not change after 'Void this layaway' 
Issue History
2015-10-14 16:44aaroncaleroNew Issue
2015-10-14 16:44aaroncaleroAssigned To => Retail
2015-10-14 16:44aaroncaleroResolution time => 1445378400
2015-10-14 16:44aaroncaleroTriggers an Emergency Pack => No
2015-10-19 12:32OrekariaNote Added: 0081074
2015-10-19 12:32OrekariaStatusnew => feedback
2015-10-19 12:32OrekariaAssigned ToRetail => aaroncalero
2015-10-19 13:53marvintmAssigned Toaaroncalero => marvintm
2015-10-19 13:53marvintmStatusfeedback => scheduled
2015-10-19 15:05aaroncaleroNote Added: 0081093
2015-10-21 15:01hgbotCheckin
2015-10-21 15:01hgbotNote Added: 0081175
2015-10-21 15:01hgbotStatusscheduled => resolved
2015-10-21 15:01hgbotResolutionopen => fixed
2015-10-21 15:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dfc486fb9f9a618f1c697bf7235150c3cae4d458 [^]
2015-10-23 15:20OrekariaReview Assigned To => guilleaer
2015-10-26 09:28guilleaerNote Added: 0081291
2015-10-26 09:28guilleaerStatusresolved => closed
2015-10-26 09:28guilleaerFixed in Version => RR16Q1
2015-11-16 16:22OrekariaRelationship addedcauses 0031462
2016-03-11 16:28marvintmRelationship addedrelated to 0032464

Notes
(0081074)
Orekaria   
2015-10-19 12:32   
Cannot reproduce
Please indicate the payment details
Please attach screenshots of the error and the text
(0081093)
aaroncalero   
2015-10-19 15:05   
Create a simple layaway (e.g. with 1 avalanche transceiver)
Layaway it.
Load the layaway again.
Void the layaway.
Add a payment (e.g. 50€)
Click on Done.

Red error message in POS: There was an error voiding the Layaway.
Server side error:

2015-10-19 15:01:42,162 [ajp-localhost%2F127.0.0.1-8809-7] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 insert into FIN_Finacc_Transaction (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, Isactive, C_Currency_ID, Fin_Financial_Account_ID, Line, Fin_Payment_ID, DateAcct, Status, Paymentamt, Depositamt, Processed, Processing, Posted, Trxtype, Statementdate, Description, CreatedByAlgorithm, C_Bpartner_ID, EM_APRM_Modify, EM_Aprm_Processed, Fin_Finacc_Transaction_ID) values ('39363B0921BB4293B48383844325E84C', 'D270A5AC50874F8BA67A88EE977F8E3B', '2015-10-19 15:01:42.132000 +02:00:00', '3073EDF96A3C42CC86C7069E379522D2', '2015-10-19 15:01:42.132000 +02:00:00', '3073EDF96A3C42CC86C7069E379522D2', 'Y', '102', 'F37A1534BB6C4BB9AC8564B7850792D4', 300, '6409287A0C214344B9F7E164E885E940', '2015-10-19 00:00:00.000000 +02:00:00', 'RDNC', '0.00', '0', 'Y', 'N', 'N', 'BPW', '2015-10-19 00:00:00.000000 +02:00:00', 'Order No.: VBS1/0000083
', 'N', 'ABD91C9D3BC94175B876FBBE9CACA008', 'N', 'P', 'E7865E8D7C7545F3AB2436D044F646A8') was aborted. Call getNextException to see the cause.
2015-10-19 15:01:42,167 [ajp-localhost%2F127.0.0.1-8809-7] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: new row for relation "fin_finacc_transaction" violates check constraint "fin_trans_amounts_chk"
2015-10-19 15:01:42,171 [ajp-localhost%2F127.0.0.1-8809-7] ERROR org.openbravo.mobile.core.process.SecuredJSONProcess - Could not execute JDBC batch update
...
2015-10-19 15:01:54,033 [ajp-localhost%2F127.0.0.1-8809-7] ERROR org.openbravo.base.util.CheckException - Triggers disabled, commit is not allowed when in triggers-disabled mode, call TriggerHandler.enable() before committing
org.openbravo.base.util.CheckException: Triggers disabled, commit is not allowed when in triggers-disabled mode, call TriggerHandler.enable() before committing

(taken from retail_stable_pgsql_pi_openbravo.log)
(0081175)
hgbot   
2015-10-21 15:01   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: dfc486fb9f9a618f1c697bf7235150c3cae4d458
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Oct 21 09:43:06 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/dfc486fb9f9a618f1c697bf7235150c3cae4d458 [^]

Fixed issue 31150. Triggers will no longer be disabled if VoidLayaway fails.

---
M src/org/openbravo/retail/posterminal/ProcessVoidLayaway.java
---
(0081291)
guilleaer   
2015-10-26 09:28   
Code reviewed and tested