Author: mrisaliti
Date: Sat Apr 12 08:26:26 2008
New Revision: 647461

URL: http://svn.apache.org/viewvc?rev=647461&view=rev
Log:
When a customPriceCalcService has been run into the calculateProductPrice it 
was not possible to give custom attributes that the custom service can use it 
(OFBIZ-1747)

Modified:
    ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml
    
ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java

Modified: ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml?rev=647461&r1=647460&r2=647461&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml 
(original)
+++ ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml Sat Apr 
12 08:26:26 2008
@@ -44,6 +44,7 @@
         <attribute name="checkIncludeVat" type="String" mode="IN" 
optional="true"><!-- can be Y or N, defaults to N --></attribute>
         <attribute name="findAllQuantityPrices" type="String" mode="IN" 
optional="true"><!-- can be Y or N, defaults to N; see the allQuantityPrices 
attribute for more details --></attribute>
         <attribute name="surveyResponseId" type="String" mode="IN" 
optional="true"/>
+        <attribute name="customAttributes" type="Map" mode="IN" 
optional="true"/>
         <attribute name="basePrice" type="Double" mode="OUT" 
optional="false"><!-- will only be different from price if there is a display 
price adjustment, for example: checkIncludeVat=Y and a VAT amount was found 
--></attribute>
         <attribute name="price" type="Double" mode="OUT" optional="false"/>
         <attribute name="listPrice" type="Double" mode="OUT" optional="true"/>

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=647461&r1=647460&r2=647461&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 
Sat Apr 12 08:26:26 2008
@@ -97,6 +97,7 @@
         String webSiteId = (String) context.get("webSiteId");
         String checkIncludeVat = (String) context.get("checkIncludeVat");
         String surveyResponseId = (String) context.get("surveyResponseId");
+        Map customAttributes = (Map) context.get("customAttributes");
         
         String findAllQuantityPricesStr = (String) 
context.get("findAllQuantityPrices");
         boolean findAllQuantityPrices = "Y".equals(findAllQuantityPricesStr);
@@ -501,6 +502,9 @@
                     inMap.put("amount", amountDbl);
                     if (UtilValidate.isNotEmpty(surveyResponseId)) {
                         inMap.put("surveyResponseId", surveyResponseId);
+                    }
+                    if (UtilValidate.isNotEmpty(customAttributes)) {
+                        inMap.put("customAttributes", customAttributes);
                     }
                     try {
                         Map outMap = 
dispatcher.runSync(customMethod.getString("customMethodName"), inMap);


Reply via email to