Fixes issue 28130: Transactions for the same order can be performed in different terminals (index)
authorRafa Alonso <rafael.alonso@openbravo.com>
Fri, 20 Feb 2015 14:40:05 +0100
changeset 26002 ed3b5179390b
parent 26001 5d480df7230c
child 26037 fe497a1f9c38
Fixes issue 28130: Transactions for the same order can be performed in different terminals (index)

The scenario:
- 2 or more terminals create transactions against the same order

Problems were:
- it was impossible to track in which terminal the transactions were performed
- it was impossible to create all the cash ups correctly

The solution:
- the 'em_obpos_app_cashup_id' column in the 'fin_finacc_transaction' table is populated with the current cashupId of the terminal involved in any transaction

Side benefits:
- the cashup process should complete faster
src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml
--- a/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Wed Feb 18 18:21:08 2015 +0100
+++ b/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Fri Feb 20 14:40:05 2015 +0100
@@ -204,6 +204,9 @@
         <index-column name="FIN_FINANCIAL_ACCOUNT_ID"/>
         <index-column name="LINE"/>
       </index>
+      <index name="FIN_FINACC_TRANSACTION_CASHUP" unique="true">
+        <index-column name="EM_OBPOS_APP_CASHUP_ID"/>
+      </index>
       <index name="FIN_FINACC_TRANSACTION_DAO" unique="false">
         <index-column name="FIN_FINANCIAL_ACCOUNT_ID"/>
         <index-column name="FIN_RECONCILIATION_ID"/>