diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index c0a76751..e4d52045 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -1627,7 +1627,7 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode function GetCapitalTaxListDetails($PONO = '',$CapitalRange=''){ if($CapitalRange==1){ - $taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(st.`After_CGST`) AS TotalCGST,SUM(st.`After_SGST`) AS TotalSGST,SUM(st.`After_IGST`) AS TotalIGST,SUM(st.`otherallowance`) AS TotalOtherAllowance,SUM(st.`Afterdiscountval`) AS TotalDiscount,st.discountval,st.Afterdiscountval,st.CGST,st.SGST,st.IGST,st.otherallowance FROM T_Service_Tax st + $taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(st.`After_CGST`) AS TotalCGST,SUM(st.`After_SGST`) AS TotalSGST,SUM(st.`After_IGST`) AS TotalIGST,SUM(st.`otherallowance`) AS TotalOtherAllowance,SUM(st.`Afterdiscountval`) AS TotalDiscount,st.discountval,st.Afterdiscountval,st.CGST,st.SGST,st.IGST,st.otherallowance,SUM(st.`AfterFreightValue`) AS TotalFreight,st.FreightValue FROM T_Service_Tax st join T_PurchaseOrder_LineItem pl on pl.LineItemNo=st.LineItemNo join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO where pm.POType=? and pm.PONO=? @@ -1637,7 +1637,9 @@ join T_MaterialMaster Mat on Mat.MaterialCode = LineItem.MaterialCode return $query->result(); } else if($CapitalRange==0){ - $taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode,SUM(it.`AfterFreightValue`) AS TotalFreight,it.FreightValue,it.AfterFreightValue FROM T_Import_Tax it + $taxQuery ='SELECT group_concat(pl.MaterialCode ORDER BY pl.MaterialCode ASC) as Itemcode, + SUM(it.`AfterFreightValue`) AS TotalFreight,it.FreightValue,it.AfterFreightValue, + SUM(it.`AfterIGST`) AS TotalIGST FROM T_Import_Tax it join T_PurchaseOrder_LineItem pl on pl.LineItemNo=it.LineItemNo join T_PurchaseOrder_Master pm on pm.PONO=pl.PONO where pm.POType=? and pm.PONO=? diff --git a/application/views/capitalpopdf.php b/application/views/capitalpopdf.php index 7551f6b7..0bd92ab3 100755 --- a/application/views/capitalpopdf.php +++ b/application/views/capitalpopdf.php @@ -544,7 +544,8 @@ $TotalIgst=$TotalIgst+$st->TotalIGST; $TotalDiscount=$TotalDiscount+$st->TotalDiscount; $TotalOtherAllowance=$TotalOtherAllowance+$st->TotalOtherAllowance; - $TotalFreight='-'; + $TotalFreight=$TotalFreight+$st->TotalFreight; + // $TotalFreight='-'; ?> TotalDiscount>0 && $st->TotalDiscount!='') { ?> @@ -577,11 +578,18 @@