Openbravo Issue Tracking System - Retail Modules
View Issue Details
0033161Retail ModulesWeb POSpublic2016-06-06 14:562016-06-06 14:56
shuehner 
Retail 
normalminorhave not tried
newopen 
5
 
 
No
0033161: Double update of same obpos_app_cashup row during Cashup process
The cashup process triggers 2 sql update of the obpos_app_cashup row.

If possible those should be changed into single sql update.

1.)
Triggered by flush in ProcessCashClose.getCashUp
243459 [Import Entry - 6] INFO org.openbravo.base.PoolInterceptor - executeBatch --- SQL:
update OBPOS_App_Cashup set Created=?, Updated=?, Netsales=?, Grosssales=?, Netreturns=?, Grossreturns=?, Totalretailtransactions=?, Isprocessed=? where Obpos_App_Cashup_ID=?
  t:1
     $1: 2016-06-06 03:57:21.0
     $2: 2016-06-06 13:57:32.015
     $3: 1195.4
     $4: 1434.48
     $5: 0
     $6: 0
     $7: 1434.48
     $8: Y
     $9: A15AE3A7FC745C0B1C39135680F9B869
java.lang.Exception
    at org.openbravo.base.PoolInterceptor$PSInvokationHandler.invoke(PoolInterceptor.java:99)
    at com.sun.proxy.$Proxy23.executeBatch(Unknown Source)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:205)
    at org.openbravo.retail.posterminal.ProcessCashClose.getCashUp(ProcessCashClose.java:408)
    at org.openbravo.retail.posterminal.ProcessCashClose.saveRecord(ProcessCashClose.java:87)


2.)
2nd flush triggered (indirectly) by TriggerHandler.getInstance().disable()
243610 [Import Entry - 6] INFO org.openbravo.base.PoolInterceptor - executeBatch --- SQL:
update OBPOS_App_Cashup set Updated=?, Jsoncashup=? where Obpos_App_Cashup_ID=?
  t:47
     $1: 2016-06-06 13:57:32.228
     $2: {"posterminal":"9EA03767200042BD999A5C43AC07AFBF","id":"A15AE3A7FC745C0B1C39135680F9B869","isprocessed":"Y","isbeingprocessed":"Y","netSales":1195.4,"grossSales":1434.48,"netReturns":0,"grossReturns":0,"totalRetailTransactions":1434.48,"cashPaymentMethodInfo":[{"paymentMethodId":"28EE87BE3FB5462BA0F47B388DA97EC8","id":"3EFF3DC55BBF8988C298DE61B27193CA","searchKey":"OBPOS_payment.cash","startingCash":200,"totalSales":1434.48,"totalReturns":0,"rate":"1","isocode":"EUR","totalDeposits":0,"totalDrops":0,"paymentmethod_id":"28EE87BE3FB5462BA0F47B388DA97EC8","amountToKeep":"200","totalCounted":"1634.48"}],"cashTaxInfo":[{"name":"TVA 20%","amount":239.08,"orderType":"0","cashupId":"A15AE3A7FC745C0B1C39135680F9B869","id":"BC958F47048BDB7FB632CFC2117C29BC"}],"cashCloseInfo":[{"expected":1634.48,"difference":0,"paymentTypeId":"28EE87BE3FB5462BA0F47B388DA97EC8","paymentMethod":{"_identifier":"ESPECE","_entityName":"OBPOS_App_Payment_Type","$ref":"OBPOS_App_Payment_Type\/FE27131042004DED99FE69731A0AEE14","id":"FE27131042004DED99FE69731A0AEE14","client":"B8D74EB90D8A422F900F442C2D721C2E","client$_identifier":"BUT","organization":"DFEB3AE28E684CA7B6BCCB2D7FB7623F","organization$_identifier":"CAEN","active":true,"creationDate":"2016-06-06T01:57:21+02","createdBy":"100","createdBy$_identifier":"Openbravo","updated":"2016-06-06T01:57:21+02","updatedBy":"100","updatedBy$_identifier":"Openbravo","searchKey":"OBPOS_payment.cash","name":"ESPECE","paymentMethod":"29F862983F3B45739C1507E416123129","paymentMethod$_identifier":"Espèce","currency":"102","currency$_identifier":"EUR","documentType":"19BADE1498E60FF2E0530100007F77FB","documentType$_identifier":"AP Invoice","obposTerminaltype":"6076DA45D5C64A17884F1047D6FD4571","obposTerminaltype$_identifier":"Generic Cashier","automatemovementtoother":true,"keepfixedamount":true,"amount":200,"allowvariableamount":true,"allowdontmove":false,"allowmoveeverything":false,"cashDifferences":"6A1A48C17D8A44C495AE068E0533A7E7","cashDifferences$_identifier":"Écarts de caisse 478 - Cash differences","allowdrops":true,"gLItemForDrops":"5B8C9A8ACB1243169F9084BB5EA1D08A","gLItemForDrops$_identifier":"Retraits 580 - Withdrawals","allowdeposits":true,"gLItemForDeposits":"F6E0B323BF0641E6A84B7527AC142057","gLItemForDeposits$_identifier":"Dépôts 580 - Deposits","glitemDropdep":"08CC317B840A4560B64350A81C4FAA76","glitemDropdep$_identifier":"G\/L Item obligatoire pour clôture de caisse 478010 - Cash up","glitemWriteoff":"244EBC693A3E4BFE816DD8AB84AA98F8","glitemWriteoff$_identifier":"Trop-perçus 771 - Overpayments","paymentProvider":null,"refundProvider":null,"openDrawer":false,"iscash":true,"allowopendrawer":true,"printtwice":false,"countcash":true,"maxLimitAmount":null,"showkeypad":true,"defaultCashPaymentMethod":false,"leaveascredit":false,"image":null,"paymentMethodCategory":null,"allowoverpayment":true,"overpaymentLimit":null,"isshared":false,"countDiffLimit":null,"possGlitemTilldiff":null,"obdicoIsdigitalcoupon":false,"possCountDiffLimit":null,"obrmlcLimit":null,"recordTime":1465214241803,"amountToKeep":200},"id":"970755E1E6E9B5BF8C7410D355619426","foreignDifference":0,"foreignExpected":1634.48}],"cashUpDate":"2016-06-06T01:57:21.803Z","creationDate":"2016-06-06T01:57:21.803Z","userId":"E656690635D34C41A52FCD3CF69B30C2","timezoneOffset":-60,"businessDate":"2016-06-06 00:00:00.000","cashupCode":null,"cashMgmtIds":[]}
     $3: A15AE3A7FC745C0B1C39135680F9B869
java.lang.Exception
    at org.openbravo.base.PoolInterceptor$PSInvokationHandler.invoke(PoolInterceptor.java:99)
    at com.sun.proxy.$Proxy23.executeBatch(Unknown Source)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:205)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:146)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:130)
    at org.openbravo.dal.core.TriggerHandler.disable(TriggerHandler.java:64)
    at org.openbravo.retail.posterminal.ProcessCashClose.doReconciliationAndInvoices(ProcessCashClose.java:265)
-
Performance
Issue History
2016-06-06 14:56shuehnerNew Issue
2016-06-06 14:56shuehnerAssigned To => Retail
2016-06-06 14:56shuehnerTriggers an Emergency Pack => No
2016-06-06 14:56shuehnerTag Attached: Performance

There are no notes attached to this issue.