From 6c834fcc894cf8eef2b73ed0bb8089da9dc9aa28 Mon Sep 17 00:00:00 2001
From: "chaitanya@vtiger.com" <chaitanya@vtiger.com>
Date: Thu, 30 May 2024 13:00:37 +0530
Subject: [PATCH] E_ALL cleanups in Services module

---
 .../modules/Services/modules/Services/Services.php   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pkg/vtiger/modules/Services/modules/Services/Services.php b/pkg/vtiger/modules/Services/modules/Services/Services.php
index de5465ecf..d02895830 100644
--- a/pkg/vtiger/modules/Services/modules/Services/Services.php
+++ b/pkg/vtiger/modules/Services/modules/Services/Services.php
@@ -14,6 +14,7 @@ class Services extends CRMEntity {
 	var $table_name = 'vtiger_service';
 	var $table_index= 'serviceid';
 	var $column_fields = Array();
+	protected $isWorkFlowFieldUpdate = false;
 
 	/** Indicator if this is a custom module or standard module */
 	var $IsCustomModule = true;
@@ -117,12 +118,12 @@ class Services extends CRMEntity {
 		{
 			$this->insertTaxInformation('vtiger_producttaxrel', 'Services');
 
-			if ($_REQUEST['action'] != 'MassEditSave' ) {
+			if (isset($_REQUEST['action']) && $_REQUEST['action'] != 'MassEditSave' ) {
 				$this->insertPriceInformation('vtiger_productcurrencyrel', 'Services');
 			}
 		}
 
-		if($_REQUEST['action'] == 'SaveAjax' && isset($_REQUEST['base_currency']) && isset($_REQUEST['unit_price'])){
+		if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'SaveAjax' && isset($_REQUEST['base_currency']) && isset($_REQUEST['unit_price'])){
 			$this->insertPriceInformation('vtiger_productcurrencyrel', 'Services');
 		}
 		// Update unit price value in vtiger_productcurrencyrel
@@ -139,7 +140,6 @@ class Services extends CRMEntity {
 		global $adb, $log;
 		$log->debug("Entering into insertTaxInformation($tablename, $module) method ...");
 		$tax_details = getAllTaxes();
-
 		$tax_per = '';
 		//Save the Product - tax relationship if corresponding tax check box is enabled
 		//Delete the existing tax if any
@@ -162,7 +162,7 @@ class Services extends CRMEntity {
 				$taxid = getTaxId($tax_name);
 				$tax_per = $_REQUEST[$tax_name];
 
-				$taxRegions = $_REQUEST[$tax_name.'_regions'];
+				$taxRegions = isset($_REQUEST[$tax_name.'_regions']) ? $_REQUEST[$tax_name.'_regions'] : "";
 				if ($taxRegions) {
 					$tax_per = $_REQUEST[$tax_name.'_defaultPercentage'];
 				} else {
@@ -177,7 +177,7 @@ class Services extends CRMEntity {
 
 				$log->debug("Going to save the Product - $tax_name tax relationship");
 
-				if ($_REQUEST['action'] === 'MassEditSave') {
+				if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'MassEditSave') {
 					$adb->pquery('DELETE FROM vtiger_producttaxrel WHERE productid=? AND taxid=?', array($this->id, $taxid));
 				}
 
@@ -228,7 +228,7 @@ class Services extends CRMEntity {
 			$requestPrice = CurrencyField::convertToDBFormat($_REQUEST['unit_price'], null, true);
 			$actualPrice = CurrencyField::convertToDBFormat($_REQUEST[$cur_valuename], null, true);
 			$isQuickCreate = false;
-			if($_REQUEST['action']=='SaveAjax' && isset($_REQUEST['base_currency']) && $_REQUEST['base_currency'] == $cur_valuename){
+			if(isset($_REQUEST['action']) && $_REQUEST['action']=='SaveAjax' && isset($_REQUEST['base_currency']) && $_REQUEST['base_currency'] == $cur_valuename){
 				$actualPrice = $requestPrice;
 				$isQuickCreate = true;
 			}
-- 
GitLab