minor fix for priceset
authordeb.monish <monish.deb@webaccessglobal.com>
Thu, 3 Mar 2016 20:48:00 +0000 (02:18 +0530)
committerdeb.monish <monish.deb@webaccessglobal.com>
Thu, 3 Mar 2016 20:48:00 +0000 (02:18 +0530)
CRM/Contribute/Form/Contribution/Main.php

index 2e8e68b65d7047f50ffebc47ea957b6bb758798d..73cb547540a7c3a1d9f315ec14eda4a8705d7bcf 100644 (file)
@@ -1008,6 +1008,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
 
     $params['currencyID'] = CRM_Core_Config::singleton()->defaultCurrency;
 
+    $is_quick_config = 0;
     if (!empty($params['priceSetId'])) {
       $is_quick_config = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_priceSetId, 'is_quick_config');
       if ($is_quick_config) {
@@ -1053,7 +1054,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu
         empty($this->_paymentProcessor) &&
         !array_key_exists('hidden_processor', $params)) ||
       (CRM_Utils_Array::value('payment_processor_id', $params) == 0)
-      && $params['amount'] != 0
+      && ($is_quick_config == 0 || $params['amount'] != 0)
     ) {
       $params['is_pay_later'] = 1;
     }