Driver + amendment + igr spelling mistake + service unwanted rray : ps
This commit is contained in:
parent
9576b3375c
commit
8ddc3fc3f8
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user