Openbravo Issue Tracking System - POS2
View Issue Details
0051004POS2POSpublic2022-11-24 17:002023-07-12 05:55
kchoperena 
sreehari 
highmajoralways
closedfixed 
5
pi 
 
No
0051004: Error in a deferred payment when the marketing survey module is installed
Error in a deferred payment when the marketing survey module is installed and has configured several surveys.

For this case, we have configured 4 different surveys:
- Code Postal (mandatory) / Type of survey: text
- Comment nous avez-vous connu? (mandatory) / Type of survey: text
- Avez-vous trouvé tout ce que vous cherchiez? (mandatory) / Type of survey: List of options
- Quel produit avez-vous manqué? (optional) / Type of survey: text
- Login into the WebPOS
- Create a order with a customer and delivery mode any other than Pick and Carry
- Pay the partial amount
- Check out
- Fill up a Marketing Survey.
- Go back to the back office to check the payment done
- Go back to the POS
- Retrieve the order
- Pay the remaining balance.
- Marketing Survey pop up appears ( Why twice for the same order ?)
- Fill out the form.
- Check out.

RESULTS:
- Go to the EWI window. The following error appears:

org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "obms_marksurveyres_un"
  Detail: Key (obms_marketing_survey_id, c_order_id)=(67B6178996E044F6B8ADB5C648D6FEBD, A870C9D994859727860D92A33B2F1FF5) already exists.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:560)
    at org.postgresql.jdbc.PgStatement.internalExecuteBatch(PgStatement.java:893)
    at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:916)
    at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1684)
    at jdk.internal.reflect.GeneratedMethodAccessor373.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
    at com.sun.proxy.$Proxy80.executeBatch(Unknown Source)
    at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:121)
    at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:106)
    at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:148)
    at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.executeBatch(JdbcCoordinatorImpl.java:198)
    at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:80)
    at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.buildBatchStatement(AbstractBatchImpl.java:137)
    at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.getBatchStatement(AbstractBatchImpl.java:126)
    at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.getBatchStatement(BatchingBatch.java:67)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3356)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3902)
    at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107)
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
    at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
    at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
    at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344)
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
    at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)
    at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1402)
    at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1389)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:265)
    at org.openbravo.retail.discounts.coupons.otf.OrderLoaderHookOTFCoupons.exec(OrderLoaderHookOTFCoupons.java:63)
    at org.openbravo.retail.discounts.coupons.otf.OrderLoaderHookOTFCoupons$Proxy$_$$_WeldClientProxy.exec(Unknown Source)
    at org.openbravo.retail.posterminal.OrderLoader.executeHooks(OrderLoader.java:816)
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:606)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:204)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:156)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:88)

In the sales orders payment plant, the payment is still not processed
The webpos still shows the order as "Partially Paid"
In the Marketing Survey Result Window only the initial input is registered.


No tags attached.
Issue History
2022-11-24 17:00kchoperenaNew Issue
2022-11-24 17:00kchoperenaAssigned To => Retail
2022-11-24 17:00kchoperenaTriggers an Emergency Pack => No
2023-03-31 09:13guillermogilAssigned ToRetail => sreehari
2023-04-08 17:34shrewdjayNote Added: 0148337
2023-04-10 09:27sreehariStatusnew => scheduled
2023-04-13 07:17marvintmNote Deleted: 0148337
2023-04-15 11:08hgbotNote Added: 0148451
2023-07-11 09:23hgbotResolutionopen => fixed
2023-07-11 09:23hgbotStatusscheduled => closed
2023-07-11 09:23hgbotNote Added: 0152303
2023-07-11 09:23hgbotNote Added: 0152304
2023-07-11 14:56sreehariNote Added: 0152340
2023-07-11 14:56sreehariStatusclosed => new
2023-07-11 14:56sreehariResolutionfixed => open
2023-07-11 14:57sreehariStatusnew => scheduled
2023-07-11 15:30hgbotNote Added: 0152342
2023-07-12 05:55hgbotResolutionopen => fixed
2023-07-12 05:55hgbotStatusscheduled => closed
2023-07-12 05:55hgbotNote Added: 0152366
2023-07-12 05:55hgbotNote Added: 0152367

Notes
(0148451)
hgbot   
2023-04-15 11:08   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey/-/merge_requests/9 [^]
(0152303)
hgbot   
2023-07-11 09:23   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey [^]
Changeset: 2716c1e3134034e0dc15c89678d061c07009deb9
Author: Sreehari <sreehari@qualiantech.com>
Date: 10-07-2023 18:58:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey/-/commit/2716c1e3134034e0dc15c89678d061c07009deb9 [^]

Fixes ISSUE-51004: Fixed deffered payment error by Marketing Survey popup only once
*Updated Year
*Created Index for c_order_id in OBMS_Marketing_Surv_Result

---
A src/org/openbravo/pos2/marketingsurvey/master/PaidReceiptProperties.java
M src-db/database/model/tables/OBMS_MARKETING_SURV_RESULT.xml
M web-jspack/org.openbravo.pos2.marketingsurvey/src/model/ticket/user-actions/MarketingSurveyUserActionHooks.js
---
(0152304)
hgbot   
2023-07-11 09:23   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey/-/merge_requests/9 [^]
(0152340)
sreehari   
2023-07-11 14:56   
Index is not following naming conventions
(0152342)
hgbot   
2023-07-11 15:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey/-/merge_requests/11 [^]
(0152366)
hgbot   
2023-07-12 05:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey [^]
Changeset: eed1853483779c998e9844b52b4d35ceb37aa557
Author: Sreehari Venkataraman <sreehari@qualiantech.com>
Date: 11-07-2023 18:54:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey/-/commit/eed1853483779c998e9844b52b4d35ceb37aa557 [^]

Fixes ISSUE-51004: Renamed Index as per Naming Standards

---
M src-db/database/model/tables/OBMS_MARKETING_SURV_RESULT.xml
---
(0152367)
hgbot   
2023-07-12 05:55   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.marketingsurvey/-/merge_requests/11 [^]