svn commit: r1801274 - in /ofbiz/ofbiz-framework/trunk/applications/order: groovyScripts/entry/AddGiftCertificates.groovy template/entry/cart/ShowCart.ftl

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

svn commit: r1801274 - in /ofbiz/ofbiz-framework/trunk/applications/order: groovyScripts/entry/AddGiftCertificates.groovy template/entry/cart/ShowCart.ftl

Deepak Dixit-5
Author: deepak
Date: Sat Jul  8 10:59:18 2017
New Revision: 1801274

URL: http://svn.apache.org/viewvc?rev=1801274&view=rev
Log:
Fixed: add gift certificate in purchase order cause exception (OFBIZ-9438)
Apply slightly modified patch from jira issue.
Thanks Wai and Pallavi for your contribution.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/AddGiftCertificates.groovy
    ofbiz/ofbiz-framework/trunk/applications/order/template/entry/cart/ShowCart.ftl

Modified: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/AddGiftCertificates.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/AddGiftCertificates.groovy?rev=1801274&r1=1801273&r2=1801274&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/AddGiftCertificates.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/entry/AddGiftCertificates.groovy Sat Jul  8 10:59:18 2017
@@ -51,5 +51,5 @@ context.giftCardProductList = giftCardPr
 // Get Survey Id for Gift Certificates
 
 productStoreFinActSetting = from("ProductStoreFinActSetting").where("productStoreId", productStoreId, "finAccountTypeId", "GIFTCERT_ACCOUNT").queryOne()
-context.surveyId = productStoreFinActSetting.purchaseSurveyId
+context.surveyId = productStoreFinActSetting?.purchaseSurveyId
 

Modified: ofbiz/ofbiz-framework/trunk/applications/order/template/entry/cart/ShowCart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/template/entry/cart/ShowCart.ftl?rev=1801274&r1=1801273&r2=1801274&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/template/entry/cart/ShowCart.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/template/entry/cart/ShowCart.ftl Sat Jul  8 10:59:18 2017
@@ -91,7 +91,9 @@ under the License.
                       </#if>
                       <@htmlTemplate.lookupField formName="quickaddform" name="add_product_id" id="add_product_id" fieldFormName="${fieldFormName}"/>
                       <a href="javascript:quicklookup(document.quickaddform.add_product_id)" class="buttontext">${uiLabelMap.OrderQuickLookup}</a>
+                        <#if "SALES_ORDER" == shoppingCart.getOrderType()>
                       <a href="javascript:quicklookupGiftCertificate()" class="buttontext">${uiLabelMap.OrderAddGiftCertificate}</a>
+                        </#if>
                       <#if "PURCHASE_ORDER" == shoppingCart.getOrderType()>
                         <a href="javascript:showQohAtp()" class="buttontext">${uiLabelMap.ProductAtpQoh}</a>
                       </#if>