Fixed bug 17801: Void Payments in Awaiting Execution status
authorVíctor Martínez Romanos <victor.martinez@openbravo.com>
Wed, 29 Jun 2011 10:31:43 +0200
changeset 12995 7640a29608bc
parent 12994 7097e108e58e
child 12996 bc639e86fe20
Fixed bug 17801: Void Payments in Awaiting Execution status
When a payment is in awaiting execution status, the user should be able to void it.
In this case the details related invoices or orders should be canceled.
The next time the user adds a payment to an invoice or an order, the suggested amount
will be all the pending amount to be paid, without taking into account the previously canceled details.
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
src-db/database/model/tables/FIN_PAYMENT_SCHEDULEDETAIL.xml
src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_REF_LIST.xml
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -1342,7 +1342,7 @@
 <!--4193EFDEB8354986A5100B0285768A45-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
 <!--4193EFDEB8354986A5100B0285768A45-->  <AD_COLUMN_ID><![CDATA[7DC34559B3F2B45BE040007F0100784A]]></AD_COLUMN_ID>
 <!--4193EFDEB8354986A5100B0285768A45-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--4193EFDEB8354986A5100B0285768A45-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y']]></DISPLAYLOGIC>
+<!--4193EFDEB8354986A5100B0285768A45-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y' & @Status@!'RPVOID']]></DISPLAYLOGIC>
 <!--4193EFDEB8354986A5100B0285768A45-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--4193EFDEB8354986A5100B0285768A45-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--4193EFDEB8354986A5100B0285768A45-->  <SEQNO><![CDATA[130]]></SEQNO>
@@ -2841,7 +2841,7 @@
 <!--7DFD1BBEC2F60C48E040007F01004674-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
 <!--7DFD1BBEC2F60C48E040007F01004674-->  <AD_COLUMN_ID><![CDATA[7DC34559B3F2B45BE040007F0100784A]]></AD_COLUMN_ID>
 <!--7DFD1BBEC2F60C48E040007F01004674-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--7DFD1BBEC2F60C48E040007F01004674-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y']]></DISPLAYLOGIC>
+<!--7DFD1BBEC2F60C48E040007F01004674-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y' & @Status@!'RPVOID']]></DISPLAYLOGIC>
 <!--7DFD1BBEC2F60C48E040007F01004674-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--7DFD1BBEC2F60C48E040007F01004674-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--7DFD1BBEC2F60C48E040007F01004674-->  <SEQNO><![CDATA[130]]></SEQNO>
@@ -8769,6 +8769,106 @@
 <!--FEB73B6C75B9445FA61265D24096F41B-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--FEB73B6C75B9445FA61265D24096F41B--></AD_FIELD>
 
+<!--FF80818130D0918F0130D0B9899F00B2--><AD_FIELD>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <AD_FIELD_ID><![CDATA[FF80818130D0918F0130D0B9899F00B2]]></AD_FIELD_ID>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <AD_TAB_ID><![CDATA[FD40D9C2F1F14943933DEFEF4A8458E4]]></AD_TAB_ID>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF80818130D0918F0130D0B9899F00B2-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF80818130D0918F0130D0B9899F00B2--></AD_FIELD>
+
+<!--FF80818130D0918F0130D0BD40D200C9--><AD_FIELD>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <AD_FIELD_ID><![CDATA[FF80818130D0918F0130D0BD40D200C9]]></AD_FIELD_ID>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <AD_TAB_ID><![CDATA[F9751D712A804D57B97A36803843F2D7]]></AD_TAB_ID>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF80818130D0918F0130D0BD40D200C9-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF80818130D0918F0130D0BD40D200C9--></AD_FIELD>
+
+<!--FF80818130D0918F0130D0BE2C1600D2--><AD_FIELD>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <AD_FIELD_ID><![CDATA[FF80818130D0918F0130D0BE2C1600D2]]></AD_FIELD_ID>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <AD_TAB_ID><![CDATA[6707D7449A8D45DB851F608BA88329C8]]></AD_TAB_ID>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF80818130D0918F0130D0BE2C1600D2-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF80818130D0918F0130D0BE2C1600D2--></AD_FIELD>
+
+<!--FF80818130D0918F0130D0BECAE800DD--><AD_FIELD>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <AD_FIELD_ID><![CDATA[FF80818130D0918F0130D0BECAE800DD]]></AD_FIELD_ID>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <AD_TAB_ID><![CDATA[B82C02920AA84E8DB57D553185BD2F06]]></AD_TAB_ID>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF80818130D0918F0130D0BECAE800DD-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF80818130D0918F0130D0BECAE800DD--></AD_FIELD>
+
 <!--FFCF533CA2014698ABA8A54C97102D1E--><AD_FIELD>
 <!--FFCF533CA2014698ABA8A54C97102D1E-->  <AD_FIELD_ID><![CDATA[FFCF533CA2014698ABA8A54C97102D1E]]></AD_FIELD_ID>
 <!--FFCF533CA2014698ABA8A54C97102D1E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -748,4 +748,15 @@
 <!--FF80818130B6856A0130B6956220002D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--FF80818130B6856A0130B6956220002D--></AD_MESSAGE>
 
+<!--FF80818130D0918F0130D10749340156--><AD_MESSAGE>
+<!--FF80818130D0918F0130D10749340156-->  <AD_MESSAGE_ID><![CDATA[FF80818130D0918F0130D10749340156]]></AD_MESSAGE_ID>
+<!--FF80818130D0918F0130D10749340156-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130D0918F0130D10749340156-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130D0918F0130D10749340156-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130D0918F0130D10749340156-->  <VALUE><![CDATA[APRM_PaymentNotRPAE_NotVoid]]></VALUE>
+<!--FF80818130D0918F0130D10749340156-->  <MSGTEXT><![CDATA[Impossible to void because its status is not Awaiting Execution]]></MSGTEXT>
+<!--FF80818130D0918F0130D10749340156-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--FF80818130D0918F0130D10749340156-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FF80818130D0918F0130D10749340156--></AD_MESSAGE>
+
 </data>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -29,7 +29,7 @@
 <!--575E470ABADB4C278132C957A78C47E3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--575E470ABADB4C278132C957A78C47E3-->  <NAME><![CDATA[Process Payment valid actions]]></NAME>
 <!--575E470ABADB4C278132C957A78C47E3-->  <TYPE><![CDATA[S]]></TYPE>
-<!--575E470ABADB4C278132C957A78C47E3-->  <CODE><![CDATA[((@EM_APRM_Process_Payment@ = 'P' AND AD_Ref_List.value='P') OR (@EM_APRM_Process_Payment@ = 'R' AND AD_Ref_List.value='R') OR (@EM_APRM_Process_Payment@ is null))]]></CODE>
+<!--575E470ABADB4C278132C957A78C47E3-->  <CODE><![CDATA[((@EM_APRM_Process_Payment@ = 'P' AND AD_Ref_List.value='P') OR (@EM_APRM_Process_Payment@ = 'R' AND AD_Ref_List.value IN ('R', 'V')) OR (@EM_APRM_Process_Payment@ is null))]]></CODE>
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--575E470ABADB4C278132C957A78C47E3--></AD_VAL_RULE>
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Jun 16 12:25:48 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Jun 29 10:31:43 2011 +0200
@@ -435,6 +435,121 @@
           OBContext.restorePreviousMode();
         }
 
+      } else if (strAction.equals("V")) {
+        // Void
+        OBContext.setAdminMode();
+        try {
+          if (payment.isProcessed()) {
+            // Already Posted Document
+            if ("Y".equals(payment.getPosted())) {
+              msg.setType("Error");
+              msg.setTitle(Utility.messageBD(conProvider, "Error", vars.getLanguage()));
+              msg.setMessage(Utility.parseTranslation(conProvider, vars, vars.getLanguage(),
+                  "@PostedDocument@" + ": " + payment.getDocumentNo()));
+              bundle.setResult(msg);
+              return;
+            }
+            // Transaction exists
+            if (hasTransaction(payment)) {
+              msg.setType("Error");
+              msg.setTitle(Utility.messageBD(conProvider, "Error", vars.getLanguage()));
+              msg.setMessage(Utility.parseTranslation(conProvider, vars, vars.getLanguage(),
+                  "@APRM_TransactionExists@"));
+              bundle.setResult(msg);
+              return;
+            }
+            // Payment with generated credit already used on other payments.
+            if (payment.getGeneratedCredit().compareTo(BigDecimal.ZERO) == 1
+                && payment.getUsedCredit().compareTo(BigDecimal.ZERO) == 1) {
+              msg.setType("Error");
+              msg.setTitle(Utility.messageBD(conProvider, "Error", vars.getLanguage()));
+              msg.setMessage(Utility.parseTranslation(conProvider, vars, vars.getLanguage(),
+                  "@APRM_PaymentGeneratedCreditIsUsed@"));
+              bundle.setResult(msg);
+              return;
+            }
+            // Payment not in Awaiting Execution
+            if (!"RPAE".equals(payment.getStatus())) {
+              msg.setType("Error");
+              msg.setTitle(Utility.messageBD(conProvider, "Error", vars.getLanguage()));
+              msg.setMessage(Utility.parseTranslation(conProvider, vars, vars.getLanguage(),
+                  "@APRM_PaymentNotRPAE_NotVoid@"));
+              bundle.setResult(msg);
+              return;
+            }
+
+            /*
+             * Void the payment
+             */
+            payment.setStatus("RPVOID");
+
+            /*
+             * Cancel all payment schedule details related to the payment
+             */
+            final List<FIN_PaymentScheduleDetail> removedPDS = new ArrayList<FIN_PaymentScheduleDetail>();
+            for (final FIN_PaymentDetail paymentDetail : payment.getFINPaymentDetailList()) {
+              for (final FIN_PaymentScheduleDetail paymentScheduleDetail : paymentDetail
+                  .getFINPaymentScheduleDetailList()) {
+                BigDecimal outStandingAmt = BigDecimal.ZERO;
+
+                if (paymentScheduleDetail.getInvoicePaymentSchedule() != null) {
+                  // Related to invoices
+                  for (final FIN_PaymentScheduleDetail invScheDetail : paymentScheduleDetail
+                      .getInvoicePaymentSchedule()
+                      .getFINPaymentScheduleDetailInvoicePaymentScheduleList()) {
+                    if (invScheDetail.getPaymentDetails() == null) {
+                      outStandingAmt = outStandingAmt.add(invScheDetail.getAmount());
+                      removedPDS.add(invScheDetail);
+                    } else if (invScheDetail.equals(paymentScheduleDetail)) {
+                      outStandingAmt = outStandingAmt.add(invScheDetail.getAmount());
+                      paymentScheduleDetail.setCanceled(true);
+                    }
+                  }
+                  // Create merged Payment Schedule Detail with the pending to be paid amount
+                  final FIN_PaymentScheduleDetail mergedScheduleDetail = dao
+                      .getNewPaymentScheduleDetail(payment.getOrganization(), outStandingAmt);
+                  mergedScheduleDetail.setInvoicePaymentSchedule(paymentScheduleDetail
+                      .getInvoicePaymentSchedule());
+                  OBDal.getInstance().save(mergedScheduleDetail);
+                } else if (paymentScheduleDetail.getOrderPaymentSchedule() != null) {
+                  // Related to orders
+                  for (final FIN_PaymentScheduleDetail ordScheDetail : paymentScheduleDetail
+                      .getOrderPaymentSchedule()
+                      .getFINPaymentScheduleDetailOrderPaymentScheduleList()) {
+                    if (ordScheDetail.getPaymentDetails() == null) {
+                      outStandingAmt = outStandingAmt.add(ordScheDetail.getAmount());
+                      removedPDS.add(ordScheDetail);
+                    } else if (ordScheDetail.equals(paymentScheduleDetail)) {
+                      outStandingAmt = outStandingAmt.add(ordScheDetail.getAmount());
+                      paymentScheduleDetail.setCanceled(true);
+                    }
+                  }
+                  // Create merged Payment Schedule Detail with the pending to be paid amount
+                  final FIN_PaymentScheduleDetail mergedScheduleDetail = dao
+                      .getNewPaymentScheduleDetail(payment.getOrganization(), outStandingAmt);
+                  mergedScheduleDetail.setOrderPaymentSchedule(paymentScheduleDetail
+                      .getOrderPaymentSchedule());
+                  OBDal.getInstance().save(mergedScheduleDetail);
+                } else if (paymentScheduleDetail.getOrderPaymentSchedule() == null
+                    && paymentScheduleDetail.getInvoicePaymentSchedule() == null) {
+                  // Credit payment
+                  payment.setGeneratedCredit(payment.getGeneratedCredit().subtract(
+                      paymentScheduleDetail.getAmount()));
+                  removedPDS.add(paymentScheduleDetail);
+                }
+
+                OBDal.getInstance().save(payment);
+                OBDal.getInstance().flush();
+              }
+              paymentDetail.getFINPaymentScheduleDetailList().removeAll(removedPDS);
+              for (FIN_PaymentScheduleDetail removedPD : removedPDS)
+                OBDal.getInstance().remove(removedPD);
+            }
+          }
+        } finally {
+          OBDal.getInstance().flush();
+          OBContext.restorePreviousMode();
+        }
       }
 
       payment.setProcessNow(false);
@@ -442,6 +557,7 @@
       OBDal.getInstance().flush();
 
       bundle.setResult(msg);
+
     } catch (final Exception e) {
       e.printStackTrace(System.err);
       msg.setType("Error");
--- a/src-db/database/model/tables/FIN_PAYMENT_SCHEDULEDETAIL.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/src-db/database/model/tables/FIN_PAYMENT_SCHEDULEDETAIL.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -53,6 +53,10 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
+      <column name="ISCANCELED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA['N']]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="FIN_AD_CLIENT_SCHEDULEDETAIL">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -68,5 +72,6 @@
       <foreign-key foreignTable="FIN_PAYMENT_SCHEDULE" name="FIN_PAYMENT_SCHORD_SCHDETAIL">
         <reference local="FIN_PAYMENT_SCHEDULE_ORDER" foreign="FIN_PAYMENT_SCHEDULE_ID"/>
       </foreign-key>
+      <check name="FIN_PAY_SCHE_DETAIL_ISCANC_CHK"><![CDATA[ISCANCELED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="VIEW FIN_PAYMENT_DETAIL_V">
-    <view name="FIN_PAYMENT_DETAIL_V"><![CDATA[SELECT psd.fin_payment_scheduledetail_id AS fin_payment_detail_v_id, psd.ad_client_id, psd.ad_org_id, psd.isactive, psd.created, psd.createdby, psd.updated, psd.updatedby, psi.fin_payment_schedule_id AS fin_payment_sched_inv_v_id, pso.fin_payment_schedule_id AS fin_payment_sched_ord_v_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.amount, pso.amount) AS expected, psd.amount AS paidamt, p.c_bpartner_id, p.fin_paymentmethod_id, p.fin_financial_account_id, p.c_currency_id, p.paymentdate, gli.name AS glitemname, pd.writeoffamt, fa.c_currency_id AS finacc_currency_id, p.finacc_txn_convert_rate, psd.amount * p.finacc_txn_convert_rate AS paidconverted, COALESCE(psi.amount, pso.amount) * p.finacc_txn_convert_rate AS expectedconverted
+    <view name="FIN_PAYMENT_DETAIL_V"><![CDATA[SELECT psd.fin_payment_scheduledetail_id AS fin_payment_detail_v_id, psd.ad_client_id, psd.ad_org_id, psd.isactive, psd.created, psd.createdby, psd.updated, psd.updatedby, psi.fin_payment_schedule_id AS fin_payment_sched_inv_v_id, pso.fin_payment_schedule_id AS fin_payment_sched_ord_v_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.amount, pso.amount) AS expected, psd.amount AS paidamt, p.c_bpartner_id, p.fin_paymentmethod_id, p.fin_financial_account_id, p.c_currency_id, p.paymentdate, gli.name AS glitemname, pd.writeoffamt, fa.c_currency_id AS finacc_currency_id, p.finacc_txn_convert_rate, psd.amount * p.finacc_txn_convert_rate AS paidconverted, COALESCE(psi.amount, pso.amount) * p.finacc_txn_convert_rate AS expectedconverted, psd.iscanceled
 FROM fin_payment p
 LEFT JOIN fin_financial_account fa ON p.fin_financial_account_id = fa.fin_financial_account_id, fin_payment_detail pd
 JOIN fin_payment_scheduledetail psd ON pd.fin_payment_detail_id = psd.fin_payment_detail_id
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -223704,6 +223704,39 @@
 <!--5BA94E7B7D4810ACE040007F0101152B-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--5BA94E7B7D4810ACE040007F0101152B--></AD_COLUMN>
 
+<!--5BC978BD972A4CB9936D7B5794153BE1--><AD_COLUMN>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_COLUMN_ID><![CDATA[5BC978BD972A4CB9936D7B5794153BE1]]></AD_COLUMN_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <COLUMNNAME><![CDATA[Iscanceled]]></COLUMNNAME>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_TABLE_ID><![CDATA[C0233061EA504EFEAB0483E836BBAF31]]></AD_TABLE_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <READONLYLOGIC><![CDATA['Y' = 'Y']]></READONLYLOGIC>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_ELEMENT_ID><![CDATA[B465F3438BE64D2D99A6343B63B7E76E]]></AD_ELEMENT_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <POSITION><![CDATA[14]]></POSITION>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--5BC978BD972A4CB9936D7B5794153BE1-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--5BC978BD972A4CB9936D7B5794153BE1--></AD_COLUMN>
+
 <!--5BE185F526BBFA15E040007F01016962--><AD_COLUMN>
 <!--5BE185F526BBFA15E040007F01016962-->  <AD_COLUMN_ID><![CDATA[5BE185F526BBFA15E040007F01016962]]></AD_COLUMN_ID>
 <!--5BE185F526BBFA15E040007F01016962-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -231277,6 +231310,37 @@
 <!--7296009E504AA348E040007F01013C92-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--7296009E504AA348E040007F01013C92--></AD_COLUMN>
 
+<!--7299BF93D2984DF8932FE2800DA0ED2A--><AD_COLUMN>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <COLUMNNAME><![CDATA[Iscanceled]]></COLUMNNAME>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_TABLE_ID><![CDATA[DC63963AB3F1489BAAB5A9A7EFD1B407]]></AD_TABLE_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <SEQNO><![CDATA[360]]></SEQNO>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_ELEMENT_ID><![CDATA[B465F3438BE64D2D99A6343B63B7E76E]]></AD_ELEMENT_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <POSITION><![CDATA[30]]></POSITION>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--7299BF93D2984DF8932FE2800DA0ED2A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--7299BF93D2984DF8932FE2800DA0ED2A--></AD_COLUMN>
+
 <!--72F4EB7BF7C24F6AA8BB4149E68BF665--><AD_COLUMN>
 <!--72F4EB7BF7C24F6AA8BB4149E68BF665-->  <AD_COLUMN_ID><![CDATA[72F4EB7BF7C24F6AA8BB4149E68BF665]]></AD_COLUMN_ID>
 <!--72F4EB7BF7C24F6AA8BB4149E68BF665-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -24924,6 +24924,17 @@
 <!--B43D23CAEBD211DD9AFA0016D4EE9DB3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--B43D23CAEBD211DD9AFA0016D4EE9DB3--></AD_ELEMENT>
 
+<!--B465F3438BE64D2D99A6343B63B7E76E--><AD_ELEMENT>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <AD_ELEMENT_ID><![CDATA[B465F3438BE64D2D99A6343B63B7E76E]]></AD_ELEMENT_ID>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <COLUMNNAME><![CDATA[Iscanceled]]></COLUMNNAME>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <PRINTNAME><![CDATA[Canceled]]></PRINTNAME>
+<!--B465F3438BE64D2D99A6343B63B7E76E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B465F3438BE64D2D99A6343B63B7E76E--></AD_ELEMENT>
+
 <!--B4D4121446D847EA91B262AEDA567798--><AD_ELEMENT>
 <!--B4D4121446D847EA91B262AEDA567798-->  <AD_ELEMENT_ID><![CDATA[B4D4121446D847EA91B262AEDA567798]]></AD_ELEMENT_ID>
 <!--B4D4121446D847EA91B262AEDA567798-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -175038,6 +175038,31 @@
 <!--623FEEB84688C86EE040007F0101639E-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--623FEEB84688C86EE040007F0101639E--></AD_FIELD>
 
+<!--624A567748534046B21FF892CA4FF4DC--><AD_FIELD>
+<!--624A567748534046B21FF892CA4FF4DC-->  <AD_FIELD_ID><![CDATA[624A567748534046B21FF892CA4FF4DC]]></AD_FIELD_ID>
+<!--624A567748534046B21FF892CA4FF4DC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--624A567748534046B21FF892CA4FF4DC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--624A567748534046B21FF892CA4FF4DC-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--624A567748534046B21FF892CA4FF4DC-->  <AD_TAB_ID><![CDATA[173B46EC4F91406E9B68DCF6464BB308]]></AD_TAB_ID>
+<!--624A567748534046B21FF892CA4FF4DC-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--624A567748534046B21FF892CA4FF4DC-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--624A567748534046B21FF892CA4FF4DC-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--624A567748534046B21FF892CA4FF4DC-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--624A567748534046B21FF892CA4FF4DC-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--624A567748534046B21FF892CA4FF4DC-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
+<!--624A567748534046B21FF892CA4FF4DC-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--624A567748534046B21FF892CA4FF4DC-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--624A567748534046B21FF892CA4FF4DC-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--624A567748534046B21FF892CA4FF4DC--></AD_FIELD>
+
 <!--625117B1E5874923BF97181AB349E8E3--><AD_FIELD>
 <!--625117B1E5874923BF97181AB349E8E3-->  <AD_FIELD_ID><![CDATA[625117B1E5874923BF97181AB349E8E3]]></AD_FIELD_ID>
 <!--625117B1E5874923BF97181AB349E8E3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -186222,6 +186247,31 @@
 <!--9297652C3C0A2C95E040007F0100484A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--9297652C3C0A2C95E040007F0100484A--></AD_FIELD>
 
+<!--929C26927DF84A94908BFDAEE6A2E9FF--><AD_FIELD>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <AD_FIELD_ID><![CDATA[929C26927DF84A94908BFDAEE6A2E9FF]]></AD_FIELD_ID>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <NAME><![CDATA[Canceled]]></NAME>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <AD_TAB_ID><![CDATA[07F009753DA647C2AF38697BA9F1B1A0]]></AD_TAB_ID>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <AD_COLUMN_ID><![CDATA[7299BF93D2984DF8932FE2800DA0ED2A]]></AD_COLUMN_ID>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--929C26927DF84A94908BFDAEE6A2E9FF-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--929C26927DF84A94908BFDAEE6A2E9FF--></AD_FIELD>
+
 <!--92FC7D0E63E80A15E040007F0100490C--><AD_FIELD>
 <!--92FC7D0E63E80A15E040007F0100490C-->  <AD_FIELD_ID><![CDATA[92FC7D0E63E80A15E040007F0100490C]]></AD_FIELD_ID>
 <!--92FC7D0E63E80A15E040007F0100490C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Jun 16 12:25:48 2011 +0200
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Wed Jun 29 10:31:43 2011 +0200
@@ -10766,4 +10766,27 @@
 <!--FF808181304FE89F0130500BEE4E003C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--FF808181304FE89F0130500BEE4E003C--></AD_REF_LIST>
 
+<!--FF80818130BC11480130BC193B3F0012--><AD_REF_LIST>
+<!--FF80818130BC11480130BC193B3F0012-->  <AD_REF_LIST_ID><![CDATA[FF80818130BC11480130BC193B3F0012]]></AD_REF_LIST_ID>
+<!--FF80818130BC11480130BC193B3F0012-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130BC11480130BC193B3F0012-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130BC11480130BC193B3F0012-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130BC11480130BC193B3F0012-->  <VALUE><![CDATA[V]]></VALUE>
+<!--FF80818130BC11480130BC193B3F0012-->  <NAME><![CDATA[Void]]></NAME>
+<!--FF80818130BC11480130BC193B3F0012-->  <AD_REFERENCE_ID><![CDATA[36972531DA994BB38ECB91993058282F]]></AD_REFERENCE_ID>
+<!--FF80818130BC11480130BC193B3F0012-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF80818130BC11480130BC193B3F0012--></AD_REF_LIST>
+
+<!--FF80818130BC11480130BC1CEDD20021--><AD_REF_LIST>
+<!--FF80818130BC11480130BC1CEDD20021-->  <AD_REF_LIST_ID><![CDATA[FF80818130BC11480130BC1CEDD20021]]></AD_REF_LIST_ID>
+<!--FF80818130BC11480130BC1CEDD20021-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF80818130BC11480130BC1CEDD20021-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF80818130BC11480130BC1CEDD20021-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF80818130BC11480130BC1CEDD20021-->  <VALUE><![CDATA[RPVOID]]></VALUE>
+<!--FF80818130BC11480130BC1CEDD20021-->  <NAME><![CDATA[Voided]]></NAME>
+<!--FF80818130BC11480130BC1CEDD20021-->  <DESCRIPTION><![CDATA[Voided]]></DESCRIPTION>
+<!--FF80818130BC11480130BC1CEDD20021-->  <AD_REFERENCE_ID><![CDATA[575BCB88A4694C27BC013DE9C73E6FE7]]></AD_REFERENCE_ID>
+<!--FF80818130BC11480130BC1CEDD20021-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF80818130BC11480130BC1CEDD20021--></AD_REF_LIST>
+
 </data>