bug fixes : ps
This commit is contained in:
parent
50db9f5ae5
commit
0151bbdb4f
@ -271,7 +271,7 @@ class Employeedetails extends BaseController
|
||||
$Nominee = $this->request->getPost('nomineename');
|
||||
$createdby = $this->session->get('userId');
|
||||
$is_management_team = $this->request->getPost('is_management_team');
|
||||
|
||||
$is_driver = $this->request->getPost('is_driver');
|
||||
$TDS_Rate = $this->request->getPost('TDS_Rate');
|
||||
$tds_applicable=$this->request->getPost('tds_applicable');
|
||||
|
||||
@ -337,7 +337,8 @@ class Employeedetails extends BaseController
|
||||
'is_management_team' => $is_management_team,
|
||||
'esi_applicable' => $esi_applicable,
|
||||
'pf_applicable' => $pf_applicable,
|
||||
'work_location' => $work_location
|
||||
'work_location' => $work_location,
|
||||
'is_driver' => $is_driver,
|
||||
);
|
||||
|
||||
//print_r($Employee);die();
|
||||
@ -728,6 +729,7 @@ class Employeedetails extends BaseController
|
||||
$Nominee = $this->request->getPost('nomineename');
|
||||
$chked = $this->request->getPost('isactive');
|
||||
$is_management_team = $this->request->getPost('is_management_team');
|
||||
$is_driver = $this->request->getPost('is_driver');
|
||||
$esi_applicable = $this->request->getPost('esi_applicable');
|
||||
$pf_applicable = $this->request->getPost('pf_applicable');
|
||||
$work_location = $this->request->getPost('work_location');
|
||||
@ -798,6 +800,7 @@ class Employeedetails extends BaseController
|
||||
'ESI' => $esino,
|
||||
'NomineeDetails' => $Nominee,
|
||||
'is_management_team' => $is_management_team,
|
||||
'is_driver' => $is_driver,
|
||||
'esi_applicable' => $esi_applicable,
|
||||
'pf_applicable' => $pf_applicable,
|
||||
'work_location' => $work_location
|
||||
|
||||
@ -254,7 +254,18 @@ class Config_model extends Model
|
||||
|
||||
$subQuery = "SELECT DISTINCT po.PONO, DATE_FORMAT(po.PODate, '%d-%m-%Y') as PODate,
|
||||
mm.MaterialName, CD.Key, CD.ConfigValue as CategoryName,
|
||||
s.StatusName, s.statusCode, po.POType, po.CapitalRange
|
||||
s.StatusName, s.statusCode, po.POType, po.CapitalRange,
|
||||
CASE
|
||||
WHEN s.statusCode = 'ST073' THEN 'OPEN ORDER PO'
|
||||
WHEN s.statusCode = 'ST074' THEN 'IGR DRAFT'
|
||||
WHEN s.statusCode = 'ST027' THEN 'IGR CREATED'
|
||||
WHEN s.statusCode = 'ST024' THEN s.StatusName
|
||||
WHEN s.statusCode = 'ST014' THEN 'PO DRAFT'
|
||||
WHEN s.statusCode = 'ST015' THEN 'PO CREATED'
|
||||
WHEN s.statusCode = 'ST005' THEN s.StatusName
|
||||
WHEN s.statusCode = 'ST026' THEN 'PO RELEASED'
|
||||
ELSE s.StatusName
|
||||
END AS statusDescription
|
||||
FROM t_purchaseorder_lineitem pl
|
||||
JOIN t_purchaseorder_master po ON po.PONO = pl.PONO
|
||||
JOIN t_materialmaster mm ON mm.MaterialCode = pl.MaterialCode
|
||||
|
||||
@ -1672,8 +1672,11 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
{
|
||||
|
||||
$builder = $this->db->table('t_purchaseorder_master mast')->distinct()
|
||||
->select('mast.PODate,mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
|
||||
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME')
|
||||
->select('mast.PODate,mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,rmast.ReqType,mast.Status,mast.CapitalRange,
|
||||
(select EmpID from tbl_users where userId=mast.ApprovedBy ) as AEID,mast.ApprovedBy,
|
||||
(select EmpID from tbl_users where userId=mast.ReleasedBy ) as REID,mast.ReleasedBy,
|
||||
(select FirstName from t_employee_details where EmpID=AEID) as Approver,
|
||||
(select FirstName from t_employee_details where EmpID=REID) as Releaser,sup.SupplierName,sup.MSME')
|
||||
->join('t_supplierdetailsn sup', 'sup.SupplierID = mast.SupplierID')
|
||||
->join('t_status st', 'st.StatusCode=mast.Status')
|
||||
->join('t_purchaseorder_lineitem req', 'req.PONO= mast.PONO')
|
||||
@ -1705,8 +1708,8 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
$result = $builder->get();
|
||||
// Get the last executed query
|
||||
// $lastQuery = $this->db->getLastQuery();
|
||||
// echo $lastQuery;
|
||||
// die;
|
||||
// dd($lastQuery);
|
||||
// dd($result->getResult());
|
||||
return $result->getResult();
|
||||
}
|
||||
|
||||
|
||||
@ -739,6 +739,19 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="is_driver" value="0"
|
||||
onchange="updateSwitchValue(this);driverCheck(this);" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<label
|
||||
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">Driver
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
@ -1124,6 +1137,15 @@
|
||||
function updateSwitchValue(checkbox) {
|
||||
checkbox.value = checkbox.checked ? "1" : "0";
|
||||
}
|
||||
function driverCheck(driver) {
|
||||
if (driver.checked) {
|
||||
$('#Total_salary').prop('required', false);
|
||||
$('#Total_salary').prop('readonly', true);
|
||||
} else {
|
||||
$('#Total_salary').prop('required', true);
|
||||
$('#Total_salary').prop('readonly', false);
|
||||
}
|
||||
}
|
||||
|
||||
function calculalteHRA() {
|
||||
//var empid=document.getElementById('emp').value;
|
||||
|
||||
@ -60,6 +60,7 @@ $esi_applicable = 0;
|
||||
$pf_applicable = 0;
|
||||
$TDS_Rate = '';
|
||||
$tds_apllicable = 0;
|
||||
$is_driver = 0;
|
||||
|
||||
if (!empty($EmpDetails)) {
|
||||
foreach ($EmpDetails as $Emp) {
|
||||
@ -110,6 +111,7 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
$isactive = $Emp->IsActive;
|
||||
$ProfilePicPath = '';
|
||||
$is_driver = $Emp->is_driver;
|
||||
|
||||
if (!empty($Emp->ProfilePic)) {
|
||||
|
||||
@ -647,6 +649,20 @@ if (!empty($EmpDetails)) {
|
||||
Team</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="margin-top: 18px;">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" name="is_driver"
|
||||
value="<?= $is_driver; ?>" <?php echo $is_driver == '1' ? 'checked' : ''; ?>
|
||||
onchange="updateSwitchValue(this);driverCheck(this);" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<label
|
||||
style="display: inline-block; vertical-align: bottom; margin-right: 10px; margin-bottom: 10px;">Driver
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
</div>
|
||||
@ -1699,6 +1715,11 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
var driverChecked = "<?php echo $is_driver; ?>";
|
||||
if (driverChecked) {
|
||||
$('#Total_salary').prop('required', false);
|
||||
$('#Total_salary').prop('readonly', true);
|
||||
}
|
||||
$("#gender").select2();
|
||||
$("#MartialStatus").select2();
|
||||
$("#desigination").select2();
|
||||
@ -1735,6 +1756,15 @@ if (!empty($EmpDetails)) {
|
||||
function updateSwitchValue(checkbox) {
|
||||
checkbox.value = checkbox.checked ? "1" : "0";
|
||||
}
|
||||
function driverCheck(driver) {
|
||||
if (driver.checked) {
|
||||
$('#Total_salary').prop('required', false);
|
||||
$('#Total_salary').prop('readonly', true);
|
||||
} else {
|
||||
$('#Total_salary').prop('required', true);
|
||||
$('#Total_salary').prop('readonly', false);
|
||||
}
|
||||
}
|
||||
|
||||
function calculalteHRA() {
|
||||
//var empid=document.getElementById('emp').value;
|
||||
|
||||
@ -18,6 +18,11 @@ if (!empty($master)) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.modal-content {
|
||||
width: 800px ! important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-page">
|
||||
<div class="content">
|
||||
@ -530,10 +535,10 @@ if (!empty($master)) {
|
||||
if (response.length > 0) {
|
||||
let tableHtml = `
|
||||
<table class="table table-bordered">
|
||||
<thead style="background-color: #539754; color: white; font-size: 13px;">
|
||||
<thead style="background-color: #539754; color: white; font-size: 12px;">
|
||||
<tr>
|
||||
<th style="text-align: center;" >PO Number</th>
|
||||
<th style="text-align: center;" >PO Date</th>
|
||||
<th>PO Date</th>
|
||||
<th style="text-align: center;" >Material Name</th>
|
||||
<th style="text-align: center;" >PO Type</th>
|
||||
<th style="text-align: center;" >PO Status</th>
|
||||
@ -547,13 +552,13 @@ if (!empty($master)) {
|
||||
|
||||
tableHtml += `
|
||||
<tr>
|
||||
<td class="pono-cell" data-pono="${item.PONO}" data-potype="${item.POType}" data-capitalrange="${item.CapitalRange}" style="cursor: pointer; color: #4d3a6d;">
|
||||
${item.PONO}
|
||||
</td>
|
||||
<td>${item.PODate}</td>
|
||||
<td>${item.MaterialName}</td>
|
||||
<td style="text-align: right;">${item.POType}</td>
|
||||
<td style="text-align: right;">${item.StatusName}</td>
|
||||
<td class="pono-cell" data-pono="${item.PONO}" data-potype="${item.POType}" data-capitalrange="${item.CapitalRange}" style="cursor: pointer; color: #4d3a6d;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||
<u>${item.PONO}</u>
|
||||
</td>
|
||||
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${item.PODate}</td>
|
||||
<td style="text-align:left; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${item.MaterialName}</td>
|
||||
<td style="text-align:left;">${item.POType}</td>
|
||||
<td style="text-align:left; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${item.StatusName}</td>
|
||||
|
||||
</tr>
|
||||
`;
|
||||
|
||||
@ -128,6 +128,7 @@ if (empty($Status)) {
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if (!empty($AppList)) {
|
||||
$index = 0;
|
||||
foreach ($AppList as $record) {
|
||||
@ -154,8 +155,7 @@ if (empty($Status)) {
|
||||
|
||||
<td><?php echo $record->TotalOrderValue ?></td>
|
||||
|
||||
|
||||
<td><?php echo $record->Approver ?></td>
|
||||
<td><?php if($record->StatusCode == "ST026"){ echo $record->Releaser; } ?></td>
|
||||
<td>
|
||||
<?php
|
||||
$statusMappings = [
|
||||
@ -182,7 +182,7 @@ if (empty($Status)) {
|
||||
|
||||
<?php if(session()->get('roleText') == 'System Administrator'){?>
|
||||
<td>
|
||||
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED or $record->StatusCode == PO_RELEASER_ONHOLD or $record->StatusCode == PO_AWAITING_RELEASE) { ?>
|
||||
|
||||
|
||||
<select
|
||||
|
||||
Loading…
Reference in New Issue
Block a user