@@ -112,6 +112,7 @@ |
||
112 | 112 | /** |
113 | 113 | * Clean up the input to be used as a regex |
114 | 114 | * @access private |
115 | + * @param string $value |
|
115 | 116 | */ |
116 | 117 | public function __formatAsRegex($value) |
117 | 118 | { |
@@ -70,8 +70,9 @@ discard block |
||
70 | 70 | unset($this->tplvars); |
71 | 71 | |
72 | 72 | $this->tplvars = []; |
73 | - foreach ($restorevars as $key => $val) |
|
74 | - $this->assign($key, $val); |
|
73 | + foreach ($restorevars as $key => $val) { |
|
74 | + $this->assign($key, $val); |
|
75 | + } |
|
75 | 76 | } |
76 | 77 | |
77 | 78 | /** |
@@ -82,8 +83,9 @@ discard block |
||
82 | 83 | */ |
83 | 84 | public function merge($instring, $avoidLookup = false) |
84 | 85 | { |
85 | - if (empty($instring)) |
|
86 | - return $instring; |
|
86 | + if (empty($instring)) { |
|
87 | + return $instring; |
|
88 | + } |
|
87 | 89 | |
88 | 90 | if (!$avoidLookup) { |
89 | 91 |
@@ -20,6 +20,7 @@ discard block |
||
20 | 20 | * Helper function to log messages |
21 | 21 | * @param String Message to log |
22 | 22 | * @param Boolean true appends linebreak, false to avoid it |
23 | + * @param string $message |
|
23 | 24 | * @access private |
24 | 25 | */ |
25 | 26 | static function log($message, $delim = true) |
@@ -30,6 +31,7 @@ discard block |
||
30 | 31 | /** |
31 | 32 | * Initialize webservice for the given module |
32 | 33 | * @param Module Instance of the module. |
34 | + * @param Module $moduleInstance |
|
33 | 35 | */ |
34 | 36 | static function initialize($moduleInstance) |
35 | 37 | { |
@@ -45,6 +47,7 @@ discard block |
||
45 | 47 | /** |
46 | 48 | * Initialize webservice for the given module |
47 | 49 | * @param Module Instance of the module. |
50 | + * @param Module $moduleInstance |
|
48 | 51 | */ |
49 | 52 | static function uninitialize($moduleInstance) |
50 | 53 | { |
@@ -69,6 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Normalize the directory path separators. |
72 | + * @param string $path |
|
72 | 73 | */ |
73 | 74 | public function __normalizePath($path) |
74 | 75 | { |
@@ -79,6 +80,7 @@ discard block |
||
79 | 80 | |
80 | 81 | /** |
81 | 82 | * Copy the directory on the disk into zip file. |
83 | + * @param string $zipdirname |
|
82 | 84 | */ |
83 | 85 | public function copyDirectoryFromDisk($dirname, $zipdirname = null, $excludeList = null, $basedirname = null) |
84 | 86 | { |
@@ -50,8 +50,9 @@ discard block |
||
50 | 50 | if ($search_index === 0) { |
51 | 51 | $startindex = strlen($base_realpath) + 1; |
52 | 52 | // On windows $base_realpath ends with / and On Linux it will not have / at end! |
53 | - if (strrpos($base_realpath, '/') == strlen($base_realpath) - 1) |
|
54 | - $startindex -= 1; |
|
53 | + if (strrpos($base_realpath, '/') == strlen($base_realpath) - 1) { |
|
54 | + $startindex -= 1; |
|
55 | + } |
|
55 | 56 | $relpath = substr($src_realpath, $startindex); |
56 | 57 | } |
57 | 58 | return $relpath; |
@@ -62,8 +63,9 @@ discard block |
||
62 | 63 | */ |
63 | 64 | public function __fixDirSeparator($path) |
64 | 65 | { |
65 | - if ($path != '' && (strripos($path, '/') != strlen($path) - 1)) |
|
66 | - $path .= '/'; |
|
66 | + if ($path != '' && (strripos($path, '/') != strlen($path) - 1)) { |
|
67 | + $path .= '/'; |
|
68 | + } |
|
67 | 69 | return $path; |
68 | 70 | } |
69 | 71 | |
@@ -72,8 +74,9 @@ discard block |
||
72 | 74 | */ |
73 | 75 | public function __normalizePath($path) |
74 | 76 | { |
75 | - if ($path && strpos($path, '\\') !== false) |
|
76 | - $path = preg_replace("/\\\\/", "/", $path); |
|
77 | + if ($path && strpos($path, '\\') !== false) { |
|
78 | + $path = preg_replace("/\\\\/", "/", $path); |
|
79 | + } |
|
77 | 80 | return $path; |
78 | 81 | } |
79 | 82 | |
@@ -83,18 +86,21 @@ discard block |
||
83 | 86 | public function copyDirectoryFromDisk($dirname, $zipdirname = null, $excludeList = null, $basedirname = null) |
84 | 87 | { |
85 | 88 | $dir = opendir($dirname); |
86 | - if (strripos($dirname, '/') != strlen($dirname) - 1) |
|
87 | - $dirname .= '/'; |
|
89 | + if (strripos($dirname, '/') != strlen($dirname) - 1) { |
|
90 | + $dirname .= '/'; |
|
91 | + } |
|
88 | 92 | |
89 | - if ($basedirname === null) |
|
90 | - $basedirname = realpath($dirname); |
|
93 | + if ($basedirname === null) { |
|
94 | + $basedirname = realpath($dirname); |
|
95 | + } |
|
91 | 96 | |
92 | 97 | while (false !== ($file = readdir($dir))) { |
93 | 98 | if ($file != '.' && $file != '..' && |
94 | 99 | $file != '.svn' && $file != 'CVS') { |
95 | 100 | // Exclude the file/directory |
96 | - if (!empty($excludeList) && in_array("$dirname$file", $excludeList)) |
|
97 | - continue; |
|
101 | + if (!empty($excludeList) && in_array("$dirname$file", $excludeList)) { |
|
102 | + continue; |
|
103 | + } |
|
98 | 104 | |
99 | 105 | if (is_dir("$dirname$file")) { |
100 | 106 | $this->copyDirectoryFromDisk("$dirname$file", $zipdirname, $excludeList, $basedirname); |
@@ -19,33 +19,26 @@ |
||
19 | 19 | if($service == "customerportal") |
20 | 20 | { |
21 | 21 | include("api/customerportal.php"); |
22 | - } |
|
23 | - elseif($service == "mobile") |
|
22 | + } elseif($service == "mobile") |
|
24 | 23 | { |
25 | 24 | include("api/mobile.php"); |
26 | - } |
|
27 | - elseif($service == "yetiportal") |
|
25 | + } elseif($service == "yetiportal") |
|
28 | 26 | { |
29 | 27 | include("api/yetiportal.php"); |
30 | - } |
|
31 | - elseif($service == "firefox") |
|
28 | + } elseif($service == "firefox") |
|
32 | 29 | { |
33 | 30 | include("api/firefoxtoolbar.php"); |
34 | - } |
|
35 | - elseif($service == "wordplugin") |
|
31 | + } elseif($service == "wordplugin") |
|
36 | 32 | { |
37 | 33 | include("api/wordplugin.php"); |
38 | - } |
|
39 | - elseif($service == "thunderbird") |
|
34 | + } elseif($service == "thunderbird") |
|
40 | 35 | { |
41 | 36 | include("api/thunderbirdplugin.php"); |
42 | - } |
|
43 | - else |
|
37 | + } else |
|
44 | 38 | { |
45 | 39 | echo "No Service Configured for ". strip_tags($service); |
46 | 40 | } |
47 | -} |
|
48 | -else |
|
41 | +} else |
|
49 | 42 | { |
50 | 43 | echo "<h1>YetiForceCRM API Services</h1>"; |
51 | 44 | echo "<li>YetiForceCRM Yeti Portal EndPoint URL -- Click <a href='api.php?service=yetiportal'>here</a></li>"; |
@@ -11,39 +11,39 @@ |
||
11 | 11 | require_once 'config/api.php'; |
12 | 12 | $service = $_REQUEST['service']; |
13 | 13 | |
14 | -if(isset($service)) |
|
14 | +if (isset($service)) |
|
15 | 15 | { |
16 | - if(!in_array($service,$enabledServices)){ |
|
17 | - echo $service.' - Service is not active'; |
|
16 | + if (!in_array($service, $enabledServices)) { |
|
17 | + echo $service . ' - Service is not active'; |
|
18 | 18 | return; |
19 | 19 | } |
20 | - if($service == "customerportal") |
|
20 | + if ($service == "customerportal") |
|
21 | 21 | { |
22 | 22 | include("api/customerportal.php"); |
23 | 23 | } |
24 | - elseif($service == "mobile") |
|
24 | + elseif ($service == "mobile") |
|
25 | 25 | { |
26 | 26 | include("api/mobile.php"); |
27 | 27 | } |
28 | - elseif($service == "yetiportal") |
|
28 | + elseif ($service == "yetiportal") |
|
29 | 29 | { |
30 | 30 | include("api/yetiportal.php"); |
31 | 31 | } |
32 | - elseif($service == "firefox") |
|
32 | + elseif ($service == "firefox") |
|
33 | 33 | { |
34 | 34 | include("api/firefoxtoolbar.php"); |
35 | 35 | } |
36 | - elseif($service == "wordplugin") |
|
36 | + elseif ($service == "wordplugin") |
|
37 | 37 | { |
38 | 38 | include("api/wordplugin.php"); |
39 | 39 | } |
40 | - elseif($service == "thunderbird") |
|
40 | + elseif ($service == "thunderbird") |
|
41 | 41 | { |
42 | 42 | include("api/thunderbirdplugin.php"); |
43 | 43 | } |
44 | 44 | else |
45 | 45 | { |
46 | - echo "No Service Configured for ". strip_tags($service); |
|
46 | + echo "No Service Configured for " . strip_tags($service); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | else |
@@ -98,7 +98,6 @@ |
||
98 | 98 | * @param string $pubkey A public key for reCAPTCHA |
99 | 99 | * @param string $error The error given by reCAPTCHA (optional, default is null) |
100 | 100 | * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) |
101 | - |
|
102 | 101 | * @return string - The HTML to be embedded in the user's form. |
103 | 102 | */ |
104 | 103 | function recaptcha_get_html($pubkey, $error = null, $use_ssl = false) |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $http_request .= $req; |
78 | 78 | |
79 | 79 | $response = ''; |
80 | - if (false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) )) { |
|
80 | + if (false == ($fs = @fsockopen($host, $port, $errno, $errstr, 10))) { |
|
81 | 81 | die('Could not open socket'); |
82 | 82 | } |
83 | 83 |
@@ -47,8 +47,9 @@ discard block |
||
47 | 47 | function _recaptcha_qsencode($data) |
48 | 48 | { |
49 | 49 | $req = ""; |
50 | - foreach ($data as $key => $value) |
|
51 | - $req .= $key . '=' . urlencode(stripslashes($value)) . '&'; |
|
50 | + foreach ($data as $key => $value) { |
|
51 | + $req .= $key . '=' . urlencode(stripslashes($value)) . '&'; |
|
52 | + } |
|
52 | 53 | |
53 | 54 | // Cut the last '&' |
54 | 55 | $req = substr($req, 0, strlen($req) - 1); |
@@ -83,8 +84,10 @@ discard block |
||
83 | 84 | |
84 | 85 | fwrite($fs, $http_request); |
85 | 86 | |
86 | - while (!feof($fs)) |
|
87 | - $response .= fgets($fs, 1160); // One TCP-IP packet |
|
87 | + while (!feof($fs)) { |
|
88 | + $response .= fgets($fs, 1160); |
|
89 | + } |
|
90 | + // One TCP-IP packet |
|
88 | 91 | fclose($fs); |
89 | 92 | $response = explode("\r\n\r\n", $response, 2); |
90 | 93 |
@@ -206,6 +206,9 @@ discard block |
||
206 | 206 | } |
207 | 207 | /* Mailhide related code */ |
208 | 208 | |
209 | +/** |
|
210 | + * @param string $ky |
|
211 | + */ |
|
209 | 212 | function _recaptcha_aes_encrypt($val, $ky) |
210 | 213 | { |
211 | 214 | if (!function_exists("mcrypt_encrypt")) { |
@@ -217,6 +220,9 @@ discard block |
||
217 | 220 | return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); |
218 | 221 | } |
219 | 222 | |
223 | +/** |
|
224 | + * @param string $x |
|
225 | + */ |
|
220 | 226 | function _recaptcha_mailhide_urlbase64($x) |
221 | 227 | { |
222 | 228 | return strtr(base64_encode($x), '+/', '-_'); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $moduleTableIndexList = $meta->getEntityTableIndexList(); |
121 | 121 | foreach ($tableList as $index => $tableName) { |
122 | 122 | if ($tableName != $tableList[0]) { |
123 | - $sql .=' INNER JOIN ' . $tableName . ' ON ' . $tableList[0] . '.' . |
|
123 | + $sql .= ' INNER JOIN ' . $tableName . ' ON ' . $tableList[0] . '.' . |
|
124 | 124 | $moduleTableIndexList[$tableList[0]] . '=' . $tableName . '.' . |
125 | 125 | $moduleTableIndexList[$tableName]; |
126 | 126 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | //If module is Leads and if you are not selected any leads fields then query failure is happening. |
129 | 129 | //By default we are checking where condition on base table. |
130 | 130 | if ($module == 'Leads' && !in_array('vtiger_leaddetails', $tableList)) { |
131 | - $sql .=' INNER JOIN vtiger_leaddetails ON vtiger_leaddetails.leadid = vtiger_crmentity.crmid'; |
|
131 | + $sql .= ' INNER JOIN vtiger_leaddetails ON vtiger_leaddetails.leadid = vtiger_crmentity.crmid'; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $sql .= ' WHERE'; |
@@ -209,8 +209,9 @@ discard block |
||
209 | 209 | $needle = '$' . strtolower($this->module) . '-' . $parentFieldColumnMapping[$params['field']] . ':' . $column . '$'; |
210 | 210 | $this->processedDescription = str_replace($needle, $values[array_search($column, $fieldColumnMapping)], $this->processedDescription); |
211 | 211 | } |
212 | - if (!$params['owner']) |
|
213 | - $this->processedmodules[$module] = true; |
|
212 | + if (!$params['owner']) { |
|
213 | + $this->processedmodules[$module] = true; |
|
214 | + } |
|
214 | 215 | } |
215 | 216 | } |
216 | 217 | } |
@@ -253,7 +254,8 @@ discard block |
||
253 | 254 | $rows = $adb->num_rows($res); |
254 | 255 | if ($rows > 0) { |
255 | 256 | return true; |
256 | - } else |
|
257 | - return false; |
|
257 | + } else { |
|
258 | + return false; |
|
259 | + } |
|
258 | 260 | } |
259 | 261 | } |
@@ -37,8 +37,9 @@ discard block |
||
37 | 37 | |
38 | 38 | public function setConfig($key, $value) |
39 | 39 | { |
40 | - if (empty($key)) |
|
41 | - return; |
|
40 | + if (empty($key)) { |
|
41 | + return; |
|
42 | + } |
|
42 | 43 | $this->properties[$key] = $value; |
43 | 44 | //not neccessary for php5.x versions |
44 | 45 | self::$propertiesCache[$this->name] = $this->properties; |
@@ -46,8 +47,9 @@ discard block |
||
46 | 47 | |
47 | 48 | public function getConfig($key) |
48 | 49 | { |
49 | - if (empty($key)) |
|
50 | - return ''; |
|
50 | + if (empty($key)) { |
|
51 | + return ''; |
|
52 | + } |
|
51 | 53 | return $this->properties[$key]; |
52 | 54 | } |
53 | 55 | } |
@@ -15,6 +15,10 @@ discard block |
||
15 | 15 | protected $name; |
16 | 16 | static $propertiesCache = []; |
17 | 17 | |
18 | + /** |
|
19 | + * @param string $path |
|
20 | + * @param string $name |
|
21 | + */ |
|
18 | 22 | public function __construct($path, $name, $force = false) |
19 | 23 | { |
20 | 24 | $this->load($path, $name, $force); |
@@ -41,6 +45,9 @@ discard block |
||
41 | 45 | self::$propertiesCache[$this->name] = $this->properties; |
42 | 46 | } |
43 | 47 | |
48 | + /** |
|
49 | + * @param string $key |
|
50 | + */ |
|
44 | 51 | public function getConfig($key) |
45 | 52 | { |
46 | 53 | if (empty($key)) |
@@ -28,8 +28,9 @@ |
||
28 | 28 | $blockid_list = '('; |
29 | 29 | for ($i = 0; $i < $noofrows; $i++) { |
30 | 30 | $blockid = $adb->query_result($result, $i, "blockid"); |
31 | - if ($i != 0) |
|
32 | - $blockid_list .= ', '; |
|
31 | + if ($i != 0) { |
|
32 | + $blockid_list .= ', '; |
|
33 | + } |
|
33 | 34 | $blockid_list .= $blockid; |
34 | 35 | $block_label[$blockid] = $adb->query_result($result, $i, "blocklabel"); |
35 | 36 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $moduleName = $entity->getModuleName(); |
314 | 314 | |
315 | 315 | $statusChanged = false; |
316 | - $vtEntityDelta = new VTEntityDelta (); |
|
316 | + $vtEntityDelta = new VTEntityDelta(); |
|
317 | 317 | $oldEntity = $vtEntityDelta->getOldValue($moduleName, $entity_id, $statusFieldName); |
318 | 318 | $recordDetails = $entity->getData(); |
319 | 319 | $statusChanged = $vtEntityDelta->hasChanged($moduleName, $entity_id, $statusFieldName); |
@@ -941,19 +941,19 @@ discard block |
||
941 | 941 | for ($i = 0; $i < $noOfRows; ++$i) { |
942 | 942 | $status = $adb->query_result($result, $i, 'temp_status'); |
943 | 943 | if ($obj->getImportRecordStatus('none') == $status) { |
944 | - $statusCount['PENDING'] ++; |
|
944 | + $statusCount['PENDING']++; |
|
945 | 945 | } elseif ($obj->getImportRecordStatus('failed') == $status) { |
946 | - $statusCount['FAILED'] ++; |
|
946 | + $statusCount['FAILED']++; |
|
947 | 947 | } else { |
948 | - $statusCount['IMPORTED'] ++; |
|
948 | + $statusCount['IMPORTED']++; |
|
949 | 949 | switch ($status) { |
950 | - case $obj->getImportRecordStatus('created') : $statusCount['CREATED'] ++; |
|
950 | + case $obj->getImportRecordStatus('created') : $statusCount['CREATED']++; |
|
951 | 951 | break; |
952 | - case $obj->getImportRecordStatus('skipped') : $statusCount['SKIPPED'] ++; |
|
952 | + case $obj->getImportRecordStatus('skipped') : $statusCount['SKIPPED']++; |
|
953 | 953 | break; |
954 | - case $obj->getImportRecordStatus('updated') : $statusCount['UPDATED'] ++; |
|
954 | + case $obj->getImportRecordStatus('updated') : $statusCount['UPDATED']++; |
|
955 | 955 | break; |
956 | - case $obj->getImportRecordStatus('merged') : $statusCount['MERGED'] ++; |
|
956 | + case $obj->getImportRecordStatus('merged') : $statusCount['MERGED']++; |
|
957 | 957 | break; |
958 | 958 | } |
959 | 959 | } |
@@ -17,6 +17,7 @@ discard block |
||
17 | 17 | * Param $ext_prod_arr - existing vtiger_products |
18 | 18 | * Param $module - module name |
19 | 19 | * return type void |
20 | + * @param string $mode |
|
20 | 21 | */ |
21 | 22 | function updateStk($product_id, $qty, $mode, $ext_prod_arr, $module) |
22 | 23 | { |
@@ -250,9 +251,6 @@ discard block |
||
250 | 251 | } |
251 | 252 | |
252 | 253 | /** Function used to delete the Inventory product details for the passed entity |
253 | - * @param int $objectid - entity id to which we want to delete the product details from REQUEST values where as the entity will be Purchase Order or Invoice |
|
254 | - * @param string $return_old_values - string which contains the string return_old_values or may be empty, if the string is return_old_values then before delete old values will be retrieved |
|
255 | - * @return array $ext_prod_arr - if the second input parameter is 'return_old_values' then the array which contains the productid and quantity which will be retrieved before delete the product details will be returned otherwise return empty |
|
256 | 254 | */ |
257 | 255 | function deleteInventoryProductDetails($focus) |
258 | 256 | { |
@@ -128,16 +128,18 @@ discard block |
||
128 | 128 | $taxpercentage = $adb->query_result($res, 0, 'taxpercentage'); |
129 | 129 | |
130 | 130 | //This is to retrive the default configured value if the taxpercentage related to product is empty |
131 | - if ($taxpercentage == '' && $default == 'default') |
|
132 | - $taxpercentage = getTaxPercentage($type); |
|
131 | + if ($taxpercentage == '' && $default == 'default') { |
|
132 | + $taxpercentage = getTaxPercentage($type); |
|
133 | + } |
|
133 | 134 | |
134 | 135 | |
135 | 136 | \App\log::trace("Exiting from getProductTaxPercentage($productid,$type) function. return value=$taxpercentage"); |
136 | - if ($current_user->truncate_trailing_zeros === true) |
|
137 | - return \vtlib\Functions::formatDecimal($taxpercentage); |
|
138 | - else |
|
139 | - return $taxpercentage; |
|
140 | -} |
|
137 | + if ($current_user->truncate_trailing_zeros === true) { |
|
138 | + return \vtlib\Functions::formatDecimal($taxpercentage); |
|
139 | + } else { |
|
140 | + return $taxpercentage; |
|
141 | + } |
|
142 | + } |
|
141 | 143 | |
142 | 144 | /** Function used to get the list of Tax types as a array |
143 | 145 | * @param string $available - available or empty where as default is all, if available then the taxes which are available now will be returned otherwise all taxes will be returned |
@@ -369,8 +371,9 @@ discard block |
||
369 | 371 | |
370 | 372 | $inv_table_array = []; |
371 | 373 | $inv_id_array = []; |
372 | - if (!array_key_exists($module, $inv_table_array)) |
|
373 | - return ''; |
|
374 | + if (!array_key_exists($module, $inv_table_array)) { |
|
375 | + return ''; |
|
376 | + } |
|
374 | 377 | |
375 | 378 | $res = $adb->pquery("select taxtype from $inv_table_array[$module] where $inv_id_array[$module]=?", array($id)); |
376 | 379 | |
@@ -425,8 +428,9 @@ discard block |
||
425 | 428 | $res = $adb->pquery("select $taxname from vtiger_inventoryproductrel where id = ? and productid = ?", array($id, $productid)); |
426 | 429 | $taxvalue = $adb->query_result($res, 0, $taxname); |
427 | 430 | |
428 | - if ($taxvalue == '') |
|
429 | - $taxvalue = '0'; |
|
431 | + if ($taxvalue == '') { |
|
432 | + $taxvalue = '0'; |
|
433 | + } |
|
430 | 434 | |
431 | 435 | \App\log::trace("Exit from function getInventoryProductTaxValue($id, $productid, $taxname)."); |
432 | 436 | |
@@ -770,8 +774,9 @@ discard block |
||
770 | 774 | $subject = $row['subject']; |
771 | 775 | $sql = 'SELECT * FROM %s WHERE temp_status = %s'; |
772 | 776 | $sql = sprintf($sql, $tableName, Import_Data_Action::$IMPORT_RECORD_NONE); |
773 | - if (!empty($subject)) |
|
774 | - $sql .= ' && subject = "' . str_replace("\"", "\\\"", $subject) . '"'; |
|
777 | + if (!empty($subject)) { |
|
778 | + $sql .= ' && subject = "' . str_replace("\"", "\\\"", $subject) . '"'; |
|
779 | + } |
|
775 | 780 | $subjectResult = $adb->query($sql); |
776 | 781 | $count = $adb->num_rows($subjectResult); |
777 | 782 | $subjectRowIDs = []; |
@@ -888,8 +893,9 @@ discard block |
||
888 | 893 | foreach ($fieldMapping as $fieldName => $index) { |
889 | 894 | if ($moduleFields[$fieldName]->getTableName() == 'vtiger_inventoryproductrel') { |
890 | 895 | $lineItemData[$fieldName] = $lineItemFieldData[$fieldName]; |
891 | - if ($fieldName != 'productid') |
|
892 | - $inventoryFieldData[$fieldName] = ''; |
|
896 | + if ($fieldName != 'productid') { |
|
897 | + $inventoryFieldData[$fieldName] = ''; |
|
898 | + } |
|
893 | 899 | } |
894 | 900 | } |
895 | 901 | array_push($lineItems, $lineItemData); |