Author: ashish
Date: Sat May 21 06:49:00 2016
New Revision: 1744851

URL: http://svn.apache.org/viewvc?rev=1744851&view=rev
Log:
Applied patch for jira issue - OFBIZ-6105 - Have the internal organization set 
upon Quote creation.
Thanks Harsh for the contribution.

Modified:
    
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml

Modified: 
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml?rev=1744851&r1=1744850&r2=1744851&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml 
(original)
+++ 
ofbiz/trunk/applications/order/script/org/ofbiz/order/quote/QuoteServices.xml 
Sat May 21 06:49:00 2016
@@ -145,6 +145,14 @@ under the License.
             <set value="REQ_TAKER" field="takerMap.roleTypeId"/>
             <call-service service-name="createQuoteRole" 
in-map-name="takerMap"/>
         </if-compare-field>
+        
+        <!-- Set ProductStore's payToPartyId as internal organisation for 
quote -->
+        <if-not-empty field="productStore.payToPartyId">
+            <set from-field="newEntity.quoteId" 
field="internalOrgMap.quoteId"/>
+            <set from-field="productStore.payToPartyId" 
field="internalOrgMap.partyId"/>
+            <set value="INTERNAL_ORGANIZATIO" 
field="internalOrgMap.roleTypeId"/>
+            <call-service service-name="createQuoteRole" 
in-map-name="internalOrgMap"/>
+        </if-not-empty>
 
         <check-errors/>
     </simple-method>


Reply via email to