[OFBiz] SVN: r4992 - trunk/applications/order/script/org/ofbiz/order/quote

jacopo at svn.ofbiz.org jacopo at svn.ofbiz.org
Sat May 14 12:28:18 EDT 2005


Author: jacopo
Date: 2005-05-14 11:28:01 -0500 (Sat, 14 May 2005)
New Revision: 4992

Modified:
   trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
Log:
Improvements to the quote stuff (plus misc fixes):

- added new entity and services to manage coefficients for a quote: the coefficients are used to quickly calculate default prices for quote items based on product's averageCost
- added new screen to manage quote prices
- added some missing uilabels


Modified: trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
===================================================================
--- trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml	2005-05-14 16:24:27 UTC (rev 4991)
+++ trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml	2005-05-14 16:28:01 UTC (rev 4992)
@@ -151,6 +151,45 @@
         <check-errors/>
     </simple-method>
     
+    <!-- create a new QuoteCoefficient -->
+    <simple-method method-name="createQuoteCoefficient" short-description="Create a QuoteCoefficient">
+        <check-permission permission="ORDERMGR" action="_CREATE">
+            <fail-message message="Security Error: to run createQuoteCoefficient you must have the ORDERMGR_CREATE or ORDERMGR_ADMIN permission"/>
+        </check-permission>
+        <check-errors/>
+        <!-- create new entity and create all the fields -->
+        <make-value value-name="newEntity" entity-name="QuoteCoefficient"/>
+        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
+        <create-value value-name="newEntity"/>
+        <check-errors/>
+    </simple-method>
+
+    <!-- update an existing QuoteCoefficient -->
+    <simple-method method-name="updateQuoteCoefficient" short-description="Update an existing QuoteCoefficient">
+        <check-permission permission="ORDERMGR" action="_CREATE">
+            <fail-message message="Security Error: to run updateQuoteCoefficient you must have the ORDERMGR_CREATE or ORDERMGR_ADMIN permission"/>
+        </check-permission>
+        <check-errors/>
+        <entity-one entity-name="QuoteCoefficient" value-name="quoteCoefficient" auto-field-map="true"/>
+        <check-errors/>
+        <set-nonpk-fields map-name="parameters" value-name="quoteCoefficient"/>
+        <store-value value-name="quoteCoefficient"/>
+        <check-errors/>
+    </simple-method>
+
+    <!-- remove an existing QuoteCoefficient -->
+    <simple-method method-name="removeQuoteCoefficient" short-description="Remove an existing QuoteCoefficient">
+        <check-permission permission="ORDERMGR" action="_CREATE">
+            <fail-message message="Security Error: to run removeQuoteCoefficient you must have the ORDERMGR_CREATE or ORDERMGR_ADMIN permission"/>
+        </check-permission>
+        <check-errors/>
+        <entity-one entity-name="QuoteCoefficient" value-name="quoteCoefficient" auto-field-map="true"/>
+        <check-errors/>
+        <remove-value value-name="quoteCoefficient"/>
+        <check-errors/>
+    </simple-method>
+
     <!-- create a new Quote and QuoteItem for a given CustRequest -->
     <simple-method method-name="createQuoteAndQuoteItemForRequest" short-description="Create a Quote">
         <check-permission permission="ORDERMGR" action="_CREATE">
@@ -200,5 +239,32 @@
         </if-not-empty>
         <check-errors/>
     </simple-method>
+    <simple-method method-name="autoUpdateQuotePrice" short-description="Auto update a QuoteItem price">
+        <check-permission permission="ORDERMGR" action="_CREATE">
+            <fail-message message="Security Error: to run autoUpdateQuotePrice you must have the ORDERMGR_CREATE or ORDERMGR_ADMIN permission"/>
+        </check-permission>
+        <check-errors/>
+        <entity-one entity-name="QuoteItem" value-name="quoteItem" auto-field-map="true"/>
+        <check-errors/>
+        <if-not-empty field-name="parameters.manualQuoteUnitPrice">
+            <field-to-field field-name="parameters.manualQuoteUnitPrice" to-field-name="quoteItem.quoteUnitPrice"/>
+        </if-not-empty>
+        <if-empty field-name="parameters.manualQuoteUnitPrice">
+            <if-not-empty field-name="parameters.defaultQuoteUnitPrice">
+                <field-to-field field-name="parameters.defaultQuoteUnitPrice" to-field-name="quoteItem.quoteUnitPrice"/>
+            </if-not-empty>
+            <!--
+            <calculate field-name="quoteItem.quoteUnitPrice" type="Double">
+                <calcop operator="multiply">
+                    <calcop operator="get" field-name="parameters.averageCost"/>
+                    <calcop operator="get" field-name="parameters.costToPriceMult"/>
+                </calcop>
+            </calculate>
+            -->
+        </if-empty>
+        <store-value value-name="quoteItem"/>
+        <check-errors/>
+        <field-to-request field-name="quoteItem.quoteId" request-name="quoteId"/>
+    </simple-method>
 
 </simple-methods>
\ No newline at end of file



More information about the Svn mailing list