You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mo...@apache.org on 2011/03/23 17:59:29 UTC

svn commit: r1084638 - /ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml

Author: mor
Date: Wed Mar 23 16:59:29 2011
New Revision: 1084638

URL: http://svn.apache.org/viewvc?rev=1084638&view=rev
Log:
Bug fix - When a new price rule is added it should default to now. The screen to add a price rule can be extended to include all the attribute on ProductPriceRule entity other then just rule name.

Modified:
    ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml?rev=1084638&r1=1084637&r2=1084638&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/price/PriceServices.xml Wed Mar 23 16:59:29 2011
@@ -239,6 +239,9 @@ under the License.
 
         <make-value value-field="newEntity" entity-name="ProductPriceRule"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
+        <if-empty field="parameters.fromDate">
+            <now-timestamp field="newEntity.fromDate"/>
+        </if-empty>
         <sequenced-id sequence-name="ProductPriceRule" field="newEntity.productPriceRuleId"/>
         <field-to-result field="newEntity.productPriceRuleId" result-name="productPriceRuleId"/>