From 3df917b916b0f8d7ff49a5c5751a0c4b0992d946 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Thu, 29 Aug 2024 08:15:16 +0530 Subject: [PATCH] Capital po live issue : GWM --- app/Models/Purchaseorder_model.php | 24 +++++++++++------------- app/Views/editCapitalPo.php | 10 +++++----- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/app/Models/Purchaseorder_model.php b/app/Models/Purchaseorder_model.php index b9898986..a0f828cf 100644 --- a/app/Models/Purchaseorder_model.php +++ b/app/Models/Purchaseorder_model.php @@ -1654,18 +1654,16 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per, { $subQuery = 'SELECT distinct LineItem.LineItemNo,LineItem.Per,LineItem.ServiceMaterialDescription,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName,LineItem.ServiceMaterialDescription,LineItem.ServiceFrequency, -Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,Tax.*, - ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess,AfterCustomEdCess,ROUND((POMast.ExchangeRate*BasicPriceInMTon*Quantity),2) as BasicINRValue,Tax.TotalValue as ImportTotalValue,Tax.FreightType,Tax.NoOfTrip,Tax.FreightValue,Tax.AfterFreightValue,POMast.CurrencyType, - - Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem - join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO -join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode - - join t_import_tax Tax on Tax.LineItemNo = LineItem.LineItemNo - join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo -left join t_employee_details emp on Req.Requestedby = emp.EmpID - - join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode where LineItem.PONO =?'; + Mat.UOM,Quantity,ReceivedQuantity,Rate,Req.Status,Tax.*, + ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,POMast.ExchangeRateCalculatedon,POMast.TotalOrderValue as BasicValue,POMast.CapitalRange,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess,AfterCustomEdCess,ROUND((POMast.ExchangeRate*BasicPriceInMTon*Quantity),2) as BasicINRValue,Tax.TotalValue as ImportTotalValue,Tax.FreightType,Tax.NoOfTrip,Tax.FreightValue,Tax.AfterFreightValue,POMast.CurrencyType, + + Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem + join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO + join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode + left join t_import_tax Tax on Tax.LineItemNo = LineItem.LineItemNo + join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo + left join t_employee_details emp on Req.Requestedby = emp.EmpID + left join t_departmentdetails Dept on Req.RequestedDept = Dept.DEPCode where LineItem.PONO =?'; //print_r($subQuery); $query = $this->db->query($subQuery, array($PONO)); @@ -1720,7 +1718,7 @@ left join t_employee_details emp on Req.Requestedby = emp.EmpID Req.CostCenterCode,Dept.DepartmentName FROM t_purchaseorder_lineitem LineItem join t_purchaseorder_master POMast on POMast.PONO = LineItem.PONO join t_materialmaster Mat on Mat.MaterialCode = LineItem.MaterialCode - join t_service_tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo + left join t_service_tax ServiceTax on ServiceTax.LineItemNo = LineItem.LineItemNo join t_requestion_master Req on Req.ReqNo = LineItem.ReqNo join t_employee_details emp on Req.Requestedby = emp.EmpID diff --git a/app/Views/editCapitalPo.php b/app/Views/editCapitalPo.php index 0955b15a..b8e10ce2 100644 --- a/app/Views/editCapitalPo.php +++ b/app/Views/editCapitalPo.php @@ -2935,7 +2935,7 @@ -
+
Total Discount Amount 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', number_format($ExitDiscountedAmt, 2, '.', '')), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalDiscount', 'value' => set_value('txtTotalDiscount', isset($ExitDiscountedAmt) ? number_format($ExitDiscountedAmt, 2, '.', '') : 0 ), 'id' => 'txtTotalDiscount', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -3623,7 +3623,7 @@ 'txtTotalFreight', 'value' => set_value('txtTotalFreight', number_format($TotalFreightAmt, 2, '.', '')), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'txtTotalFreight', 'value' => set_value('txtTotalFreight', isset($TotalFreightAmt) ? number_format($TotalFreightAmt, 2, '.', '') : 0 ), 'id' => 'txtTotalFreight', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?> @@ -3638,7 +3638,7 @@ 'CapitalToatlOrder', 'value' => set_value('CapitalToatlOrder', number_format($totalCapitalOrder, 2, '.', '')), 'id' => 'CapitalToatlOrder', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); + $data = array('name' => 'CapitalToatlOrder', 'value' => set_value('CapitalToatlOrder', isset($totalCapitalOrder) ? number_format($totalCapitalOrder, 2, '.', '') : 0), 'id' => 'CapitalToatlOrder', 'class' => 'form-control', 'readonly' => 'true', 'style' => 'text-align:right;'); echo form_input($data); ?>
@@ -3828,7 +3828,7 @@ var SelectedMaterialList = { Mat: [] }; - var index = + 1; + var index = + 1; var myArray = ; $.each(myArray, function(idx, obj) {