diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 33115d35..83083c6b 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -1207,15 +1207,15 @@ function addNewImportPurchaseOrder() $DeliverySchedule = ''; } - $PaymentDate=$this->input->post('Payment'); - if($PaymentDate==1) - { - $PaymentDays='After'; - } - else - { - $PaymentDays='Before'; - } + // $PaymentDate=$this->input->post('Payment'); + // if($PaymentDate==1) + // { + // $PaymentDays='After'; + // } + // else + // { + // $PaymentDays='Before'; + // } //echo $PaymentDays; //die(); @@ -1240,11 +1240,11 @@ function addNewImportPurchaseOrder() $CurrencyType=$this->input->post('currencytype'); $PaymentTerms=$this->input->post('PaymentTerms'); - $Payableat=$this->input->post('PayableAT'); + // $Payableat=$this->input->post('PayableAT'); - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays,'POType'=>$POType); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType); //print_r($POList); //die(); @@ -1392,15 +1392,15 @@ $createddt=''; $Deliverydt = $this->getDateformat($dt); $DeliverySchedule = ''; } - $PaymentDate=$this->input->post('Payment'); - if($PaymentDate==1) - { - $PaymentDays='After'; - } - else - { - $PaymentDays='Before'; - } + // $PaymentDate=$this->input->post('Payment'); + // if($PaymentDate==1) + // { + // $PaymentDays='After'; + // } + // else + // { + // $PaymentDays='Before'; + // } $SpcialInstruction = $this->input->post('txtSpcialInstruction'); $TotalOrder = $this->input->post('txtToatlOrder'); @@ -1417,10 +1417,10 @@ $createddt=''; $updateddt = $dt->format('Y-m-d H:i:s'); $PaymentTerms=$this->input->post('PaymentTerms'); - $Payableat=$this->input->post('PayableAT'); + // $Payableat=$this->input->post('PayableAT'); // PO Master // PO Master - $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'PayableAT'=>$Payableat,'PaymentDays'=>$PaymentDays); + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms); //echo $PONO; //echo $TotalOrder; //print_r($POList); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 4d3214c0..e5cc6d25 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -692,14 +692,19 @@ 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 , - 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)+(RMCIncludingCustomersPerKG*Quantity),2)as TotalOrderValue,ROUND((POMast.ExchangeRate*BasicPriceInMTon),2) as BasicINRValue,TotalValue,CurrencyType, +Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue,ActualQuantityReceived, +QuantityRejected,ROUND(ActualQuantityReceived-QuantityRejected)as PendingQty, + 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)+(RMCIncludingCustomersPerKG*Quantity),2)as TotalOrderValue,ROUND((POMast.ExchangeRate*BasicPriceInMTon),2) as BasicINRValue,TotalValue,CurrencyType,ReceivedQuantity, + 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 join T_Employee_Details emp on Req.Requestedby = emp.EmpID + + left join T_MRIR_Details Det on Det.MaterialCode=LineItem.MaterialCode + join T_DepartmentDetails Dept on emp.Departmentcode = Dept.DEPCode where LineItem.PONO =?'; //print_r($subQuery); diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index b9288c46..fbb830e1 100644 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -4,6 +4,7 @@ $ReqType =''; $Value=''; $EXCRATE=0; $parentPO= ''; +$ServiceDescription=''; //$Value="$"; //echo $ExchangeRate; //echo $Currency; @@ -498,7 +499,7 @@ body { --> -
+ -
+
@@ -529,10 +530,15 @@ body {
- -Add Line Item - - + + + + Add Line Item @@ -1629,6 +1635,542 @@ body {
+
+ + + + @@ -1645,11 +2187,15 @@ body { - + + + + + @@ -1671,12 +2217,16 @@ body { ?> - + + - + + + + @@ -1759,16 +2309,18 @@ body { + + + ExchangeRate; //$totorder=$totorder+$record->ProductPrice; $totorder=$totorder+$record->ProductPrice; + //$ServiceDescription=$record->ServiceDescription; //alert($totorder); @@ -1964,12 +2517,14 @@ body { - +   Save   Submit - + + OK +
@@ -2030,6 +2585,20 @@ body {
SNo Requisition NoItem NameMaterial CodeDescription Quantity UOM Rate Basic AmountReceived QtyRejected QtyPending Qty Action
ReqNo ?>ReqNo ?>MaterialCode ?> MaterialName?> Quantity ?> UOM ?> Rate ?>BasicValue ?>BasicValue ?>ActualQuantityReceived ?>QuantityRejected ?>PendingQty?>     -