details:   https://code.openbravo.com/erp/devel/pi/rev/2bf4f16d601b
changeset: 16740:2bf4f16d601b
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Fri Jun 01 12:59:58 2012 +0200
summary:   Fixes issue 20434: Process failed during execution when post a 
Matched Invoice

details:   https://code.openbravo.com/erp/devel/pi/rev/b438f3afeb4e
changeset: 16741:b438f3afeb4e
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Mon Jun 04 10:07:52 2012 +0200
summary:   Fixes issue 20440: Error without information in the P&E of Return To 
Vendor

details:   https://code.openbravo.com/erp/devel/pi/rev/7c7695051a48
changeset: 16742:7c7695051a48
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Mon Jun 04 12:34:26 2012 +0200
summary:   Fixes issue 20663: In java SRMOPickEditLines.java can fail when is 
getting the tax

details:   https://code.openbravo.com/erp/devel/pi/rev/20e7cfac32dd
changeset: 16743:20e7cfac32dd
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Tue Jun 05 09:59:33 2012 +0200
summary:   Fixes issue 20640: Quick lunch short for specific names of some menu

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js
 |   2 +-
 src-db/database/sourcedata/AD_MESSAGE.xml                                      
                                                                                
 |  11 ++
 src/org/openbravo/common/actionhandler/SRMOPickEditLines.java                  
                                                                                
 |  38 ++++++---
 src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java                          
                                                                                
 |   9 +-
 4 files changed, 43 insertions(+), 17 deletions(-)

diffs (133 lines):

diff -r 5644f97bda6e -r 20e7cfac32dd 
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js
   Fri Jun 01 14:18:28 2012 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js
   Tue Jun 05 09:59:33 2012 +0200
@@ -129,7 +129,7 @@
   // is 20
   pickListCellHeight: 22,
 
-  quickRunWidth: 210,
+  quickRunWidth: 267,
   // fixes issue https://issues.openbravo.com/view.php?id=15105
   quickRunPickListCellHeight: 22,
   pickListHeight: 200,
diff -r 5644f97bda6e -r 20e7cfac32dd src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Fri Jun 01 14:18:28 2012 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Tue Jun 05 09:59:33 2012 +0200
@@ -19688,6 +19688,17 @@
 <!--D3FE17DEC49F4FC3BAE381FDAAA00D52-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D3FE17DEC49F4FC3BAE381FDAAA00D52--></AD_MESSAGE>
 
+<!--D40805953F4042C293C2390B6B36034E--><AD_MESSAGE>
+<!--D40805953F4042C293C2390B6B36034E-->  
<AD_MESSAGE_ID><![CDATA[D40805953F4042C293C2390B6B36034E]]></AD_MESSAGE_ID>
+<!--D40805953F4042C293C2390B6B36034E-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D40805953F4042C293C2390B6B36034E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D40805953F4042C293C2390B6B36034E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D40805953F4042C293C2390B6B36034E-->  
<VALUE><![CDATA[NoTaxFoundForProduct]]></VALUE>
+<!--D40805953F4042C293C2390B6B36034E-->  <MSGTEXT><![CDATA[With current 
product configuration and order it is not possible to found a valid tax for 
product @product@. Please change the tax and product configuration.]]></MSGTEXT>
+<!--D40805953F4042C293C2390B6B36034E-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--D40805953F4042C293C2390B6B36034E-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D40805953F4042C293C2390B6B36034E--></AD_MESSAGE>
+
 <!--D4208AC7E8B348D08F0D621DB273F257--><AD_MESSAGE>
 <!--D4208AC7E8B348D08F0D621DB273F257-->  
<AD_MESSAGE_ID><![CDATA[D4208AC7E8B348D08F0D621DB273F257]]></AD_MESSAGE_ID>
 <!--D4208AC7E8B348D08F0D621DB273F257-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
diff -r 5644f97bda6e -r 20e7cfac32dd 
src/org/openbravo/common/actionhandler/SRMOPickEditLines.java
--- a/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java     Fri Jun 
01 14:18:28 2012 +0200
+++ b/src/org/openbravo/common/actionhandler/SRMOPickEditLines.java     Tue Jun 
05 09:59:33 2012 +0200
@@ -38,6 +38,7 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.order.Order;
@@ -190,6 +191,12 @@
           parameters.add("Y");
 
           taxId = (String) CallStoredProcedure.getInstance().call("C_Gettax", 
parameters, null);
+          if (taxId == null || "".equals(taxId)) {
+            Map<String, String> errorParameters = new HashMap<String, 
String>();
+            errorParameters.put("product", product.getName());
+            String message = OBMessageUtils.messageBD("NoTaxFoundForProduct");
+            throw new OBException(OBMessageUtils.parseTranslation(message, 
errorParameters));
+          }
         }
         TaxRate tax = OBDal.getInstance().get(TaxRate.class, taxId);
 
@@ -249,12 +256,14 @@
         if (isDefultPriceList) {
           throw new OBException("NoDefaultPriceList");
         } else {
-          // If pl was the Business Partner's price list, there was no fit 
price list for it so take
+          // If pl was the Business Partner's price list, there was no fit 
price list for it so
+          // take
           // the default price list.
-          pl = getDefaultPriceList(o.getClient().getId(), 
o.getOrganization().getId(), isSalesPL);
-          earliestPlv = getEarliestPriceListVersion(pl, orderDate);
-          // There is no fit price list version.
-          if (earliestPlv == null) {
+          try {
+            pl = getDefaultPriceList(o.getClient().getId(), 
o.getOrganization().getId(), isSalesPL);
+            earliestPlv = getEarliestPriceListVersion(pl, orderDate);
+          } catch (Exception e) {
+            // There is no fit price list version.
             throw new OBException("NoDefaultPriceList");
           }
         }
@@ -267,19 +276,20 @@
         } else if (prices != null) {
           return prices;
         } else {
-          pl = getDefaultPriceList(o.getClient().getId(), 
o.getOrganization().getId(), isSalesPL);
-          earliestPlv = getEarliestPriceListVersion(pl, orderDate);
-          if (earliestPlv == null) {
+          try {
+            pl = getDefaultPriceList(o.getClient().getId(), 
o.getOrganization().getId(), isSalesPL);
+            earliestPlv = getEarliestPriceListVersion(pl, orderDate);
+          } catch (Exception e) {
             throw new OBException("NoDefaultPriceList");
+          }
+          prices = getProductPricesFromPLV(strProductId, earliestPlv);
+          if (prices == null) {
+            throw new OBException("NoProductInDefaultPriceList");
           } else {
-            prices = getProductPricesFromPLV(strProductId, earliestPlv);
-            if (prices == null) {
-              throw new OBException("NoProductInDefaultPriceList");
-            } else {
-              return prices;
-            }
+            return prices;
           }
         }
+
       }
       return null;
     } finally {
diff -r 5644f97bda6e -r 20e7cfac32dd 
src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java     Fri Jun 01 
14:18:28 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocMatchInv.java     Tue Jun 05 
09:59:33 2012 +0200
@@ -50,8 +50,8 @@
     super(AD_Client_ID, AD_Org_ID, connectionProvider);
   }
 
-  public void loadObjectFieldProvider(ConnectionProvider conn,
-      @SuppressWarnings("hiding") String AD_Client_ID, String Id) throws 
ServletException {
+  public void loadObjectFieldProvider(ConnectionProvider conn, 
@SuppressWarnings("hiding")
+  String AD_Client_ID, String Id) throws ServletException {
     setObjectFieldProvider(DocMatchInvData.selectRegistro(conn, AD_Client_ID, 
Id));
   }
 
@@ -203,6 +203,11 @@
     DocLine docLine = new DocLine(DocumentType, Record_ID, "");
     docLine.m_C_Project_ID = data[0].getField("INOUTPROJECT");
 
+    if (ZERO.compareTo(bdCost) == 0) {
+      strMessage = "@MatchedInvIsZero@";
+      setStatus(STATUS_DocumentDisabled);
+    }
+
     dr = fact
         .createLine(docLine, 
getAccount(AcctServer.ACCTTYPE_NotInvoicedReceipts, as, conn),
             costCurrencyId, bdCost.toString(), Fact_Acct_Group_ID, 
nextSeqNo(SeqNo), DocumentType,

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to