Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
18b1df6361
@ -443,6 +443,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$POLineItemNo = $this->request->getPost('LineItemNo' . $i);
|
||||
$CostCenter = $this->request->getPost('costCode' . $i);
|
||||
$ServiceFrequency = $this->request->getPost('Frequency' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
|
||||
$LineItemNo = '';
|
||||
$RecQtyvalue = 0.00;
|
||||
$rowspanvalue = 0;
|
||||
@ -595,6 +597,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
*/
|
||||
function UpdateAmendServicePurchaseOrder()
|
||||
{
|
||||
// dd($this->request->getPost());
|
||||
$PONO = $this->request->getPost('txtPONO');
|
||||
|
||||
$changeStatus = $this->request->getPost('changeStatus');
|
||||
@ -776,6 +779,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$POLineItemNo = $this->request->getPost('LineItemNo' . $i);
|
||||
$TotalOrderValue = $this->request->getPost('TotalOrderValue' . $i);
|
||||
$ServiceFrequency = $this->request->getPost('Frequency' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
|
||||
$LineItemNo = '';
|
||||
$RecQtyvalue = 0.00;
|
||||
$rowspanvalue = 0;
|
||||
@ -821,7 +826,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'ServiceMaterialDescription' => $servicematerialdescription, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'ReceivedQuantity' => $RecQtyvalue, 'AmendedDetails' => $CAD, 'Per' => $Per);
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'ServiceMaterialDescription' => $servicematerialdescription, 'CreatedBy' => $updatedBy, 'CreatedDate' => $updateddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'ReceivedQuantity' => $RecQtyvalue, 'AmendedDetails' => $CAD, 'Per' => $Per,'LineitemAuditorNotes' => $LineitemAuditorNotes);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
@ -1174,6 +1179,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$beforeFreightNoofTriploc = $this->request->getPost('beforeNoTrip' . $i);
|
||||
$beforeFreightrateloc = $this->request->getPost('beforeFvalue' . $i);
|
||||
$beforeFreightAmountloc = $this->request->getPost('beforeAfvalue' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
|
||||
|
||||
$rowspanvalue = 0;
|
||||
|
||||
@ -1256,7 +1263,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'AmendedDetails' => $CAD, 'Per' => $Per, 'ServiceMaterialDescription' => $CapitalItemDescrition);
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'AmendedDetails' => $CAD, 'Per' => $Per, 'ServiceMaterialDescription' => $CapitalItemDescrition,'LineitemAuditorNotes' => $LineitemAuditorNotes);
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
$LineItemNo = '';
|
||||
|
||||
@ -1540,6 +1547,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$ClearingCharge = $this->request->getPost('ClearingCharge' . $i);
|
||||
$NetValue = $this->request->getPost('NetValue' . $i);
|
||||
$DutyImpact = $this->request->getPost('DutyImpact' . $i);
|
||||
$LineitemAuditorNotes = $this->request->getPost('LineItemNoteForAuditor' . $i);
|
||||
$LineitemAuditorNotes = ($LineitemAuditorNotes === null || $LineitemAuditorNotes === '') ? '-' : $LineitemAuditorNotes;
|
||||
|
||||
$specialinstruction = $this->request->getPost('Addinstruction' . $i);
|
||||
$CostCenter = $this->request->getPost('costCode' . $i);
|
||||
@ -1645,8 +1654,8 @@ class Amendmentpurchaseorder extends BaseController
|
||||
}
|
||||
if($itemRate != 0){
|
||||
$this->purchaseorder_model->updateMaterialRate($MaterialCode, $itemRate); }
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'AmendedDetails' => $CAD, 'Per' => $per, 'ServiceMaterialDescription' => $specialinstruction);
|
||||
|
||||
$POLineItemList = array('PONO' => $NewPO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'AmendedDetails' => $CAD, 'Per' => $per, 'ServiceMaterialDescription' => $specialinstruction,'LineitemAuditorNotes' => $LineitemAuditorNotes);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
@ -1654,7 +1663,7 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$LineItemNo = $POLineItem[0]['LineItemNo'];
|
||||
}
|
||||
|
||||
$ImportTaxList = array('LineItemNo' => $LineItemNo, 'BasicPriceInMTon' => $BasicPriceinmton, 'ProductPrice' => $Productprice, 'LandingCharge' => $LandingCharge, 'AfterLandingCharge' => $AfterLandingCharge, 'CustomDuty' => $CustomDuty, 'AfterCustomDuty' => $AfterCustomDuty, 'CustomEdCess' => $CustomEd, 'CustomSHCess' => $CustomSH, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'Grossdutypayable' => $Grossdutypayable, 'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG, 'QuantityKG' => $QuantityKG, 'AfterCustomSHCess' => $AfterCustomSH, 'AfterCustomEdCess' => $AfterCustomEd, 'TotalValue' => $Totalvalueitem, 'FreightType' => $FreightType, 'NoOfTrip' => $NoOfTrip, 'FreightValue' => $Freightrate, 'AfterFreightValue' => $Freightamount, 'AssessableValue' => $Assable, 'SubTotal' => $Subtotal, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'DutyImpact' => $DutyImpact, 'NetValue' => $NetValue, 'ClearingCharge' => $ClearingCharge);
|
||||
$ImportTaxList = array('LineItemNo' => $LineItemNo, 'BasicPriceInMTon' => $BasicPriceinmton, 'ProductPrice' => $Productprice, 'LandingCharge' => $LandingCharge, 'AfterLandingCharge' => $AfterLandingCharge, 'CustomDuty' => $CustomDuty, 'AfterCustomDuty' => $AfterCustomDuty, 'CustomEdCess' => $CustomEd, 'CustomSHCess' => $CustomSH, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'Grossdutypayable' => $Grossdutypayable, 'CustomDutyExpensesPerKG' => $CustomDutyExpensesPerKG, 'QuantityKG' => $QuantityKG, 'AfterCustomSHCess' => $AfterCustomSH, 'AfterCustomEdCess' => $AfterCustomEd, 'TotalValue' => $Totalvalueitem, 'FreightType' => $FreightType, 'NoOfTrip' => $NoOfTrip, 'FreightValue' => $Freightrate, 'AfterFreightValue' => $Freightamount, 'AssessableValue' => $Assable, 'SubTotal' => $Subtotal, 'IGST' => $Igst, 'AfterIGST' => $AfterIgst, 'DutyImpact' => $DutyImpact, 'NetValue' => $NetValue, 'ClearingCharge' => $ClearingCharge,'LineitemAuditorNotes' => $LineitemAuditorNotes);
|
||||
$ImportList = $this->purchaseorder_model->addImportTax($ImportTaxList);
|
||||
}
|
||||
|
||||
|
||||
@ -4,18 +4,21 @@ namespace App\Controllers;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\Driver_model;
|
||||
use App\Models\Employeedetails_model;
|
||||
use Mpdf\Mpdf;
|
||||
|
||||
|
||||
class Driver extends BaseController
|
||||
{
|
||||
protected $driver_model;
|
||||
protected $employeedetails_model;
|
||||
protected $session;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->driver_model = new Driver_model();
|
||||
$this->employeedetails_model = new Employeedetails_model();
|
||||
$this->session = session();
|
||||
helper('form');
|
||||
$this->isLoggedIn();
|
||||
@ -23,7 +26,18 @@ class Driver extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data['driver_list'] = $this->driver_model->useDriverTable()->getDriverList();
|
||||
|
||||
// $data['driver_list'] = $this->driver_model->useDriverTable()->getDriverList(); // old
|
||||
$data1 = $this->employeedetails_model->employeeListing();
|
||||
$driver_list = [];
|
||||
if (count($data1) > 0) {
|
||||
for ($i = 0; $i < count($data1); $i++) {
|
||||
if($data1[$i]->is_driver){
|
||||
array_push($driver_list, $data1[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
$data['driver_list'] = $driver_list;
|
||||
$this->global['pageTitle'] = 'Driver List';
|
||||
$this->loadViews("driverListing", $this->global, $data, NULL);
|
||||
}
|
||||
@ -449,13 +463,13 @@ class Driver extends BaseController
|
||||
{
|
||||
$loan_id = $result->Loan_ID;
|
||||
|
||||
if($result->Remaining_Due - 1 == 0){ $is_Active = 0; }else{ $is_Active = 1; }
|
||||
|
||||
|
||||
$loan = [
|
||||
'Paid_Due' => $result->Paid_Due + 1,
|
||||
'Remaining_Due' => $result->Remaining_Due - 1,
|
||||
'Paid_Amount' => $result->Paid_Amount + $result->Loan_Recovered,
|
||||
'is_Active' => $is_Active
|
||||
|
||||
];
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -317,7 +317,6 @@ class Servicepurchaseorder extends BaseController
|
||||
|
||||
|
||||
$POLineItemList = array('PONO' => $PONO, 'ReqNo' => $Reqnumber, 'MaterialCode' => $MaterialCode, 'Quantity' => $Quantity, 'Rate' => $itemRate, 'Status' => $LineItemStatus, 'CreatedBy' => $CreateBy, 'CreatedDate' => $createddt, 'CostCenterCode' => $CostCenter, 'ServiceFrequency' => $ServiceFrequency, 'ServiceMaterialDescription' => $ItemDescription, 'Per' => $Per, 'ItemNo' => $ItemNo,'LineitemAuditorNotes' => $LineitemAuditorNotes);
|
||||
print_r($POLineItemList);
|
||||
|
||||
$POLineItem = $this->purchaseorder_model->addPOLineItem($POLineItemList);
|
||||
|
||||
@ -343,7 +342,6 @@ class Servicepurchaseorder extends BaseController
|
||||
}
|
||||
}
|
||||
}
|
||||
die;
|
||||
echo 'Service Purchase Order Created Successfully! PO Number Is: ' . $PONO;
|
||||
}
|
||||
//update service po
|
||||
|
||||
@ -111,7 +111,7 @@ class Driver_model extends Model
|
||||
->select('t_loan_master.Loan_ID,Loan_Amount,Loan_Issued_Date,Monthly_Due,Due_Start_Date as DueDate,No_of_Dues,Paid_Due,Remaining_Due,Paid_Amount,t_loan_history.Balance_Amount, t_driver_monthly_pay_inputs.Loan_Recovered')
|
||||
->join('t_employee_details as driver_details', 'driver_details.EmpID = t_driver_attendance.driver_id', 'left')
|
||||
->join('t_emp_pay_data','t_emp_pay_data.EmpID=driver_details.EmpID','Left')
|
||||
->join('t_loan_master','t_loan_master.EmpID = driver_details.EmpID','Left')
|
||||
->join('t_loan_master','t_loan_master.EmpID = driver_details.EmpID and t_loan_master.Remaining_Due != 0','Left')
|
||||
->join('t_loan_history','t_loan_history.Loan_ID = t_loan_master.Loan_ID','Left')
|
||||
->join('t_driver_monthly_pay_inputs','t_driver_monthly_pay_inputs.driver_id = driver_details.EmpID','Left')
|
||||
->where('t_driver_attendance.date BETWEEN "'.$from.'" AND "'.$to.'"')
|
||||
@ -231,7 +231,7 @@ class Driver_model extends Model
|
||||
->select('CONCAT_WS(" ", driver.FirstName, driver.LastName) AS FullName')
|
||||
->select('MonthlyPay.*,driver.BankAccountNo , driver.PFNO , driver.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
||||
->join('t_employee_details as driver', 'driver.EmpID = MonthlyPay.driver_id and driver.is_driver = 1', 'left')
|
||||
->join('t_loan_master as L', 'MonthlyPay.driver_id = L.EmpID and L.is_Active = 1', 'left')
|
||||
->join('t_loan_master as L', 'MonthlyPay.driver_id = L.EmpID and L.is_Active = 1 and L.Remaining_Due != 0', 'left')
|
||||
->where('MonthlyPay.driver_id', $driver_id)
|
||||
->where('MonthlyPay.month_year', $PayOn);
|
||||
|
||||
|
||||
@ -101,13 +101,13 @@ class Monthlypay_model extends Model
|
||||
//echo $lastdate;
|
||||
|
||||
//left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and month(t_payroll.PayOn) = month(?) and year(t_payroll.PayOn) = year(?)
|
||||
$sql = "select t_emp_pay_data.EmpID,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,t_attendance.Days_Worked as Days_worked,t_attendance.Absent as LOP_Days,t_attendance.Paid_Leave as Paid_leave,t_attendance.Total_OTHrs as OT_Hrs_Worked,t_attendance.NoofDays,t_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Id,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_loan_history .Balance_Amount,t_employee_details.is_driver
|
||||
$sql = "select t_emp_pay_data.EmpID,t_emp_pay_data.*,t_employee_details.FirstName,t_employee_details.DateofJoining,t_employee_details.Designation,t_employee_details.esi_applicable,t_employee_details.pf_applicable,t_employee_details.is_management_team,t_attendance.Days_Worked as Days_worked,t_attendance.Absent as LOP_Days,t_attendance.Paid_Leave as Paid_leave,t_attendance.Total_OTHrs as OT_Hrs_Worked,t_attendance.NoofDays,t_attendance.sunday_count,t_loan_master.Loan_ID,t_loan_master.Monthly_Due,t_loan_master.Due_Start_Date as DueDate,t_loan_master.Loan_Amount,t_loan_master.Paid_Amount,t_payroll.Id,t_monthly_pay_inputs.Loan_Recovered,t_monthly_pay_inputs.Estimate,t_monthly_pay_inputs.Festival_Bonus,t_monthly_pay_inputs.Other_Deductions,t_monthly_pay_inputs.is_payslip_generated,t_loan_history .Balance_Amount,t_employee_details.is_driver
|
||||
from t_emp_pay_data
|
||||
left join t_employee_details on t_employee_details.EmpID = t_emp_pay_data.EmpID
|
||||
left join t_payroll on t_employee_details.EmpID = t_payroll.EmpID and t_payroll.PayOn = ?
|
||||
left join t_attendance on t_emp_pay_data.EmpID = t_attendance.EmpID
|
||||
left join t_monthly_pay_inputs on t_monthly_pay_inputs.EmpID = t_emp_pay_data.EmpID and t_monthly_pay_inputs.Month_Year = ?
|
||||
left join t_loan_master on t_emp_pay_data.EmpID = t_loan_master.EmpID and t_loan_master.is_Active = 1
|
||||
left join t_loan_master on t_emp_pay_data.EmpID = t_loan_master.EmpID and t_loan_master.Remaining_Due != 0
|
||||
left join t_loan_history on t_loan_history .Loan_ID = t_loan_master.Loan_ID
|
||||
where t_employee_details.DateofJoining <= ?
|
||||
and month(t_attendance.Month_Year) = month(?) and year(t_attendance.Month_Year) = year(?)
|
||||
@ -180,13 +180,13 @@ class Monthlypay_model extends Model
|
||||
|
||||
$builder = $this->db->table('t_attendance')
|
||||
->select('t_attendance.*,t_employee_details.FirstName,t_employee_details.LastName')
|
||||
->join('t_employee_details', 't_attendance.EmpID=t_employee_details.EmpID')
|
||||
->join('t_employee_details', 't_attendance.EmpID=t_employee_details.EmpID' , 'left')
|
||||
// ->where('year(t_employee_details.DateofJoining) <= ',$year_val)
|
||||
// ->where('month(t_employee_details.DateofJoining) <= ',$month_val)
|
||||
->where('t_employee_details.DateofJoining <= ', $lastdate)
|
||||
->where('Month_Year', $current)
|
||||
->where('t_attendance.Month_Year', $current)
|
||||
->where('t_employee_details.is_driver', 0)
|
||||
// ->where('t_employee_details.IsActive',1)
|
||||
->where('t_employee_details.IsActive',1)
|
||||
->orderBy('t_attendance.EmpID', 'asc');
|
||||
$query = $builder->get();
|
||||
|
||||
|
||||
@ -513,7 +513,7 @@ class Payroll_model extends Model
|
||||
$builder = $this->db->table('t_monthly_pay_inputs MonthlyPay ')
|
||||
->select('MonthlyPay.*, E.BankAccountNo , E.PFNO , E.ESI as ESINO , L.Loan_ID, L.Loan_Amount, L.Loan_Issued_Date, L.Monthly_Due, L.Due_Start_Date, L.No_of_Dues, L.Paid_Due, L.Remaining_Due, L.Paid_Amount')
|
||||
->join('t_employee_details as E', 'MonthlyPay.EmpID = E.EmpID', 'left')
|
||||
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1', 'left')
|
||||
->join('t_loan_master as L', 'MonthlyPay.EmpID = L.EmpID and L.is_Active = 1 and L.Remaining_Due != 0', 'left')
|
||||
->where('MonthlyPay.EmpID', $EmpId)
|
||||
->where('MonthlyPay.Month_Year', $PayOn);
|
||||
|
||||
@ -521,6 +521,19 @@ class Payroll_model extends Model
|
||||
return $query->getResult();
|
||||
}
|
||||
|
||||
function updatePaySlipGeneration($EmpId, $PayOn)
|
||||
{
|
||||
$builder = $this->db->table('t_monthly_pay_inputs'); // Define the table
|
||||
$builder->where('EmpID', $EmpId)
|
||||
->where('Month_Year', $PayOn)
|
||||
->set(['is_payslip_generated' => 1])
|
||||
->update();
|
||||
|
||||
return $this->db->affectedRows(); // Return number of affected rows
|
||||
}
|
||||
|
||||
|
||||
|
||||
function insertPayroll($data)
|
||||
{
|
||||
$builder = $this->db->table('t_payroll');
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
<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);">Master Details</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">HR</a></li>
|
||||
<li class="breadcrumb-item active">
|
||||
<h4 class="page-title">Driver Details</h4>
|
||||
<h4 class="page-title">Driver Load Details</h4>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<a data-toggle="modal" href="#ddwizard" data-id="0" data-name="" class="btn btn-success">Add Driver Details </a>
|
||||
<!-- <a data-toggle="modal" href="#ddwizard" data-id="0" data-name="" class="btn btn-success">Add Driver Details </a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -23,7 +23,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
|
||||
<?php //dd($driver_list); ?>
|
||||
<div class="card-body" style="overflow-x:scroll;">
|
||||
|
||||
<table id="driver_listing" class="table dt-responsive nowrap w-100">
|
||||
@ -32,7 +32,6 @@
|
||||
<th>Create Date</th>
|
||||
<th>Driver Name</th>
|
||||
<th>Driver Mobile </th>
|
||||
<th>Create By</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@ -41,29 +40,24 @@
|
||||
<?php
|
||||
if (!empty($driver_list)) :
|
||||
foreach ($driver_list as $record) {
|
||||
$createdat = new DateTime($record['created_on']);
|
||||
$date = $createdat->format('d-m-Y');
|
||||
$time = $createdat->format('h:i A');
|
||||
|
||||
if (date('d-m-Y', strtotime($record->Created_date)) == "30-11--0001") {
|
||||
$cdate = '00-00-0000';
|
||||
} else {
|
||||
$cdate = date('d-m-Y', strtotime($record->Created_date));
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= esc($date) ?></td>
|
||||
<td><?= esc($record['driver_name']) ?></td>
|
||||
<td><?= esc($record['driver_mobile']) ?></td>
|
||||
<td><?= esc($record['FullName']) ?></td>
|
||||
<td><?= $record['isactive'] == 1 ? 'Active' : 'InActive' ?></td>
|
||||
<td><?php if ($record['isactive'] == 0) { ?>
|
||||
<a onclick="confirmReActivate(event)" style="cursor:pointer;" href="<?php echo base_url() . 'reActivateDriver?driverId=' . esc($record['driver_id']); ?>">
|
||||
<i class="fa fa-key" style="color:#02a8b5;"></i>
|
||||
</a>
|
||||
<?php }else{ ?>
|
||||
<a data-toggle="modal" href="#ddwizard" data-id="<?php echo $record['driver_id']; ?>" data-name="<?php echo $record['driver_name']; ?>" data-mobile="<?php echo $record['driver_mobile']; ?>">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a onclick="confirmDelete(event)" style="cursor:pointer;" href="<?php echo base_url() . 'deleteDriver?driverId=' . $record['driver_id']; ?>">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
<?php $today = date('M-Y'); ?>
|
||||
|
||||
<td><?= esc($cdate) ?></td>
|
||||
<td><?php echo $record->FirstName; ?></td>
|
||||
<td><?php echo $record->ContactNumber ?></td>
|
||||
<td><?php echo $record->IsActive == 1 ? 'Active' : 'InActive' ?></td>
|
||||
<td>
|
||||
<?php if($record->is_driver){ ?>
|
||||
|
||||
<a title="Trip Details" style="cursor:pointer;" href="<?= base_url() . 'loadDriverAttendance?gobal_driver_id=' . $record->EmpID.'&date='.$cdate; ?>">
|
||||
<i class="fa fa-truck"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -1,3 +1,58 @@
|
||||
<style>
|
||||
.edit-container {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.edit-input-field {
|
||||
padding: 2px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.edit-input-field:focus {
|
||||
outline: none;
|
||||
border-color: #007bff;
|
||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||
}
|
||||
|
||||
.save-btn,
|
||||
.cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
color: #28a745;
|
||||
background-color: #e8f5e9;
|
||||
}
|
||||
|
||||
.save-btn:hover {
|
||||
background-color: #c3e6cb;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
color: #dc3545;
|
||||
background-color: #f8d7da;
|
||||
}
|
||||
|
||||
.cancel-btn:hover {
|
||||
background-color: #f5c6cb;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
$AvlCapitalBudAmt = isset($AvlCapitalBudAmt) ? (int) $AvlCapitalBudAmt : 0;
|
||||
$RequesterName = '';
|
||||
@ -803,6 +858,7 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INR)" ?></th>
|
||||
@ -827,6 +883,18 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
<td style="text-align:center !important"><?php echo $record->ReqNo ?></td>
|
||||
<td style="text-align:left !important"><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:left !important;">
|
||||
<a href="#"
|
||||
class="editable-field"
|
||||
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
||||
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
|
||||
</a>
|
||||
<div class="edit-container" style="display:none;">
|
||||
<input type="text" class="edit-input-field" />
|
||||
<button class="save-btn">✔</button>
|
||||
<button class="cancel-btn">✖</button>
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
|
||||
<td style="text-align:left !important"><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right !important"><?php echo number_format($record->Rate, 2, '.', ''); ?></td>
|
||||
@ -856,6 +924,10 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
$row = array("materialCode" => $record->MaterialCode, "ReqNo" => $record->ReqNo);
|
||||
array_push($res_arr_values, $row);
|
||||
?>
|
||||
<input type="hidden"
|
||||
name="<?php echo 'LineItemNoteForAuditor' . $index ?>"
|
||||
id="<?php echo 'LineItemNoteForAuditor' . $index ?>"
|
||||
value="<?php echo $record->LineitemAuditorNotes; ?>" />
|
||||
<input type="hidden"
|
||||
name="<?php echo 'CapitalItemDescrition' . $index ?>"
|
||||
id="<?php echo 'CapitalItemDescrition' . $index ?>"
|
||||
@ -1601,19 +1673,43 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row" style="padding:3%;">
|
||||
<div class="form-group col-md-12" align="right"><br>
|
||||
<div>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<label><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously
|
||||
uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile"
|
||||
<!-- Start po file changes as per edit page -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($PrePOFile)) {
|
||||
$PrePOFilePath = FCPATH . 'public/uploads/POfiles/' . $PrePOFile;
|
||||
if (file_exists($PrePOFilePath)) { ?>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile"
|
||||
value="<?php echo $PrePOFile; ?>" /><br>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value=""><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<!-- ends here -->
|
||||
|
||||
<!-- for button -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" align="right"><br>
|
||||
<div class="btn-container" style="text-align: right;">
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
@ -1622,19 +1718,19 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
|
||||
|
||||
<input type="button" class="btn btn-secondary" value="Cancel"
|
||||
onClick="window.location ='amendmentpurchaseorder';"
|
||||
style="margin-right:10px">
|
||||
<a class="btn btn-primary Save" onclick="Save(0)"> <span
|
||||
class="bold">Draft</span></a>
|
||||
onClick="window.location ='amendmentpurchaseorder';">
|
||||
<a class="btn btn-success Save" onclick="Save(0)"> <span
|
||||
class="bold">Save as Draft</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span
|
||||
class="bold">Submit</span></a>
|
||||
|
||||
class="bold">Submit</span></a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- end button -->
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<?php $UpdatedOn = new DateTime($UpdatedOn, new DateTimeZone('Asia/Kolkata'));
|
||||
@ -2390,6 +2486,50 @@ if (!empty($POItem) && $CapitalRange == '1') {
|
||||
</td>
|
||||
</tr>
|
||||
</script> -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.editable-field', function(e) {
|
||||
e.preventDefault();
|
||||
const $link = $(this);
|
||||
const value = $link.text().trim();
|
||||
|
||||
// Hide the <a> tag and show the edit container
|
||||
$link.hide();
|
||||
const $editContainer = $link.siblings('.edit-container');
|
||||
$editContainer.find('.edit-input-field').val(value);
|
||||
$editContainer.show();
|
||||
});
|
||||
|
||||
// Handle click on the tick (save) button
|
||||
$(document).on('click', '.save-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $input = $editContainer.find('.edit-input-field');
|
||||
|
||||
const value = $input.val().trim();
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
const LineItemNoteForAuditor = $link.data('notes');
|
||||
const id = $link.data('id');
|
||||
var theForm = $(".CreatePO");
|
||||
$("#LineItemNoteForAuditor" + id).val(value); // to update the hidden fields
|
||||
$link.text(value).show(); // to update table cell
|
||||
$editContainer.hide();
|
||||
});
|
||||
|
||||
// Handle click on the close (cancel) button
|
||||
$(document).on('click', '.cancel-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
|
||||
// Hide the edit container and show the <a> tag
|
||||
$editContainer.hide();
|
||||
$link.show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var RequistQuantity = '';
|
||||
var AvilBudAmt = '';
|
||||
|
||||
@ -1,3 +1,58 @@
|
||||
<style>
|
||||
.edit-container {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.edit-input-field {
|
||||
padding: 2px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.edit-input-field:focus {
|
||||
outline: none;
|
||||
border-color: #007bff;
|
||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||
}
|
||||
|
||||
.save-btn,
|
||||
.cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
color: #28a745;
|
||||
background-color: #e8f5e9;
|
||||
}
|
||||
|
||||
.save-btn:hover {
|
||||
background-color: #c3e6cb;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
color: #dc3545;
|
||||
background-color: #f8d7da;
|
||||
}
|
||||
|
||||
.cancel-btn:hover {
|
||||
background-color: #f5c6cb;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
$AvlAmount = 0;
|
||||
$ReqType = '';
|
||||
@ -1201,6 +1256,7 @@ if (!empty($RequistionDetails)) {
|
||||
<th style="white-space: nowrap !important; text-align:left !important">SNo</th>
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo $INR ?></th>
|
||||
@ -1225,6 +1281,18 @@ if (!empty($RequistionDetails)) {
|
||||
<td style="text-align:center !important"><?php echo $record->ReqNo ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:left !important;">
|
||||
<a href="#"
|
||||
class="editable-field"
|
||||
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
||||
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
|
||||
</a>
|
||||
<div class="edit-container" style="display:none;">
|
||||
<input type="text" class="edit-input-field" />
|
||||
<button class="save-btn">✔</button>
|
||||
<button class="cancel-btn">✖</button>
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
||||
@ -1334,6 +1402,8 @@ if (!empty($RequistionDetails)) {
|
||||
<input type="hidden" name="<?php echo 'beforeCustomEdCess1' . $index ?>" id="<?php echo 'beforeCustomEdCess1' . $index ?>" value="<?php echo $record->CustomEdCess; ?>" />
|
||||
<input type="hidden" name="<?php echo 'Grossdutypayable1' . $index ?>" id="<?php echo 'Grossdutypayable1' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" />
|
||||
<input type="hidden" name="<?php echo 'beforeGrossdutypayable' . $index ?>" id="<?php echo 'beforeGrossdutypayable' . $index ?>" value="<?php echo $record->Grossdutypayable; ?>" />
|
||||
<input type="hidden" name="<?php echo 'LineItemNoteForAuditor' . $index ?>" id="<?php echo 'LineItemNoteForAuditor' . $index ?>" value="<?php echo $record->LineitemAuditorNotes; ?>" />
|
||||
|
||||
<?php
|
||||
|
||||
// if($PONOStatus == PO_DRAFT)
|
||||
@ -1500,15 +1570,41 @@ if (!empty($RequistionDetails)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start po file changes as per edit page -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($PrePOFile)) {
|
||||
$PrePOFilePath = FCPATH . 'public/uploads/POfiles/' . $PrePOFile;
|
||||
if (file_exists($PrePOFilePath)) { ?>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<!-- <button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete </button> -->
|
||||
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<!-- ends here -->
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" align="right"><br />
|
||||
<div>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
<input type="hidden" name="isEdit" id="isEdit" value="0" />
|
||||
@ -1527,7 +1623,7 @@ if (!empty($RequistionDetails)) {
|
||||
?>
|
||||
<!-- <a class="btn btn-success Save" ID="Save" onclick="Save(0)" > <span class="bold">Save</span></a> -->
|
||||
<a class="btn btn-secondary Save" ID="Cancel" href="<?php echo base_url() . 'amendmentpurchaseorder'; ?>"> <span class="bold">Cancel</span></a>
|
||||
<a class="btn btn-primary" onclick="Save(0)"> <span class="bold">Draft</span></a>
|
||||
<a class="btn btn-success" onclick="Save(0)"> <span class="bold">Save as Draft</span></a>
|
||||
<a class="btn btn-success Submit" ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
<!-- <input type="reset" class="btn btn-success" value="Reset"> -->
|
||||
<?php //}else {
|
||||
@ -1576,7 +1672,50 @@ if (!empty($RequistionDetails)) {
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.editable-field', function(e) {
|
||||
e.preventDefault();
|
||||
const $link = $(this);
|
||||
const value = $link.text().trim();
|
||||
|
||||
// Hide the <a> tag and show the edit container
|
||||
$link.hide();
|
||||
const $editContainer = $link.siblings('.edit-container');
|
||||
$editContainer.find('.edit-input-field').val(value);
|
||||
$editContainer.show();
|
||||
});
|
||||
|
||||
// Handle click on the tick (save) button
|
||||
$(document).on('click', '.save-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $input = $editContainer.find('.edit-input-field');
|
||||
|
||||
const value = $input.val().trim();
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
const LineItemNoteForAuditor = $link.data('notes');
|
||||
const id = $link.data('id');
|
||||
var theForm = $(".CreatePO");
|
||||
$("#LineItemNoteForAuditor" + id).val(value); // to update the hidden fields
|
||||
$link.text(value).show(); // to update table cell
|
||||
$editContainer.hide();
|
||||
});
|
||||
|
||||
// Handle click on the close (cancel) button
|
||||
$(document).on('click', '.cancel-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
|
||||
// Hide the edit container and show the <a> tag
|
||||
$editContainer.hide();
|
||||
$link.show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#Date').click(function() {
|
||||
@ -2905,10 +3044,9 @@ if (!empty($RequistionDetails)) {
|
||||
|
||||
function Save(status) {
|
||||
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
|
||||
|
||||
$('#txtStatus').val(stat);
|
||||
stat = '<?php echo PO_RELEASED; ?>';// refer constant file
|
||||
$('#txtStatus').val(stat); // old flow due to client
|
||||
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
var txtRowCount = $('#txtRowCount').val();
|
||||
|
||||
@ -1,3 +1,58 @@
|
||||
<style>
|
||||
.edit-container {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.edit-input-field {
|
||||
padding: 2px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.edit-input-field:focus {
|
||||
outline: none;
|
||||
border-color: #007bff;
|
||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||
}
|
||||
|
||||
.save-btn,
|
||||
.cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
color: #28a745;
|
||||
background-color: #e8f5e9;
|
||||
}
|
||||
|
||||
.save-btn:hover {
|
||||
background-color: #c3e6cb;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
color: #dc3545;
|
||||
background-color: #f8d7da;
|
||||
}
|
||||
|
||||
.cancel-btn:hover {
|
||||
background-color: #f5c6cb;
|
||||
}
|
||||
</style>
|
||||
<?php $ReqType = '';
|
||||
$CompanyAddress = '';
|
||||
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
|
||||
@ -1225,6 +1280,7 @@ if (!empty($INRSYMBOL)) {
|
||||
<th style="white-space: nowrap !important;">SNo</th>
|
||||
<th class="text-center" style="white-space: nowrap !important;">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important;">Line Item Specs</th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th class="text-right" style="white-space: nowrap !important;">Rate<?php echo "($INRSYM)" ?></th>
|
||||
@ -1249,6 +1305,18 @@ if (!empty($INRSYMBOL)) {
|
||||
<td class="text-center"><?php echo $record->ReqNo ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:left !important;">
|
||||
<a href="#"
|
||||
class="editable-field"
|
||||
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
||||
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
|
||||
</a>
|
||||
<div class="edit-container" style="display:none;">
|
||||
<input type="text" class="edit-input-field" />
|
||||
<button class="save-btn">✔</button>
|
||||
<button class="cancel-btn">✖</button>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td class="text-right"><?php echo $record->Rate ?></td>
|
||||
@ -1419,6 +1487,9 @@ if (!empty($INRSYMBOL)) {
|
||||
<input type="hidden" name="<?php echo 'beforeitemRate' . $index ?>"
|
||||
id="<?php echo 'beforeitemRate' . $index ?>"
|
||||
value="<?php echo $record->Rate; ?>" />
|
||||
<input type="hidden" name="<?php echo 'LineItemNoteForAuditor' . $index ?>"
|
||||
id="<?php echo 'LineItemNoteForAuditor' . $index ?>"
|
||||
value="<?php echo $record->LineitemAuditorNotes; ?>" />
|
||||
|
||||
|
||||
|
||||
@ -1552,18 +1623,44 @@ if (!empty($INRSYMBOL)) {
|
||||
<input type="hidden" name="SpcialInstruction" id="SpcialInstruction" value=" ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Start po file changes as per edit page -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12"><br />
|
||||
<div>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<div class="form-group col-md-12">
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($PrePOFile)) {
|
||||
$PrePOFilePath = FCPATH . 'public/uploads/POfiles/' . $PrePOFile;
|
||||
if (file_exists($PrePOFilePath)) { ?>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously
|
||||
uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
<?php } ?>
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile"
|
||||
value="<?php echo $PrePOFile; ?>" /><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<!-- ends here -->
|
||||
|
||||
<!-- for Button -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" align="right"><br />
|
||||
<div class="btn-container" style="text-align: right;">
|
||||
|
||||
<input type="hidden" name="txtPoRange" id="txtPoRange" />
|
||||
@ -1577,16 +1674,17 @@ if (!empty($INRSYMBOL)) {
|
||||
<input type="button" class="btn btn-secondary" value="Cancel"
|
||||
onClick="window.location ='amendmentpurchaseorder';">
|
||||
<a class="btn btn-primary Save" onclick="Save(0)"> <span
|
||||
class="bold">Draft</span></a>
|
||||
class="bold">Save as Draft</span></a>
|
||||
<a class="btn btn-success Save" ID="Submit" onclick="Save(1)"> <span
|
||||
class="bold">Approve</span></a>
|
||||
|
||||
<!-- <input type="reset" class="btn btn-success" value = "OK"> -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ends button -->
|
||||
|
||||
<!-- for Status details -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
|
||||
@ -1615,6 +1713,7 @@ if (!empty($INRSYMBOL)) {
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ends Status -->
|
||||
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
@ -2170,6 +2269,50 @@ if (!empty($INRSYMBOL)) {
|
||||
</td>
|
||||
</tr>
|
||||
</script> -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.editable-field', function(e) {
|
||||
e.preventDefault();
|
||||
const $link = $(this);
|
||||
const value = $link.text().trim();
|
||||
|
||||
// Hide the <a> tag and show the edit container
|
||||
$link.hide();
|
||||
const $editContainer = $link.siblings('.edit-container');
|
||||
$editContainer.find('.edit-input-field').val(value);
|
||||
$editContainer.show();
|
||||
});
|
||||
|
||||
// Handle click on the tick (save) button
|
||||
$(document).on('click', '.save-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $input = $editContainer.find('.edit-input-field');
|
||||
|
||||
const value = $input.val().trim();
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
const LineItemNoteForAuditor = $link.data('notes');
|
||||
const id = $link.data('id');
|
||||
var theForm = $(".CreatePO");
|
||||
$("#LineItemNoteForAuditor" + id).val(value); // to update the hidden fields
|
||||
$link.text(value).show(); // to update table cell
|
||||
$editContainer.hide();
|
||||
});
|
||||
|
||||
// Handle click on the close (cancel) button
|
||||
$(document).on('click', '.cancel-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
|
||||
// Hide the edit container and show the <a> tag
|
||||
$editContainer.hide();
|
||||
$link.show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var tempUserId = 0;
|
||||
@ -2535,11 +2678,11 @@ if (!empty($INRSYMBOL)) {
|
||||
|
||||
|
||||
//alert('Inside else');
|
||||
stat = '<?php echo PO_RELEASED; ?>';
|
||||
stat = '<?php echo PO_RELEASED; ?>'; // refer constant file
|
||||
|
||||
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#txtStatus').val(stat);
|
||||
$('#txtStatus').val(stat); //old status not use
|
||||
tinyMCE.triggerSave();
|
||||
var splinstr = $('#txtSpcialInstruction').val();
|
||||
$('#SpcialInstruction').val(splinstr);
|
||||
|
||||
@ -1,3 +1,58 @@
|
||||
<style>
|
||||
.edit-container {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.edit-input-field {
|
||||
padding: 2px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.edit-input-field:focus {
|
||||
outline: none;
|
||||
border-color: #007bff;
|
||||
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
|
||||
}
|
||||
|
||||
.save-btn,
|
||||
.cancel-btn {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 50%;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
color: #28a745;
|
||||
background-color: #e8f5e9;
|
||||
}
|
||||
|
||||
.save-btn:hover {
|
||||
background-color: #c3e6cb;
|
||||
}
|
||||
|
||||
.cancel-btn {
|
||||
color: #dc3545;
|
||||
background-color: #f8d7da;
|
||||
}
|
||||
|
||||
.cancel-btn:hover {
|
||||
background-color: #f5c6cb;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
$insuranceStatus = array(
|
||||
array("name" => "NO", "value" => "0"),
|
||||
@ -1038,6 +1093,7 @@ foreach ($PaymentTerms as $TER) {
|
||||
<th style="white-space: nowrap !important; text-align:center !important">Requisition No</th>
|
||||
<th style="white-space: nowrap !important;">Item Code</th>
|
||||
<th style="white-space: nowrap !important;">Item Description</th>
|
||||
<th style="white-space: nowrap !important; text-align:left !important">Line Item Specs</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Quantity</th>
|
||||
<th style="white-space: nowrap !important;">UOM</th>
|
||||
<th style="white-space: nowrap !important; text-align:right !important">Rate<?php echo "($INRSYM)" ?></th>
|
||||
@ -1077,6 +1133,18 @@ foreach ($PaymentTerms as $TER) {
|
||||
<td><?php echo $record->MaterialCode ?></td>
|
||||
<td><?php $shortName = mb_strimwidth($record->MaterialName, 0, 13, "...");
|
||||
echo $shortName; ?></td>
|
||||
<td style="text-align:left !important;">
|
||||
<a href="#"
|
||||
class="editable-field"
|
||||
data-id="<?php echo $index ?>" data-notes="<?php echo $record->LineitemAuditorNotes; ?>">
|
||||
<?php echo !empty($record->LineitemAuditorNotes) ? $record->LineitemAuditorNotes : "-"; ?>
|
||||
</a>
|
||||
<div class="edit-container" style="display:none;">
|
||||
<input type="text" class="edit-input-field" />
|
||||
<button class="save-btn">✔</button>
|
||||
<button class="cancel-btn">✖</button>
|
||||
</div>
|
||||
</td>
|
||||
<td style="text-align:right !important"><?php echo $record->Quantity ?></td>
|
||||
<td><?php echo $record->UOM ?></td>
|
||||
<td style="text-align:right !important"><?php echo $record->Rate ?></td>
|
||||
@ -1155,6 +1223,8 @@ foreach ($PaymentTerms as $TER) {
|
||||
|
||||
<input type="hidden" name="<?php echo 'OtherServiceDescription' . $index ?>" id="<?php echo 'OtherServiceDescription' . $index ?>" value="<?php echo $record->MaterialDescription; ?>" />
|
||||
|
||||
<input type="hidden" name="<?php echo 'LineItemNoteForAuditor' . $index ?>" id="<?php echo 'LineItemNoteForAuditor' . $index ?>" value="<?php echo $record->LineitemAuditorNotes; ?>" />
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
@ -1277,17 +1347,44 @@ foreach ($PaymentTerms as $TER) {
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<!-- <label>Purchase Order File</label> -->
|
||||
|
||||
<!-- Start po file changes as per edit page -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label>Select Purchase Order File</label><br>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($PrePOFile)) {
|
||||
$PrePOFilePath = FCPATH . 'public/uploads/POfiles/' . $PrePOFile;
|
||||
if (file_exists($PrePOFilePath)) { ?>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" id="deletePreviousPurchaseOrderFileDiv" align="left">
|
||||
<br />
|
||||
|
||||
<label><a title="previously uploaded PO File"
|
||||
href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>">
|
||||
<span>previously uploaded purchase order file- </span>
|
||||
<small><?= $PrePOFile; ?></small></a></label>
|
||||
|
||||
<button class="btn btn-danger btn-sm " id="deletePreviousPurchaseOrderFile">Delete</button>
|
||||
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<!-- ends here -->
|
||||
|
||||
<!-- for Button -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12" align="right"><br>
|
||||
<div>
|
||||
<input type="file" name="POFile" id="POFile">
|
||||
<?php if ($PrePOFile) { ?>
|
||||
<label><a title="previously uploaded PO File" href="<?php echo base_url() . 'public/uploads/POfiles/' . $PrePOFile ?>"><span>previously uploaded - </span><small><?= $PrePOFile; ?></small></a></label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="btn-container" style="text-align: right;">
|
||||
<input type="hidden" id="PrePOFile" name="PrePOFile" value="<?php echo $PrePOFile; ?>" /><br>
|
||||
|
||||
<input type="hidden" name="txtPONO" id="txtPONO" value="<?php echo $PONO; ?>" />
|
||||
<input type="hidden" name="txtStatus" id="txtStatus" />
|
||||
@ -1295,14 +1392,15 @@ foreach ($PaymentTerms as $TER) {
|
||||
|
||||
|
||||
<input class="btn btn-secondary" type="button" class="btn btn-success mr-2 " value="Cancel" onClick="window.location ='amendmentpurchaseorder';">
|
||||
<a class="btn btn-primary Save" onclick="Save(0)" > <span class="bold">Draft</span></a>
|
||||
<a class="btn btn-primary Save" onclick="Save(0)" > <span class="bold">Save as Draft</span></a>
|
||||
<a class="btn btn-success Save " ID="Submit" onclick="Save(1)"> <span class="bold">Submit</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ends Button -->
|
||||
<br>
|
||||
<div class="row">
|
||||
<!-- for Start -->
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<?php $Reqon = new DateTime($Reqon, new DateTimeZone('Asia/Kolkata'));
|
||||
@ -1332,7 +1430,7 @@ foreach ($PaymentTerms as $TER) {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ends Button -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -1677,7 +1775,50 @@ foreach ($PaymentTerms as $TER) {
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.editable-field', function(e) {
|
||||
e.preventDefault();
|
||||
const $link = $(this);
|
||||
const value = $link.text().trim();
|
||||
|
||||
// Hide the <a> tag and show the edit container
|
||||
$link.hide();
|
||||
const $editContainer = $link.siblings('.edit-container');
|
||||
$editContainer.find('.edit-input-field').val(value);
|
||||
$editContainer.show();
|
||||
});
|
||||
|
||||
// Handle click on the tick (save) button
|
||||
$(document).on('click', '.save-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $input = $editContainer.find('.edit-input-field');
|
||||
|
||||
const value = $input.val().trim();
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
const LineItemNoteForAuditor = $link.data('notes');
|
||||
const id = $link.data('id');
|
||||
var theForm = $(".CreatePO");
|
||||
$("#LineItemNoteForAuditor" + id).val(value); // to update the hidden fields
|
||||
$link.text(value).show(); // to update table cell
|
||||
$editContainer.hide();
|
||||
});
|
||||
|
||||
// Handle click on the close (cancel) button
|
||||
$(document).on('click', '.cancel-btn', function(e) {
|
||||
e.preventDefault();
|
||||
const $btn = $(this);
|
||||
const $editContainer = $btn.closest('.edit-container');
|
||||
const $link = $editContainer.siblings('.editable-field');
|
||||
|
||||
// Hide the edit container and show the <a> tag
|
||||
$editContainer.hide();
|
||||
$link.show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- <script type="text/html" id="ServiceList">
|
||||
<tr id="<%=index%>">
|
||||
<td align="left"><%=index%></td>
|
||||
@ -2199,13 +2340,13 @@ foreach ($PaymentTerms as $TER) {
|
||||
</script>
|
||||
<script>
|
||||
function Save(status) {
|
||||
stat = '<?php echo PO_CREATED; ?>';
|
||||
// stat = '<?php echo PO_RELEASED; ?>';
|
||||
|
||||
stat = '<?php echo PO_RELEASED; ?>'; // refer constant file
|
||||
tinyMCE.triggerSave();
|
||||
|
||||
var splinstr = $('#ScopeofWork').val();
|
||||
var deladd = $('#DeliveryAddr').val();
|
||||
$('#txtStatus').val(stat);
|
||||
$('#txtStatus').val(stat);// old flow due to client
|
||||
|
||||
|
||||
//$('#SpcialInstruction').val(splinstr);
|
||||
@ -2238,7 +2379,6 @@ foreach ($PaymentTerms as $TER) {
|
||||
if (status == 1) { // for approve
|
||||
formData.append('changeStatus','ST026');
|
||||
};
|
||||
disableButtons();
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
// data: $('.ServicePO').serialize(),
|
||||
|
||||
@ -766,7 +766,7 @@
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-hr">
|
||||
<a href="<?php echo base_url(); ?>employeeListing" class="dropdown-item"><i class="ri-shield-user-line align-middle mr-1"></i> Employee Details</a>
|
||||
<!-- <a href="<?php echo base_url(); ?>DriverListing" class="dropdown-item"><i class="ri-file-settings-line align-middle mr-1"></i> Driver Details</a> -->
|
||||
<a href="<?php echo base_url(); ?>DriverListing" class="dropdown-item"><i class="ri-file-settings-line align-middle mr-1"></i> Driver Load Details</a>
|
||||
<a href="<?php echo base_url(); ?>attendance" class="dropdown-item"><i class=" ri-time-line align-middle mr-1"></i> Attendance</a>
|
||||
|
||||
<div class="dropdown">
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
|
||||
<label class="col-form-label">Vechicle Number</label>
|
||||
<label class="col-form-label">Vehicle Number</label>
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo', 'value' => set_value('VehicleNo'), 'id' => 'VehicleNo', 'class' => 'form-control', 'maxlength' => '20', 'autocomplete' => 'off');
|
||||
echo form_input($data);
|
||||
|
||||
@ -392,8 +392,8 @@
|
||||
<td style="max-width:80px;text-align:right;"> <?php echo $over_time[$i]; ?> </td>
|
||||
|
||||
<td id="monthDue<?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"
|
||||
<?php if ($record->is_payslip_generated == 0) { echo "contenteditable='true';"; } ?>
|
||||
<?php if ($record->is_payslip_generated == 1) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||
|
||||
@ -407,10 +407,10 @@
|
||||
|
||||
|
||||
<td id="otherDet<?php echo $index ?>" onkeypress="return isNumber(event);" onkeyup="changeInput(event);"
|
||||
<?php if (empty($record->Key)) {
|
||||
<?php if ($record->is_payslip_generated == 0) {
|
||||
echo "contenteditable='true';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
<?php if ($record->is_payslip_generated == 1) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||
|
||||
@ -426,10 +426,10 @@
|
||||
|
||||
<td id="Festival<?php echo $index ?>" onkeypress="return isNumber(event);"
|
||||
onkeyup="changeInput(event);"
|
||||
<?php if (empty($record->Key)) {
|
||||
<?php if ($record->is_payslip_generated == 0) {
|
||||
echo "contenteditable='true';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
<?php if ($record->is_payslip_generated == 1) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;"
|
||||
<?php } else { ?>style="text-align:right;" <?php } ?>>
|
||||
<?php if (!empty($record->Festival_Bonus)) {
|
||||
@ -443,10 +443,10 @@
|
||||
<?php $totalfestival[] = isset($Festival_Bonus) ? $Festival_Bonus : []; ?>
|
||||
|
||||
<td id="empsal<?php echo $index ?>"
|
||||
<?php if (empty($record->Key)) {
|
||||
<?php if ($record->is_payslip_generated == 1) {
|
||||
echo "contenteditable='false';";
|
||||
} ?>
|
||||
<?php if (!empty($record->Key)) { ?> title="Payslip Calculated"
|
||||
<?php if ($record->is_payslip_generated == 1) { ?> title="Payslip Calculated"
|
||||
style="text-align:right;color:blue;" <?php }else{ ?>style="text-align:right;" <?php } ?>>
|
||||
<?php if (!empty($record->Estimate)) {
|
||||
echo $record->Estimate;
|
||||
|
||||
@ -112,6 +112,7 @@ $monthsoptions = array("01" => "Jan", "02" => "Feb", "03" => "Mar", "04" => "Apr
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>"+result['path'],
|
||||
success: function(result) {
|
||||
console.log(result);
|
||||
$('form#PayslipGenerator').submit();
|
||||
$('#loader').hide();
|
||||
alert("Salary Calculated Successfully..!");
|
||||
|
||||
@ -165,16 +165,22 @@
|
||||
$purchaseorderDate = (!empty($POItem) && !empty($POItem[0]->PODate)) ? new DateTime($POItem[0]->PODate, new DateTimeZone('Asia/Kolkata')) : "";
|
||||
$poDate = $purchaseorderDate ? $purchaseorderDate->format('d-m-Y') : "-";
|
||||
$IsOpenOrder = (!empty($POItem) && !empty($POItem[0]->IsOpenOrder)) ? $POItem[0]->IsOpenOrder : "";
|
||||
$DeliveryDate = "";
|
||||
$DeliverySchedule = "";
|
||||
if (!empty($POItem) && !empty($POItem[0]->DeliveryOption)) {
|
||||
$DlvSch = "";
|
||||
|
||||
if ($POItem[0]->DeliveryOption == 1) {
|
||||
$DeliverySchedule = $POItem[0]->DeliverySchedule;
|
||||
} else if ($POItem[0]->DeliveryOption == 0 && !empty($POItem[0]->DeliveryDate)) {
|
||||
$DlvSch = $POItem[0]->DeliverySchedule;
|
||||
}
|
||||
|
||||
if ($POItem[0]->DeliveryOption == 0 && !empty($POItem[0]->DeliveryDate)) {
|
||||
$dtDe = new DateTime($POItem[0]->DeliveryDate, new DateTimeZone('Asia/Kolkata'));
|
||||
$DeliveryDate = $dtDe ? $dtDe->format('d-m-Y') : "";
|
||||
$DlvSch = $dtDe ? $dtDe->format('d-m-Y') : "";
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($dispatch)){
|
||||
$DlvSch = $dispatch; // for import means.
|
||||
}
|
||||
|
||||
|
||||
$RequistionNo = (!empty($RequistionDetails) && !empty($RequistionDetails[0]['RequistionNo'])) ? $RequistionDetails[0]['RequistionNo'] : "-";
|
||||
$ReqDate = (!empty($RequistionDetails) && !empty($RequistionDetails[0]['ReqDate'])) ? $RequistionDetails[0]['ReqDate'] : "";
|
||||
// $RequestedDept = (!empty($RequistionDetails) && !empty($RequistionDetails[0]['RequestedDept'])) ? $RequistionDetails[0]['RequestedDept'] : "-";
|
||||
@ -371,7 +377,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:0em;"><?php echo trans('Delivery/Schedule By'); ?></td>
|
||||
<td style="border:0em;"><?php echo (empty($DeliveryDate) && empty($DeliverySchedule) && empty($dispatch)) ? ': -' : ': ' . $DeliveryDate . $DeliverySchedule . $dispatch; ?></td>
|
||||
<td style="border:0em;"><?php echo ': ' .$DlvSch; ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
@ -338,16 +338,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body" style="margin-top: 23px;">
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()" id="day">
|
||||
Add New File
|
||||
</button>
|
||||
</div>
|
||||
<div id="filesContainer">
|
||||
<!-- Rows will be dynamically appended here -->
|
||||
</div>
|
||||
|
||||
<?php if (isset($invoice_data)) {
|
||||
<?php if (isset($invoice_data)) {
|
||||
foreach ($invoice_data as $key => $value) { ?>
|
||||
|
||||
<div class="row pad ">
|
||||
@ -372,6 +363,16 @@
|
||||
|
||||
<?php }
|
||||
} ?>
|
||||
<div class="col-md-4">
|
||||
<button type="button" class="btn btn-primary btn-sm a1" onclick="appendFilesFileds()" id="day">
|
||||
Add New File
|
||||
</button>
|
||||
</div>
|
||||
<div id="filesContainer">
|
||||
<!-- Rows will be dynamically appended here -->
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
@ -631,19 +632,36 @@ $(document).ready(function () {
|
||||
var invoiceId = $('#invoice_id_set').val();
|
||||
formData.append('invoice_id', invoiceId);
|
||||
|
||||
var hasFiles = false;
|
||||
// Append files
|
||||
$('input[name="emp_file[]"]').each(function(index, input) {
|
||||
var files = $(input)[0].files;
|
||||
if (files.length > 0) {
|
||||
formData.append('emp_file[]', files[0]);
|
||||
hasFiles = true; // At least one file is selected
|
||||
}
|
||||
});
|
||||
if (!hasFiles) {
|
||||
alert('Please select file.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var hasFileName = true;
|
||||
// Append other fields
|
||||
$('input[name="file_name[]"]').each(function(index, input) {
|
||||
var fileName = $(input).val().trim();
|
||||
if (!fileName) {
|
||||
hasFileName = false;
|
||||
}
|
||||
formData.append('file_name[]', $(input).val());
|
||||
});
|
||||
|
||||
if (!hasFileName) {
|
||||
alert('Please enter a file name for selected files.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user