svn commit: r574699 - in /ofbiz/trunk/applications/product: config/ProductUiLabels.properties script/org/ofbiz/product/promo/PromoServices.xml servicedef/services_pricepromo.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r574699 - in /ofbiz/trunk/applications/product: config/ProductUiLabels.properties script/org/ofbiz/product/promo/PromoServices.xml servicedef/services_pricepromo.xml

jaz-3
Author: jaz
Date: Tue Sep 11 14:25:45 2007
New Revision: 574699

URL: http://svn.apache.org/viewvc?rev=574699&view=rev
Log:
changed create promo code service to accept the ID from the form

Modified:
    ofbiz/trunk/applications/product/config/ProductUiLabels.properties
    ofbiz/trunk/applications/product/script/org/ofbiz/product/promo/PromoServices.xml
    ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml

Modified: ofbiz/trunk/applications/product/config/ProductUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/config/ProductUiLabels.properties?rev=574699&r1=574698&r2=574699&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/config/ProductUiLabels.properties (original)
+++ ofbiz/trunk/applications/product/config/ProductUiLabels.properties Tue Sep 11 14:25:45 2007
@@ -1072,6 +1072,7 @@
 ProductPromotionProducts=Promotion Products
 ProductPromotionReqCode=Req. Code
 ProductPromotionReqEmailOrParty=Req. Email or Party
+ProductPromotionUploadSetOfPromotionCodes=Upload Set of Promotion Codes
 ProductPromotionUseLimits=Use Limits
 ProductPromotions=Promotions
 ProductCommissions=Commissions

Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/promo/PromoServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/promo/PromoServices.xml?rev=574699&r1=574698&r2=574699&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/script/org/ofbiz/product/promo/PromoServices.xml (original)
+++ ofbiz/trunk/applications/product/script/org/ofbiz/product/promo/PromoServices.xml Tue Sep 11 14:25:45 2007
@@ -152,7 +152,11 @@
 
         <make-value value-name="newEntity" entity-name="ProductPromoCode"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
-        <sequenced-id-to-env sequence-name="ProductPromoCode" env-name="newEntity.productPromoCodeId" stagger-max="100"/>
+        <set-pk-fields map-name="parameters" value-name="newEntity"/>
+        <if-empty field-name="newEntity.productPromoCodeId">
+            <sequenced-id-to-env sequence-name="ProductPromoCode" env-name="newEntity.productPromoCodeId" stagger-max="100"/>
+        </if-empty>
+        
         <field-to-result field-name="productPromoCodeId" map-name="newEntity"/>
 
         <now-timestamp-to-env env-name="nowTimestamp"/>

Modified: ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml?rev=574699&r1=574698&r2=574699&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml (original)
+++ ofbiz/trunk/applications/product/servicedef/services_pricepromo.xml Tue Sep 11 14:25:45 2007
@@ -191,7 +191,7 @@
     <service name="createProductPromoCode" default-entity-name="ProductPromoCode" engine="simple"
                 location="org/ofbiz/product/promo/PromoServices.xml" invoke="createProductPromoCode" auth="true">
         <description>Create a ProductPromoCode</description>
-        <auto-attributes include="pk" mode="OUT" optional="false"/>
+        <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true">
             <exclude field-name="createdDate"/>
             <exclude field-name="createdByUserLogin"/>
@@ -215,6 +215,12 @@
         <description>Delete a ProductPromoCode</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
+    <service name="createBulkProductPromoCode" engine="java"
+            location="org.ofbiz.product.promo.PromoServices" invoke="importPromoCodesFromFile" auth="true">
+        <description>Creates several ProductPromoCode from an uploaded list of promo codes (one code per line)</description>
+        <implements service="uploadFileInterface"/>
+        <auto-attributes mode="IN" entity-name="ProductPromoCode" include="nonpk" optional="true"/>        
+    </service>
 
     <service name="createProductPromoCodeEmail" default-entity-name="ProductPromoCodeEmail" engine="simple"
                 location="org/ofbiz/product/promo/PromoServices.xml" invoke="createProductPromoCodeEmail" auth="true">
@@ -226,6 +232,12 @@
                 location="org/ofbiz/product/promo/PromoServices.xml" invoke="deleteProductPromoCodeEmail" auth="true">
         <description>Delete a ProductPromoCodeEmail</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
+    </service>
+    <service name="createBulkProductPromoCodeEmail" engine="java"
+                location="org.ofbiz.product.promo.PromoServices" invoke="importPromoCodeEmailsFromFile" auth="true">
+        <description>Create several ProductPromoCodeEmail from an uploaded list of emails (one address per line)</description>
+        <implements service="uploadFileInterface"/>
+        <attribute name="productPromoCodeId" type="String" mode="IN" optional="false"/>        
     </service>
 
     <service name="createProductPromoCodeParty" default-entity-name="ProductPromoCodeParty" engine="simple"