From 0ede2b4fdd1f91f00190df5baa106d9707383277 Mon Sep 17 00:00:00 2001 From: madhu sr <madhu.sr@vtigersolutions.com> Date: Tue, 9 Apr 2024 11:02:13 +0000 Subject: [PATCH] #Fixes::158205948::madhusr::Taxes on charges were not exporting to the pdf in inventory --- include/utils/InventoryUtils.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/utils/InventoryUtils.php b/include/utils/InventoryUtils.php index 2f0ce6152..3935c1a58 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 +?> -- GitLab