You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by bi...@apache.org on 2007/12/12 01:21:29 UTC

svn commit: r603423 - in /ofbiz/trunk/applications/product/src/org/ofbiz: product/price/PriceServices.java shipment/thirdparty/usps/UspsServices.java

Author: bibryam
Date: Tue Dec 11 16:21:27 2007
New Revision: 603423

URL: http://svn.apache.org/viewvc?rev=603423&view=rev
Log:
Fixed a bug in calculateProductPrice service when called for products with agreement.
Removed non UTF character causing warnings.

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=603423&r1=603422&r2=603423&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Tue Dec 11 16:21:27 2007
@@ -485,7 +485,7 @@
         List orderItemPriceInfos = FastList.newInstance();
         if (defaultPriceValue != null) {
             // If a price calc formula (service) is specified, then use it to get the unit price
-            if (UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) {
+            if ("ProductPrice".equals(defaultPriceValue.getEntityName()) && UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) {
                 GenericValue customMethod = null;
                 try {
                     customMethod = defaultPriceValue.getRelatedOne("CustomMethod");

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=603423&r1=603422&r2=603423&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java Tue Dec 11 16:21:27 2007
@@ -181,7 +181,7 @@
             UtilXml.addChildElementValue(packageElement, "Machinable", "False", requestDocument);
         }
 
-        // send the request                                                                รท
+        // send the request
         Document responseDocument = null;
         try {
             responseDocument = sendUspsRequest("RateV2", requestDocument);



Re: svn commit: r603423 - in /ofbiz/trunk/applications/product/src/org/ofbiz: product/price/PriceServices.java shipment/thirdparty/usps/UspsServices.java

Posted by Jacopo Cappellato <ti...@sastau.it>.
Bilgin,

this is a good catch, thanks.

Jacopo

bibryam@apache.org wrote:
> Author: bibryam
> Date: Tue Dec 11 16:21:27 2007
> New Revision: 603423
> 
> URL: http://svn.apache.org/viewvc?rev=603423&view=rev
> Log:
> Fixed a bug in calculateProductPrice service when called for products with agreement.
> Removed non UTF character causing warnings.
> 
> Modified:
>     ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
>     ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/usps/UspsServices.java
> 
> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=603423&r1=603422&r2=603423&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java Tue Dec 11 16:21:27 2007
> @@ -485,7 +485,7 @@
>          List orderItemPriceInfos = FastList.newInstance();
>          if (defaultPriceValue != null) {
>              // If a price calc formula (service) is specified, then use it to get the unit price
> -            if (UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) {
> +            if ("ProductPrice".equals(defaultPriceValue.getEntityName()) && UtilValidate.isNotEmpty(defaultPriceValue.getString("customPriceCalcService"))) {
>                  GenericValue customMethod = null;
>                  try {
>                      customMethod = defaultPriceValue.getRelatedOne("CustomMethod");