From d7784099c871776a52d2456ecfa72c7cbe5c677d Mon Sep 17 00:00:00 2001 From: velz2020 Date: Sat, 12 Aug 2017 19:09:48 +0530 Subject: [PATCH] PAYROLL AMEND DATE FORMAT --- .../controllers/amendmentpurchaseorder.php | 5 +- application/controllers/emppaydate.php | 26 ++++-- application/views/addemppaydate.php | 83 +++++++++++++++---- application/views/editCapitalAmendPO.php | 12 +-- application/views/editOldemppay.php | 80 ++++++++++++++---- application/views/editRevenueAmendPO.php | 12 +-- application/views/editServiceAmendPO.php | 11 +-- application/views/emppayListing.php | 4 + 8 files changed, 176 insertions(+), 57 deletions(-) diff --git a/application/controllers/amendmentpurchaseorder.php b/application/controllers/amendmentpurchaseorder.php index dd3ca2d9..1bdf8ace 100755 --- a/application/controllers/amendmentpurchaseorder.php +++ b/application/controllers/amendmentpurchaseorder.php @@ -332,7 +332,7 @@ class amendmentpurchaseorder extends BaseController } - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'AmendedDetails'=>$MAD); + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID,'POType'=>$POType,'TotalOrderValue'=>$TotalOrderValueSummary,'PODate'=>$PODate,'Status'=>PO_RELEASED,'PaymentTerms'=>$PaymentTerms,'PaymentOtherDescription'=>$Otherpayment,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'ServiceDescription'=>$SpecialInstruction,'CreatedBy'=>$updatedBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'UpdatedOn'=>$updateddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'AmendedDetails'=>$MAD); //print_r($POMaster); @@ -891,7 +891,8 @@ function UpdateAmendServicePurchaseOrder() if($PaymentMethod != 'PT08'){ $Otherpayment=''; } - $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin); + $updatedBy = $this->session->userdata ( 'userId' ); + $POMaster = array('ParentPO'=>$PONO,'SupplierID'=>$SupplierID, 'TotalOrderValue'=>$FinalTotalOrder,'POType'=>$POType,'PODate'=>$PODate,'Status'=>PO_RELEASED,'CapitalRange'=>$PoRange,'ExchangeRate'=>$ExchangeRate,'ExchangeRateCalculatedon'=>$ExchangeRateOn,'PaymentTerms'=>$PaymentMethod,'PaymentOtherDescription'=>$Otherpayment,'ServiceDescription'=>$SpcialInstruction,'CreatedBy'=>$CreateBy,'DeliveryAddress'=>$DeliveryAddr,'DeliveryDate'=>$Deliverydt,'CreatedDate'=>$createddt,'ReleasedBy'=>$updatedBy,'ReleasedOn'=>$updateddt,'DeliverySchedule'=>$DeliverySchedule,'DeliveryOption'=>$DeliveryOption,'CurrencyType'=>$currencytypeID,'AmendedDetails'=>$MAD,'Import_DispatchDetails'=>$curdispatch,'Import_PlaceofOrgin'=>$PlaceOforigin); // print_r($POMaster); $LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster,$CreateBy,$PONO); diff --git a/application/controllers/emppaydate.php b/application/controllers/emppaydate.php index a3487a97..9de145b1 100755 --- a/application/controllers/emppaydate.php +++ b/application/controllers/emppaydate.php @@ -86,7 +86,6 @@ class emppaydate extends BaseController $this->load->library('form_validation'); $this->form_validation->set_rules('EmpID','EmpID','required'); - $this->form_validation->set_rules('Basic_Pay','Basic_Pay','trim|required'); $this->form_validation->set_rules('HRA_Rate','HRA_Rate','trim|required'); $this->form_validation->set_rules('OT_Rate','OT_Rate','trim|required'); $this->form_validation->set_rules('Allowances','Allowances','trim|required'); @@ -103,14 +102,16 @@ class emppaydate extends BaseController { $Pay_Data_ID=$this->input->post('Pay_Data_ID'); $EmpID = $this->input->post('EmpID'); + $Total_Salary=$this->input->post('Total_salary'); $Basic_Pay=$this->input->post('Basic_Pay'); $HRA_Rate=$this->input->post('HRA_Rate'); + $HRA_Amount=$this->input->post('HRA_Amount'); $OT_Rate=$this->input->post('OT_Rate'); $Allowances=$this->input->post('Allowances'); $PF_Rate=$this->input->post('PF_Rate'); $ESI_Rate=$this->input->post('ESI_Rate'); $Food_Allowances=$this->input->post('Food_Allowances'); - //$All = $this->input->post('All'); + //$All = $this->input->post('All'); $CreateBy = $this->session->userdata ( 'userId' ); $chked = $this->input->post('is_Active'); @@ -131,13 +132,14 @@ class emppaydate extends BaseController //$createddt = $dt->format('Y-m-d H:i:s'); // $emppayExists = $this->emppaydate_model->( $emppay); - - $emppay = array(); + // Becasue of done cool thinfg of it. + + // $emppay = array(); - $emppay = array('EmpID'=>$EmpID, 'Basic_Pay'=>$Basic_Pay, 'HRA_Rate'=>$HRA_Rate, 'OT_Rate'=>$OT_Rate, 'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate ,'Food_Allowances'=>$Food_Allowances,'is_Active'=>$IsActive,'Created_By'=>$CreateBy); + $emppay = array('EmpID'=>$EmpID,'TotalSalary'=>$Total_Salary,'Basic_Pay'=>$Basic_Pay,'HRA_Rate'=>$HRA_Rate,'HRA_Amount'=>$HRA_Amount, 'OT_Rate'=>$OT_Rate, 'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate ,'Food_Allowances'=>$Food_Allowances,'is_Active'=>$IsActive,'Created_By'=>$CreateBy); - //print_r($monthdata); + // print_r($emppay);die(); $result = $this->emppaydate_model->addNewemppay($emppay); if($result > 0) @@ -188,6 +190,7 @@ class emppaydate extends BaseController $this->form_validation->set_rules('Pay_Data_ID','Pay_Data_ID','trim|required'); $this->form_validation->set_rules('EmpID','EmpID','trim|required'); + $this->form_validation->set_rules('total_salary','total_salary','trim|required'); $this->form_validation->set_rules('Basic_Pay','Basic_Pay','trim|required'); $this->form_validation->set_rules('HRA_Rate','HRA_Rate','trim|required'); $this->form_validation->set_rules('OT_Rate','OT_Rate','trim|required'); @@ -211,8 +214,10 @@ class emppaydate extends BaseController $Pay_Data_ID=$this->input->post('Pay_Data_ID'); $EmpID = $this->input->post('EmpID'); - $Basic_Pay=$this->input->post('Basic_Pay'); + $TotalSalary=$this->input->post('total_salary'); + $Basic_Pay=$this->input->post('Basic_Pay'); $HRA_Rate=$this->input->post('HRA_Rate'); + $HRA_Amount=$this->input->post('HRA_Amount'); $OT_Rate=$this->input->post('OT_Rate'); $Allowances=$this->input->post('Allowances'); $PF_Rate=$this->input->post('PF_Rate'); @@ -237,7 +242,7 @@ class emppaydate extends BaseController $emppaydatas = array(); - $emppaydatas = array('Pay_Data_ID'=>$Pay_Data_ID, 'EmpID'=>$EmpID, 'Basic_Pay'=>$Basic_Pay, 'HRA_Rate'=>$HRA_Rate, 'OT_Rate'=>$OT_Rate, 'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate,'Food_Allowances'=>$Food_Allowances, 'Last_Mod_By'=>$Last_Mod_By, 'Last_Mod_Time'=>$Last_Mod_Time, 'is_Active'=>$IsActive); + $emppaydatas = array('Pay_Data_ID'=>$Pay_Data_ID, 'EmpID'=>$EmpID,'TotalSalary'=>$TotalSalary,'Basic_Pay'=>$Basic_Pay, 'HRA_Rate'=>$HRA_Rate,'HRA_Amount'=>$HRA_Amount,'OT_Rate'=>$OT_Rate, 'Allowances'=>$Allowances, 'PF_Rate'=>$PF_Rate, 'ESI_Rate'=>$ESI_Rate,'Food_Allowances'=>$Food_Allowances, 'Last_Mod_By'=>$Last_Mod_By, 'Last_Mod_Time'=>$Last_Mod_Time, 'is_Active'=>$IsActive); @@ -246,10 +251,13 @@ class emppaydate extends BaseController if($result == true) { - $this->session->set_flashdata('success', 'updated successfully'); + echo ""; + //$this->session->set_flashdata('success', 'updated successfully'); + } else { + echo ""; $this->session->set_flashdata('error', 'updation failed'); } diff --git a/application/views/addemppaydate.php b/application/views/addemppaydate.php index 1da2bfb3..7fab5c43 100755 --- a/application/views/addemppaydate.php +++ b/application/views/addemppaydate.php @@ -74,12 +74,24 @@
+
+ * +
+ 'Total_salary','id' => 'Total_salary','value' => set_value('Total_salary'),'pattern' => '[0-9]{4,6}', 'class' => 'form-control', 'style'=>'text-transform:uppercase;','title' => 'Enter Valid Total salary Amount,Minimum Four Digit Positive Number','onchange'=>'calculalteHRA();'); + echo form_input($data); + ?> +
+
+
+
*
'Basic_Pay','id' => 'Basic_Pay','value' => set_value('Basic_Pay'),'pattern' => '[0-9]{4,6}', 'class' => 'form-control', 'style'=>'text-transform:uppercase;','title' => 'Enter Valid Basic Pay Amount,Minimum Four Digit Positive Number'); + $data = array('name' => 'Basic_Pay','id' => 'Basic_Pay','value' => set_value('Basic_Pay'),'pattern' => '[0-9]{4,6}', 'class' => 'form-control', 'style'=>'text-transform:uppercase;','title' => 'Enter Valid Basic Pay Amount,Minimum Four Digit Positive Number','readonly'=>'readonly'); echo form_input($data); ?>
@@ -91,22 +103,38 @@ -
+ +
+ +
+ +
*
'HRA_Rate','id'=>'HRA_Rate','value' => set_value('HRA_Rate'), 'class' => 'form-control','style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,2}([.][0-9]{1,2})?)', 'title'=>'Enter the Valid HRA Rate,Minimum 1 digit,Maximum 2 digit','onfocusout'=>'validateHRA();'); + $data = array('name' => 'HRA_Rate','id'=>'HRA_Rate','value' => set_value('HRA_Rate'), 'class' => 'form-control','style'=>'text-transform:uppercase;','pattern'=>'([0-9]{1,2}([.][0-9]{1,2})?)', 'title'=>'Enter the Valid HRA Rate,Minimum 1 digit,Maximum 2 digit','onfocusout'=>'validateHRA();','onchange'=>'calculalteHRA();'); echo form_input($data); ?>
-
- -
+
+
+ * + +
+ 'HRA_Amount','id'=>'HRA_Amount','value' => set_value('HRA_Amount'), 'class' => 'form-control','style'=>'text-transform:uppercase;','readonly'=>'readonly'); + echo form_input($data); + ?> +
+
+
+
* @@ -120,7 +148,17 @@
-
+ + + + + + +
+ +
+ +
*
@@ -132,11 +170,8 @@
- - - - -
+ +
* @@ -149,9 +184,6 @@
-
- -
* @@ -228,7 +260,26 @@
- + diff --git a/application/views/editCapitalAmendPO.php b/application/views/editCapitalAmendPO.php index cfbbc8f7..eff4666a 100755 --- a/application/views/editCapitalAmendPO.php +++ b/application/views/editCapitalAmendPO.php @@ -100,7 +100,7 @@ if(!empty($POMaster)) $SupName = $Req->SupplierName; $Address = $Req->Address; $pdt = new DateTime($Req->PODate); - $PODate = $pdt->format('Y-m-d'); + $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; @@ -108,7 +108,7 @@ if(!empty($POMaster)) if(!empty($Req->DeliveryDate)) { $Ddt = new DateTime($Req->DeliveryDate); - $Deliverydt = $Ddt->format('Y-m-d'); + $Deliverydt = $Ddt->format('d-m-Y'); }else{ $Deliverydt=null; } @@ -121,7 +121,7 @@ if(!empty($POMaster)) $scopeofwork = $Req->ServiceDescription; //$PayableAT=$Req->PayableAT; $ExchangeRateOn1=new DateTime($Req->ExchangeRateCalculatedon); - $ExchangeRateOn=$ExchangeRateOn1->format('Y-m-d'); + $ExchangeRateOn=$ExchangeRateOn1->format('d-m-Y'); // $PaymentDays=$Req->PaymentDays; $PaymentOtherDescription=$Req->PaymentOtherDescription; $PaymentTerms=$Req->PaymentTerms; @@ -274,11 +274,11 @@ document.getElementById('dispatchinternational').style.display = 'block'; $("#PODate").datepicker({ //minDate : d, maxDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' + dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' }); $("#Deliverydate").datepicker({ minDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' + dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10' }); $('#Date').click(function () { //for Date range selection @@ -1666,6 +1666,8 @@ document.getElementById('dispatchinternational').style.display = 'block';
+ format('d-m-Y');?>

diff --git a/application/views/editOldemppay.php b/application/views/editOldemppay.php index 2fe2c208..c15bdee5 100755 --- a/application/views/editOldemppay.php +++ b/application/views/editOldemppay.php @@ -16,7 +16,9 @@ $Created_By=''; $Created_Time=''; $Last_Mod_By=''; - $Last_Mod_Time=''; + $Last_Mod_Time=''; + $HRA_Amount=''; + $TotalSalary=''; if(!empty($emppay)) @@ -29,8 +31,10 @@ if(!empty($emppay)) $Pay_Data_ID=$ep->Pay_Data_ID; $EmpID=$ep->EmpID; + $TotalSalary=$ep->TotalSalary; $Basic_Pay=$ep->Basic_Pay; $HRA_Rate=$ep->HRA_Rate; + $HRA_Amount=$ep->HRA_Amount; $OT_Rate=$ep->OT_Rate; $Allowances=$ep->Allowances; $PF_Rate=$ep->PF_Rate; @@ -104,27 +108,56 @@ if(!empty($emppay))
- Basic Pay:* - + Total Salary:* +
+
+ +
+
+
+ Basic Pay:* + +
+
+
HRA_Rate(%):* - + +
+
+
+ +
+
+
+ HRA_Amount:* +
-
+ + + + +
+ + + + +
+
OT_Rate:* @@ -132,9 +165,8 @@ if(!empty($emppay))
- - -
+ +
Allowances:* @@ -142,12 +174,6 @@ if(!empty($emppay))
-
- - - - -
@@ -294,4 +320,28 @@ if(!empty($emppay))
- \ No newline at end of file + + \ No newline at end of file diff --git a/application/views/editRevenueAmendPO.php b/application/views/editRevenueAmendPO.php index 01ba2903..e7bb7b7c 100644 --- a/application/views/editRevenueAmendPO.php +++ b/application/views/editRevenueAmendPO.php @@ -2,7 +2,7 @@ format('Y-m-d'); +$CurrentDate = $dt->format('d-m-Y'); $MaxPoDate = ''; $AvlAmount = 0; $DeliverSchedule=''; @@ -71,12 +71,12 @@ if(!empty($POMaster)) $Address = $Req->Address; $Pdt = new DateTime($Req->PODate); - $PODate = $Pdt->format('Y-m-d'); + $PODate = $Pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; $Ddt = new DateTime($Req->DeliveryDate); //echo $Req->DeliveryDate."
"; - $Deliverydt = $Ddt->format('Y-m-d'); + $Deliverydt = $Ddt->format('d-m-Y'); //echo $Deliverydt; $PaymentOtherDescription=$Req->PaymentOtherDescription; //echo $PaymentOtherDescription; @@ -200,11 +200,11 @@ $(function() { $("#PODate").datepicker({ minDate : d, maxDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' + dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' }); $("#Deliverydt").datepicker({ minDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' + dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10' }); /* $("#Requeston").datepicker({ //minDate : d, @@ -1732,6 +1732,8 @@ function calculateEditTaxValue()
+format('d-m-Y');?>

diff --git a/application/views/editServiceAmendPO.php b/application/views/editServiceAmendPO.php index 1fbdd40f..34345623 100755 --- a/application/views/editServiceAmendPO.php +++ b/application/views/editServiceAmendPO.php @@ -59,12 +59,12 @@ if(!empty($POMaster)) $SupName = $Req->SupplierName; $Address = $Req->Address; $pdt = new DateTime($Req->PODate); - $PODate = $pdt->format('Y-m-d'); + $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; // echo "*" . $Req->DeliveryDate . "*"; $Ddt = new DateTime($Req->DeliveryDate); - $Deliverydt = $Ddt->format('Y-m-d'); + $Deliverydt = $Ddt->format('d-m-Y'); // echo "-" . $Deliverydt . "-"; $DeliveryAddress =$Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; @@ -179,11 +179,11 @@ var AvilBudAmt = ''; $("#PODate").datepicker({ minDate : d, maxDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' + dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '-100:+0' }); $("#Deliverydt").datepicker({ minDate : 'now', - dateFormat: 'mm/dd/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' + dateFormat: 'dd/mm/yy',changeMonth: true, changeYear: true,yearRange: '0:+10' }); $('#drpSupplier').change(function() { @@ -1305,7 +1305,8 @@ $(document).ready(function () {

- + format('d-m-Y');?>

diff --git a/application/views/emppayListing.php b/application/views/emppayListing.php index 30acdf5a..69b8b636 100755 --- a/application/views/emppayListing.php +++ b/application/views/emppayListing.php @@ -36,8 +36,10 @@ Pay Data ID Employee ID + Total Salary Basic Pay HRA Rate + HRA Amount OT Rate Allowances PF Rate @@ -59,8 +61,10 @@ Pay_Data_ID ?> EmpID ?> + TotalSalary ?> Basic_Pay ?> HRA_Rate ?> + HRA_Amount ?> OT_Rate ?> Allowances ?> PF_Rate ?>