bug fixes : ps

This commit is contained in:
VE10-Sanjeev 2025-02-21 12:56:54 +00:00
parent 50db9f5ae5
commit 0151bbdb4f
7 changed files with 93 additions and 19 deletions

View File

@ -271,7 +271,7 @@ class Employeedetails extends BaseController
$Nominee = $this->request->getPost('nomineename'); $Nominee = $this->request->getPost('nomineename');
$createdby = $this->session->get('userId'); $createdby = $this->session->get('userId');
$is_management_team = $this->request->getPost('is_management_team'); $is_management_team = $this->request->getPost('is_management_team');
$is_driver = $this->request->getPost('is_driver');
$TDS_Rate = $this->request->getPost('TDS_Rate'); $TDS_Rate = $this->request->getPost('TDS_Rate');
$tds_applicable=$this->request->getPost('tds_applicable'); $tds_applicable=$this->request->getPost('tds_applicable');
@ -337,7 +337,8 @@ class Employeedetails extends BaseController
'is_management_team' => $is_management_team, 'is_management_team' => $is_management_team,
'esi_applicable' => $esi_applicable, 'esi_applicable' => $esi_applicable,
'pf_applicable' => $pf_applicable, 'pf_applicable' => $pf_applicable,
'work_location' => $work_location 'work_location' => $work_location,
'is_driver' => $is_driver,
); );
//print_r($Employee);die(); //print_r($Employee);die();
@ -728,6 +729,7 @@ class Employeedetails extends BaseController
$Nominee = $this->request->getPost('nomineename'); $Nominee = $this->request->getPost('nomineename');
$chked = $this->request->getPost('isactive'); $chked = $this->request->getPost('isactive');
$is_management_team = $this->request->getPost('is_management_team'); $is_management_team = $this->request->getPost('is_management_team');
$is_driver = $this->request->getPost('is_driver');
$esi_applicable = $this->request->getPost('esi_applicable'); $esi_applicable = $this->request->getPost('esi_applicable');
$pf_applicable = $this->request->getPost('pf_applicable'); $pf_applicable = $this->request->getPost('pf_applicable');
$work_location = $this->request->getPost('work_location'); $work_location = $this->request->getPost('work_location');
@ -798,6 +800,7 @@ class Employeedetails extends BaseController
'ESI' => $esino, 'ESI' => $esino,
'NomineeDetails' => $Nominee, 'NomineeDetails' => $Nominee,
'is_management_team' => $is_management_team, 'is_management_team' => $is_management_team,
'is_driver' => $is_driver,
'esi_applicable' => $esi_applicable, 'esi_applicable' => $esi_applicable,
'pf_applicable' => $pf_applicable, 'pf_applicable' => $pf_applicable,
'work_location' => $work_location 'work_location' => $work_location

View File

@ -254,7 +254,18 @@ class Config_model extends Model
$subQuery = "SELECT DISTINCT po.PONO, DATE_FORMAT(po.PODate, '%d-%m-%Y') as PODate, $subQuery = "SELECT DISTINCT po.PONO, DATE_FORMAT(po.PODate, '%d-%m-%Y') as PODate,
mm.MaterialName, CD.Key, CD.ConfigValue as CategoryName, 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 FROM t_purchaseorder_lineitem pl
JOIN t_purchaseorder_master po ON po.PONO = pl.PONO JOIN t_purchaseorder_master po ON po.PONO = pl.PONO
JOIN t_materialmaster mm ON mm.MaterialCode = pl.MaterialCode JOIN t_materialmaster mm ON mm.MaterialCode = pl.MaterialCode

View File

@ -1672,8 +1672,11 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
{ {
$builder = $this->db->table('t_purchaseorder_master mast')->distinct() $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('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 FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME') (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_supplierdetailsn sup', 'sup.SupplierID = mast.SupplierID')
->join('t_status st', 'st.StatusCode=mast.Status') ->join('t_status st', 'st.StatusCode=mast.Status')
->join('t_purchaseorder_lineitem req', 'req.PONO= mast.PONO') ->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(); $result = $builder->get();
// Get the last executed query // Get the last executed query
// $lastQuery = $this->db->getLastQuery(); // $lastQuery = $this->db->getLastQuery();
// echo $lastQuery; // dd($lastQuery);
// die; // dd($result->getResult());
return $result->getResult(); return $result->getResult();
} }

View File

@ -739,6 +739,19 @@
</label> </label>
</div> </div>
</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> <br>
</div> </div>
@ -1124,6 +1137,15 @@
function updateSwitchValue(checkbox) { function updateSwitchValue(checkbox) {
checkbox.value = checkbox.checked ? "1" : "0"; 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() { function calculalteHRA() {
//var empid=document.getElementById('emp').value; //var empid=document.getElementById('emp').value;

View File

@ -60,6 +60,7 @@ $esi_applicable = 0;
$pf_applicable = 0; $pf_applicable = 0;
$TDS_Rate = ''; $TDS_Rate = '';
$tds_apllicable = 0; $tds_apllicable = 0;
$is_driver = 0;
if (!empty($EmpDetails)) { if (!empty($EmpDetails)) {
foreach ($EmpDetails as $Emp) { foreach ($EmpDetails as $Emp) {
@ -110,6 +111,7 @@ if (!empty($EmpDetails)) {
$isactive = $Emp->IsActive; $isactive = $Emp->IsActive;
$ProfilePicPath = ''; $ProfilePicPath = '';
$is_driver = $Emp->is_driver;
if (!empty($Emp->ProfilePic)) { if (!empty($Emp->ProfilePic)) {
@ -647,6 +649,20 @@ if (!empty($EmpDetails)) {
Team</label> Team</label>
</div> </div>
</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> <br>
</div> </div>
@ -1699,6 +1715,11 @@ if (!empty($EmpDetails)) {
} }
$(document).ready(function () { $(document).ready(function () {
var driverChecked = "<?php echo $is_driver; ?>";
if (driverChecked) {
$('#Total_salary').prop('required', false);
$('#Total_salary').prop('readonly', true);
}
$("#gender").select2(); $("#gender").select2();
$("#MartialStatus").select2(); $("#MartialStatus").select2();
$("#desigination").select2(); $("#desigination").select2();
@ -1735,6 +1756,15 @@ if (!empty($EmpDetails)) {
function updateSwitchValue(checkbox) { function updateSwitchValue(checkbox) {
checkbox.value = checkbox.checked ? "1" : "0"; 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() { function calculalteHRA() {
//var empid=document.getElementById('emp').value; //var empid=document.getElementById('emp').value;

View File

@ -18,6 +18,11 @@ if (!empty($master)) {
} }
} }
?> ?>
<style>
.modal-content {
width: 800px ! important;
}
</style>
<div class="content-page"> <div class="content-page">
<div class="content"> <div class="content">
@ -530,10 +535,10 @@ if (!empty($master)) {
if (response.length > 0) { if (response.length > 0) {
let tableHtml = ` let tableHtml = `
<table class="table table-bordered"> <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> <tr>
<th style="text-align: center;" >PO Number</th> <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;" >Material Name</th>
<th style="text-align: center;" >PO Type</th> <th style="text-align: center;" >PO Type</th>
<th style="text-align: center;" >PO Status</th> <th style="text-align: center;" >PO Status</th>
@ -547,13 +552,13 @@ if (!empty($master)) {
tableHtml += ` tableHtml += `
<tr> <tr>
<td class="pono-cell" data-pono="${item.PONO}" data-potype="${item.POType}" data-capitalrange="${item.CapitalRange}" style="cursor: pointer; color: #4d3a6d;"> <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;">
${item.PONO} <u>${item.PONO}</u>
</td> </td>
<td>${item.PODate}</td> <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${item.PODate}</td>
<td>${item.MaterialName}</td> <td style="text-align:left; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${item.MaterialName}</td>
<td style="text-align: right;">${item.POType}</td> <td style="text-align:left;">${item.POType}</td>
<td style="text-align: right;">${item.StatusName}</td> <td style="text-align:left; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">${item.StatusName}</td>
</tr> </tr>
`; `;

View File

@ -128,6 +128,7 @@ if (empty($Status)) {
</thead> </thead>
<tbody> <tbody>
<?php <?php
if (!empty($AppList)) { if (!empty($AppList)) {
$index = 0; $index = 0;
foreach ($AppList as $record) { foreach ($AppList as $record) {
@ -154,8 +155,7 @@ if (empty($Status)) {
<td><?php echo $record->TotalOrderValue ?></td> <td><?php echo $record->TotalOrderValue ?></td>
<td><?php if($record->StatusCode == "ST026"){ echo $record->Releaser; } ?></td>
<td><?php echo $record->Approver ?></td>
<td> <td>
<?php <?php
$statusMappings = [ $statusMappings = [
@ -182,7 +182,7 @@ if (empty($Status)) {
<?php if(session()->get('roleText') == 'System Administrator'){?> <?php if(session()->get('roleText') == 'System Administrator'){?>
<td> <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 <select