From 2f2ee5f7c6351f5b85137df3215c0a6e28f55a91 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 8 Sep 2017 11:54:48 +0530 Subject: [PATCH] edit import per --- application/controllers/purchaseorder.php | 8 +++++--- application/models/purchaseorder_model.php | 2 +- application/views/editimportpo.php | 23 +++++++++++++++++++++- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index b1388df3..dc4a1989 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1664,7 +1664,9 @@ function addNewImportPurchaseOrder() $Nosoftrip=$this->input->post('NoOfTrip'.$i); $FreightRate=$this->input->post('FreightValue'.$i); $FreightAmount=$this->input->post('AfterFreightValue'.$i); - // echo $Totalvalueitem; + + $per=$this->input->post('Per'.$i); + echo $per; //die(); $LineItemNo = ''; //echo "sdsfsd"; @@ -1690,7 +1692,7 @@ function addNewImportPurchaseOrder() { if(strlen($POLineItemNo) == 0) { - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter,'Per'=>$per); $POLineItem=$this->purchaseorder_model->addPOLineItem($POLineItemList); if(count($POLineItem)>0) { @@ -1707,7 +1709,7 @@ function addNewImportPurchaseOrder() //echo $LineItemNo; //die(); - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter); + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'UpdatedOn'=>$updateddt,'CostCenterCode'=>$CostCenter,'Per'=>$per); $POLineItem = $this->purchaseorder_model->updatePOLineItem($PONO,$POLineItemNo,$POLineItemList); } diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index c487e986..ad9fe6e7 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -863,7 +863,7 @@ function GetImportPurchaseOrderDetails($PONO = '') $subQuery ='SELECT distinct LineItem.LineItemNo,Req.ReqNo,Mat.MaterialCode,Mat.MaterialName, Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue,ReceivedQuantity, -QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty, +QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per, ROUND((RMCIncludingCustomersPerKG*Quantity),2)as Taxamount,LandingCharge,HighSeasSalesCharge,CustomDuty,ExciseDuty,ExciseDutyEdCess,CustomEdCess,POMast.ExchangeRate,AfterLandingCharge,AfterHighSeasSalesCharge,AfterCustomDuty,AfterExciseDuty,AfterExciseDutyEdCess,AddlExciseDuty,AfterAddlExciseDuty,Grossdutypayable,AvailableModvat,Grossexpensesduetocustomduty,purchaseratePerKG,CustomDutyExpensesPerKG,RMCIncludingCustomersPerKG,QuantityKG,BasicPriceInMTon,ProductPrice,CustomSHCess,AfterCustomSHCess,AfterExciseDutySHCess,ExciseDutySHCess, AfterCustomEdCess,ROUND((Quantity *Rate),2)as TotalOrderValue,ROUND((POMast.ExchangeRate*BasicPriceInMTon),2) as BasicINRValue,TotalValue,CurrencyType,ReceivedQuantity,Tax.*, diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index 0f6f1db1..0cda3a3e 100755 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -2731,6 +2731,10 @@ if($PONOStatus == PO_RELEASED) + + + +