Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2025-02-10 16:27:43 +05:30
commit 21cd2aa633
13 changed files with 716 additions and 30 deletions

BIN
app.zip

Binary file not shown.

View File

@ -92,6 +92,12 @@ $routes->post('gatheredCustAndQty', 'Driver::gatheredCustAndQty');
// Driver Monthly Pay Inputs Routes
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'driverMonthlyPayInputs', 'Driver::driverMonthlyPayInputs');
$routes->post('saveMonthlyData', 'Driver::saveMonthlyData');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'driverViewPay', 'Driver::viewGenerator');
$routes->post('checkDriverExistPay', 'Driver::checkDriverExistPay');
$routes->post('driverPayslip', 'Driver::driverPayslip');
$routes->post('getDriver', 'Driver::getDriver');
$routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'driverPrintPdf', 'Driver::driverPrintPdf');
// Asset Detail Routes
$routes->get('assetListing', 'Assetdetails::assetListing');
$routes->get('addasset', 'Assetdetails::addasset');

View File

@ -4,6 +4,7 @@ namespace App\Controllers;
use App\Controllers\BaseController;
use App\Models\Driver_model;
use Mpdf\Mpdf;
class Driver extends BaseController
@ -277,12 +278,12 @@ class Driver extends BaseController
$attendance->diesel = $monthly_pay_array[$attendance->driver_id]->diesel;
$attendance->shed_duty_amount = $monthly_pay_array[$attendance->driver_id]->shed_duty_amount;
$attendance->driver_final_payment = $monthly_pay_array[$attendance->driver_id]->driver_final_payment;
$attendance->payroll_id = $monthly_pay_array[$attendance->driver_id]->payroll_id;
}
}
$data['monthinputs'] = $attendance_data;
$data['dropdownvalue'] = $current;
// dd($data['monthinputs']);
$this->global['pageTitle'] = 'Driver Monthly Inputs';
$this->loadViews("driverMonthlyPayInputs", $this->global, $data, NULL);
@ -338,4 +339,231 @@ class Driver extends BaseController
echo $total . "- Driver Updated Successfully ";
}
// payroll------->
public function viewGenerator()
{
$data['Payon'] = $this->driver_model->getPayOn();
$this->global['pageTitle'] = 'Payroll Generater';
$this->loadViews("driverPaySlipGenerate", $this->global, $data, NULL);
}
function getDriver()
{
$id = $this->request->getPost('id1');
$result = $this->driver_model->getDriverlist2($id);
$HTML = "";
if (count($result) > 0) {
foreach ($result as $list) {
$HTML .= "<option value='" . $list->driver_id . "'>" . $list->name . "</option>";
}
}
echo $HTML;
}
function checkDriverExistPay()
{
$driver = $this->request->getPost('driver');
$payon = $this->request->getPost('payon');
$result = $this->driver_model->checkDriverExistPay($driver, $payon);
echo json_encode(count($result));
}
public function driverPayslip()
{
$PayOn = $this->request->getPost('payon');
$Driver = $this->request->getPost('driver');
$res = $this->driver_model->getMonthlyPayDetails($Driver, $PayOn);
$result = $res[0];
$data = [
'PayOn' => $result->month_year,
'driver_id' => $result->driver_id,
'driver_name' => $result->driver_name,
'no_of_loads' => $result->no_of_loads,
'driver_monthly_salary_amount' => $result->driver_monthly_salary_amount,
'driver_monthly_food_amount' => $result->driver_monthly_food_amount,
'driver_earnings_amount' => $result->driver_earnings_amount,
'diesel' => $result->diesel,
'shed_duty_amount' => $result->shed_duty_amount,
'driver_final_payment' => $result->driver_final_payment,
'created_by' => $this->session->get('userId')
];
$insert = $this->driver_model->insertPayroll($data);
return $insert;
}
public function driverPrintPdf()
{
$filename = " ";
$html = "";
$All = $this->request->getPost('All');
$Payon = $this->request->getPost('PayOn');
$m = date("M", mktime(0, 0, 0, (int)$Payon, 10));
$y = substr((string)$Payon, 3);
if ($All != '') {
$filename = 'PayslipFor-' . $m . '-' . $y;
$result = $this->driver_model->getEmpAll($Payon);
if ($result > 0) {
for ($i = 0; $i < count($result); $i++) {
$EmpID = $result[$i]['EmpId'];
$Data['PayDetails'] = $this->driver_model->GetPayslipdata($Payon, $EmpID);
$totalsalary = $Data['PayDetails'][0]->TotalSalary;
$totalsalaryinwords = $this->convertNumberToWords(round($totalsalary));
$Data['amtinwords'] = $totalsalaryinwords;
$html .= view("driverPayslipGeneratePrint", $Data);
}
}
} else {
$EmpID = $this->request->getPost('Driver');
$Data['PayDetails'] = $this->driver_model->GetPayslipdata($Payon, $EmpID);
$name = $Data['PayDetails'][0]->name;
$filename = 'PayslipFor-' . $EmpID . ' ' . $name . ' ' . $m . ' ' . $y;
$totalsalary = $Data['PayDetails'][0]->driver_final_payment;
$totalsalaryinwords = $this->convertNumberToWords(round($totalsalary));
$Data['amtinwords'] = $totalsalaryinwords;
// print_r ($Data);exit();
// echo view("driverPayslipGeneratePrint", $Data);die;
$html = view("driverPayslipGeneratePrint", $Data);
}
$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("Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1;
$mpdf->WriteHTML($html);
$mpdf->SetTitle('Resico:DriverPayslip');
$mpdf->Output("driverPayslip-" . $filename . ".pdf", 'D');
}
function convertNumberToWords($number) {
$numberWords = [
0 => "Zero",
1 => "One",
2 => "Two",
3 => "Three",
4 => "Four",
5 => "Five",
6 => "Six",
7 => "Seven",
8 => "Eight",
9 => "Nine",
10 => "Ten",
11 => "Eleven",
12 => "Twelve",
13 => "Thirteen",
14 => "Fourteen",
15 => "Fifteen",
16 => "Sixteen",
17 => "Seventeen",
18 => "Eighteen",
19 => "Nineteen",
20 => "Twenty",
30 => "Thirty",
40 => "Forty",
50 => "Fifty",
60 => "Sixty",
70 => "Seventy",
80 => "Eighty",
90 => "Ninety"
];
if ($number == 0) {
return $numberWords[0];
}
$word = '';
if ($number >= 10000000) {
$crore = floor($number / 10000000);
if ($crore > 0) {
$word .= $this->convertNumberToWords($crore) . " Crore ";
}
$number %= 10000000;
}
if ($number >= 100000) {
$lakh = floor($number / 100000);
if ($lakh > 0) {
$word .= $this->convertNumberToWords($lakh) . " Lakh ";
}
$number %= 100000;
}
if ($number >= 1000) {
$thousand = floor($number / 1000);
if ($thousand > 0) {
$word .= $this->convertNumberToWords($thousand) . " Thousand ";
}
$number %= 1000;
}
if ($number >= 100) {
$hundred = floor($number / 100);
if ($hundred > 0) {
$word .= $this->convertNumberToWords($hundred) . " Hundred ";
}
$number %= 100;
}
if ($number > 0) {
if ($word !== '') {
$word .= "and ";
}
if ($number <= 20) {
$word .= $numberWords[$number];
} else {
$word .= $numberWords[floor($number / 10) * 10];
if ($number % 10 > 0) {
$word .= " " . $numberWords[$number % 10];
}
}
}
return trim($word);
}
}

View File

@ -33,6 +33,7 @@ class Inwardgateregister extends BaseController
*/
public function __construct()
{
parent::__construct();
$this->inwardgateregister_model = new Inwardgateregister_model();
$this->IGRRemarks_model = new IGRRemarks_model();
@ -42,6 +43,7 @@ class Inwardgateregister extends BaseController
$this->logger = service('logger'); // Load the logger service
$this->isLoggedIn();
}
/**
* This function used to load the first screen of the user
@ -1524,11 +1526,48 @@ function updateIGRWeight(){
->join('t_employee_details', 't_igr_remarkes.remark_by = t_employee_details.EmpID', 'left')
->where('t_igr_remarkes.igr_no', $data['igr_no'])
->findAll();
$this->sendRemarkMail($this->request->getPost('igr_no'),$this->request->getPost('remark'),session()->get('EmpID'));
echo json_encode($data);
}
public function sendRemarkMail($IGRNo,$remark,$empCode)
{
if(session()->get('roleText') == 'System Administrator') // id is 1
{
$roleId = 2;
}
else if(session()->get('roleText') == 'Auditor') // id is 2
{
$roleId = 1;
}
$result_for_email = $this->inwardgateregister_model->getDetailsforEmail($this->session->get('userId'),$roleId);
$email = "";
for ($i = 0; $i < count($result_for_email['emails']); $i++) {
$email .= $result_for_email['emails'][$i]->email . " , ";
}
$email = rtrim($email, " ,");
$content = 'A new remark was created by '.$result_for_email['full_name'].' against IGR no '.$IGRNo.',</br></br> "'.$remark.'"';
$notification = new Notification();
$notification->sendEmail([
'recipient_email' => $email,
'subject' => $result_for_email['company'].' - IGR Remark Raised',
'description' => $content,
'company' => $result_for_email['company'],
'from_mail'=> $result_for_email['from_mail']
]);
}
public function saveIGRHistory($hist){
$field = $hist['key'];

View File

@ -47,14 +47,16 @@ class Driver_model extends Model
return $this->table . '.' . $field;
}, $this->allowedFields));
$selectFields = "CONCAT_WS(' ', t_employee_details.FirstName, t_employee_details.LastName) AS FullName, t_employee_details.IsActive as employee_isactive, t_driver.driver_name,ip_clients.client_name as customer,ip_invoices.received_qty as quantity," . $fields;
$selectFields = "CONCAT_WS(' ', t_employee_details.FirstName, t_employee_details.LastName) AS FullName, t_employee_details.IsActive as employee_isactive, t_driver.driver_name,ip_clients.client_name as customer,ip_invoices.received_qty as quantity,t_driver_payroll.id as payroll_id,t_driver_payroll.PayOn," . $fields;
$month_year = get_date_time_dynamical_format('Y-m-d','m-Y',"$from");
return $this->select($selectFields)
->join('t_driver', 't_driver.driver_id = ' . $this->table . '.driver_id', 'left')
->join('tbl_users', 'tbl_users.userId = ' . $this->table . '.created_by', 'left')
->join('t_employee_details', 'tbl_users.EmpID = t_employee_details.EmpID', 'left')
->join('ip_invoices', 'ip_invoices.invoice_number = ' . $this->table . '.invoice_number', 'left')
->join('ip_clients', 'ip_clients.client_id = ip_invoices.client_id', 'left')
->join('t_driver_payroll', 't_driver_payroll.driver_id = '.$this->table.'.driver_id and t_driver_payroll.PayOn = "'.$month_year.'"', 'left')
->where($this->table.'.date BETWEEN "'.$from.'" AND "'.$to.'"')
->where($this->table . '.driver_id', $driver_id)
->where($this->table . '.isactive', 1)
@ -107,12 +109,16 @@ class Driver_model extends Model
function driverMonthlyPayInputs($monthYear){
$builder = $this->db->table('t_driver_monthly_pay_inputs');
$query = $builder->where('t_driver_monthly_pay_inputs.month_year', $monthYear)
->groupBy('t_driver_monthly_pay_inputs.driver_id, t_driver_monthly_pay_inputs.month_year')
->get();
$builder->select('t_driver_monthly_pay_inputs.*, t_driver_payroll.id as payroll_id');
$builder->join('t_driver_payroll', 't_driver_payroll.driver_id = t_driver_monthly_pay_inputs.driver_id', 'left');
$builder->where('t_driver_monthly_pay_inputs.month_year', $monthYear);
$builder->groupBy('t_driver_monthly_pay_inputs.driver_id, t_driver_monthly_pay_inputs.month_year');
$query = $builder->get();
$result = $query->getResult();
return $result;
return $result;
}
@ -153,6 +159,99 @@ class Driver_model extends Model
}
}
function getPayOn()
{
$builder = $this->db->table('t_driver_monthly_pay_inputs')
->select('DISTINCT(month_year)')
->orderBy("month_year", "desc");
$query = $builder->get();
return $query->getResult();
}
function getDriverlist2($Payon = '')
{
$builder = $this->db->table('t_driver_monthly_pay_inputs Pay')
->select('Pay.driver_id as driver_id,driver.driver_name as name')
->join('t_driver driver', 'Pay.driver_id = driver.driver_id');
if ($Payon != '') {
$builder->where('Pay.month_year', $Payon);
}
$builder->orderBy("Pay.driver_id", "asc");
$query = $builder->get();
return $query->getResult();
}
function checkDriverExistPay($driver_id, $payon)
{
$builder = $this->db->table('t_driver_payroll')
->select('PayOn,driver_id')
->where('PayOn', $payon)
->where('driver_id', $driver_id);
$query = $builder->get();
return $query->getResult();
}
function getMonthlyPayDetails($driver_id, $PayOn)
{
$builder = $this->db->table('t_driver_monthly_pay_inputs MonthlyPay ')
->select('MonthlyPay.*')
->where('MonthlyPay.driver_id', $driver_id)
->where('MonthlyPay.month_year', $PayOn);
$query = $builder->get();
return $query->getResult();
}
function insertPayroll($data)
{
$builder = $this->db->table('t_driver_payroll');
$builder->insert($data);
$count = $this->db->affectedRows();
return $count;
}
function getEmpAll($Payon = '')
{
$builder = $this->db->table('t_payroll Pay')
->select('Pay.EmpID as EmpId,Emp.FirstName as Fname,Emp.LastName as Lname')
->join('t_employee_details Emp', 'Pay.EmpID = Emp.EmpID');
if ($Payon != '') {
$builder->where('Pay.PayOn', $Payon);
}
$builder->orderBy("Pay.EmpID", "asc");
$query = $builder->get();
return $query->getResultArray();
}
function GetPayslipdata($PayOn = '', $EmpId = '')
{
//echo "FROM MODEL" . $PayOn . $EmpId;
$builder = $this->db->table('t_driver_payroll Pay')->select('Pay.*,driver.driver_name as name ')
->join('t_driver driver', 'Pay.driver_id = driver.driver_id');
if ($PayOn != '') {
$builder->where('Pay.PayOn', $PayOn);
}
if ($EmpId != '') {
$builder->where('Pay.driver_id', $EmpId);
}
if ($PayOn != '') {
$builder->orderBy("Pay.driver_id", "asc");
}
if ($PayOn == '' && $EmpId == '') {
$builder->orderBy("Pay.PayOn", "desc");
}
$query = $builder->get();
return $query->getResult();
}
}
?>

View File

@ -1200,7 +1200,7 @@ class Inwardgateregister_model extends Model
return $query->getResult();
}
public function getDetailsforEmail($userId)
public function getDetailsforEmail($userId,$roleId = 2)
{
$query0 = $this->db->query("
SELECT CompanyName,EmailAddress
@ -1217,7 +1217,7 @@ class Inwardgateregister_model extends Model
$query2 = $this->db->query("
SELECT email FROM tbl_users
WHERE isDeleted = 0 AND roleId = 2" // hardcoded because auditor role only. refer with gwm 29/01/2025
WHERE isDeleted = 0 AND roleId =".$roleId // hardcoded because auditor role only. refer with gwm 29/01/2025
);
$emails = $query2->getResult();

View File

@ -73,12 +73,13 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
</form>
</div>
<div class="col-4 text-right" id="savebutton">
<?php if(isset($driver_attendance_list) || $driver_attendance_list[0]['payroll_id'] == ''){ ?>
<button type="button" style="margin-top:0px;" class="btn btn-success" data-target="#attendanceModal" data-id="0" data-toggle="modal">
Add Trip details
</button>
<?php } ?>
</div>
</div></br>
<div class="table-responsive" style="overflow-x:scroll;">
<table id="driver_att_listing" class="table dt-responsive nowrap w-100">
<thead>
@ -118,7 +119,7 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
<td><?= esc($record['salary_amount']) ?></td>
<td><?= esc($record['food_amount']) ?></td>
<td><?= esc($record['load_type']) ?></td>
<td>
<td><?php if($record['payroll_id'] == ''){ ?>
<a data-toggle="modal" href="#attendanceModal" data-arr='<?php echo json_encode($record); ?>' data-id='<?= esc($record['driver_attendance_id']) ?>'>
<i class="fas fa-edit"></i>&nbsp;&nbsp;&nbsp;
</a>
@ -126,9 +127,8 @@ $datefordropdown = format_date($datefordropdown, 0, 'M-Y');
<a onclick="confirmDelete(event)" style="cursor:pointer;" href="<?php echo base_url() . 'deleteDriverAttendance?driverAttendanceId=' . esc($record['driver_attendance_id']).'&gobal_driver_id='.esc($record['driver_id']).'&month_year='.esc($datefordropdown); ?>">
<i class="fa fa-trash"></i>&nbsp;&nbsp;&nbsp;
</a>
</a>
<?php } ?>
</td>
</tr>
<?php } ?>

View File

@ -277,10 +277,10 @@
} ?>
</td>
<td id="diesel<?php echo $index ?>" style="max-width:80px;text-align:right;" onkeypress="return isNumber(event);" onkeyup="changeInput(event, <?php echo $index; ?>);"
<?php if (empty($record->Key)) {
<?php if (empty($record->payroll_id)) {
echo "contenteditable='true';";
} ?>
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated" style="text-align:right;color:blue;"
<?php if (!empty($record->payroll_id)) { ?> title="Payslip Calculated" style="text-align:right;color:blue;"
<?php } else { ?>style="text-align:right;" <?php } ?>>
<?php if (!empty($record->diesel)) {
@ -291,10 +291,10 @@
} ?>
</td>
<td id="sheddu<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event, <?php echo $index; ?>);"
<?php if (empty($record->Key)) {
<?php if (empty($record->payroll_id)) {
echo "contenteditable='true';";
} ?>
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
<?php if (!empty($record->payroll_id)) { ?> title="Payslip Calculated"
style="text-align:right;color:blue;"
<?php } else { ?>style="text-align:right;" <?php } ?>>

View File

@ -0,0 +1,230 @@
<?php
$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");
?>
<script>
$(function() {
$(".select2").select2();
$('#All').click(function() {
if ($('#All').prop('checked')) {
$('#Driver').attr('disabled', 'true');
} else {
$('#Driver').removeAttr('disabled');
}
});
$('#PayOn').change(function() {
var id = $('#PayOn').val();
if (id != '-1') {
$('#loader').show();
$.ajax({
data: {
id1: id
},
type: "POST",
url: "<?php echo base_url(); ?>getDriver",
success: function(result) {
if (result) {
$("#Driver").empty();
$('#loader').hide();
$("#Driver").append(result);
}
}
});
} else {
alert('Please select the PayOn');
return false;
}
});
$("#Calculate").click(function() {
var payon = $('#PayOn').val();
var driver = $('#Driver').val();
if (payon != '-1' && driver != '-1') {
var check = $('#All').is(":checked");
if (check) {
var c = 0;
var time = 0;
$('#Driver').find('option').each(function() {
c++;
var driver = $(this).val();
$('#loader').show();
$.ajax({
data: {
payon: payon,
driver: driver
},
type: "POST",
url: "<?php echo base_url(); ?>checkDriverExistPay",
success: function(result) {
if (result != 1) {
$.ajax({
data: {
payon: payon,
driver: driver
},
type: "POST",
url: "<?php echo base_url(); ?>driverPayslip",
success: function(result) {
console.log(result);
$('#loader').hide();
}
});
}
}
});
});
time = (c * 300);
// alert(time);
setTimeout(function() {
alert(c + '-Driver Salary Added Successfully!');
$('form#PayslipGenerator').submit();
alert("Please wait while Payslip Downloading...!");
$('#loader').hide();
}, time);
} // else for select all not selected
else {
$('#loader').show();
$.ajax({
data: {
payon: payon,
driver: driver
},
type: "POST",
url: "<?php echo base_url(); ?>checkDriverExistPay",
success: function(result) {
if (result == 1) {
$('form#PayslipGenerator').submit();
$('#loader').hide();
alert("Payslip Downloaded Successfully..!");
} else {
$.ajax({
data: {
payon: payon,
driver: driver
},
type: "POST",
url: "<?php echo base_url(); ?>driverPayslip",
success: function(result) {
$('form#PayslipGenerator').submit();
$('#loader').hide();
alert("Salary Calculated Successfully..!");
}
});
}
}
});
} // else for select all not selected
} // check payon select/not selected
else {
alert('Please select the PayOn');
return false;
}
});
});
</script>
<div class="content-page">
<!-- Content Header (Page header) -->
<div class="container-fluid">
<div class="page-title-box page-title-box-alt">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="javascript: void(0);">HR</a></li>
<li class="breadcrumb-item"><a href="javascript: void(0);">PaySlip</a></li>
<li class="breadcrumb-item active">
<h4 class="page-title"> Driver's Pay Slip Generator</h4>
</li>
</ol>
</div>
</div>
<div class="content">
<div class="card">
<div class="card-body" style="padding: 1rem 2rem !important;">
<form id="PayslipGenerator" action="<?php echo base_url() ?>driverPrintPdf" method="post" role="form" style="border:2px dotted; padding:5%">
<div class="row">
<div class="col-md-4">
<span for="selectmonth">Select Month</span>
<select id="PayOn" name="PayOn" class="form-control select2" style="width: 100%;">
<option value="-1">Select Payon Month</option>
<?php
if (!empty($Payon)) {
foreach ($Payon as $rl) {
$m = substr($rl->month_year, 0, 2);
$y = substr($rl->month_year, 3);
$tot = $monthsoptions[$m] . "-" . $y;
echo "<option value=\"" . $rl->month_year . "\">" . $tot . "</option>";
}
}
?>
</select>
</div>
<div id="content"></div>
<div class="col-md-2">
</div>
<div class="col-md-4 col-md-offset-2">
<span>Driver</span>
<select id="Driver" name="Driver" class="form-control select2" type="text" class="form-control">
<option value="-1">Select Driver</option>
</select>
<br />
<!-- <input type="checkbox" name="All" id="All"> Select All<br> -->
</div>
<div class="col-md-6" align="right">
</div>
<div class="col-md-4 col-md-offset-6" align="right">
<input style="margin-top:10px !important" type="button" class="btn btn-info" id="Calculate" value="Calculate Pay" />
</div>
<div class="row">
<?php
helper('form');
$error = session()->getFlashdata('error');
if ($error) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<?php echo session()->getFlashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = session()->getFlashdata('success');
if ($success) {
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true"><EFBFBD></button>
<?php echo session()->getFlashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-4">
<?php // echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><3E></button></div>');
?>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@ -788,9 +788,7 @@
</a>
<div class="dropdown-menu" aria-labelledby="topnav-payslip">
<a href="<?php echo base_url(); ?>driverMonthlyPayInputs" class="dropdown-item">Monthly Pay Information </a>
<a href="#" class="dropdown-item">PaySlip Generator</a>
<a href="<?php echo base_url(); ?>driverViewPay" class="dropdown-item">PaySlip Generator</a>
</div>
</div>

View File

@ -515,7 +515,10 @@
<tfoot>
<tr>
<th colspan="20"></th>
<th></th> <th></th> <th></th> <th></th> <th></th>
<th></th> <th></th> <th></th> <th></th> <th></th>
<th></th> <th></th> <th></th> <th></th> <th></th>
<th></th> <th></th> <th></th> <th></th> <th></th>
<th>Total</th>
<th id="monthloan" style="text-align:right;">
<?php echo isset($totalmonthloan) ? number_format(array_sum($totalmonthloan), 2) : ''; ?>
@ -847,9 +850,6 @@ $(document).ready(function () {
if (is_management_team == 1) {
var dayWorkPaid = dayWorks + paidLeave + lopDay;
} else {
@ -880,14 +880,13 @@ $(document).ready(function () {
var currentDaySalary = daySalary * dayWorkPaid;
var currentDaySalary = daySalary * dayWorkPaid;
if (isNaN(currentDaySalary)) { currentDaySalary = 0; }
var currentDayHra = dayHra * dayWorkPaid;
var currentDayHra = dayHra * dayWorkPaid;
if (isNaN(currentDayHra)) { currentDayHra = 0; }
var current_loan_amt = 0;
var autoLoan = parseFloat(monthDue);
@ -946,7 +945,6 @@ $(document).ready(function () {
var employeeSalary = Math.round(empMonthSalary);
//console.log( employeeSalary);
var cals = (employeeSalary).toFixed(0);

View File

@ -219,6 +219,9 @@
<!-- Rec qty changed to invoice qty -->
<th>Invoice Qty</th>
<th>Net weight</th>
<th>Taxable Amt</th>
<th>Tax Amt</th>
<th>Total Amt</th>
<th>Vechicle No</th>
<th>Driver</th>
<th>Transporter</th>
@ -257,6 +260,9 @@
<td align="right"><?php echo (int)$record->ReceivedQuantity ?></td>
<td align="right"><?php echo (int)$record->NetWeight ?></td>
<td align="right"><?php echo (int)$record->taxable_value ?></td>
<td align="right"><?php echo (int)$record->gst_amount ?></td>
<td align="right"><?php echo ((int)$record->gst_amount + (int)$record->gst_amount) ?></td>
<td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->DriverName ?></td>