From 1540e6b40a6704a680645b6de28e6ec870e96e5c Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 24 Oct 2017 18:29:48 +0530 Subject: [PATCH] capital and import issues fixes --- application/models/purchaseorder_model.php | 6 ++++-- application/views/capitalpopdf.php | 24 ++++++++++++++++++---- application/views/editrequisitionform.php | 2 +- application/views/importpo.php | 5 +++++ application/views/purchaseorder.php | 3 ++- 5 files changed, 32 insertions(+), 8 deletions(-) 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 @@ - + + TotalFreight>0 && $st->TotalFreight!='') { ?> + TotalFreight,2); ?> + + + + TotalIGST; $TotalDiscount='-'; $TotalOtherAllowance='-'; $TotalFreight=$TotalFreight+$st->TotalFreight; @@ -589,7 +597,12 @@ - + TotalIGST>0 && $st->TotalIGST!='') { ?> + TotalIGST; ?> + + + + TotalFreight>0 && $st->TotalFreight!='') { ?> TotalFreight,2); ?> @@ -610,10 +623,13 @@ $TotalIgst1=$TotalIgst; $TotalDiscount1=$TotalDiscount; $TotalOtherAllowance1=$TotalOtherAllowance; + $TotalFreight1=$TotalFreight; } else if($CapitalRange==0){ + $TotalIgst1=$TotalIgst; $TotalFreight1=$TotalFreight; + } ?> diff --git a/application/views/editrequisitionform.php b/application/views/editrequisitionform.php index d3759e36..28f2148b 100755 --- a/application/views/editrequisitionform.php +++ b/application/views/editrequisitionform.php @@ -65,7 +65,7 @@ if(!empty($ReqPOType)) } else { - document.getElementById('DisplayScheduleDiv').style.display = 'block'; + document.getElementById('DisplayScheduleDiv').style.display = 'none'; document.getElementById('ServicePeriodOption').style.display = 'none'; document.getElementById('NoServices').style.display = 'none'; diff --git a/application/views/importpo.php b/application/views/importpo.php index cbfd0cb5..3cd503fc 100755 --- a/application/views/importpo.php +++ b/application/views/importpo.php @@ -2083,6 +2083,9 @@ $(document).ready(function () { $('#Schedulediv').show(); }); }); + +