diff --git a/include/utils/InventoryUtils.php b/include/utils/InventoryUtils.php index 2f0ce6152c99f69b44bca207db4fde5fd2c694e1..3935c1a589765fa78c71598d6fa7cb5ed40f0e3d 100644 --- a/include/utils/InventoryUtils.php +++ b/include/utils/InventoryUtils.php @@ -981,7 +981,12 @@ function getInventorySHTaxPercent($id, $taxname, $taxnum=null) //To get the values from the vtiger_inventorychargesrel where the actual shiiping and handling tax info of particular record stored. if($adb->num_rows($res) < 1){ $j=$taxnum+1; - $charges_result = $adb->pquery("SELECT JSON_EXTRACT(charges, '$.1.taxes.$j') as charges FROM vtiger_inventorychargesrel WHERE recordid=?", array($id)); + $charges_result = $adb->pquery( + "SELECT JSON_UNQUOTE(JSON_EXTRACT(charges, CONCAT('$.\"1\".taxes.\"', ? ,'\"'))) as charges + FROM vtiger_inventorychargesrel + WHERE recordid = ?", + array($j, $id) + ); $rowData = $adb->fetch_array($charges_result); $charges = Zend_Json::decode(html_entity_decode($rowData['charges'])); $taxpercentage = $charges; @@ -1739,4 +1744,4 @@ function getCompoundTaxesInfoForInventoryRecord($recordId, $moduleName) { return $compoundTaxesInfo; } -?> \ No newline at end of file +?>