From 78678320ff67a263028d0a25ba6e102a75910820 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 14 Jul 2017 18:23:33 +0530 Subject: [PATCH] import po changes --- application/controllers/purchaseorder.php | 337 ++++++++------- application/models/purchaseorder_model.php | 2 +- application/views/editimportpo.php | 361 +++++++++++----- application/views/importpo.php | 476 +++++++++++++-------- application/views/importpopdf.php | 298 ++++++------- 5 files changed, 866 insertions(+), 608 deletions(-) mode change 100755 => 100644 application/views/importpopdf.php diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 2154a478..1364c628 100755 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -374,6 +374,7 @@ class purchaseorder extends BaseController //echo $AvlBudAmt; //print_r($data['AvlBudAmt']); $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO); + //print_r($data['POItem']); $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); foreach($data['POMaster'] as $CUR) { @@ -1204,176 +1205,193 @@ public function importpoprint($PONO) function addNewImportPurchaseOrder() {//echo ("ggh"); - $POdt =$this->input->post('PODate'); - $PODate = $this->getDateformat($POdt); + $POdt =$this->input->post('PODate'); + $PODate = $this->getDateformat($POdt); $SupplierID = $this->input->post('drpSupplier'); - $DeliveryAddr = $this->input->post('DeliveryAddr'); - $dt = $this->input->post('Deliverydt'); - $Deliverydt = $this->getDateformat($dt); - $POType = $this->input->post('POType'); - $PoRange = $this->input->post('txtPoRange'); + $DeliveryAddr = $this->input->post('DeliveryAddr'); + //$dt = $this->input->post('Deliverydt'); + //$Deliverydt = $this->getDateformat($dt); + $POType = $this->input->post('POType'); + $PoRange = $this->input->post('txtPoRange'); + //$Dispatchinstruction=$this->post('Dispatch'); + //echo $Dispatchinstruction; + //die(); + //$Schedule=$this->post('Scheduleby'); + $DeliveryOption = $this->input->post('DateRange'); + + //echo $DeliveryOption; + //die(); + $DeliverySchedule=''; + $Dispatch=''; + if($DeliveryOption==1) + { + $Dispatch=''; + $DeliverySchedule = $this->input->post('Scheduleby'); + } + + + else + { + $Dispatch = $this->input->post('Dispatch'); + $DeliverySchedule = ''; + } - $DeliveryOption = $this->input->post('DateRange'); - if($DeliveryOption==1){ - $Deliverydt = ''; - $DeliverySchedule = $this->input->post('Scheduleby'); - } - else{ - $Deliverydt = $this->getDateformat($dt); - $DeliverySchedule = ''; - } // $PaymentDate=$this->input->post('Payment'); // if($PaymentDate==1) // { - // $PaymentDays='After'; + // $PaymentDays='After'; // } // else // { - // $PaymentDays='Before'; + // $PaymentDays='Before'; // } //echo $PaymentDays; //die(); - $SpcialInstruction = $this->input->post('txtSpcialInstruction'); - $TotalOrder = $this->input->post('txtToatlOrder'); - $POStatus = $this->input->post('textStatus'); - //echo "$POStatus"; - //die(); + $SpcialInstruction = $this->input->post('txtSpcialInstruction'); + $TotalOrder = $this->input->post('txtToatlOrder'); + $POStatus = $this->input->post('textStatus'); + //echo "$POStatus"; + //die(); $CreateBy = $this->session->userdata ( 'userId' ); - $RowCount = $this->input->post('txtRowCount'); + $RowCount = $this->input->post('txtRowCount'); - $DeletedRow = $this->input->post('txtDeletedRow'); - - $comma_separated = explode(':', $DeletedRow); - - $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); - $createddt = $dt->format('Y-m-d H:i:s'); - $Exchangerate=$this->input->post('ExchangeRate'); - $ExchangeRateCalculatedon=$this->input->post('Exchangerateon'); - $CurrencyType=$this->input->post('currencytype'); - - $PaymentTerms=$this->input->post('PaymentTerms'); - // $Payableat=$this->input->post('PayableAT'); + $DeletedRow = $this->input->post('txtDeletedRow'); + + $comma_separated = explode(':', $DeletedRow); + + $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); + $createddt = $dt->format('Y-m-d H:i:s'); + $Exchangerate=$this->input->post('ExchangeRate'); + $ExchangeRateCalculatedon=$this->input->post('Exchangerateon'); + $CurrencyType=$this->input->post('currencytype'); + + $PaymentTerms=$this->input->post('PaymentTerms'); + $Palaceoforigin=$this->input->post('PlaceOforigin'); + // $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,'POType'=>$POType); + // $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'CreatedDate'=>$createddt,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType); + + + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'PORange'=>$PoRange,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin); - //print_r($POList); - //die(); - $POMaster = $this->purchaseorder_model->addPOMaster($POList); - - $PONO = ''; - if(count($POMaster)>0) - { - $PONO = $POMaster[0]['PONO']; - } - //echo $PONO; - //echo $POType; - // PO Line Items - $LineItemStatus = REQITEM_NEW; - //echo ' test:'.REVENUE; - //echo $RowCount; - for ($i = 1; $i <= $RowCount; $i++) - { - //echo "AS"; - $MaterialCode = $this->input->post('materialCode'.$i); - $Quantity = $this->input->post('quantity'.$i); - $Reqnumber = $this->input->post('Reqnumber'.$i); - $itemRate = $this->input->post('itemRate'.$i); + //print_r($POList); + //die(); + $POMaster = $this->purchaseorder_model->addPOMaster($POList); + + $PONO = ''; + if(count($POMaster)>0) + { + $PONO = $POMaster[0]['PONO']; + } + //echo $PONO; + //echo $POType; + // PO Line Items + $LineItemStatus = REQITEM_NEW; + //echo ' test:'.REVENUE; + //echo $RowCount; + for ($i = 1; $i <= $RowCount; $i++) + { + //echo "AS"; + $MaterialCode = $this->input->post('materialCode'.$i); + $Quantity = $this->input->post('quantity'.$i); + $Reqnumber = $this->input->post('Reqnumber'.$i); + $itemRate = $this->input->post('itemRate'.$i); - //$Exchangerate = $this->input->post('Exchangerate'.$i); - $BasicPriceinmton = $this->input->post('BasicPriceinUS'.$i); - $Productprice = $this->input->post('BasicAmt'.$i); - $LandingCharge = $this->input->post('LandingChargee'.$i); - $AfterLandingCharge = $this->input->post('AfterLandingChargee'.$i); - $HighSeas = $this->input->post('Highseass'.$i); - $AfterHighSeas = $this->input->post('AfterHighseass'.$i); + //$Exchangerate = $this->input->post('Exchangerate'.$i); + $BasicPriceinmton = $this->input->post('BasicPriceinUS'.$i); + $Productprice = $this->input->post('BasicAmt'.$i); + $LandingCharge = $this->input->post('LandingChargee'.$i); + $AfterLandingCharge = $this->input->post('AfterLandingChargee'.$i); + $HighSeas = $this->input->post('Highseass'.$i); + $AfterHighSeas = $this->input->post('AfterHighseass'.$i); - $CustomDuty = $this->input->post('Customduty'.$i); - $AfterCustomDuty = $this->input->post('AfterCustomduty'.$i); + $CustomDuty = $this->input->post('Customduty'.$i); + $AfterCustomDuty = $this->input->post('AfterCustomduty'.$i); - $ExciseDuty = $this->input->post('ExcisedutyTax'.$i); - $AfterExciseDuty = $this->input->post('AfterExcisedutyTax'.$i); - $ExciseDutyEd = $this->input->post('ExcisedutyED'.$i); - $AfterExciseDutyEd = $this->input->post('AfterExcisedutyED'.$i); + $ExciseDuty = $this->input->post('ExcisedutyTax'.$i); + $AfterExciseDuty = $this->input->post('AfterExcisedutyTax'.$i); + $ExciseDutyEd = $this->input->post('ExcisedutyED'.$i); + $AfterExciseDutyEd = $this->input->post('AfterExcisedutyED'.$i); - $ExciseDutySH = $this->input->post('ExcisedutySH'.$i); - $AfterExciseDutySH = $this->input->post('AfterExcisedutySH'.$i); + $ExciseDutySH = $this->input->post('ExcisedutySH'.$i); + $AfterExciseDutySH = $this->input->post('AfterExcisedutySH'.$i); - $CustomEd= $this->input->post('CustomEDcess'.$i); - $AfterCustomEd= $this->input->post('AfterCustomEDcess'.$i); + $CustomEd= $this->input->post('CustomEDcess'.$i); + $AfterCustomEd= $this->input->post('AfterCustomEDcess'.$i); - $CustomSH = $this->input->post('CustomSHcess'.$i); - $AfterCustomSH = $this->input->post('AfterCustomSHcess'.$i); + $CustomSH = $this->input->post('CustomSHcess'.$i); + $AfterCustomSH = $this->input->post('AfterCustomSHcess'.$i); - $AddAdtional = $this->input->post('AdditionalExciseduty'.$i); - $AfterAddAdtional = $this->input->post('AfterAdditionalExciseduty'.$i); + $AddAdtional = $this->input->post('AdditionalExciseduty'.$i); + $AfterAddAdtional = $this->input->post('AfterAdditionalExciseduty'.$i); - $Grossdutypayable = $this->input->post('Grossdutypayable'.$i); - $AvailableModvat = $this->input->post('AvilableModvat'.$i); - $Grossexpensesduetocustomduty = $this->input->post('Grossexpenses'.$i); - $purchaseratePerKG = $this->input->post('purchaserate'.$i); - $CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpenses'.$i); - $RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomers'.$i); - $QuantityKG = $this->input->post('PurQuantity'.$i); + $Grossdutypayable = $this->input->post('Grossdutypayable'.$i); + $AvailableModvat = $this->input->post('AvilableModvat'.$i); + $Grossexpensesduetocustomduty = $this->input->post('Grossexpenses'.$i); + $purchaseratePerKG = $this->input->post('purchaserate'.$i); + $CustomDutyExpensesPerKG = $this->input->post('CustomDutyExpenses'.$i); + $RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomers'.$i); + $QuantityKG = $this->input->post('PurQuantity'.$i); - //$currencytypeID = $this->input->post('currencytype'); - $Totalvalueitem=$this->input->post('TotalExp'.$i); + //$currencytypeID = $this->input->post('currencytype'); + $Totalvalueitem=$this->input->post('TotalExp'.$i); - //echo $BasicPriceinmton; - $CostCenter = $this->input->post('costCode'.$i); - - $SkipInsert = "False"; - if( count($comma_separated) > 0) - { - for($j = 1; $j < count($comma_separated); $j++) - { - $deletedRow = $comma_separated[$j] ; - - if($deletedRow == $i ) - { - $SkipInsert = "True"; - break; - } - - } - } - if($SkipInsert == "False") - { - $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter); + //echo $BasicPriceinmton; + $CostCenter = $this->input->post('costCode'.$i); + + $SkipInsert = "False"; + if( count($comma_separated) > 0) + { + for($j = 1; $j < count($comma_separated); $j++) + { + $deletedRow = $comma_separated[$j] ; + + if($deletedRow == $i ) + { + $SkipInsert = "True"; + break; + } + + } + } + if($SkipInsert == "False") + { + $POLineItemList = array('PONO'=>$PONO, 'ReqNo'=>$Reqnumber,'MaterialCode'=>$MaterialCode,'Quantity'=>$Quantity,'Rate'=>$itemRate,'Status'=>$LineItemStatus,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'CostCenterCode'=>$CostCenter); - //print_r($POLineItemList); - //die(); - + //print_r($POLineItemList); + //die(); + - $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); - - $LineItemNo = ''; - if(count($POLineItem)>0) - { - $LineItemNo = $POLineItem[0]['LineItemNo']; - } - //echo $LineItemNo; - - if(trim($POType) == IMPORT ) - { - // echo 'Success'; - $ImportTaxList = array('LineItemNo'=>$LineItemNo,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem); - //print_r($ImportTaxList); - //die(); + $POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList); + + $LineItemNo = ''; + if(count($POLineItem)>0) + { + $LineItemNo = $POLineItem[0]['LineItemNo']; + } + //echo $LineItemNo; + + if(trim($POType) == IMPORT ) + { + // echo 'Success'; + $ImportTaxList = array('LineItemNo'=>$LineItemNo,'BasicPriceInMTon'=>$BasicPriceinmton,'ProductPrice'=>$Productprice,'LandingCharge'=>$LandingCharge,'AfterLandingCharge'=>$AfterLandingCharge,'AfterHighSeasSalesCharge'=>$AfterHighSeas,'HighSeasSalesCharge'=>$HighSeas,'CustomDuty'=>$CustomDuty,'AfterCustomDuty'=>$AfterCustomDuty,'ExciseDuty'=>$ExciseDuty,'AfterExciseDuty'=>$AfterExciseDuty,'ExciseDutyEdCess'=>$ExciseDutyEd,'AfterExciseDutyEdCess'=>$AfterExciseDutyEd,'ExciseDutySHCess'=>$ExciseDutySH,'CustomEdCess'=>$CustomEd,'CustomSHCess'=>$CustomSH,'AddlExciseDuty'=>$AddAdtional,'CreatedBy'=>$CreateBy,'CreatedDate'=>$createddt,'AfterExciseDutySHCess'=>$AfterExciseDutySH,'AfterAddlExciseDuty'=>$AfterAddAdtional,'Grossdutypayable'=>$Grossdutypayable,'AvailableModvat'=>$AvailableModvat,'Grossexpensesduetocustomduty'=>$Grossexpensesduetocustomduty,'purchaseratePerKG'=>$purchaseratePerKG,'CustomDutyExpensesPerKG'=>$CustomDutyExpensesPerKG,'RMCIncludingCustomersPerKG'=>$RMCIncludingCustomersPerKG,'QuantityKG'=>$QuantityKG,'AfterCustomSHCess'=>$AfterCustomSH,'AfterCustomEdCess'=>$AfterCustomEd,'TotalValue'=>$Totalvalueitem); + //print_r($ImportTaxList); + //die(); - - $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); - - } - } - - } - echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ; + + $ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList); + + } + } + + } + echo 'Purchase Order Created Successfully! PO Number Is: '.$PONO ; } @@ -1393,21 +1411,40 @@ $createddt=''; $Deliverydt = $this->getDateformat($dt); $POType = $this->input->post('POType'); //$PoRange = $this->input->post('txtPoRange'); - $DeliveryOption = $this->input->post('DateRange'); + //$DeliveryOption = $this->input->post('DateRange'); $Exchangerate=$this->input->post('ExchangeRate'); $ExchangeRateCalculatedon=$this->input->post('Exchangerateon'); $CurrencyType=$this->input->post('currencytype'); + + $DeliveryOption = $this->input->post('DateRange'); + + //echo $DeliveryOption; + //die(); + $DeliverySchedule=''; + $Dispatch=''; + if($DeliveryOption==1) + { + $Dispatch=''; + $DeliverySchedule = $this->input->post('Scheduleby'); + } + + + else + { + $Dispatch = $this->input->post('Dispatch'); + $DeliverySchedule = ''; + } - if($DeliveryOption==1){ - $Deliverydt = ''; - $DeliverySchedule = $this->input->post('Scheduleby'); - } - else{ - $Deliverydt = $this->getDateformat($dt); - $DeliverySchedule = ''; - } + // if($DeliveryOption==1){ + // $Deliverydt = ''; + // $DeliverySchedule = $this->input->post('Scheduleby'); + // } + // else{ + // $Deliverydt = $this->getDateformat($dt); + // $DeliverySchedule = ''; + // } // $PaymentDate=$this->input->post('Payment'); // if($PaymentDate==1) // { @@ -1433,10 +1470,16 @@ $createddt=''; $updateddt = $dt->format('Y-m-d H:i:s'); $PaymentTerms=$this->input->post('PaymentTerms'); + + $Palaceoforigin=$this->input->post('PlaceOforigin'); // $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); + // $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); + + + + $POList = array('SupplierID'=>$SupplierID, 'TotalOrderValue'=>$TotalOrder,'PODate'=>$PODate,'Status'=>$POStatus,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'Import_DispatchDetails'=>$Dispatch,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ExchangeRate'=>$Exchangerate,'ExchangeRateCalculatedon'=>$ExchangeRateCalculatedon,'CurrencyType'=>$CurrencyType,'PaymentTerms'=>$PaymentTerms,'POType'=>$POType,'Import_PlaceofOrgin'=>$Palaceoforigin); //echo $PONO; //echo $TotalOrder; //print_r($POList); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index ddc6d936..fee5542e 100755 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -742,7 +742,7 @@ function GetCurrencytype() function GetINRCurrencytype($Currency_Code='') { - $subQuery='select FontCode2000 from T_Currency_Details where Currency_Code=?'; + $subQuery='select * from T_Currency_Details where Currency_Code=?'; $query=$this->db->query($subQuery,array($Currency_Code)); //print_r($this->db->last_query()); return $query->result(); diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index bc92ac45..d740d437 100644 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -27,7 +27,7 @@ foreach ($PaymentTerms as $TER) { $Terms=$TER->PaymentTerms; } - +//echo $Terms; $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('Y-m-d'); @@ -57,6 +57,18 @@ if(!empty($CompanyDetails)) } } + + +$INR=''; +if(!empty($INRSYMBOL)) +{ + foreach ($INRSYMBOL as $INR) + { + $INR=$INR->Currency_Code; + // $INR=$INR->FontCode2000; + } +} +//echo $INR; //echo "$CompanyAddress"; //$Exchangerate=$ExchangeRate; @@ -92,6 +104,8 @@ $PayableAT=''; //$ExchangeRate $ExchangeRateCalculatedon=''; $StatusName=''; +$Import_DispatchDetails=''; +$Import_PlaceofOrgin=''; if(!empty($POMaster)) { @@ -121,6 +135,9 @@ if(!empty($POMaster)) $Currency_Type=$Req->CurrencyType; $parentPO =$Req->ParentPO; $DeliverySchedule=$Req->DeliverySchedule; + $Import_DispatchDetails=$Req->Import_DispatchDetails; + $Import_PlaceofOrgin=$Req->Import_PlaceofOrgin; + $PaymentTerms=$Req->PaymentTerms; } } //echo $ServiceDescription; @@ -199,10 +216,10 @@ body { // //maxDate : 'now', // dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' // }); - $("#Deliverydt").datepicker({ - minDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' - }); + // $("#Deliverydt").datepicker({ + // minDate : 'now', + // dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' + // }); $("#Requeston").datepicker({ //minDate : d, @@ -370,7 +387,7 @@ body {
-
+ +
+
+ +
+ + 'POType','value' => set_value('POType',IMPORT),'id'=>'POType', 'class' => 'form-control' ,'readonly' => 'true'); + echo form_input($data); + ?> +
+
+
+ +
+ 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); + echo form_input($data); + ?> +
+
@@ -407,7 +445,7 @@ body { Select Delivery By
- "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?>     + "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?>     "DateRange", "id"=>"Schedule", "value"=>"1")); ?> @@ -424,11 +462,11 @@ body { ?>
-

- +

+ 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true'); + $data = array('name' => 'Dispatch','value' => set_value('Dispatch',$Import_DispatchDetails),'id'=>'Dispatch', 'class' => 'form-control' ,'required' => 'true'); echo form_input($data); ?> @@ -463,15 +501,17 @@ body { ?>
-
- +
+
'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); + // $data = array('name' => 'PlaceOforigin','value' => set_value('PlaceOforigin'),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); + // echo form_input($data); + $data = array('name' => 'PlaceOforigin','value' => set_value('PlaceOforigin',$Import_PlaceofOrgin),'id'=>'PlaceOforigin', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); ?>
-
+
@@ -485,6 +525,29 @@ body { PaymentTerms){ + $options1[$Pay->PaymentTerms] = $Pay->PaymentTerms; + + } + + endforeach; + + + foreach ($PaymentTerms as $Pay): + if($PaymentTerms!=$Pay->PaymentTerms){ + $options1[$Pay->PaymentTerms] = $Pay->PaymentTerms; + + } + + endforeach; + } + + // echo form_dropdown('currencytype', $options1,set_value('currencytype',$Currency_Type),'id="currencytype"','class="form-control select2"' , 'required="true"'); + ?> @@ -707,7 +770,7 @@ if($PONOStatus == PO_RELEASED)
-

+

@@ -756,10 +819,11 @@ if($PONOStatus == PO_RELEASED)
- Basic Price: + +
-
+
- Landing charge + +
@@ -801,7 +866,8 @@ if($PONOStatus == PO_RELEASED)
- High seas sales charge + +
@@ -822,7 +888,8 @@ if($PONOStatus == PO_RELEASED)
- Custom duty : (a) + +
@@ -843,7 +910,8 @@ if($PONOStatus == PO_RELEASED)
- Excise duty : (b) + +
@@ -864,7 +932,8 @@ if($PONOStatus == PO_RELEASED)
- Excise duty ED_cess : (C) + +
@@ -885,7 +954,9 @@ if($PONOStatus == PO_RELEASED)
- Excise duty S & H cess :(d) + + +
@@ -906,7 +977,8 @@ if($PONOStatus == PO_RELEASED)
- Custom ED_cess : (e) + +
@@ -927,7 +999,8 @@ if($PONOStatus == PO_RELEASED)
- Custom S & H cess : (f) + +
@@ -950,7 +1023,8 @@ if($PONOStatus == PO_RELEASED)
- Additional Excise duty : (g) + +
@@ -971,7 +1045,8 @@ if($PONOStatus == PO_RELEASED)
- Gross duty payable + +
@@ -984,7 +1059,8 @@ if($PONOStatus == PO_RELEASED)
- Available Modvat set-off on import : + +
@@ -999,7 +1075,8 @@ if($PONOStatus == PO_RELEASED)
- Gross expenses due to custom duty: + +
@@ -1017,7 +1094,7 @@ if($PONOStatus == PO_RELEASED)
- purchase rate [Basic] + purchase rate [Basic]/UOM
@@ -1041,7 +1118,8 @@ if($PONOStatus == PO_RELEASED)
- Custom Duty Expenses + +
@@ -1055,7 +1133,8 @@ if($PONOStatus == PO_RELEASED)
- RMC Including Customers + +
@@ -1065,11 +1144,12 @@ if($PONOStatus == PO_RELEASED) ?>
-
- Total Amount: +
-
+