FIX_payslip : ps

This commit is contained in:
VE10-Sanjeev 2024-06-12 03:14:50 +00:00
parent 437cc01e48
commit f293a63fce
29 changed files with 1032 additions and 524 deletions

View File

@ -129,6 +129,9 @@ $routes->get('batchcard/getHistListing', 'Batchcard::getHistListing');
//Complaint Routes
$routes->get('purchaseorder/AddComplaint','Purchaseorder::AddComplaint');
$routes->post('purchaseorder/SaveComplaint','Purchaseorder::SaveComplaint');
$routes->get('purchaseorder/EditComplaint', 'Purchaseorder::EditComplaint');
$routes->post('purchaseorder/UpdateComplaint', 'Purchaseorder::UpdateComplaint');
$routes->get('purchaseorder/Savencrlist', 'Purchaseorder::Savencrlist');
$routes->get('purchaseorder/Nonconfirmativelist','Purchaseorder::Nonconfirmativelist');
//Zohobooks sync
@ -141,10 +144,29 @@ $routes->match(['get', 'post', 'put', 'delete'],'attendance', 'Monthlypay::atten
$routes->match(['get', 'post', 'put', 'delete'],'publicholidays', 'Monthlypay::loadPublicholidays');
$routes->match(['get', 'post', 'put', 'delete'],'permission', 'Monthlypay::permissionslip');
$routes->match(['get', 'post', 'put', 'delete'],'permissionlist', 'Monthlypay::permissionlist');
$routes->match(['get', 'post'],'monthlypay/permissionpdf/(:any)', 'Monthlypay::permissionpdf/$1');
$routes->post('monthlypay/addper', 'Monthlypay::addper');
$routes->post('monthlypay/saveAttendance', 'Monthlypay::saveAttendance');
$routes->post('monthlypay/savePublicHolidays', 'Monthlypay::savePublicHolidays');
$routes->post('monthlypay/deletePublicHoliday', 'Monthlypay::deletePublicHoliday');
$routes->get('emppaydate/addemppaydate', 'Emppaydate::addemppaydate');
$routes->post('emppaydate/addNewemppay', 'Emppaydate::addNewemppay');
$routes->get('emppaydate/editOldemppay/(:num)', 'Emppaydate::editOldemppay/$1');
$routes->post('emppaydate/editemppay', 'Emppaydate::editemppay');
$routes->post('emppaydate/deleteEmpPay', 'Emppaydate::deleteEmpPay');
$routes->match(['get', 'post', 'put', 'delete'],'emppayListings', 'Emppaydate::emppayListing');
$routes->match(['get', 'post', 'put', 'delete'],'emppayListings/(:num)', 'Emppaydate::emppayListing/$1');
$routes->match(['get', 'post', 'put', 'delete'],'loanreports', 'Payslip::loadLoanReport');
$routes->match(['get', 'post', 'put', 'delete'],'bonusreports', 'Payslip::Bonusreport');
$routes->match(['get', 'post'],'loanreports/(:any)/(:any)', 'Payslip::loadLoanReport/$1/$2');
$routes->match(['get', 'post'],'loanreports/(:any)', 'Payslip::loadLoanReport/$1');
$routes->match(['get', 'post'],'loanreports', 'Payslip::loadLoanReport');
$routes->post('payslip/Bonusreport', 'Payslip::Bonusreport');
$routes->get('payslip/MonthwiseBonusreport', 'Payslip::monthwiseBonusReport');
// $routes->get('leavereports/(:any)/(:any)', 'Payslip::leaveReport/$1/$2');
$routes->match(['get', 'post'],'leavereports', 'Payslip::leaveReport');
$routes->match(['get', 'post'],'leavemonthlyreports/(:any)/(:any)', 'Payslip::monthwiseLeaveReport/$1/$2');
$routes->match(['get', 'post', 'put', 'delete'],'monthlypay', 'Payslip::monthlyInputs');
$routes->match(['get', 'post', 'put', 'delete'],'ExcelUpload2', 'Payslip::viewUpload2');
$routes->match(['get', 'post', 'put', 'delete'],'FileUpload', 'Payslip::uploadExcel');
@ -154,7 +176,14 @@ $routes->match(['get', 'post', 'put', 'delete'],'ViewPay', 'Payslip::viewGenerat
$routes->match(['get', 'post', 'put', 'delete'],'updatepayroll', 'Payslip::updatepayroll');
$routes->match(['get', 'post', 'put', 'delete'],'BankReport', 'Payslip::loadBankreportScreen');
$routes->match(['get', 'post', 'put', 'delete'],'PaysilpListing', 'Payslip::payslipLisiting');
$routes->post('payslip/reload_paysliplist','Payslip::reload_paysliplist');
$routes->post('payslip/changeMonth','Payslip::changeMonth');
$routes->post('payslip/saveMonthlyData','Payslip::saveMonthlyData');
$routes->post('payslip/getEmployee','Payslip::getEmployee');
$routes->post('payslip/checkExistPay','Payslip::checkExistPay');
$routes->post('payslip/callsp','Payslip::callsp');
$routes->get('payslip/editPayslip/(:any)','Payslip::editPayslip/$1');
$routes->post('payslip/updatePayslip','Payslip::updatePayslip');
// Application Requisition Flow Routes
$routes->match(['get', 'post', 'put', 'delete'],'Requisition', 'Requisitionform::requisitionlisting');
$routes->match(['get', 'post', 'put', 'delete'],'RequisitionForm', 'Requisitionform::requisition');
@ -315,6 +344,7 @@ $routes->match(['get', 'post', 'put', 'delete'],'Report_Material_inward_Register
$routes->match(['get', 'post', 'put', 'delete'],'DeliveryPerformance', 'User::deliver_perform');
$routes->match(['get', 'post', 'put', 'delete'],'Empperform', 'Report::per');
$routes->get('quality', 'Quality::index');
$routes->get('qualityreportlist', 'Quality::reportList');
$routes->get('qualityreportlistinward', 'Quality::reportListInward');
$routes->get('shortagematerialListing', 'Rawmaterialdetails::shortagematerialListing');

View File

@ -90,24 +90,24 @@ class Emppaydate extends BaseController
helper('form'); //$this->load->library('form_validation');
$EmpID = $this->request->getPost('EmpID');
$this->validator->setRules([
'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
'EmpID'=> 'trim|required',
'HRA_Rate'=> 'trim|required',
'HRA_Amount'=> 'trim|required',
'Basic_Pay'=> 'trim|required',
'Total_salary'=> 'trim|required',
'Allowances'=> 'trim|required',
'PF_Rate'=> 'trim|required',
'ESI_Rate'=> 'trim|required',
'Food_Allowances'=> 'trim|required',
'Incentives'=> 'trim|required']);
// $this->validator->setRules([
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
// 'EmpID'=> 'trim|required',
// 'HRA_Rate'=> 'trim|required',
// 'HRA_Amount'=> 'trim|required',
// 'Basic_Pay'=> 'trim|required',
// 'Total_salary'=> 'trim|required',
// 'Allowances'=> 'trim|required',
// 'PF_Rate'=> 'trim|required',
// 'ESI_Rate'=> 'trim|required',
// 'Food_Allowances'=> 'trim|required',
// 'Incentives'=> 'trim|required']);
if ($this->validator->run() == FALSE || $EmpID == -1) {
$this->addemppaydate();
} else {
// if ($this->validator->run() == FALSE || $EmpID == -1) {
// $this->addemppaydate();
// } else {
$EmpID = $this->request->getPost('EmpID');
$Total_Salary = $this->request->getPost('Total_salary');
@ -162,16 +162,16 @@ class Emppaydate extends BaseController
}
}
if ($result > 0) {
echo "<script>alert('Employee Pay List Created successfully!');</script>";
redirect('emppaydate/emppayListing', 'refresh');
echo "<script type='text/javascript'>alert('Employee Pay List Created successfully!');
window.location = '".base_url()."emppayListings';</script>";
} else {
echo "<script>alert('Employee Pay List Not Created!');</script>";
redirect('emppaydate/emppayListing', 'refresh');
echo "<script type='text/javascript'>alert('Employee Pay List Not Created!');
window.location = '".base_url()."emppayListings';</script>";
}
//}
}
// }
}
/**
@ -202,21 +202,21 @@ class Emppaydate extends BaseController
$Pay_Data_ID = $this->request->getPost('Pay_Data_ID');
//'Pay_Data_ID'=>'trim|required';
$this->validator->setRules([
'EmpID'=> 'trim|required',
'Total_Salary'=> 'trim|required',
'Basic_Pay'=> 'trim|required',
'HRA_Rate'=> 'trim|required',
'Allowances'=> 'trim|required',
'PF_Rate'=> 'trim|required',
'ESI_Rate'=> 'trim|required',
'Food_Allowances'=> 'trim|required',
'Incentives'=> 'trim|required']);
// $this->validator->setRules([
// 'EmpID'=> 'trim|required',
// 'Total_Salary'=> 'trim|required',
// 'Basic_Pay'=> 'trim|required',
// 'HRA_Rate'=> 'trim|required',
// 'Allowances'=> 'trim|required',
// 'PF_Rate'=> 'trim|required',
// 'ESI_Rate'=> 'trim|required',
// 'Food_Allowances'=> 'trim|required',
// 'Incentives'=> 'trim|required']);
if ($this->validator->run() == FALSE) {
// if ($this->validator->run() == FALSE) {
$this->editOldemppay($Pay_Data_ID);
} else {
// $this->editOldemppay($Pay_Data_ID);
// } else {
$Pay_Data_ID = $this->request->getPost('Pay_Data_ID');
$EmpID = $this->request->getPost('EmpID');
@ -285,18 +285,17 @@ class Emppaydate extends BaseController
$result = $this->emppaydate_model->editemppay($emppay);
if ($result == true) {
echo "<script>alert('Employee Status Updated Sucessfully..!');</script>";
echo "<script type='text/javascript'>alert('Employee Status Updated Sucessfully..!');
window.location = '".base_url()."emppayListings';</script>";
} else {
echo "<script>alert('Update Failed..!')</script>";
$this->session->set_flashdata('error', 'updation failed');
echo "<script type='text/javascript'>alert('Update Failed..!';
window.location = '".base_url()."emppayListings';</script>";
}
redirect('emppaydate/emppayListing');
}
// redirect('emppaydate/emppayListing');
// }
}

View File

@ -36,7 +36,8 @@ class Login extends BaseController
if (!isset($isLoggedIn) || $isLoggedIn != TRUE) {
return view('login');
} else {
redirect('/dashboard');
// redirect('/dashboard');
return redirect()->to('/dashboard');
}
}
@ -52,7 +53,7 @@ class Login extends BaseController
return view('login');
} else {
// return view('login');
redirect('/dashboard');
return redirect()->to('/dashboard');
}
}

View File

@ -6,7 +6,7 @@ use App\Controllers\BaseController;
use CodeIgniter\Validation\Exceptions\ValidationException;
// require APPPATH . '/third_party/mpdf/mpdf.php';
use Mpdf\Mpdf;
use App\Models\Monthlypay_model;
@ -72,7 +72,7 @@ class Monthlypay extends BaseController
function savePublicHolidays()
{
$jsondata = $this->request->getPost('param1');
$phpdata = json_decode($jsondata);
$phpdata = json_decode((string)$jsondata);
$total = 0;
foreach ($phpdata as $d) {
@ -110,13 +110,14 @@ class Monthlypay extends BaseController
if ($this->request->getPost('month')) {
$current = $this->request->getPost('month');
$month = substr($current, 0, 3);
$year = substr($current, 4);
$month = date_parse($month);
$current = $year . "-" . $month['month'] . '-01';
$monthdays = cal_days_in_month(CAL_GREGORIAN, $month['month'], $year);
$begin = new DateTime($year . '-' . $month['month'] . '-01');
$end = new DateTime($year . '-' . $month['month'] . '-' . $monthdays);
$month_short_name = substr((string)$current, 0, 3);
$year = substr((string)$current, 4);
$month_arr = date_parse($month_short_name);
$month = $month_arr['month'];
$current = $year . "-" . $month . '-01';
$monthdays = cal_days_in_month(CAL_GREGORIAN, $month_arr['month'], $year);
$begin = new \DateTime($year . '-' . $month . '-01');
$end = new \DateTime($year . '-' . $month . '-' . $monthdays);
}
if (empty($current)) {
// echo "fresh";
@ -125,8 +126,8 @@ class Monthlypay extends BaseController
$month = date("m");
$current = $current . "-01";
$monthdays = cal_days_in_month(CAL_GREGORIAN, $month, $year);
$begin = new DateTime($year . '-' . $month . '-01');
$end = new DateTime($year . '-' . $month . '-' . $monthdays);
$begin = new \DateTime($year . '-' . $month . '-01');
$end = new \DateTime($year . '-' . $month . '-' . $monthdays);
}
@ -158,7 +159,7 @@ class Monthlypay extends BaseController
$total = 0;
$jsondata = $this->request->getPost('param1');
$phpdata = json_decode($jsondata, true);
$phpdata = json_decode((string)$jsondata, true);
$date = $this->request->getPost('param2');
$NoofDays = $this->request->getPost('param3');
$Month_Year = format_date($date);
@ -485,11 +486,11 @@ class Monthlypay extends BaseController
// print_r($result);die;
if (!empty($result)) {
echo "<script type='text/javascript'>alert('Successfully Created Permission Form');
window.location = 'Permissionlist';
window.location = '".base_url()."permissionlist';
</script>";
} else {
echo "<script type='text/javascript'>alert('Not Created Permission Form');
window.location = 'Permission';
window.location = '".base_url()."permission';
</script>";
//redirect('permission');
@ -508,38 +509,82 @@ class Monthlypay extends BaseController
}
//this function used to pdf value display //
function permissionpdf($SNO)
{
// function permissionpdf($SNO)
// {
// $data['per'] = $this->monthlypay_model->pdf($SNO);
// $id = '';
// $name = '';
// $permissionpdf = '';
// $date = '';
// foreach ($data['per'] as $record) {
// $id = $record->EmpID;
// $name = $record->FirstName;
// $date = format_date($record->Date, 0, 'd-m-Y');
// }
// $permissionpdf = $id . '-' . $name . '-' . $date;
// view($this->config->item('admin_folder') . '/permissionpdf', $data);
// $mpdf = new mPDF('utf-8', 'A4-P', 10, 10, 10, 10, 10, 38, 4, 6);
// $mpdf->SetDisplayMode('fullpage');
// $mpdf->SetHTMLHeader($HtmlHeading);
// $mpdf->SetTitle('Permission');
// $html = view('permissionpdf', $data, true);
// $mpdf->SetDisplayMode('fullpage');
// //$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
// //$mpdf->list_indent_first_level = 1;
// $mpdf->setAutoTopMargin = 'stretch';
// $mpdf->setAutoBottomMargin = 'stretch';
// $mpdf->WriteHTML($html);
// $mpdf->Output('Permissionslip' . $permissionpdf . '.pdf', 'I', $php);
// }
public function permissionpdf($SNO)
{
$data['per'] = $this->monthlypay_model->pdf($SNO);
$id = '';
$name = '';
$permissionpdf = '';
$date = '';
foreach ($data['per'] as $record) {
foreach ($data['per'] as $record) {
$id = $record->EmpID;
$name = $record->FirstName;
$date = format_date($record->date, 0, 'd-m-Y');
$date = date('d-m-Y', strtotime($record->Date));
}
$permissionpdf = $id . '-' . $name . '-' . $date;
// Generate the view into a variable
$html = view('permissionpdf', $data);
view($this->config->item('admin_folder') . '/permissionpdf', $data);
// Create an instance of mPDF
$mpdf = new Mpdf([
'mode' => 'utf-8',
'format' => 'A4-P',
'margin_left' => 10,
'margin_right' => 10,
'margin_top' => 10,
'margin_bottom' => 10,
'margin_header' => 10,
'margin_footer' => 6,
]);
$mpdf = new mPDF('utf-8', 'A4-P', 10, 10, 10, 10, 10, 38, 4, 6);
// Set additional configurations
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetHTMLHeader($HtmlHeading);
$mpdf->SetTitle('Permission');
$html = view('permissionpdf', $data, true);
$mpdf->SetDisplayMode('fullpage');
//$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
//$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
// If you have a custom HTML header, set it here
// $mpdf->SetHTMLHeader($HtmlHeading);
// Write the HTML to the PDF
$mpdf->WriteHTML($html);
$mpdf->Output('Permissionslip' . $permissionpdf . '.pdf', 'I', $php);
// Output the PDF to the browser
$mpdf->Output('Permissionslip' . $permissionpdf . '.pdf', 'D');
}
//this function used to Production salary Details
@ -664,12 +709,12 @@ class Monthlypay extends BaseController
$date = $this->request->getPost("id");
// echo $date;
$daydate = date('Y-m', strtotime($date));
$daydate = date('Y-m', strtotime((string)$date));
//echo $date; die;
$daydate = $daydate . '-01';
//$dat = date('d');
// echo $daydate; echo "";
$WH = 'WH' . date('j', strtotime($date));
$WH = 'WH' . date('j', strtotime((string)$date));
// echo $WH;
$yesterday = $this->monthlypay_model->attyesterday($WH, $daydate);
@ -697,7 +742,7 @@ class Monthlypay extends BaseController
//print_r($absentName);die;
$data['today'] = $values;
$OT = 'OT' . date('j', strtotime($date));
$OT = 'OT' . date('j', strtotime((string)$date));
$CUR_month = date('t');

View File

@ -10,6 +10,15 @@ use CodeIgniter\Validation\Exceptions\ValidationException;
use App\Models\Monthlypay_model;
use App\Models\Payroll_model;
use Mpdf\Mpdf;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\IOFactory;
/**
@ -79,8 +88,8 @@ class Payslip extends BaseController
$createdby = $this->session->get('userId');
$monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr", "05" => "May", "06" => "June", "07" => "July", "08" => "Aug", "09" => "Sep", "10" => "Oct", "11" => "Nov", "12" => "Dec");
$m = substr($payon, 0, 2);
$y = substr($payon, 3);
$m = substr((string)$payon, 0, 2);
$y = substr((string)$payon, 3);
$month = $monthsoptions[$m] . "-" . $y;
$excel = $this->request->getPost('excel');
$HTML = '';
@ -120,7 +129,7 @@ class Payslip extends BaseController
$data['Totalamtwords'] = $totamtwords;
$data['PayMonth'] = $month;
$filename = 'Bank Report for' . $payon . 'pdf';
$HTML = view("bankreportprint", $data, true);
$HTML = view("bankreportprint", $data);
}
if ($this->request->getPost('PF_Report')) {
$data['PFESI'] = $this->payroll_model->getReportforPFESI($payon);
@ -145,98 +154,91 @@ class Payslip extends BaseController
$data['Totalamtwords'] = $totamtwords;
if (empty($excel)) {
$filename = 'PF Report for' . $payon . 'pdf';
$HTML = view("pfreportprint", $data, true);
$HTML = view("pfreportprint", $data);
// echo "PDF PART 1";
} else {
// Create a new Spreadsheet object
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setTitle('Employee PF Report ' . $data['PayMonth']);
// $this->load->library('excel');
// $this->global['pageTitle'] = $this->CompanyName.' : PF Excel Report';
// $this->loadViews('pfexcel',$this->global,$data,NULL);
$this->excel->setActiveSheetIndex(0);
$this->excel->getActiveSheet()->setTitle('Employee PF Report ' . $data['PayMonth']);
$this->excel->getActiveSheet()->setCellValue('A1', 'Employee PF Report ' . $data['PayMonth']);
// Set headers
$sheet->setCellValue('A1', 'Employee PF Report ' . $data['PayMonth']);
$sheet->mergeCells('A1:H1');
$sheet->getStyle('A1')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
$sheet->getStyle('A1')->getFont()->setBold(true)->setSize(16);
$sheet->getStyle('A1')->getFill()->getStartColor()->setARGB('#333');
// Set column headers
$sheet->setCellValue('A4', 'S.No.');
$sheet->setCellValue('B4', 'Employee Name');
$sheet->setCellValue('C4', 'PF Account No');
$sheet->setCellValue('D4', 'Employee Contribution');
$sheet->setCellValue('E4', 'Employer Contribution');
$sheet->setCellValue('F4', 'No Of Days Worked');
$sheet->setCellValue('G4', 'OT Hrs Worked');
$sheet->setCellValue('H4', 'Total Amount');
// Style column headers
for ($col = ord('A'); $col <= ord('H'); $col++) {
$sheet->getColumnDimension(chr($col))->setAutoSize(true);
$sheet->getStyle(chr($col))->getFont()->setSize(12);
$sheet->getStyle(chr($col))->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
}
$this->excel->getActiveSheet()->setCellValue('A4', 'S.No.');
$this->excel->getActiveSheet()->setCellValue('B4', 'Employee Name');
$this->excel->getActiveSheet()->setCellValue('C4', 'PF Account No');
$this->excel->getActiveSheet()->setCellValue('D4', 'Employee Contribution');
// Populate data
$i = 6;
$j = 1;
$overall = 0;
$overallemp = 0;
$overallemr = 0;
foreach ($data['PFESI'] as $row) {
$sheet->setCellValue('A' . $i, $j);
$sheet->setCellValue('B' . $i, $row->FName . ' ' . $row->Lname);
$sheet->setCellValue('C' . $i, $row->PFNO);
$sheet->setCellValue('D' . $i, number_format($row->PF, 2, '.', ''));
$sheet->setCellValue('E' . $i, number_format($row->CompanyPF, 2, '.', ''));
$sheet->setCellValue('F' . $i, number_format($row->NoofDaysWorked, 2, '.', ''));
$sheet->setCellValue('G' . $i, number_format($row->OTperHours, 2, '.', ''));
$total = $row->PF + $row->CompanyPF;
$overall += $total;
$overallemp += $row->PF;
$overallemr += $row->CompanyPF;
$sheet->setCellValue('H' . $i, $total);
$i++;
$j++;
}
// Total
$sheet->setCellValue('C' . $i, 'Total');
$sheet->setCellValue('D' . $i, $overallemp);
$sheet->setCellValue('E' . $i, $overallemr);
$sheet->setCellValue('H' . $i, $overall);
// Protect the sheet
$sheet->getProtection()->setSheet(true);
$sheet->getProtection()->setSort(true);
$sheet->getProtection()->setInsertRows(true);
$sheet->getProtection()->setFormatCells(true);
// Set the headers for file download
// $filename = 'EmployeePFReport_' . date('Ymd_His') . '.xls';
$filename = 'EmployeePFReport' . $payon . 'xls';
$this->excel->getActiveSheet()->setCellValue('E4', 'Employeer Contribution');
$this->excel->getActiveSheet()->setCellValue('F4', 'No Of Days Worked');
$this->excel->getActiveSheet()->setCellValue('G4', 'OT Hrs Worked');
$this->excel->getActiveSheet()->setCellValue('H4', 'Total Amount');
$this->excel->getActiveSheet()->mergeCells('A1:F1');
$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(16);
$this->excel->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setARGB('#333');
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . $filename . '"');
header('Cache-Control: max-age=0');
// Write the file
$writer = new Xlsx($spreadsheet);
$writer->save('php://output');
for ($col = ord('A'); $col <= ord('H'); $col++) {
$this->excel->getActiveSheet()->getColumnDimension(chr($col))->setAutoSize(true);
$this->excel->getActiveSheet()->getStyle(chr($col))->getFont()->setSize(12);
$this->excel->getActiveSheet()->getStyle(chr($col))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
}
// print_r($data['PFESI']);die();
$i = 6;
$j = 1;
$total = 0;
$overall = 0;
$totemp = 0;
$overallemp = 0;
$totemr = 0;
$overallemr = 0;
foreach ($data['PFESI'] as $row) {
$this->excel->getActiveSheet()->setCellValue('A' . (string)($i), $j);
$this->excel->getActiveSheet()->setCellValue('B' . (string)($i), $row->FName . $row->Lname);
$this->excel->getActiveSheet()->setCellValue('C' . (string)($i), $row->PFNO);
$this->excel->getActiveSheet()->setCellValue('D' . (string)($i), number_format($row->PF, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('D' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('D' . (string)($i))->getNumberFormat()->setFormatCode('0.00');
$this->excel->getActiveSheet()->setCellValue('E' . (string)($i), number_format($row->CompanyPF, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('E' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('E' . (string)($i))->getNumberFormat()->setFormatCode('0.00');
$this->excel->getActiveSheet()->setCellValue('C' . (string)($i + 1), 'Total');
$this->excel->getActiveSheet()->setCellValue('F' . (string)($i), number_format($row->NoofDaysWorked, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('F' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->setCellValue('G' . (string)($i), number_format($row->OTperHours, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('G' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$total = $row->PF + $row->CompanyPF;
$totemp = $row->PF;
$totemr = $row->CompanyPF;
$overall = $overall + $total;
$overallemp = $overallemp + $totemp;
$overallemr = $overallemr + $totemr;
$this->excel->getActiveSheet()->setCellValue('H' . (string)($i), ($total));
//$this->excel->getActiveSheet()->setCellValue('D' . (string)($i),($totemp));
//$this->excel->getActiveSheet()->setCellValue('E' . (string)($i),($totemr));
$this->excel->getActiveSheet()->getStyle('H' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('H' . (string)($i))->getNumberFormat()->setFormatCode('0.00');
$this->excel->getActiveSheet()->setCellValue('H' . (string)($i + 1), ($overall));
$this->excel->getActiveSheet()->setCellValue('D' . (string)($i + 1), ($overallemp));
$this->excel->getActiveSheet()->setCellValue('E' . (string)($i + 1), ($overallemr));
$this->excel->getActiveSheet()->getStyle('H' . (string)($i + 1))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('H' . (string)($i + 1))->getNumberFormat()->setFormatCode('0.00');
//$this->excel->getActiveSheet()->setCellValue('A6','HI');
$i++;
$j++;
}
$this->excel->getActiveSheet()->getProtection()->setSheet(true);
$this->excel->getActiveSheet()->getProtection()->setSort(true);
$this->excel->getActiveSheet()->getProtection()->setInsertRows(true);
$this->excel->getActiveSheet()->getProtection()->setFormatCells(true);
$filename = 'EmployeePFReport' . $payon . 'xls';
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . $filename . '"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
$objWriter->save('php://output');
}
}
@ -266,149 +268,140 @@ class Payslip extends BaseController
if (empty($excel)) {
$filename = 'ESI Report for' . $payon . 'pdf';
$HTML = view("esireportprint", $data, true);
$HTML = view("esireportprint", $data);
// echo "PDF PART 1";
} else {
// Create a new Spreadsheet object
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setTitle('Employee PF Report ' . $data['PayMonth']);
// $this->load->library('excel');
// Set headers
$sheet->setCellValue('A1', 'Employee PF Report ' . $data['PayMonth']);
$sheet->mergeCells('A1:H1');
$sheet->getStyle('A1')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
$sheet->getStyle('A1')->getFont()->setBold(true)->setSize(16);
$sheet->getStyle('A1')->getFill()->getStartColor()->setARGB('#333');
$this->excel->setActiveSheetIndex(0);
$this->excel->getActiveSheet()->setTitle('Employee ESI Report ' . $data['PayMonth']);
$this->excel->getActiveSheet()->setCellValue('A1', 'Employee ESI Report ' . $data['PayMonth']);
// Set column headers
$sheet->setCellValue('A4', 'S.No.');
$sheet->setCellValue('B4', 'Employee Name');
$sheet->setCellValue('C4', 'PF Account No');
$sheet->setCellValue('D4', 'Employee Contribution');
$sheet->setCellValue('E4', 'Employer Contribution');
$sheet->setCellValue('F4', 'No Of Days Worked');
$sheet->setCellValue('G4', 'OT Hrs Worked');
$sheet->setCellValue('H4', 'Total Amount');
$this->excel->getActiveSheet()->setCellValue('A4', 'S.No.');
$this->excel->getActiveSheet()->setCellValue('B4', 'Employee Name');
$this->excel->getActiveSheet()->setCellValue('C4', 'ESI Account No');
$this->excel->getActiveSheet()->setCellValue('D4', 'Employee Contribution');
$this->excel->getActiveSheet()->setCellValue('E4', 'Employeer Contribution');
$this->excel->getActiveSheet()->setCellValue('F4', 'No Of Days Worked');
$this->excel->getActiveSheet()->setCellValue('G4', 'OT Hrs Worked');
$this->excel->getActiveSheet()->setCellValue('H4', 'Total Amount');
$this->excel->getActiveSheet()->mergeCells('A1:F1');
$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);
$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(16);
$this->excel->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setARGB('#333');
for ($col = ord('A'); $col <= ord('H'); $col++) {
$this->excel->getActiveSheet()->getColumnDimension(chr($col))->setAutoSize(true);
$this->excel->getActiveSheet()->getStyle(chr($col))->getFont()->setSize(12);
$this->excel->getActiveSheet()->getStyle(chr($col))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
}
// print_r($data['PFESI']);die();
$i = 6;
$j = 1;
$total = 0;
$overall = 0;
$totemp = 0;
$overallemp = 0;
$totemr = 0;
$overallemr = 0;
foreach ($data['PFESI'] as $row) {
$this->excel->getActiveSheet()->setCellValue('A' . (string)($i), $j);
$this->excel->getActiveSheet()->setCellValue('B' . (string)($i), $row->FName . $row->Lname);
$this->excel->getActiveSheet()->setCellValue('C' . (string)($i), $row->ESI);
$this->excel->getActiveSheet()->setCellValue('D' . (string)($i), number_format($row->EmployeeESI, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('D' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('D' . (string)($i))->getNumberFormat()->setFormatCode('0.00');
$this->excel->getActiveSheet()->setCellValue('E' . (string)($i), number_format($row->CompanyESI, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('E' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('E' . (string)($i))->getNumberFormat()->setFormatCode('0.00');
$this->excel->getActiveSheet()->setCellValue('C' . (string)($i + 1), 'Total');
$this->excel->getActiveSheet()->setCellValue('F' . (string)($i), number_format($row->NoofDaysWorked, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('F' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
// Style column headers
for ($col = ord('A'); $col <= ord('H'); $col++) {
$sheet->getColumnDimension(chr($col))->setAutoSize(true);
$sheet->getStyle(chr($col))->getFont()->setSize(12);
$sheet->getStyle(chr($col))->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
}
$this->excel->getActiveSheet()->setCellValue('G' . (string)($i), number_format($row->OTperHours, 2, '.', ''));
$this->excel->getActiveSheet()->getStyle('G' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$total = $row->EmployeeESI + $row->CompanyESI;
$overall = $overall + $total;
$totemp = $row->EmployeeESI;
$totemr = $row->CompanyESI;
$overallemp = $overallemp + $totemp;
$overallemr = $overallemr + $totemr;
$this->excel->getActiveSheet()->setCellValue('H' . (string)($i), ($total));
$this->excel->getActiveSheet()->getStyle('H' . (string)($i))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('H' . (string)($i))->getNumberFormat()->setFormatCode('0.00');
$this->excel->getActiveSheet()->setCellValue('D' . (string)($i + 1), ($overallemp));
$this->excel->getActiveSheet()->setCellValue('E' . (string)($i + 1), ($overallemr));
$this->excel->getActiveSheet()->setCellValue('H' . (string)($i + 1), ($overall));
$this->excel->getActiveSheet()->getStyle('H' . (string)($i + 1))->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT);
$this->excel->getActiveSheet()->getStyle('H' . (string)($i + 1))->getNumberFormat()->setFormatCode('0.00');
//$this->excel->getActiveSheet()->setCellValue('A6','HI');
$i++;
$j++;
}
$this->excel->getActiveSheet()->getProtection()->setSheet(true);
$this->excel->getActiveSheet()->getProtection()->setSort(true);
$this->excel->getActiveSheet()->getProtection()->setInsertRows(true);
$this->excel->getActiveSheet()->getProtection()->setFormatCells(true);
$filename = 'EmployeeESIReport' . $payon . 'xls';
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . $filename . '"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');
$objWriter->save('php://output');
// Populate data
$i = 6;
$j = 1;
$overall = 0;
$overallemp = 0;
$overallemr = 0;
foreach ($data['PFESI'] as $row) {
$sheet->setCellValue('A' . $i, $j);
$sheet->setCellValue('B' . $i, $row->FName . ' ' . $row->Lname);
$sheet->setCellValue('C' . $i, $row->PFNO);
$sheet->setCellValue('D' . $i, number_format($row->PF, 2, '.', ''));
$sheet->setCellValue('E' . $i, number_format($row->CompanyPF, 2, '.', ''));
$sheet->setCellValue('F' . $i, number_format($row->NoofDaysWorked, 2, '.', ''));
$sheet->setCellValue('G' . $i, number_format($row->OTperHours, 2, '.', ''));
$total = $row->PF + $row->CompanyPF;
$overall += $total;
$overallemp += $row->PF;
$overallemr += $row->CompanyPF;
$sheet->setCellValue('H' . $i, $total);
$i++;
$j++;
}
// Total
$sheet->setCellValue('C' . $i, 'Total');
$sheet->setCellValue('D' . $i, $overallemp);
$sheet->setCellValue('E' . $i, $overallemr);
$sheet->setCellValue('H' . $i, $overall);
// Protect the sheet
$sheet->getProtection()->setSheet(true);
$sheet->getProtection()->setSort(true);
$sheet->getProtection()->setInsertRows(true);
$sheet->getProtection()->setFormatCells(true);
// Set the headers for file download
// $filename = 'EmployeePFReport_' . date('Ymd_His') . '.xls';
$filename = 'EmployeePFReport' . $payon . 'xls';
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="' . $filename . '"');
header('Cache-Control: max-age=0');
// Write the file
$writer = new Xlsx($spreadsheet);
$writer->save('php://output');
}
}
if (empty($excel)) {
// $php = $this->output->get_output();
// Load library
// $this->load->library('dompdf_gen');
// require_once(APPPATH .'third_party/dompdf/dompdf_config.inc.php');
// $dompdf = new DOMPDF();
// $dompdf->set_paper('A4', 'portrait');
// $dompdf->load_html($php);
// $dompdf->render();
// // add the header
// $canvas = $dompdf->get_canvas();
// $font = Font_Metrics::get_font("helvetica", "bold");
// // the same call as in my previous example
// $canvas->page_text(72, 18,"",
// $font, 6, array(0,0,0));
// $dompdf->stream($filename);
//echo "PDF PART 2";
$mpdf = new mPDF('utf-8', 'A4-P', 10, 12, 12, 10, 10, 38, 4, 6);
$HTMLFooter = view('includes/bankreport_footer', $data, true);
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetHTMLHeader($HtmlHeading);
//$html = view("bankreportprint",$data,true);
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->setTitle('Sidharthindustries:PayrollReport');
// $mpdf->setFooter("Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($HTML);
$mpdf->Output("" . $filename . '.pdf', 'I', $php);
// Load the HTML content for the Header,footer
$HtmlHeading = view('includes/bankreport_header', $data);
$HTMLFooter = view('includes/bankreport_footer', $data);
// Create an instance of mPDF
$mpdf = new Mpdf([
'mode' => 'utf-8',
'format' => 'A4-P',
'margin_left' => 10,
'margin_right' => 10,
'margin_top' => 38,
'margin_bottom' => 4,
'margin_header' => 10,
'margin_footer' => 6,
]);
// Set document properties
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetHTMLHeader($HtmlHeading); // You need to define $HtmlHeading somewhere in your code
$mpdf->SetHTMLFooter($HTMLFooter . 'Page {PAGENO} of {nb}');
$mpdf->SetTitle('Resicoindustries:PayrollReport');
// Configure mPDF settings
$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
// Write HTML to PDF
$mpdf->WriteHTML($HTML);
// Output the PDF
$filename = 'EmployeePayrollReport'; // Define your filename here
$mpdf->Output($filename . '.pdf', 'D');
}
}
function loadLoanReport()
function loadLoanReport($param1 = null, $param2 = null)
{
$eid = $param1 ?? '';
$fyr = $param2 ?? '';
$currentyear = '';
$nxtyear = '';
$uri = service('uri');
$eid = $uri->getSegment(3);
$fyr = $uri->getSegment(4);
if (!empty($eid) and !empty($fyr) and !is_numeric($eid) and !($fyr == 'Overall')) {
//echo "EMPLOYEE WITH FINYEAR";
$currentyear = substr($fyr, 0, 4);
@ -447,8 +440,8 @@ class Payslip extends BaseController
$source = $this->request->getPost('source');
$data['selsource'] = $source;
$finyear = $this->request->getPost('finyear');
$currentyear = substr($finyear, 0, 4);
$nxtyear = substr($finyear, 5, 4);
$currentyear = substr((string)$finyear, 0, 4);
$nxtyear = substr((string)$finyear, 5, 4);
$data['fyear'] = $currentyear . '-' . $nxtyear;
}
}
@ -468,6 +461,34 @@ class Payslip extends BaseController
$this->loadViews("loanreports", $this->global, $data, NULL);
}
public function leaveReport()
{
$fyr = get_financial_year();
if ($this->request->getMethod() == 'POST') {
$fyr = $this->request->getPost('fyr');
}
// $fiscalYears = get_financial_year_list();
$fiscalYears = get_financial_year_list(date('Y'), 8);
$data['fiscalyears'] = $fiscalYears;
$data['selectedfiscalyears'] = $fyr;
$data['leaverecords'] = $this->payroll_model->getEmpDetailsforLeave($fyr);
// echo '<script type="text/javascript">alert("' . $fyr . '")</script>';
$this->global['pageTitle'] = 'Leave Reports';
$this->loadViews("leavereports", $this->global, $data, NULL);
}
function monthwiseLeaveReport($param1,$param2)
{
$EmployeeID = $param1;
$Fin_year = $param2;
$data['finyear'] = $Fin_year;
$this->global['pageTitle'] = 'Monthwise Leave Reports';
$data['MonthwiseReport'] = $this->payroll_model->getMonthwiseEmpDetailsforLeave($Fin_year, $EmployeeID);
$this->loadViews("leavereportsmonthwise", $this->global, $data, NULL);
}
/**
* This function used to load the first screen of the user
*/
@ -660,7 +681,7 @@ class Payslip extends BaseController
$due_start_date = $value->DueDate;
$paydate = $current; //From POST parm
if (strlen($paydate) == 6) {
if (strlen((string)$paydate) == 6) {
$paydate = '0' . $paydate;
}
$pmonth = substr($paydate, 0, 2);
@ -787,8 +808,8 @@ class Payslip extends BaseController
function saveMonthlyData()
{
$month = $this->request->getPost('param2');
$jsondata = $this->request->getPost('param1');
$month = (string)$this->request->getPost('param2');
$jsondata = (string)$this->request->getPost('param1');
$json = json_decode($jsondata, true);
@ -918,32 +939,32 @@ class Payslip extends BaseController
if ($TotalErrorFlag == 0) {
foreach ($json as $index => $j) {
$Emp = $j['Employee'];
$EmpID = substr($Emp, 0, 4);
// $EmpID = substr($Emp, 0, 4);
$parts = explode("-", $Emp);
$EmpID = $parts[0];
//$Name = $j['Employee'];
$DaysWorked = $j['Days Worked'];
$LOP_Days = $j['LOP Days'];
$Paid_leave = $j['Paid Leave'];
$OT_Hrs_Worked = $j['OT Hrs'];
$Loan_Recovered = $j['Manual Loan Due ₹'];
$Loan_Recovered = isset($j['Manual Loan Due ₹']) ? $j['Manual Loan Due ₹'] : 0.00;
if (is_string($Loan_Recovered)) {
$Loan_Recovered = strtoupper($Loan_Recovered);
}
$Incentives = $j['Incentives in ₹'];
$Festival_Bonus = $j['Festival Bonus in ₹'];
$Other_Deductions = $j['Other Deductions in ₹'];
$Estimate = $j['Estimate in ₹'];
$Incentives = isset($j['Incentives in ₹']) ? $j['Incentives in ₹'] : 0.00 ;
$Festival_Bonus = isset($j['Festival Bonus in ₹']) ? $j['Festival Bonus in ₹'] : 0.00;
$Other_Deductions = isset($j['Other Deductions in ₹']) ? $j['Other Deductions in ₹'] : 0.00;
$Estimate = isset($j['Estimate in ₹']) ? $j['Estimate in ₹'] : 0.00;
$Created_By = $this->session->get('userId');
$monthlypaydata = array('Month_Year' => $month, 'EmpID' => $EmpID, 'Days_worked' => $DaysWorked, 'LOP_Days' => $LOP_Days, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OT_Hrs_Worked, 'Loan_Recovered' => $Loan_Recovered, 'Incentives' => $Incentives, 'Festival_Bonus' => $Festival_Bonus, 'Other_Deductions' => $Other_Deductions, 'Estimate' => $Estimate, 'Created_By' => $Created_By);
//print_r($monthlypaydata);
// print_r($monthlypaydata); die;
$result = $this->monthlypay_model->saveMonthlyData_model($monthlypaydata);
$total = $total + $result;
}
@ -998,32 +1019,27 @@ class Payslip extends BaseController
$this->loadViews("payslipgenerate", $this->global, $Data, NULL);
}
/* Validation for Employee Dropdown
*/
function Employee_validate($selectValue)
{
//echo 'select_validate method called';
// 'none' is the first option and the text says something like "-Choose one-"
if ($selectValue == '-1') {
$this->validator->setMessage('Employee_validate', 'Please Select Employee.');
return false;
} else // user picked something
{
return true;
}
}
/* Validation for Employee Dropdow */
public function Employee_validate(string $str, string &$error = null): bool
{
if ($str == '-1') {
$error = 'Please Select Employee.';
return false;
}
return true;
}
function getEmployee()
{
$id = $this->request->getPost('id1');
$result = $this->payroll_model->getEmployeelist2($id);
$HTML = "";
if ($result->num_rows() > 0) {
if (count($result) > 0) {
foreach ($result->result() as $list) {
foreach ($result as $list) {
$HTML .= "<option value='" . $list->EmpId . "'>" . $list->EmpId . "-" . $list->Fname . "</option>";
@ -1032,20 +1048,16 @@ class Payslip extends BaseController
echo $HTML;
}
/* Validation for PayOn Dropdown
*/
function PayOn_validate($selectValue)
{
//echo 'select_validate method called';
// 'none' is the first option and the text says something like "-Choose one-"
if ($selectValue == '-1') {
$this->validator->setMessage('PayOn_validate', 'Please Select PayOn.');
return false;
} else // user picked something
{
return true;
}
}
/* Validation for PayOn Dropdown */
public function PayOn_validate(string $str, string &$error = null): bool
{
if ($str == '-1') {
$error = 'Please Select PayOn.';
return false;
}
return true;
}
/**
* This function used to load the first screen of the user
*/
@ -1056,20 +1068,30 @@ class Payslip extends BaseController
$html = "";
$All = $this->request->getPost('All');
if ($All == '') {
$this->validator->setRules(['Employee'=> 'trim|callback_Employee_validate']);
}
$this->validator->setRules([
'Employee' => [
'label' => 'Employee',
'rules' => 'trim|callback_Employee_validate',
]
]);
}
$this->validator->setRules(['PayOn'=> 'trim|callback_PayOn_validate']);
$this->validator->setRules([
'PayOn' => [
'label' => 'PayOn',
'rules' => 'trim|callback_PayOn_validate',
]
]);
if ($this->validator->run() == FALSE) {
$this->viewGenerator();
} else {
$Payon = $this->request->getPost('PayOn');
$m = date("M", mktime(0, 0, 0, $Payon, 10));
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
//$y =date("Y",mktime(0, 0, 0, $Payon, 10));
//$m=date("M-Y",mktime(0,0,0,$month,1,$year));
$y = substr($Payon, 3);
$y = substr((string)$Payon, 3);
//echo "Payon" . $Payon;
if ($All != '') {
@ -1095,7 +1117,7 @@ class Payslip extends BaseController
// exit();
//$Data['Count'] = $i;
$html .= view("payslipgenerateprint", $Data, true);
$html .= view("payslipgenerateprint", $Data);
// print_r ($Data);
// exit();
@ -1114,7 +1136,7 @@ class Payslip extends BaseController
$Data['amtinwords'] = $totalsalaryinwords;
//print_r ($Data);
//exit();
$html = view("payslipgenerateprint", $Data, true);
$html = view("payslipgenerateprint", $Data);
}
@ -1150,18 +1172,28 @@ class Payslip extends BaseController
// $dompdf->stream($filename);
// }
$mpdf = new mPDF('utf-8', 'A4-P', 10, 10, 10, 10, 10, 24, 4, 6);
// $mpdf = new mPDF('utf-8', 'A4-P', 10, 10, 10, 10, 10, 24, 4, 6);
$mpdf = new Mpdf([
'mode' => 'utf-8',
'format' => 'A4-P',
'margin_left' => 10,
'margin_right' => 10,
'margin_top' => 10,
'margin_bottom' => 10,
'margin_header' => 10,
'margin_footer' => 6,
'setAutoTopMargin' => 'stretch',
'setAutoBottomMargin' => 'stretch'
]);
$mpdf->SetDisplayMode('fullpage');
$mpdf->SetHTMLHeader($HtmlHeading);
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
// $mpdf->SetHTMLHeader($HtmlHeading);
$mpdf->setFooter("Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html);
$mpdf->SetTitle('Sidharthindustries:Payslip');
$mpdf->Output("" . $filename . '.pdf', 'I', $php);
}
$mpdf->SetTitle('Resico:Payslip');
$mpdf->Output("Payslip-" . $filename . ".pdf", 'D');
}
}
function updatePayslip()
@ -1203,42 +1235,30 @@ class Payslip extends BaseController
*/
function uploadExcel2()
{
$path = ROOTPATH.'public/uploads/files/';
if(!is_dir($path)) { mkdir($path, 0777, true); }
$PayrollFileName = '';
//Check whether user upload picture
if (!empty($_FILES['userfile']['name'])) {
$pathinfo = pathinfo($_FILES['userfile']['name']);
$config['upload_path'] = 'public/uploads/files/';
$file = $this->request->getFile('userfile');
if ($file && $file->isValid() && !$file->hasMoved()) {
$pathinfo = pathinfo($file->getName());
$config['upload_path'] = $path;
$config['allowed_types'] = 'xls|xlsx|csv';
$config['file_name'] = $_FILES['userfile']['name'];
$config['overwrite'] = true;
if (in_array($pathinfo['extension'], ['xlsx', 'xls']) && $file->getSize() > 0)
{
$file->move($config['upload_path'], $config['file_name']);
$PayrollFileName = $file->getName();
//Load upload library and initialize configuration
$this->load->library('upload', $config);
$this->upload->initialize($config);
$inputFileName = $path . $PayrollFileName;
// $inputFileName = $_FILES['userfile']['tmp_name'];
if (($pathinfo['extension'] == 'xlsx' || $pathinfo['extension'] == 'xls')
&& $_FILES['userfile']['size'] > 0
) {
if ($this->upload->do_upload('userfile')) {
$uploadData = $this->upload->data();
$PayrollFileName = $uploadData['file_name'];
} else {
$error = array('error' => $this->upload->display_errors());
$PayrollFileName = '';
}
$inputFileName = $_FILES['userfile']['tmp_name'];
require_once APPPATH . 'third_party/PHPExcel/IOFactory.php';
$objTpl = PHPExcel_IOFactory::load($inputFileName);
$sheet = $objTpl->getActiveSheet(0); //->toArray(null, NULL, True, True);
$highestRow = $sheet->getHighestRow();
$spreadsheet = IOFactory::load($inputFileName);
$sheet = $spreadsheet->getActiveSheet();
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
@ -1327,8 +1347,8 @@ class Payslip extends BaseController
$Paid_leave = $sheet->getCell('E' . $x)->getValue();
$OTHoursWorked = $sheet->getCell('F' . $x)->getValue();
$LoanRecovered = $sheet->getCell('G' . $x)->getValue();
if (is_string($loanRecovered)) {
$loanRecovered = strtoupper($loanRecovered);
if (is_string($LoanRecovered)) {
$LoanRecovered = strtoupper($LoanRecovered);
}
$Incentive = $sheet->getCell('G' . $x)->getValue();
$Other_Deductions = $sheet->getCell('H' . $x)->getValue();
@ -1340,7 +1360,7 @@ class Payslip extends BaseController
if ($flag != 0 && $flag2 != 0) {
$FileData = array('Month_Year' => $PayOn, 'EmpID' => $EmpId, 'Days_worked' => $Days_worked, 'LOP_Days' => $LOPDays, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OTHoursWorked, 'Loan_Recovered' => $loanRecovered, 'Incentives' => $Incentive, 'Other_Deductions' => $Other_Deductions, 'Created_By' => $createdby, 'Created_Time' => date("Y-m-d h:i:sa"));
$FileData = array('Month_Year' => $PayOn, 'EmpID' => $EmpId, 'Days_worked' => $Days_worked, 'LOP_Days' => $LOPDays, 'Paid_leave' => $Paid_leave, 'OT_Hrs_Worked' => $OTHoursWorked, 'Loan_Recovered' => $LoanRecovered, 'Incentives' => $Incentive, 'Other_Deductions' => $Other_Deductions, 'Created_By' => $createdby, 'Created_Time' => date("Y-m-d h:i:sa"));
$result = $this->payroll_model->UploadFileData2($FileData);
$success++;
}
@ -1369,8 +1389,8 @@ class Payslip extends BaseController
} else {
}
else {
echo "<script>alert('Please select valid Excel file to Upload!');window.location.href='ExcelUpload2';</script>";
}
} else {
@ -1478,8 +1498,11 @@ class Payslip extends BaseController
function MonthwiseBonusreport()
{
//echo"in controller";
$EmployeeID = $_GET['EID'];
$Fin_year = $_GET['Finyear'];
// $EmployeeID = $_GET['EID'];
// $Fin_year = $_GET['Finyear'];
$EmployeeID = $this->request->getGet('EID');
$Fin_year = $this->request->getGet('Finyear');
$data['finyear'] = $Fin_year;
//echo $EmployeeID;
//echo $Fin_year;

View File

@ -125,7 +125,31 @@ if (!function_exists('get_financial_year')) {
return $financialYear;
}
}
if (!function_exists('get_financial_year_list')) {
function get_financial_year_list($start_year = null, $num_years = 5)
{
// If no start year is provided, use the current year
$start_year = $start_year ?: date('Y');
$financial_years = [];
// Loop to generate financial years
for ($i = 0; $i < $num_years; $i++) {
$current_year = $start_year - $i;
$next_year = $current_year + 1;
// Determine the financial year
$financial_year = $current_year . '-' . $next_year;
// Add the financial year to the list
$financial_years[] = $financial_year;
}
return $financial_years;
}
}
if (!function_exists('get_shorten_financial_year')) {
function get_shorten_financial_year($date = null)
{
@ -181,6 +205,52 @@ if (!function_exists('get_date_days_ago')) {
return $newDate;
}
}
if (!function_exists('get_fiscal_years')) {
function get_fiscal_years($startOn, $endOn ,$pre_year)
{
$fiscalYearStartDate = new DateTime($startOn);
$fiscalYearEndDate = new DateTime($endOn);
$fiscalYears = [];
for ($i = 0; $i < $pre_year; $i++) {
$fiscalYearStartDate->sub(new DateInterval('P1Y'));
$fiscalYearEndDate->sub(new DateInterval('P1Y'));
$startYear = $fiscalYearStartDate->format('Y');
$endYear = $fiscalYearEndDate->format('Y');
$fiscalYears[] = "$startYear-$endYear";
}
return $fiscalYears;
}
}
if (!function_exists('get_pre_financial_years')) {
function get_pre_financial_years($startOn, $endOn ,$pre_year)
{
$fiscalYearStartDate = new DateTime($startOn);
$fiscalYearEndDate = new DateTime($endOn);
$fiscalYears = [];
for ($i = 0; $i < $pre_year; $i++) {
$fiscalYearStartDate->sub(new DateInterval('P1Y'));
$fiscalYearEndDate->sub(new DateInterval('P1Y'));
$startYear = $fiscalYearStartDate->format('Y');
$endYear = $fiscalYearEndDate->format('Y');
$fiscalYears[] = "$startYear-$endYear";
}
return $fiscalYears;
}
}
if (!function_exists('generate_pos_number')) {
function generate_pos_number($last_pono)
{

View File

@ -103,6 +103,7 @@ class Inwardgateregister_model extends Model
->join('T_PurchaseOrder_Master PO', 'igr.PONO = PO.PONO')
->join('T_Inwardgateregister_fileupload fileup', ' igr.IGRNO = fileup.IGRNO', 'left')
->join('T_SupplierDetailsN` sup', 'PO.SupplierID = sup.SupplierID')
->orderBy('igr.CreatedDate','desc')
->groupBy('igr.IGRNO', 'desc');
$query = $builder->get();
$result = $query->getResult();

View File

@ -207,7 +207,7 @@ class Monthlypay_model extends Model
$count = $res[0]['count'];
}
// print_r($data);die;
if ($count == 0) {
$builder = $this->db->table('T_Monthly_Pay_Inputs');
@ -217,7 +217,8 @@ class Monthlypay_model extends Model
} elseif ($count == 1) {
$this->db->table('T_Monthly_Pay_Inputs')
->where('H_date', $data['H_Date'])
// ->where('H_date', $data['H_Date']) // ask velmurugan H_Date public hoilday table la irukku
->where('EmpID', $data['EmpID']) // temp solution
->update($data);
$i = $this->db->affectedRows();
@ -363,6 +364,9 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
function reportvalue($fin_year)
{
if (empty($fin_year)) {
return [];
} else {
$curr_split = explode('-', $fin_year);
$pre_year = $curr_split[0];
@ -380,6 +384,7 @@ join T_DepartmentDetails as Dep on Dep.DEPCode=Emp.Departmentcode where Emp.IsA
$query = $this->db->query($sql, array($pre_year, $curr_year));
return $query->getResult();
}
}
function Monthwisereportvalue($Fin_year, $EmployeeID)
{

View File

@ -141,7 +141,7 @@ class Payroll_model extends Model
function GetPayslipdata($PayOn = '', $EmpId = '')
{
//echo "FROM MODEL" . $PayOn . $EmpId;
$builder = $this->db->table('T_Payroll Pay')->select('Pay.*,Emp.FirstName as FName ,Emp.LastName as Lname,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.AadharNo,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.Designation as Designation,Dep.DepartmentName as DeptName')
$builder = $this->db->table('T_Payroll Pay')->select('Pay.*,Emp.FirstName as FName ,Emp.LastName as Lname,Emp.DateofBirth as Dob,Emp.PANNo as Pan,Emp.BankBranchName as BankName,Emp.BankAccountNo as BankAccountNumber,Emp.IFSCCode as IFSCCode,Emp.DateofJoining as DOJ,Emp.AadharNo,Emp.Designation as Designation,Dep.DepartmentName as DeptName')
//->join('T_Payroll_File payfile', 'Pay.PayOn = payfile.PayOn')
->join('T_Employee_Details Emp', 'Pay.EmpID = Emp.EmpID')
->join('T_DepartmentDetails Dep', 'Emp.Departmentcode = Dep.DEPCode');
@ -340,7 +340,7 @@ class Payroll_model extends Model
$builder->orderBy("Pay.EmpID", "asc");
$query = $builder->get();
return $query;
return $query->getResult();
}
/* */
@ -428,6 +428,53 @@ class Payroll_model extends Model
$builder->insert($cheque);
}
public function getFiscalYear()
{
$sql = "SELECT FiscalYearStartOn, FiscalYearEndsOn FROM T_Company_Details";
$query = $this->db->query($sql);
$result = $query->getRow();
return $result;
}
public function getEmpDetailsforLeave($financial_year){
$years = explode('-', $financial_year);
$builder = $this->db->table('T_Attendance as A');
$builder->select('A.EmpID, GROUP_CONCAT(A.Month_Year) AS Month_Year, SUM(A.Days_Worked) AS NoofWorkedDays, SUM(A.Absent) AS NoofAbsentDays, SUM(A.Paid_Leave) AS NoofPaidLeaveDays, CONCAT_WS(" ", E.FirstName, E.LastName) AS FullName');
$builder->join('T_Employee_Details as E', 'A.EmpID = E.EmpID', 'left');
$builder->where('A.Month_Year >=', $years[0].'-04-01');
$builder->where('A.Month_Year <=', $years[1].'-03-31');
$builder->groupBy('A.EmpID');
$builder->orderBy('A.EmpID', 'asc');
$query = $builder->get();
$results = $query->getResult();
return $results;
}
public function getMonthwiseEmpDetailsforLeave($financial_year, $employee_id){
$years = explode('-', $financial_year);
$builder = $this->db->table('T_Attendance as A');
$builder->select('A.EmpID, A.Days_Worked AS NoofWorkedDays, A.Absent AS NoofAbsentDays, A.Paid_Leave AS NoofPaidLeaveDays');
$builder->select('CONCAT_WS(" ", E.FirstName, E.LastName) AS FullName');
$builder->select('DATE_FORMAT(A.Month_Year, "%Y-%m") AS Month_Year'); // Format as YYYY-MM
$builder->join('T_Employee_Details as E', 'A.EmpID = E.EmpID', 'left');
$builder->where('A.Month_Year >=', $years[0].'-04-01');
$builder->where('A.Month_Year <=', $years[1].'-03-31');
$builder->where('A.EmpID', $employee_id);
$builder->where('A.Absent !=', 0);
$builder->groupBy('A.EmpID, Month_Year');
$builder->orderBy('A.Month_Year');
$query = $builder->get();
$results = $query->getResult();
return $results;
}
function getChequeInfo($bank, $payon)
{

View File

@ -1595,8 +1595,10 @@ QuantityRejected,ROUND(Quantity-ReceivedQuantity)as PendingQty,Per,
$builder->orWhere('mast.Status', PO_RELEASER_ONHOLD);
$builder->orWhere('mast.Status', PO_RELEASED);
$builder->orWhere('mast.Status', REQITEM_Emergency_PO_CREATED);
$builder->orderBy('mast.Status');
// $builder->orderBy('mast.Status');
}
$builder->orderBy('mast.CreatedDate','DESC');
$result = $builder->get();
return $result->getResult();

View File

@ -57,7 +57,7 @@
</div>
<div class="box-body">
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead >
<thead style="background-color: #ddd;">
<tr>
<th>S.No</th>

View File

@ -28,7 +28,7 @@
<div class="box">
<div class="box-body">
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color:#00c068;color:#fff">
<thead style="background-color: #ddd;">
<tr>
<th>S.No</th>
@ -154,8 +154,8 @@ $(function () {
});
/*------after reload display the value text box (fin_year text box)------- */
//if(!empty($dropdownvalue)){
var s = "<?php echo $dropdownvalue; ?>";
$('#finyearttext').val(s);
// var s = "<?php // echo $dropdownvalue; ?>";
// $('#finyearttext').val(s);
///}
});
/*-----------------on ready function ends here---------------------------- */

View File

@ -45,7 +45,7 @@ $currentday = date('d');
}
.fht-table td:hover {
background-color: #00d976;;
background-color: #00a65a;
color:#ffffff;
}
@ -125,7 +125,7 @@ $currentday = date('d');
.celda_encabezado_general {
background-color: #00d976;;
background-color: #00a65a;
border: 1px solid #ccc;
color: #ffffff;
font-weight: bold;
@ -144,6 +144,7 @@ $currentday = date('d');
}
.celda_normal {
/*background-color: #fff;*/
/* <!-- ad9271 into c4e1c5 brown-light to green-light --> */
border: 1px solid #ccc;
padding: 2px 4px;
}
@ -212,7 +213,6 @@ $currentday = date('d');
</div><!-- /.box-header -->
<div class="box-body">
<?php
@ -257,7 +257,7 @@ $currentday = date('d');
<th class="celda_encabezado_general" rowspan="2">S.NO</th>
<th class="celda_encabezado_general" rowspan="2">Employee ID</th>
<th style="background-color: #00d976;;color:#fff;border:5px" rowspan="2">Employee Name</th>
<th style="background-color: #00a65a;color:#fff;border:5px" rowspan="2">Employee Name</th>
<?php
@ -311,13 +311,13 @@ $currentday = date('d');
else if($todayflag == 1)
{ echo "style='background: #dd99ff ;'"; } ?> >
<?php if($flag == 1 or $flag2 == 1)
{ echo "<font style='color:#ff0000;'>".$col."W<font>";}
{ echo "<font style='color:#fff;'>".$col."W<font>";}
else { echo $col."W"; } ?></th>
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; }?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#ff0000;'>".$col."OT<font>";} else { echo $col."OT"; }?></th>
<th <?php if($flag2 == 1){ ?> title = " <?php echo $title; ?> " <?php } else if($flag == 1 ){ ?> title = "sunday" <?php }?> class="celda_encabezado_general" <?php if($flag == 1 or $flag2 == 1) { echo "style='background: #f39c12 ;'"; } else if($todayflag == 1){ echo "style='background: #dd99ff ;'"; }?> > <?php if($flag == 1 or $flag2 == 1){ echo "<font style='color:#fff;'>".$col."OT<font>";} else { echo $col."OT"; }?></th>
<?php
//echo $flag2;
$flag =0;
@ -333,7 +333,7 @@ $currentday = date('d');
</tr>
</thead>
<tbody>
<tbody style="background-color: #fff;">
<?php $index = 0;
$row=0;
foreach($finalarray as $a){ $row++;$index++;?>
@ -754,7 +754,7 @@ function findInvalidData()
p.queue(function() {
p.css({"background-color":"white"});
$(ide).mouseover(function() {
$(this).css({"background-color":" #00d976;"})
$(this).css({"background-color":" #00a65a;"})
}).mouseout(function(){ $(this).css({"background-color":"white"});});
});
flag++;
@ -771,7 +771,7 @@ function findInvalidData()
p.queue(function() {
p.css({"background-color":"white"});
$(ide).mouseover(function() {
$(this).css({"background-color":" #00d976;"})
$(this).css({"background-color":" #00a65a;"})
}).mouseout(function(){ $(this).css({"background-color":"white"});});
});
flag++;

View File

@ -178,12 +178,11 @@
</div>
<div class="col-md-12">
<table class="table table-bordered editableTable" style="border:1px solid #333">
<table class="table table-bordered editableTable" style="border:1px solid #fff"> <!-- #333" -->
<div align="right" style="padding-right:10px">
<div class="modal fade" role="dialog">
<thead style="background-color:#fff">
<thead style="background-color: #ddd !important;"> <!-- #fff -->
<tr>
<th>SNo</th>
@ -226,7 +225,7 @@
<div class="modal fade" role="dialog">
<thead >
<thead style="background-color: #ddd !important;">
<tr>
<th>Select</th>
<th>Requistion Number</th>

View File

@ -50,7 +50,7 @@
$totaldeductions = '';
$monthsoptions = array("01" => "Jan", "02" => "Feb","03" => "Mar","04" => "Apr","05" => "May","06" => "June","07"=> "July","08"=> "Aug","09" => "Sep","10"=> "Oct","11" => "Nov","12"=>"Dec");
// print_r($PayInfo);die;
if(!empty($PayInfo))
{
@ -115,7 +115,6 @@ if(!empty($PayInfo))
}
}
?>
<style type="text/css">
@ -292,15 +291,15 @@ if(!empty($PayInfo))
<div class="col-md-2">
<div class="form-group">
<div class="form-group">
<span for="ESI_Rate">PAN</span>
<input type="text" class="form-control required num" id="pan" name="pan" value="<?php $Pan; ?>" readonly><!-- pattern="([0-9]{1,2}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 2 Digit">-->
<span for="PAN">PAN</span>
<input type="text" class="form-control required num" id="pan" name="pan" value="<?php echo $Pan; ?>" readonly><!-- pattern="([0-9]{1,2}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 2 Digit">-->
</div>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<div class="form-group">
<span for ="Food_Allowances">PF Number</span>
<span for ="PF Number">PF Number</span>
<input type="text" class="form-control required num" id="pf" name="pf" value="<?php echo $PFNumber; ?>" readonly><!--pattern="([0-9]{1,3}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 3 Digit"> -->
</div>
</div>
@ -309,7 +308,7 @@ if(!empty($PayInfo))
<div class="col-md-2">
<div class="form-group">
<div class="form-group">
<span for ="Food_Allowances">ESI Number</span>
<span for ="ESI Number">ESI Number</span>
<input type="text" class="form-control required num" id="esi" name="esi" value="<?php echo $ESINumber; ?>" readonly><!-- pattern="([0-9]{1,3}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 3 Digit"> -->
</div>
</div>
@ -318,7 +317,7 @@ if(!empty($PayInfo))
<div class="col-md-2">
<div class="form-group">
<div class="form-group">
<span for ="Food_Allowances">Aadhar No</span>
<span for ="Aadhar No">Aadhar Number</span>
<input type="text" class="form-control required num" id="aadhar" name="aadhar" value="<?php echo $AadharNo; ?>"readonly><!-- pattern="([0-9]{1,3}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 3 Digit"> -->
</div>
</div>

View File

@ -13,7 +13,6 @@ $Ddt ='';
$dt= '';
$client_id='';
$CId= '';
if(!empty($savedata))
{
foreach($savedata as $sa)
@ -21,7 +20,8 @@ if(!empty($savedata))
$Service_Details=$sa->Service_Details;
$Reason=$sa->Reason;
$Ddt = new DateTime($mas->Created_Date);
$Ddt = new DateTime($sa->Created_Date);
$dt = $Ddt->format('d-m-Y');
$mode_of_communication=$sa->mode_of_communication;
$Action_taken = $sa->Action_taken;
@ -43,9 +43,10 @@ if(!empty($savedata))
$(function() {
//Initialize Select2 Elements
$("#Customer").select2();
// var MaxDate = '<?php //echo $MaxPoDate;?>';
var MaxDate = '<?php echo $MaxPoDate;?>';
var MaxDate = '<?php echo $CurrentDate;?>';
var d = new Date(MaxDate);
var t='<?php echo $CurrentDate;?>';
var m=new Date(t);

View File

@ -22,8 +22,8 @@
</div><!-- /.box-header -->
<div class="box-body">
<table id="datatable" class="table table-bordered table-hover" style="font-size:12px;text-align: right;">
<thead>
<table id="datatable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;text-align: right;" >
<thead style="background-color: #ddd;">
<tr >
<th width="7%">Emp ID</th>
<th width="8%">Emp Name</th>

View File

@ -1742,6 +1742,11 @@
<i class="fa fa-list-alt"></i> <span>Incentives and Bonus Reports</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>leavereports" >
<i class="fa fa-list-alt"></i> <span>Leave Reports</span>
</a>
</li>
</ul>
</li>
@ -1806,6 +1811,11 @@
<i class="fa fa-list-alt"></i> <span>Incentives and Bonus Reports</span>
</a>
</li>
<li>
<a href="<?php echo base_url(); ?>leavereports" >
<i class="fa fa-list-alt"></i> <span>Leave Reports</span>
</a>
</li>
</ul>
</li>
<?php

142
app/Views/leavereports.php Normal file
View File

@ -0,0 +1,142 @@
<script src="<?php echo base_url()?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<style type="text/css">
.num {
text-align:right;
}
</style>
<style>
.dataTables_empty {
text-align: center !important;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Leave Report <?php if(!empty($selectedfiscalyears)) {echo " ( ". $selectedfiscalyears." )";} ?></center>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<div class="row">
<form action="<?php echo base_url() ?>leavereports" method="POST" id="searchList">
<div class="col-md-3">
<?php if(!empty($fiscalyears))
{
foreach ($fiscalyears as $fy):
$options[$fy] = $fy;
endforeach;
}
echo form_dropdown('fyr',$options,set_value('fyr',$selectedfiscalyears),'id="fyr"' ,'class="form-control select2"');?>
</div>
<div class="col-md-3">
<input type="button" value="View Report" class="btn btn-success" id="report">
</div>
</form>
<br>
</div>
</div>
<div class="box-body">
<table id="leavelistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>S.No</th>
<th>Employee Name</th>
<!-- <th>Total Work in Days</th> -->
<th>Leave Taken</th>
<th>Paid Leave Taken</th>
</tr>
</thead>
<tbody>
<?php
$base = base_url();
if (!empty($leaverecords)) {
$index = 0;
foreach ($leaverecords as $rec) {
$index++;
?>
<tr>
<td><?php echo $index; ?></td>
<?php if((int)$rec->NoofAbsentDays != 0){ ?>
<td><?php echo '<a title="View Monthwise Details" href="'.$base.'leavemonthlyreports/'.$rec->EmpID.'/'.$selectedfiscalyears.'">'.$rec->EmpID.'-'.$rec->FullName.'</a>'; ?></td>
<?php } else { ?>
<td><?php echo $rec->EmpID.'-'.$rec->FullName ; ?></td>
<?php } ?>
<!-- <td style="text-align:right;"><?php // if (!empty($rec->NoofWorkedDays)) { echo number_format((int)$rec->NoofWorkedDays, 0, '.', ''); } else { echo "0"; } ?></td> -->
<td style="text-align:right;"><?php if (!empty($rec->NoofAbsentDays)) { echo number_format((int)$rec->NoofAbsentDays, 0, '.', ''); } else { echo "0"; } ?></td>
<td style="text-align:right;"><?php if (!empty($rec->NoofPaidLeaveDays)) { echo number_format((int)$rec->NoofPaidLeaveDays, 0, '.', ''); } else { echo "0"; } ?></td>
</tr>
<?php
}
}// else {
?>
<!-- <tr>
<td colspan="4" style="text-align:center;">No data found</td>
</tr> -->
<?php
// }
?>
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div>
</div>
</section>
</div>
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
$(function () {
$('#leavelistings').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [[0, "asc"]],
"info": true,
"autoWidth": true,
"language": {
"emptyTable": "No data found"
}
});
});
$('#report').click(function(){
$("#searchList").submit();
});
</script>
<script type="text/javascript">
// var name = "<?php // echo 'Leave Report for ' . $selectedfiscalyears;?>";
// $("#leavelistings").tableExport({
// bootstrap: true,
// separator: ",",
// headings: true,
// buttonContent: "Export",
// addClass: "",
// defaultClass: "btn",
// defaultTheme: "btn-default",
// type: "csv",
// fileName: name,
// position: "bottom",
// stripQuotes: true
// });
</script>

View File

@ -0,0 +1,134 @@
<script src="<?php echo base_url()?>public/assets/tabletoexport/jquery.tableexport.v2.js"></script>
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.js"></script>
<script src="<?php echo base_url()?>public/assets/lightswitch/lightswitch/lib/jquery.tabletojson.min.js"></script>
<style type="text/css">
.num {
text-align:right;
}
</style>
<style>
.dataTables_empty {
text-align: center !important;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center><strong>" <?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?> "</strong> - Monthwise Leave Reports <?= ' ( '.$finyear.' )' ?></center>
</h1>
</section>
<section class="content" id="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-body">
<table id="leavelistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>S.No</th>
<th>Employee Id</th>
<th>Employee Name</th>
<th>Month Year</th>
<!-- <th>Total Work in Days</th> -->
<th>Leave Taken</th>
<th>Paid Leave Taken</th>
</tr>
</thead>
<tbody>
<?php
$index=0;
if(!empty($MonthwiseReport))
{ foreach($MonthwiseReport as $record)
{ $index++;
?>
<tr>
<td style="text-align:right;"><?php echo $index; ?></td>
<td style="text-align:right;"><?php echo $record->EmpID ?></td>
<td><?php echo $record->FullName ?></td>
<td><?php
$split_val = explode('-',$record->Month_Year);
$year_val = $split_val[0];
$month_val = $split_val[1];
$monthName = date("M", mktime(0, 0, 0, $month_val, 10));
echo $monthName . " , ".$year_val
?></td>
<!-- <td style="text-align:right;"><?php // if (!empty($record->NoofWorkedDays)) { echo number_format((int)$record->NoofWorkedDays, 0, '.', ''); } else { echo "0"; } ?></td> -->
<td style="text-align:right;"><?php if (!empty($record->NoofAbsentDays)) { echo number_format((int)$record->NoofAbsentDays, 0, '.', ''); } else { echo "0"; } ?></td>
<td style="text-align:right;"><?php if (!empty($record->NoofPaidLeaveDays)) { echo number_format((int)$record->NoofPaidLeaveDays, 0, '.', ''); } else { echo "0"; } ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /. col-xs-12 -->
</div><!-- /.inital row -->
</section><!-- /.content section closed -->
</div><!-- /.content wrapper -->
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript">
/*-----------------on ready function ------------------------------- */
$(function () {
/*-----------------for data table ------------------------------ */
var t = $('#leavelistings').DataTable( {
"columnDefs": [ {
"searchable": false,
"orderable": false,
"targets": 0
} ],
"searching": true,
"lengthChange": true,
"info": true,
"paging": true,
"autoWidth": true,
"language": {
"emptyTable": "No data found"
},
"order": [[ 0, 'asc' ]]
} );
/**---------------for table index value using datatable -------- */
t.on( 'order.dt search.dt', function () {
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
cell.innerHTML = i+1;
} );
} ).draw();
});
$("#report").click(function(){
$("#formid").attr("method", "post");
$("#formid").attr("action", "<?php echo base_url() ?>payslip/Bonusreport");
$('#formid').submit();
});
/*-----------------for export execl button------------------------------- */
var employee = "<?php echo $MonthwiseReport[0]->EmpID ?> - <?php echo $MonthwiseReport[0]->FullName ?>";
var fin_year = "<?php echo $finyear ?>";
var name = "<?php echo 'Leave Month Report for '.$MonthwiseReport[0]->EmpID.''.$MonthwiseReport[0]->FullName .' ( '.$finyear.' )' ?>";
$("#leavelistings").tableExport({
bootstrap: true,
separator: ",",
headings: true,
buttonContent: "Export",
addClass: "",
defaultClass: "btn",
defaultTheme: "btn-default",
type: "csv",
fileName: name,
position: "bottom",
stripQuotes: true
});
</script>

View File

@ -189,7 +189,7 @@
<!--<center><h3 class="box-title">-->
<div class="box-tools">
<form action="<?php echo base_url() ?>payslip/loadLoanReport" method="POST" id="searchList">
<form action="<?php echo base_url() ?>loanreports" method="POST" id="searchList">
</div><!--</h3></center>-->
@ -253,9 +253,9 @@
?>
<tr> <td><?php echo $index;?></td>
<?php if($dateflag != 1) {?>
<td><?php echo '<a href="'.$base.'payslip/loadLoanReport/'.$rec->EmpID.'/'.$fyear.'">'.$rec->EmpID.'-'.$rec->FName.'-'.$rec->Lname.'</a>';?></td>
<td><?php echo '<a href="'.$base.'loanreports/'.$rec->EmpID.'/'.$fyear.'">'.$rec->EmpID.'-'.$rec->FName.'-'.$rec->Lname.'</a>';?></td>
<?php }else{?>
<td><?php echo '<a href="'.$base.'payslip/loadLoanReport/'.$rec->Loan_ID.'">'.$rec->EmpID.'-'.$rec->FName.'-'.$rec->Lname.'</a>';?></td>
<td><?php echo '<a href="'.$base.'loanreports/'.$rec->Loan_ID.'">'.$rec->EmpID.'-'.$rec->FName.'-'.$rec->Lname.'</a>';?></td>
<?php }?>
<td style="text-align:right;"><?php if(!empty($rec->Loan_Amount)){$totalloangiven+=$rec->Loan_Amount; echo $rec->Loan_Amount;}else{echo "0.00";}?></td>
<?php if($dateflag == 1) {?>

View File

@ -74,8 +74,7 @@ $('html').bind('keypress', function(e)
<div class="box-tools">
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
<p><b>The <span style="background-color:#ff4d4d;">Red</span> highlighted Employee have loan to pay. Put <span style="background-color:#66ff33;">'NA'</span> for Skip Current Month Loan Due.</b></p>
<form action="<?php echo base_url() ?>monthlypay/monthlyListing" method="POST" id="searchList">
<form action="<?php echo base_url() ?>monthlyListings" method="POST" id="searchList">
</form>
</div><!--</h3></center>-->
@ -150,17 +149,17 @@ $('html').bind('keypress', function(e)
}
?>
<div class="row">
<div class="col-md-3">
<form id="formid">
<?php echo form_dropdown('monthyear',$ot,set_value('monthyear',$currentselection),'id="monthyear"' ,'class="form-control select2');?>
</form>
</div>
</div>
<div class="box-body">
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead >
<tr>
<div class="row">
<div class="col-md-3">
<form id="formid">
<?php echo form_dropdown('monthyear',$ot,set_value('monthyear',$currentselection),'id="monthyear"' ,'class="form-control select2');?>
</form>
</div>
</div>
<table id="monthlylistings" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px" >
<thead style="background-color: #ddd;">
<tr>
<th>S.No</th>
<th>Employee </th>
@ -268,10 +267,10 @@ $('html').bind('keypress', function(e)
<td id ="otherDet<?php echo $index?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Other_Deductions)){echo $record->Other_Deductions;$totalotherDet [] = $record->Other_Deductions;}else{ echo number_format(0.00,2,'.','');} ?></td>
<?php $totalotherDet [] = $Other_Deductions;?>
<?php $totalotherDet [] = isset($Other_Deductions) ? $Other_Deductions : [];?>
<td id="Festival<?php echo $index?>"onkeypress="return isNumber(event);" onkeyup="changeInput(event);"<?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Festival_Bonus)){echo $record->Festival_Bonus;$totalfestival [] = $record->Festival_Bonus;}else{ echo number_format(0.00,2,'.','');;} ?></td>
<?php $totalfestival [] = $Festival_Bonus;?>
<?php $totalfestival [] = isset($Festival_Bonus) ? $Festival_Bonus : [];?>
<td id="empsal<?php echo $index?>"<?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php }?>> <?php if(!empty($record->Estimate)){echo $record->Estimate; $estTotal [] = $record->Estimate; }else { echo $empSalary[$i]; $estTotal [] = $empSalary[$i];
}?></td>
@ -294,7 +293,7 @@ $('html').bind('keypress', function(e)
<input type="hidden" id = "eslRate<?php echo $index?>" value="<?php echo $record->ESI_Rate?>">
<input type="hidden" id = "hraAmt<?php echo $index?>" value="<?php echo $record->HRA_Amount?>">
<input type="hidden" id = "loanamt<?php echo $index?>" value="<?php echo $record->Loan_amount?>">
<input type="hidden" id = "loanamt<?php echo $index?>" value="<?php echo isset($record->Loan_amount) ? $record->Loan_amount : 0?>">
<input type="hidden" id = "paidamt<?php echo $index?>" value="<?php echo $record->Paid_Amount?>">
<input type="hidden" id = "duedate<?php echo $index?>" value="<?php echo $record->DueDate?>">
@ -325,12 +324,12 @@ $('html').bind('keypress', function(e)
<th>Total</th>
<th id="manualoan"><?php echo array_sum($totalmonthloan);?></th>
<th id="monthloan"><?php echo array_sum($totalmanualoan);?></th>
<th id="inst"><?php echo array_sum($totalinst);?></th>
<th id="other"><?php echo array_sum($totalotherDet);?></th>
<th id="fest"><?php echo array_sum($totalfestival);?></th>
<th id="estsal"><?php echo array_sum($estTotal);?></th>
<th id="manualoan"><?php echo isset($totalmonthloan) ? array_sum($totalmonthloan) : '';?></th>
<th id="monthloan"><?php echo isset($totalmonthloan) ? array_sum($totalmanualoan) : '' ;?></th>
<th id="inst"><?php echo isset($totalins) ? array_sum($totalinst) : '' ;?></th>
<th id="other"><?php echo isset($totalotherDet) ? array_sum($totalotherDet): '' ;?></th>
<th id="fest"><?php echo isset($totalfestival) ? array_sum($totalfestival): '' ;?></th>
<th id="estsal"><?php echo isset($estTotal) ? array_sum($estTotal): '' ;?></th>
</tr>
</tfoot>

View File

@ -18,8 +18,8 @@
</div>
<!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
<thead>
<table id="example1" class="table table-bordered table-hover editableTable" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr >
<!-- <th>#</th> -->
<th>Complaint Id</th>

View File

@ -196,8 +196,9 @@ if($RecCount > 0)
<table style="border-collapse: collapse;" cellpadding="0" cellspacing="0" border="1" width="100%">
<tr>
<td colspan="1" style="background:#2c0000;" width="15%"> <center> <img width="80" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA11JREFUeNrsnT9IHEEYxWfFw8rgpUhlo5URi2gTbIUUSrq1ui4oRLRIY9JIKrGKTQrBgJLuuutEi4CtSSOpPIuATdIEcid2YpN9C3sc8c6bf7uZmX0P7k7ultm7337zzXxvZjGaiaIfQoiqoHTUHk6eniSPUbLQUmUoebojB23dDZGBmQiQAAmQAAmQIkACJEACpAiweA3bbvDV5mb6+iKOxfTc3MDjf15dicbBQfr3591d7wBGM1H0J3l9bNLI84UFsby6mkIzFWACJMCafJ9PJyfSx29vbHQuoqJaxl34zc5O+mVtwIPi5EIcXV52IjnoLvx+by/9wXkIF8aHbq0dgYi4vOB1Q7QV2c4BXM4Z3r+RGBTAR9VqmqhVBoZnIyOdx9taTXqQGJ+YUDqXFwBV4WGU69aXRkNsr69LtyEzHfIKIKJCVl9PT3u+/63P+6bnC64SuWm3jdsYn5xkKcdamCJAAiwjQJcHAC8ATs/OBg1Qy0y4ub6WPhb1cuPwUFycn9/77OPWlvXzeQGw2QPGQ9o/PhZrS0v3IPpooFrpwgChYniidq6fnTnvrBSaA3Uc3A/1uvPuSmEA0f0uFLsyBKcZDjaisvSj8DsFW6pbcHPQpV12WQoBCHhri4taEOGwhJAXjeeBgFebn1eyp0LKi1Ym0rCsXieRqLk06HVetFqJwHmWnRz3yotHzabT9n0hpRxGZ0SjjpGKCEQkxgUtWDlbCyMfIi/qTHMgrDf7srCem5mQDS5YQNKRD2vCuQLMhCVM3bwIiK4PLIUYqrp5EXPFeGWFALO8CEdGddId7NYOHWFQUa1cUO4Fty78/fZW6tFrjx7gqfqAT0PbmWAqVCwq+bDUOxMeyokh6L8B1J1kE2BgIkACJMDyAbSx56/cACV3CoyOjfX9rNSrcrI7E/qVYYCnYhKY3LXkJECVOdx+Us51m6Nwm7HVQyUCf4UGEJuFZPMgIhC+XlYfw21WWQ/GxXJ50q09iBS1MSjYW73ww3SXMVXOobsk4MU80GQZc5DQbl5tOzWRRpS8nJqy1tUAzWZ7ecvKDdfdggWfTV0GbdnA4JB1UdhbHjo0LesAS6YWa2GaCQRIgARIESABEiABUgRIgARYRoAVYtBWBfcL/xb8hwS6av8VYADVjF2M5sTWJAAAAABJRU5ErkJggg=="></center>
</td>
<td colspan="1" style="background:#2c0000;" width="15%"> <center> <img width="80" src="<?php echo base_url(); ?>public/assets/dist/img/RI_favicon.png"></center>
</td>
<td colspan="10">
<center><b>RESICO</b><br/> Survey No: 168/1C3,Pennalur Pet Road,Goonipalyam village, <br/>Uthukottai Taluk,Tiruvallur Dist, Chennai,Tamilnadu,Pin code : 602026. <br/> PaySlip for the Month of <?php echo $PayOn ?></center>
</td>

View File

@ -1,11 +1,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
<?php //print_r($PayInfo);
$datefordropdown = date_create($datefordropdown);
$datefordropdown = date_format($datefordropdown,'m-Y');
date_default_timezone_set('Asia/Kolkata');
?>
<?php ?>
<style type="text/css">
.num {
text-align:right;
@ -29,7 +25,7 @@ date_default_timezone_set('Asia/Kolkata');
$attributes = array('id' => 'paylist');
echo form_open('paysliplist', $attributes);
$today = date('m-Y');
$data = array('type' => 'text','name' => 'month','id' => 'month','value' => $datefordropdown,'class' => 'form-control select2');
$data = array('type' => 'text','name' => 'month','id' => 'month','value' => $today,'class' => 'form-control select2');
echo form_input($data);
?>
</div>

View File

@ -21,9 +21,9 @@ span.highlight {
<CENTER><h3 class="box-title"> Employee Permission Slip Listing</h3></CENTER>
</div><!-- /.box-header -->
<!-- <?php if($DraftCount > 0 ) {?><p>
<span class="highlight">S No <b><?php echo $SNo;?></b> is in Draft status.</span> Please act on the requisition.<span class="highlight">Then only you can raise New Requisition. </span>
</p> <?php } ?> -->
<!-- <?php //if($DraftCount > 0 ) {?><p>
<span class="highlight">S No <b><?php //echo $SNo;?></b> is in Draft status.</span> Please act on the requisition.<span class="highlight">Then only you can raise New Requisition. </span>
</p> <?php //} ?> -->
<div class="row">
<div class="col-md-12 text-right" style="margin-bottom:-3%;">
<div class="form-group">
@ -35,8 +35,9 @@ span.highlight {
</div>
<br/>
<br/>
<table id="Permission" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead >
<table id="Permission" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;" >
<thead style="background-color: #ddd;">
<tr>
<th>S No</th>
<th>EmpID</th>

View File

@ -26,7 +26,7 @@ $firstname = $per->FirstName;
$lastname = $per->LastName;
$DepartmentName = $per->DepartmentName;
$Date =$per->Date;
$Date = date_format(date_create($date),'d-m-Y');
$Date = date_format(date_create($per->Date),'d-m-Y');
}
?>

View File

@ -17,25 +17,22 @@
<section class="content"><br/>
<div class="box">
<div class=" container-fluid">
<div class="box-header">
<div class="box-header">
<center><b><h3 class="box-title">View Inward Gate Register</h3></b></center>
</div>
<div class="row">
<div class="col-md-12 text-right" style="margin-bottom:-3%;">
<div class="form-group">
<a class="btn btn-success" onclick="Test()" href="<?php echo base_url(); ?>Addigr">Add New </a>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-right">
<div class="form-group">
<a class="btn btn-success" onclick="Test()" href="<?php echo base_url(); ?>Addigr">Add New </a>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead>
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<!-- <th>S.No</th> -->
<th>IGR No</th>
@ -98,11 +95,11 @@
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- .row -->
</div><!-- .containe-fluid -->
</div><!-- .box -->
<!-- ######################################edit file########################### -->
@ -119,8 +116,9 @@
<!-- Table to show the line item of po -->
<div id="contents" > </div>
<table class="table table-bordered" id="Inwardgateregisterfile" style="font-size:12px;">
<thead>
<table class="table table-bordered" id="Inwardgateregisterfile" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>SNo</th>
<th>BillNO</th>
@ -194,7 +192,7 @@
</form>
</div><!-- /.modal content -->
</div><!-- /.modal dialog -->
</div><!-- /#filemodal -->
</div><!-- /# bill modal -->
<!-- ################################################################# -->
<div class="modal fade" id="Igrshow" role="dialog">
@ -302,8 +300,10 @@
<!-- Table to show the line item of po -->
<div id="content" > </div>
<table class="table table-bordered" id="Inwardgateregistertable1" style="font-size:12px;">
<thead>
<table class="table table-bordered" id="Inwardgateregistertable1" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<th>SNo</th>
<th>Item Code</th>
@ -331,10 +331,10 @@
<div class="modal-footer">
<a class="btn btn-success" data-dismiss="modal" value="Cancel">Cancel</a>
</div>
</div>
</div><!-- .modal-content -->
</form>
</div>
</div>
</div><!-- .modal-dialog -->
</div> <!--#igrshow modal -->
@ -342,6 +342,7 @@
</section>
</div><!-- .content-wrapper -->
<script>

View File

@ -40,8 +40,8 @@
<div class="row">
<div class="col-md-12">
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead>
<table id="Inwardgateregistertable" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd;">
<tr>
<!-- <th>S.No</th> -->
<th>IGR No</th>
@ -91,10 +91,11 @@
</tbody>
</table>
</div>
</div></div>
</div>
</div>
</div> <!-- col-md-12 -->
</div><!-- class row -->
</div> <!-- class container-fluid -->
</div><!-- class box -->
<div class="modal fade" id="Igrshow" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
@ -145,32 +146,32 @@
</div>-->
<div class="col-md-12">
<div class="col-md-4">
<label>IGR Number </label>
<?php
$data = array('name' => 'IGRNumber','value' => set_value('IGRNumber'),'id'=>'IGRNO1', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
<div class="col-md-12">
<div class="col-md-4">
<label>IGR Number </label>
<?php
$data = array('name' => 'IGRNumber','value' => set_value('IGRNumber'),'id'=>'IGRNO1', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Purchase Order Number </label>
<?php
$data = array('name' => 'PurchaseOrderNumber','value' => set_value('PurchaseOrderNumber'),'id'=>'PONo', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Supplier Name </label>
<?php
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'Supplier', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Purchase Order Number </label>
<?php
$data = array('name' => 'PurchaseOrderNumber','value' => set_value('PurchaseOrderNumber'),'id'=>'PONo', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
echo form_input($data);
?>
</div>
<div class="col-md-4">
<label>Supplier Name </label>
<?php
$data = array('name' => 'SupplierName','value' => set_value('SupplierName'),'id'=>'Supplier', 'class' => 'form-control', 'required=>"true"' , 'readonly'=>'true' );
echo form_input($data);
?>
</div>
</div>
</div>
</div>
<div class="col-md-12" style=" padding-bottom: 10px;">
<div class="col-md-4">
<label>Delivery Challan/Invoice NO </label>
@ -199,8 +200,8 @@
<!-- Table to show the line item of po -->
<div id="content" > </div>
<table class="table table-bordered" id="Inwardgateregistertable1" style="font-size:12px;">
<thead>
<table id="Inwardgateregistertable1" class="table table-bordered table-hover" style="background-color:#fff;font-size:12px;">
<thead style="background-color: #ddd !important;">
<tr>
<th>SNo</th>
<th>Item Code</th>
@ -220,9 +221,10 @@
</div>
</div>
</form>
</div>
</div>
</section>
</div><!-- modal-dialog -->
</div> <!-- modal -->
</section><!-- content-->
</div><!-- content-wrapper -->
<script>
<!-- script for table , It works under the datatable plugin-->
@ -235,7 +237,7 @@
"searching": true,
"ordering": true,
//"columnDefs" : [{"targets":5, "type":"date-eu"}],
"aaSorting": [[ 4, "desc" ]],
// "aaSorting": [[ 4, "desc" ]],
"info": true,
"autoWidth": true