Fixes issue 16229 Payment Method added to callout in Multiphase Project Window
authorAinhoa Pagola <ainhoa.pagola@openbravo.com>
Wed, 11 May 2011 18:07:12 +0200
changeset 12119 ff48f6570c57
parent 12118 08a220fdf2ea
child 12120 9069258ded36
Fixes issue 16229 Payment Method added to callout in Multiphase Project Window
src/org/openbravo/erpCommon/ad_callouts/SE_Project_BPartner.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Project_BPartner.java	Wed May 11 18:06:05 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Project_BPartner.java	Wed May 11 18:07:12 2011 +0200
@@ -72,13 +72,15 @@
       log4j.debug("Output: dataSheet");
     XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
         "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument();
-    String strPaymentrule, strPaymentterm, strPricelist;
-    strPaymentrule = strPaymentterm = strPricelist = "";
+    String strPaymentrule, strPaymentterm, strPricelist, strPaymentMethod;
+    strPaymentrule = strPaymentterm = strPricelist = strPaymentMethod = "";
     BpartnerMiscData[] data = BpartnerMiscData.select(this, strBPartner);
     if (data != null && data.length > 0) {
       strPaymentrule = (strIsSOTrx.equals("Y") ? data[0].paymentrule : data[0].paymentrulepo);
       strPaymentterm = (strIsSOTrx.equals("Y") ? data[0].cPaymenttermId : data[0].poPaymenttermId);
       strPricelist = (strIsSOTrx.equals("Y") ? data[0].mPricelistId : data[0].poPricelistId);
+      strPaymentMethod = (strIsSOTrx.equals("Y") ? data[0].finPaymentmethodId
+          : data[0].poPaymentmethodId);
     }
 
     StringBuffer resultado = new StringBuffer();
@@ -176,7 +178,8 @@
     resultado.append("\n),");
     resultado.append("new Array(\"inppaymentrule\", \"" + strPaymentrule + "\"),");
     resultado.append("new Array(\"inpcPaymenttermId\", \"" + strPaymentterm + "\"),");
-    resultado.append("new Array(\"inpmPricelistId\", \"" + strPricelist + "\")");
+    resultado.append("new Array(\"inpmPricelistId\", \"" + strPricelist + "\"),");
+    resultado.append("new Array(\"inpfinPaymentmethodId\", \"" + strPaymentMethod + "\")");
     resultado.append(");");
     xmlDocument.setParameter("array", resultado.toString());
     response.setContentType("text/html; charset=UTF-8");