[Reconciliation Refactor] add bank statement line amount param
authorSandra Huguet <sandra.huguet@openbravo.com>
Mon, 08 Sep 2014 13:57:07 +0200
changeset 24644 837b545a8011
parent 24643 66e8497a06cb
child 24645 560d1f93bb9b
[Reconciliation Refactor] add bank statement line amount param
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsExpression.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsHandler.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDefaultValues.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDisplayLogics.java
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Sep 08 13:57:07 2014 +0200
@@ -328,6 +328,18 @@
 <!--56CC0941477A4250AD07527AE15FAC61-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--56CC0941477A4250AD07527AE15FAC61--></AD_ELEMENT>
 
+<!--57E963DD34864B21A857F24BFF628BDD--><AD_ELEMENT>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <AD_ELEMENT_ID><![CDATA[57E963DD34864B21A857F24BFF628BDD]]></AD_ELEMENT_ID>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <COLUMNNAME><![CDATA[bslamount_display_logic]]></COLUMNNAME>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <NAME><![CDATA[Bank Statement Line Amount Display Logic]]></NAME>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <PRINTNAME><![CDATA[Bank Statement Line Amount Display Logic]]></PRINTNAME>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--57E963DD34864B21A857F24BFF628BDD-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--57E963DD34864B21A857F24BFF628BDD--></AD_ELEMENT>
+
 <!--583D70554DDA45BD8C80C0AF11C64FC5--><AD_ELEMENT>
 <!--583D70554DDA45BD8C80C0AF11C64FC5-->  <AD_ELEMENT_ID><![CDATA[583D70554DDA45BD8C80C0AF11C64FC5]]></AD_ELEMENT_ID>
 <!--583D70554DDA45BD8C80C0AF11C64FC5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -340,6 +352,18 @@
 <!--583D70554DDA45BD8C80C0AF11C64FC5-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--583D70554DDA45BD8C80C0AF11C64FC5--></AD_ELEMENT>
 
+<!--59E68501CA9547798EAE2CEAE774D64B--><AD_ELEMENT>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <AD_ELEMENT_ID><![CDATA[59E68501CA9547798EAE2CEAE774D64B]]></AD_ELEMENT_ID>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <COLUMNNAME><![CDATA[bslamount]]></COLUMNNAME>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <NAME><![CDATA[Bank Statement Line Amount]]></NAME>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <PRINTNAME><![CDATA[Bank Statement Line Amount]]></PRINTNAME>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--59E68501CA9547798EAE2CEAE774D64B-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--59E68501CA9547798EAE2CEAE774D64B--></AD_ELEMENT>
+
 <!--5D3526B2FC0F4BB2BE7FE13C5E9C009A--><AD_ELEMENT>
 <!--5D3526B2FC0F4BB2BE7FE13C5E9C009A-->  <AD_ELEMENT_ID><![CDATA[5D3526B2FC0F4BB2BE7FE13C5E9C009A]]></AD_ELEMENT_ID>
 <!--5D3526B2FC0F4BB2BE7FE13C5E9C009A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Mon Sep 08 13:57:07 2014 +0200
@@ -409,6 +409,31 @@
 <!--2653B134344A4BBEBA417F6CFEDE8D91-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[FF80808133186ADD01331B3A932C000D]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--2653B134344A4BBEBA417F6CFEDE8D91--></OBUIAPP_PARAMETER>
 
+<!--2AC4B53D136E4167B673265DAF6660DA--><OBUIAPP_PARAMETER>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <OBUIAPP_PARAMETER_ID><![CDATA[2AC4B53D136E4167B673265DAF6660DA]]></OBUIAPP_PARAMETER_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <NAME><![CDATA[Bank Statement Line Amount]]></NAME>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <SEQNO><![CDATA[7]]></SEQNO>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <COLUMNNAME><![CDATA[bslamount]]></COLUMNNAME>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentDefaultValuesExpression")]]></DEFAULTVALUE>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <AD_ELEMENT_ID><![CDATA[59E68501CA9547798EAE2CEAE774D64B]]></AD_ELEMENT_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <DISPLAYLOGIC><![CDATA[@bslamount_display_logic@='Y']]></DISPLAYLOGIC>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <READONLYLOGIC><![CDATA[true]]></READONLYLOGIC>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--2AC4B53D136E4167B673265DAF6660DA-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--2AC4B53D136E4167B673265DAF6660DA--></OBUIAPP_PARAMETER>
+
 <!--383A1B1C19674F23AF643521AEE759D8--><OBUIAPP_PARAMETER>
 <!--383A1B1C19674F23AF643521AEE759D8-->  <OBUIAPP_PARAMETER_ID><![CDATA[383A1B1C19674F23AF643521AEE759D8]]></OBUIAPP_PARAMETER_ID>
 <!--383A1B1C19674F23AF643521AEE759D8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1755,6 +1780,30 @@
 <!--DA22BED18BD944C9B6252B8400B89934-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--DA22BED18BD944C9B6252B8400B89934--></OBUIAPP_PARAMETER>
 
+<!--DF292864DA82439793FB760E6D5A1FCC--><OBUIAPP_PARAMETER>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <OBUIAPP_PARAMETER_ID><![CDATA[DF292864DA82439793FB760E6D5A1FCC]]></OBUIAPP_PARAMETER_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <NAME><![CDATA[Bank Statement Line Amount Display Logic]]></NAME>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <SEQNO><![CDATA[1250]]></SEQNO>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <COLUMNNAME><![CDATA[bslamount_display_logic]]></COLUMNNAME>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentDisplayLogicsExpression")]]></DEFAULTVALUE>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <AD_ELEMENT_ID><![CDATA[57E963DD34864B21A857F24BFF628BDD]]></AD_ELEMENT_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--DF292864DA82439793FB760E6D5A1FCC-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--DF292864DA82439793FB760E6D5A1FCC--></OBUIAPP_PARAMETER>
+
 <!--E2FB4840B65A44D4B3090A7E3C95FD95--><OBUIAPP_PARAMETER>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <OBUIAPP_PARAMETER_ID><![CDATA[E2FB4840B65A44D4B3090A7E3C95FD95]]></OBUIAPP_PARAMETER_ID>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java	Mon Sep 08 13:57:07 2014 +0200
@@ -104,6 +104,8 @@
           return handler.getOrganization(requestMap);
         case Document:
           return handler.getDefaultDocument(requestMap);
+        case BankStatementLineAmount:
+          return handler.getBankStatementLineAmount(requestMap);
         }
       } catch (Exception e) {
         log.error("Error trying to get default value of " + strCurrentParam + " " + e.getMessage(),
@@ -154,7 +156,8 @@
         "customer_credit"), IsSOTrx("issotrx"), Payment("fin_payment_id"), Invoice("c_invoice_id"), Order(
         "c_order_id"), ConversionRate("conversion_rate"), ConvertedAmount("converted_amount"), StandardPrecision(
         "StdPrecision"), GenerateCredit("generateCredit"), DocumentCategory("DOCBASETYPE"), ReferenceNo(
-        "reference_no"), Currency("c_currency_id"), Organization("ad_org_id"), Document("trxtype");
+        "reference_no"), Currency("c_currency_id"), Organization("ad_org_id"), Document("trxtype"), BankStatementLineAmount(
+        "bslamount");
 
     private String columnname;
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java	Mon Sep 08 13:57:07 2014 +0200
@@ -79,6 +79,9 @@
 
   public abstract String getDefaultPaymentDate(Map<String, String> requestMap) throws JSONException;
 
+  public abstract String getBankStatementLineAmount(Map<String, String> requestMap)
+      throws JSONException;
+
   protected abstract long getSeq();
 
   public String getDefaultCurrencyTo(Map<String, String> requestMap) throws JSONException {
@@ -262,4 +265,5 @@
       return null;
     }
   }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsExpression.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsExpression.java	Mon Sep 08 13:57:07 2014 +0200
@@ -66,6 +66,8 @@
           return handler.getCreditToUseDisplayLogic(requestMap) ? "Y" : "N";
         case OverpaymentAction:
           return handler.getOverpaymentActionDisplayLogic(requestMap) ? "Y" : "N";
+        case BankStatementLine:
+          return handler.getBankStatementLineDisplayLogic(requestMap) ? "Y" : "N";
         }
       } catch (Exception e) {
         log.error("Error trying to get default value of " + strCurrentParam + " " + e.getMessage(),
@@ -110,7 +112,8 @@
 
   private enum Parameters {
     Organization("ad_org_id_display_logic"), Document("trxtype_display_logic"), CreditToUse(
-        "credit_to_use_display_logic"), OverpaymentAction("overpayment_action_display_logic");
+        "credit_to_use_display_logic"), OverpaymentAction("overpayment_action_display_logic"), BankStatementLine(
+        "bslamount_display_logic");
 
     private String columnname;
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsHandler.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsHandler.java	Mon Sep 08 13:57:07 2014 +0200
@@ -38,6 +38,9 @@
   public abstract boolean getCreditToUseDisplayLogic(Map<String, String> requestMap)
       throws JSONException;
 
+  public abstract boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException;
+
   protected abstract long getSeq();
 
   public boolean getOverpaymentActionDisplayLogic(Map<String, String> requestMap)
@@ -60,4 +63,5 @@
     }
 
   }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -156,4 +156,10 @@
     return "";
   }
 
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    // BankStatementLineAmount
+    return "";
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -84,4 +84,11 @@
     return payment;
   }
 
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    // BankStatementLineDisplayLogic
+    return false;
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -167,4 +167,10 @@
     return "";
   }
 
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    // BankStatementLineAmount
+    return "";
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -92,4 +92,10 @@
     return getPayment(requestMap).getGeneratedCredit();
   }
 
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    // BankStatementLineDisplayLogic
+    return false;
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -140,4 +140,10 @@
     return OBDateUtils.formatDate(new Date());
   }
 
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    // BankStatementLineAmount
+    return "";
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -82,4 +82,10 @@
     return BigDecimal.ZERO;
   }
 
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    // BankStatementLineDisplayLogic
+    return false;
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -144,4 +144,10 @@
     return OBDateUtils.formatDate(new Date());
   }
 
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    // BankStatementLineAmount
+    return "";
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -82,4 +82,10 @@
     return BigDecimal.ZERO;
   }
 
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    // BankStatementLineDisplayLogic
+    return false;
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -140,4 +140,10 @@
     return OBDateUtils.formatDate(new Date());
   }
 
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    // BankStatementLineAmount
+    return "";
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -74,4 +74,10 @@
     return OBDal.getInstance().get(Invoice.class, context.getString("inpcInvoiceId"));
   }
 
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    // BankStatementLineDisplayLogic
+    return false;
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -144,4 +144,10 @@
     return "";
   }
 
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    // BankStatementLineAmount
+    return "";
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -75,4 +75,10 @@
     return OBDal.getInstance().get(Order.class, context.getString("inpcOrderId"));
   }
 
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    // BankStatementLineDisplayLogic
+    return false;
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDefaultValues.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDefaultValues.java	Mon Sep 08 13:57:07 2014 +0200
@@ -237,4 +237,14 @@
     }
     return null;
   }
+
+  @Override
+  public String getBankStatementLineAmount(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("depositamt") && context.has("withdrawalamt")) {
+      return new BigDecimal(context.getString("depositamt")).subtract(
+          new BigDecimal(context.getString("withdrawalamt"))).toString();
+    }
+    return BigDecimal.ZERO.toPlainString();
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDisplayLogics.java	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDisplayLogics.java	Mon Sep 08 13:57:07 2014 +0200
@@ -96,4 +96,19 @@
   BigDecimal getDefaultGeneratedCredit(Map<String, String> requestMap) throws JSONException {
     return BigDecimal.ZERO;
   }
+
+  @Override
+  public boolean getBankStatementLineDisplayLogic(Map<String, String> requestMap)
+      throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+
+    // BankStatementLineDisplayLogic
+    if (context.has("trxtype")) {
+      return true;
+    } else {
+      return false;
+
+    }
+
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Mon Sep 08 13:32:59 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Mon Sep 08 13:57:07 2014 +0200
@@ -102,6 +102,7 @@
       trxtype = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "",
       trxtypeParam = null,
       orgParam = null,
+      bankStatementLineAmount = null,
       bankStatementLineId;
   if (view && view.callerField && view.callerField.view && view.callerField.view.callerField && view.callerField.view.callerField.record && //
   typeof view.callerField.view.callerField.record.affinity !== 'undefined' && //
@@ -136,8 +137,11 @@
     form.removeField(0);
     orgParam = form.getField(0);
     form.removeField(0);
+    bankStatementLineAmount=form.getField(0);
+    form.removeField(0);
     form.addField(trxtypeParam);
     form.addField(orgParam);
+    form.addField(bankStatementLineAmount);
   }
 };
 
@@ -219,7 +223,7 @@
       affectedParams = [];
   isc.addProperties(defaultFilter, {
     paymentMethodName: item.getElementValue()
-  })
+  });
   OB.APRM.AddPayment.paymentMethodMulticurrency(view, form, true);
   OB.APRM.AddPayment.checkSingleActionAvailable(form);
   if (trxtype !== "") {