From b5e2cb7a3abade9bfbbdd3b13229fec5781b07fa Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 11 Jul 2017 18:47:30 +0530 Subject: [PATCH] import --- application/controllers/purchaseorder.php | 27 +- application/models/purchaseorder_model.php | 2 +- application/views/editimportpo.php | 811 +++++++++++++++++++-- application/views/importpo.php | 56 +- 4 files changed, 812 insertions(+), 84 deletions(-) diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index daa256ca..3ac113c8 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -379,6 +379,7 @@ class purchaseorder extends BaseController $currencycode=$Detail->Currency_Code; } //print_r($unicode); + $currencycode=''; $data['unicode']=$unicode; $data['currencycode']=$currencycode; $this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form'; @@ -1181,7 +1182,7 @@ public function importpoprint($PONO) function addNewImportPurchaseOrder() {//echo ("ggh"); - + //die(); $POdt =$this->input->post('PODate'); $PODate = $this->getDateformat($POdt); $SupplierID = $this->input->post('drpSupplier'); @@ -1201,15 +1202,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(); @@ -1233,11 +1234,11 @@ function addNewImportPurchaseOrder() $ExchangeRateCalculatedon=$this->input->post('Exchangerateon'); $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(); @@ -1413,7 +1414,7 @@ $createddt=''; $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 04e9542b..e8725a99 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -670,7 +670,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 , - 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, + 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 diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index 9bcf5dd5..4f2b5ffb 100644 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -68,21 +68,21 @@ $DeliveryAddress =''; $PONOStatus=''; $PONO = ''; $ServiceDescription = ''; -$TotalLanding=''; -$tothighseas=''; -$totcustom=''; -$totexciseduty=''; -$totexcisedutyED=''; -$totexciseSH=''; -$totcustomED=''; -$totcustomSH=''; -$totaddtnlexcise=''; -$totgrossduty=''; -$totavlmodvat=''; -$totgrossexpense=''; -$totordervalue=''; -$ExchangeRate=''; -$totorder=''; +$TotalLanding=0; +$tothighseas=0; +$totcustom=0; +$totexciseduty=0; +$totexcisedutyED=0; +$totexciseSH=0; +$totcustomED=0; +$totcustomSH=0; +$totaddtnlexcise=0; +$totgrossduty=0; +$totavlmodvat=0; +$totgrossexpense=0; +$totordervalue=0; +$ExchangeRate=0; +$totorder=0; $Cur=''; $Currency_Type=''; $PayableAT=''; @@ -501,7 +501,7 @@ body { --> -
+
@@ -532,8 +532,15 @@ body {
-Add Line Item - + + + + Add Line Item @@ -671,7 +678,7 @@ body {
+ -->

@@ -1632,7 +1639,545 @@ body {
-
+
+ + + + + @@ -1647,11 +2192,15 @@ body { - + + + + + @@ -1673,12 +2222,15 @@ body { ?> - + + - + + + @@ -1765,12 +2317,16 @@ body { + + + "/> - +   Save   Submit - - + + OK + + +
@@ -2012,12 +2571,16 @@ body {
+ - + + + + @@ -2032,6 +2595,21 @@ body {
SNo Requisition NoItem NameMaterial CodeDescription Quantity UOM Rate Basic AmountReceived QtyRejected QtyPending Qty Action
ReqNo ?>ReqNo ?>MaterialCode ?> MaterialName?> Quantity ?> UOM ?> Rate ?>BasicValue ?>BasicValue ?>ReceivedQuantity ?>ReceivedQuantity ?>     + + -        
<%=index%> <%=ReqNo%><%=MaterialCode%><%=ItemName%><%=Description%> <%=Quantity%> <%=UOM%> <%=Rate%> <%=BasicAmount%><%=ReceivedQty%><%=RejectedQty%><%=PendingQty%>