diff --git a/application/controllers/purchaseorder.php b/application/controllers/purchaseorder.php index 32180bb1..b2413823 100644 --- a/application/controllers/purchaseorder.php +++ b/application/controllers/purchaseorder.php @@ -157,7 +157,8 @@ class purchaseorder extends BaseController /* End Here */ $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); - $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); + // $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); + $data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate(); $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); $ViewName = ''; @@ -259,7 +260,15 @@ class purchaseorder extends BaseController /* End Here */ $data['POMaster'] = $this->purchaseorder_model->GetServicePurchaseOrder($PONO); - $data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); + //print_r($data['POMaster']); + foreach ($data['POMaster'] as $Exc) + { + $exRate=$Exc->ExchangeRate; + } + + //print_r($exRate); + //$data['MaxPODate'] = $this->purchaseorder_model->getLastCreatedPODate(); + $data['MaxPODate'] = $this->purchaseorder_model->getLastReleasedPODate(); $data['TaxType'] = $this->purchaseorder_model->getConfigValue('C006'); $data['FreightType'] = $this->purchaseorder_model->getConfigValue('C018'); if($ReqType == SERVICE) @@ -290,36 +299,20 @@ class purchaseorder extends BaseController } // print_r($data); $data['POItem'] = $this->purchaseorder_model->GetImportPurchaseOrderDetails($PONO); - //print_r($data); - //$data['ExchangeRate']=$data['POItem']->ExchangeRate; + $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); + + // foreach($data['POMaster'] as $CUR) + // { - //print_r($data['POItem']); - - foreach($data['POItem'] as $Rate) - { - - // print_r($Rate->ExchangeRate); - $exRate=$Rate->ExchangeRate; - - // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate; - } - - foreach($data['POItem'] as $CUR) - { - - //print_r($CUR->CurrencyType); - $Currency=$CUR->CurrencyType; + // //print_r($CUR->CurrencyType); + // $Currency=$CUR->Currency_Code; - // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate; - } - //echo "$Currency"; - $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); - //print_r($data); - $data['ExchangeRate']=$exRate; - - $data['Currency']=$this->purchaseorder_model->GetCurrencytype(); - //print_r($data); + // // $data[$Rate->ExchangeRate]=$Rate->ExchangeRate; + // } + // $data['CurrencyDetail']=$this->purchaseorder_model->GetCurrencyDetail($Currency); + // //print_r($data['CurrencyDetail']); + $this->global['pageTitle'] = 'Siddharth : Edit Import Purchase order form'; $this->loadViews("editimportpo", $this->global, $data, NULL); } @@ -965,11 +958,15 @@ public function importpoprint($PONO) $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'); - $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 ); + $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); - + //print_r($POList); + //die(); $POMaster = $this->purchaseorder_model->addPOMaster($POList); $PONO = ''; @@ -991,7 +988,7 @@ public function importpoprint($PONO) $Reqnumber = $this->input->post('Reqnumber'.$i); $itemRate = $this->input->post('itemRate'.$i); - $Exchangerate = $this->input->post('Exchangerate'.$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); @@ -1027,7 +1024,7 @@ public function importpoprint($PONO) $RMCIncludingCustomersPerKG = $this->input->post('RMCIncludingCustomers'.$i); $QuantityKG = $this->input->post('PurQuantity'.$i); - $currencytypeID = $this->input->post('currencytype'); + //$currencytypeID = $this->input->post('currencytype'); $Totalvalueitem=$this->input->post('TotalExp'.$i); //echo $BasicPriceinmton; @@ -1064,7 +1061,7 @@ public function importpoprint($PONO) if(trim($POType) == IMPORT ) { // echo 'Success'; - $ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID,'TotalValue'=>$Totalvalueitem); + $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(); @@ -1093,6 +1090,12 @@ $createddt=''; $POType = $this->input->post('POType'); $PoRange = $this->input->post('txtPoRange'); $DeliveryOption = $this->input->post('DateRange'); + + $Exchangerate=$this->input->post('ExchangeRate'); + $ExchangeRateCalculatedon=$this->input->post('Exchangerateon'); + $CurrencyType=$this->input->post('currencytype'); + + if($DeliveryOption==1){ $Deliverydt = ''; $DeliverySchedule = $this->input->post('Scheduleby'); @@ -1116,7 +1119,7 @@ $createddt=''; $updateddt = $dt->format('Y-m-d H:i:s'); // PO Master // PO Master - $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 ); + $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 ); //echo $PONO; //echo $TotalOrder; //print_r($POList); @@ -1137,7 +1140,7 @@ $createddt=''; $Reqnumber = $this->input->post('Reqnumber'.$i); $itemRate = $this->input->post('itemRate'.$i); - $Exchangerate = $this->input->post('Exchangerate'.$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); @@ -1179,7 +1182,7 @@ $createddt=''; $Totalvalueitem=$this->input->post('TotalExp'.$i); $LineItemNo = ''; - $currencytypeID = $this->input->post('currencytype'); + //$currencytypeID = $this->input->post('currencytype'); $SkipInsert = "False"; if( count($comma_separated) > 0) { @@ -1217,7 +1220,7 @@ $createddt=''; $isExists = $this->purchaseorder_model->LineItemExistsinImportTax($LineItemNo); if(count($isExists) == 0) { - $ImportTaxList = array('LineItemNo'=>$LineItemNo, 'ExchangeRate'=>$Exchangerate,'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,'CurrencyType'=>$currencytypeID,'TotalValue'=>$Totalvalueitem); + $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); diff --git a/application/models/purchaseorder_model.php b/application/models/purchaseorder_model.php index 1303cb7c..7bdc563a 100644 --- a/application/models/purchaseorder_model.php +++ b/application/models/purchaseorder_model.php @@ -335,6 +335,16 @@ function purchaseorderListing() return $query->result(); } + + + function getLastReleasedPODate() + { + $this->db->select('max(ReleasedOn) as PODate'); + $this->db->from('T_PurchaseOrder_Master'); + $query = $this->db->get(); + + return $query->result(); + } /** @@ -347,7 +357,7 @@ function purchaseorderListing() $this->db->insert('T_PurchaseOrder_Master', $POMaster); $insert_id = $this->db->affected_rows(); $this->db->trans_complete(); - // print_r($this->db->last_query()); + //print_r($this->db->last_query()); if($insert_id>0) { $subQuery = 'select max(PONO) as PONO from T_PurchaseOrder_Master'; @@ -435,7 +445,7 @@ function purchaseorderListing() function GetServicePurchaseOrder($PONO = '') { $this->db->distinct(); - $this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,Stat.StatusCode'); + $this->db->select('ReqNo,POMast.PONO,ServiceDescription,supp.SupplierID,supp.SupplierName,supp.Address,PODate,Stat.StatusName,DeliveryOption,DeliverySchedule,DeliveryDate,DeliveryAddress,Stat.StatusCode,POMast.ExchangeRateCalculatedon,POMast.ExchangeRate,POMast.CurrencyType'); $this->db->from('T_PurchaseOrder_Master POMast'); $this->db->join('T_SupplierDetailsN supp', 'supp.SupplierID = POMast.SupplierID'); $this->db->join('T_Status Stat', 'Stat.StatusCode = POMast.Status'); @@ -555,7 +565,7 @@ function GetImportPurchaseOrderDetailsForPDF($PONO = '') function GetCurrencyDetail($Currency='') { - $subQuery='SELECT CurrencyCode,CurrencyName from T_Currency_Details where CurrencyCode=?'; + $subQuery='SELECT Currency_Code,Country_and_Currency from T_Currency_Details where Currency_Code=?'; $query=$this->db->query($subQuery,array($Currency)); return $query->result(); @@ -592,7 +602,7 @@ Mat.UOM,Quantity,Rate,Req.Status,ROUND((Quantity *Rate),2 ) as BasicValue , function GetCurrencytype() { - $subQuery = 'select CurrencyCode,CurrencyName from T_Currency_Details'; + $subQuery = 'select Currency_Code,Country_and_Currency from T_Currency_Details;'; $query = $this->db->query($subQuery); diff --git a/application/views/editimportpo.php b/application/views/editimportpo.php index 5049e52b..e2e714b6 100644 --- a/application/views/editimportpo.php +++ b/application/views/editimportpo.php @@ -1,11 +1,16 @@ Currency_Code.' '.' - '.' '.$Detail->Country_and_Currency; +// } $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('Y-m-d'); @@ -36,7 +41,7 @@ if(!empty($CompanyDetails)) } } - +//echo "$CompanyAddress"; //$Exchangerate=$ExchangeRate; @@ -66,6 +71,7 @@ $totordervalue=''; $ExchangeRate=''; $totorder=''; //$ExchangeRate +$ExchangeRateCalculatedon=''; if(!empty($POMaster)) @@ -86,7 +92,9 @@ if(!empty($POMaster)) $POStatus = $Req->StatusCode; $PONO = $Req->PONO; $ServiceDescription = $Req->ServiceDescription; - // $ExchangeRate=$Req->ExchangeRate; + $ExchangeRate=$Req->ExchangeRate; + $ExchangeRateCalculatedon=$Req->ExchangeRateCalculatedon; + } } ?> @@ -117,16 +125,33 @@ if(!empty($POMaster)) //$("#drpSupplier").select2(); var POMaxDate = ''; var d = new Date(POMaxDate); + + var t=''; + var m=new Date(t); + $("#PODate").datepicker({ minDate : d, maxDate : 'now', dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' }); + + $("#PayableAT").datepicker({ + minDate : m, + //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' }); + + $("#Exchangerateon").datepicker({ + minDate : m, + //maxDate : 'now', + dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' + }); + }); @@ -181,6 +206,7 @@ if(!empty($POMaster)) $Cur); $options = array("0"=>'Select Currency'); //print_r( $options); @@ -189,7 +215,7 @@ if(!empty($POMaster)) foreach ($Currency as $CUR): - $options[$CUR->CurrencyCode] = $CUR->CurrencyCode.' '.' - '.' '.$CUR->CurrencyName; + $options[$CUR->Currency_Code] = $CUR->Currency_Code.' '.' - '.' '.$CUR->Country_and_Currency; endforeach; } @@ -213,10 +239,12 @@ if(!empty($POMaster)) ?> --> -
+

Click here to check Today's Foreign Exchange value -
- +
+ + +
@@ -258,19 +286,17 @@ if(!empty($POMaster)) ?>
-
- Exchange Rate : -
- + +
+ 'Exchangerateon','value' => set_value('Exchangerateon',$ExchangeRateCalculatedon),'id'=>'Exchangerateon', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); + echo form_input($data); + ?> +
+
- - $data = array('name' => 'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()'); - - echo form_input($data); - ?> -
- - +
@@ -289,10 +315,21 @@ if(!empty($POMaster)) 'DeliveryAddr','value' => set_value('DeliveryAddr',$DeliveryAddress),'id'=>'DeliveryAddr', 'class' => 'form-control' ,'required' => 'true', 'rows' => '3', 'cols' => '40'); echo Form_textarea($data); - - ?> + ?>
+
+ + + +
+ 'ExchangeRate','value' => set_value('ExchangeRate',$ExchangeRate),'id'=>'ExchangeRate', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','onchange'=>'USRate()'); + echo form_input($data); + ?> +
+
+
-
+
+ + Select Delivery By
+ + + "DateRange", "id"=>"Date", "value"=>"0", 'checked'=>'checked')); ?>     + + "DateRange", "id"=>"Schedule", "value"=>"1")); ?> + + + +
+ + +

+ + + 'Deliverydt','value' => set_value('Deliverydt',$CurrentDate),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true'); + echo form_input($data); + ?> + +
+

'PODate','value' => set_value('PODate',$PODate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); + $data = array('name' => 'PODate','value' => set_value('PODate',$CurrentDate),'id'=>'PODate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); echo form_input($data); ?>
-
- -
- 'Deliverydt','value' => set_value('Deliverydt',$Deliverydt),'id'=>'Deliverydt', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;'); - echo form_input($data); - ?> - - -
-
+
+
+
+ + Payment Details + + + +
+ Payable Terms + +
+ +
+ Payable AT + +
+ +
Payment Date
+ + +
+
@@ -482,7 +575,8 @@ if(!empty($POMaster))
- + +
'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true'); @@ -1018,7 +1112,7 @@ if(!empty($POMaster))
- +
'imTotalAmount','value' => set_value('imTotalAmount'),'id'=>'imTotalAmount', 'class' => 'form-control' ,'readonly' => 'true'); @@ -1395,7 +1489,7 @@ if(!empty($POMaster))
'EditTotalExp','value' => set_value('TotalExp'),'id'=>'TotalExp', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true'); + $data = array('name' => 'EditTotalExp','value' => set_value('EditTotalExp'),'id'=>'EditTotalExp', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event);','readonly'=>'true'); echo form_input($data); ?>
@@ -1795,9 +1889,12 @@ var NilType = ''; Mat: [] }; -$('#ExchangeRate').val(); +//$('#ExchangeRate').val(); $('#EditAvlBudAmt').val(); +//var a=$('#ExchangeRate').val(); +//alert(a); + diff --git a/application/views/importpo.php b/application/views/importpo.php index 2ba94cb6..01753bdb 100644 --- a/application/views/importpo.php +++ b/application/views/importpo.php @@ -2,6 +2,13 @@ $AvlAmount = 0; $ReqType =''; $CompanyAddress = ''; +$Value=''; + + +date_default_timezone_set('Australia/Melbourne'); +$date = date('m/d/Y h:i:s a', time()); + + if(!empty($CompanyDetails)) { foreach ($CompanyDetails as $Req) @@ -9,10 +16,10 @@ if(!empty($CompanyDetails)) $CompanyAddress = $Req->Address; } } - +//echo "$CompanyAddress"; $dt = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $CurrentDate = $dt->format('Y-m-d'); - +//echo $CurrentDate; $MaxPoDate = ''; if(!empty($MaxPODate)) { @@ -50,18 +57,33 @@ if(!empty($AvlBudAmt))