Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
1acde857df
@ -346,9 +346,12 @@ class Assetdetails extends BaseController
|
||||
function checkAssetName(){
|
||||
|
||||
$data = $this->request->getPost();
|
||||
|
||||
$assetId = $data['assetId']??'';
|
||||
$assetName = str_replace(" ","",$data['assetName']) ;
|
||||
|
||||
$result = $this->assetdetails_model->checkAssetName($assetId,$assetName);
|
||||
|
||||
return $this->response->setJSON($result);
|
||||
|
||||
}
|
||||
|
||||
@ -140,6 +140,8 @@ class CostCenter extends BaseController
|
||||
$CostCenterId = $data['CostCenterId'];
|
||||
$CostCenterName = $data['CostCenterName'];
|
||||
|
||||
$CostCenterName = str_replace(' ', '', $CostCenterName);
|
||||
|
||||
$result = $this->costcenter_model->checkCostCenter( $CostCenterId,$CostCenterName);
|
||||
|
||||
return $this->response->setJSON($result);
|
||||
|
||||
@ -251,9 +251,18 @@ class Department extends BaseController
|
||||
|
||||
$data = $this->request->getPost();
|
||||
$departmentName = str_replace(" ","",$data['departmentName']);
|
||||
$depCode =$data['depCode'];
|
||||
|
||||
$depCode = $data['depCode'];
|
||||
|
||||
$headDepCode =$data['headDepCode'];
|
||||
|
||||
$departmentName = $data['departmentName'];
|
||||
$result = $this->department_model->checkDepartmentName($depCode,$departmentName);
|
||||
|
||||
$departmentName = str_replace(" ","",$departmentName);
|
||||
|
||||
$result = $this->department_model->checkDepartmentName($departmentName , $headDepCode , $depCode);
|
||||
|
||||
|
||||
return $this->response->setJSON($result);
|
||||
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ class Rawmaterialdetails extends BaseController
|
||||
function addNewRawMaterial()
|
||||
{
|
||||
|
||||
//echo "HI";die();
|
||||
|
||||
$TempArr = [];
|
||||
|
||||
$MaterialName = $this->request->getPost('MaterialName');
|
||||
@ -251,7 +251,7 @@ class Rawmaterialdetails extends BaseController
|
||||
|
||||
|
||||
$RawMaterial = array('MaterialName' => $MaterialName, 'MaterialType' => $MaterialType, 'UOM' => $UOM, 'Category' => $MaterialCategory, 'CreatedBy' => $CreatedBy, 'Remarks' => $Remarks, 'HSNCODE' => $HSNcode, 'stock' => $stock, 'stockdate' => $stockdate, 'reorder' => $reorder, 'Current_stock' => $currentstock);
|
||||
//print_r($RawMaterial);die();
|
||||
//print_r($RawMaterial);die();
|
||||
$result = $this->rawmaterialdetails_model->addNewRawMaterial($RawMaterial);
|
||||
|
||||
if ($result > 0) {
|
||||
|
||||
@ -478,6 +478,7 @@ class Supplier extends BaseController
|
||||
$data = $this->request->getPost();
|
||||
$transporterId = $data['transporterid']??'';
|
||||
$transporterName = $data['transportername'];
|
||||
$transporterName = str_replace(' ', '', $transporterName);
|
||||
$message = $this->supplier_model->checkTransporter($transporterId,$transporterName);
|
||||
|
||||
return $this->response->setJSON($message);
|
||||
|
||||
@ -278,7 +278,7 @@ class Assetdetails_model extends Model
|
||||
$builder = $builder->where('AssetCode !=', $assetId);
|
||||
}
|
||||
|
||||
$builder = $builder->where('REPLACE(AssetName , " ", "") ',$assetName);
|
||||
$builder = $builder->where('REPLACE(AssetName, " ", "")',$assetName);
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
|
||||
@ -429,18 +429,18 @@ where Dept.DEPCode not in
|
||||
return "Cost center $CostCenterCode deactivated successfully.";
|
||||
}
|
||||
|
||||
function checkCostCenter($CostCenterId,$CostCenterName){
|
||||
function checkCostCenter($CostCenterId,$CostCenterName){
|
||||
$builder = $this->db->table('t_costcenter_master')
|
||||
->select('CostCenterName,IsActive');
|
||||
|
||||
if(!empty($CostCenterId)){
|
||||
$builder = $builder -> where('id !=' ,$CostCenterId);
|
||||
}
|
||||
$builder = $builder->where('REPLACE(CostCenterName , " ", "") ',$CostCenterName);
|
||||
$builder = $builder->where('REPLACE(CostCenterName," ", "")',$CostCenterName);
|
||||
$query = $builder->get();
|
||||
|
||||
return $query->getResult();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
@ -10,38 +11,38 @@ class Department_model extends Model
|
||||
* @param string $searchText : This is optional search text
|
||||
* @return number $count : This is row count
|
||||
*/
|
||||
// function departmentListingCount($searchText = '')
|
||||
// {
|
||||
// ->select('BaseT.DepartmentID, BaseT.SupplierName, BaseT.Address, BaseT.ContactNumber, BaseT.AlternateContactNumber,BaseT.EmailAddress,BaseT.Exiseregistration,BaseT.TIN,BaseT.PAN,BaseT.GSTNO,BaseT.GSTRange,BaseT.CollectrateAddress,BaseT.UANumber,BaseT.PaymentTerms,BaseT.PaymentDays,BaseT.PayableAT');
|
||||
// $builder = $this->db->table('t_departmentdetails as BaseT');
|
||||
// //->join('tbl_users as users', 'users.userId = BaseT.userId','left');
|
||||
// //->join('T_SupplierDetails as ID', 'ID.DepartmentID = BaseT.DepartmentID','left');
|
||||
// if(!empty($searchText)) {
|
||||
// $likeCriteria = "(BaseT.DepartmentID LIKE '%".$searchText."%'
|
||||
// OR BaseT.SupplierName LIKE '%".$searchText."%'
|
||||
// OR BaseT.Address LIKE '%".$searchText."%'
|
||||
// OR BaseT.ContactNumber LIKE '%".$searchText."%'
|
||||
// OR BaseT.AlternateContactNumber LIKE '%".$searchText."%'
|
||||
// OR BaseT.EmailAddress LIKE '%".$searchText."%'
|
||||
// OR BaseT.Exiseregistration LIKE '%".$searchText."%'
|
||||
// OR BaseT.TIN LIKE '%".$searchText."%'
|
||||
// OR BaseT.PAN LIKE '%".$searchText."%'
|
||||
// OR BaseT.GSTNO LIKE '%".$searchText."%'
|
||||
// OR BaseT.GSTRange LIKE '%".$searchText."%'
|
||||
// OR BaseT.CollectrateAddress LIKE '%".$searchText."%'
|
||||
// OR BaseT.UANumber LIKE '%".$searchText."%'
|
||||
// OR BaseT.PaymentTerms LIKE '%".$searchText."%'
|
||||
// OR BaseT.PaymentDays LIKE '%".$searchText."%'
|
||||
// OR BaseT.PayableAT LIKE '%".$searchText."%')";
|
||||
// $this->db->where($likeCriteria);
|
||||
// }
|
||||
// //$this->db->where('BaseT.isDeleted', 0);
|
||||
// //$this->db->where('BaseT.userId !=', 1);
|
||||
// $query =$builder->get();
|
||||
|
||||
// return count($query-getResult());
|
||||
// }
|
||||
/**
|
||||
// function departmentListingCount($searchText = '')
|
||||
// {
|
||||
// ->select('BaseT.DepartmentID, BaseT.SupplierName, BaseT.Address, BaseT.ContactNumber, BaseT.AlternateContactNumber,BaseT.EmailAddress,BaseT.Exiseregistration,BaseT.TIN,BaseT.PAN,BaseT.GSTNO,BaseT.GSTRange,BaseT.CollectrateAddress,BaseT.UANumber,BaseT.PaymentTerms,BaseT.PaymentDays,BaseT.PayableAT');
|
||||
// $builder = $this->db->table('t_departmentdetails as BaseT');
|
||||
// //->join('tbl_users as users', 'users.userId = BaseT.userId','left');
|
||||
// //->join('T_SupplierDetails as ID', 'ID.DepartmentID = BaseT.DepartmentID','left');
|
||||
// if(!empty($searchText)) {
|
||||
// $likeCriteria = "(BaseT.DepartmentID LIKE '%".$searchText."%'
|
||||
// OR BaseT.SupplierName LIKE '%".$searchText."%'
|
||||
// OR BaseT.Address LIKE '%".$searchText."%'
|
||||
// OR BaseT.ContactNumber LIKE '%".$searchText."%'
|
||||
// OR BaseT.AlternateContactNumber LIKE '%".$searchText."%'
|
||||
// OR BaseT.EmailAddress LIKE '%".$searchText."%'
|
||||
// OR BaseT.Exiseregistration LIKE '%".$searchText."%'
|
||||
// OR BaseT.TIN LIKE '%".$searchText."%'
|
||||
// OR BaseT.PAN LIKE '%".$searchText."%'
|
||||
// OR BaseT.GSTNO LIKE '%".$searchText."%'
|
||||
// OR BaseT.GSTRange LIKE '%".$searchText."%'
|
||||
// OR BaseT.CollectrateAddress LIKE '%".$searchText."%'
|
||||
// OR BaseT.UANumber LIKE '%".$searchText."%'
|
||||
// OR BaseT.PaymentTerms LIKE '%".$searchText."%'
|
||||
// OR BaseT.PaymentDays LIKE '%".$searchText."%'
|
||||
// OR BaseT.PayableAT LIKE '%".$searchText."%')";
|
||||
// $this->db->where($likeCriteria);
|
||||
// }
|
||||
// //$this->db->where('BaseT.isDeleted', 0);
|
||||
// //$this->db->where('BaseT.userId !=', 1);
|
||||
// $query =$builder->get();
|
||||
|
||||
// return count($query-getResult());
|
||||
// }
|
||||
/**
|
||||
* This function is used to get the user listing count
|
||||
* @param string $searchText : This is optional search text
|
||||
* @param number $page : This is pagination offset
|
||||
@ -51,13 +52,13 @@ class Department_model extends Model
|
||||
function departmentListing()
|
||||
{
|
||||
$builder = $this->db->table('t_departmentdetails as BaseT')
|
||||
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
||||
->orderBy("BaseT.DEPCode", "desc");
|
||||
$query =$builder->get();
|
||||
$result = $query->getResult();
|
||||
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
||||
->orderBy("BaseT.DEPCode", "desc");
|
||||
$query = $builder->get();
|
||||
$result = $query->getResult();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
// function ($searchText = '')
|
||||
// {
|
||||
// if(!empty($searchText)) {
|
||||
@ -71,99 +72,141 @@ class Department_model extends Model
|
||||
// //$this->db->where('BaseT.userId !=', 1);
|
||||
// // $this->db->limit($page, $segment);
|
||||
// $query =$builder->get();
|
||||
|
||||
|
||||
// $result = $query->getResult();
|
||||
// return $result;
|
||||
// }
|
||||
/**
|
||||
* This function used to get user information by id
|
||||
* @param number $userId : This is user id
|
||||
* @return array $result : This is user information
|
||||
*/
|
||||
|
||||
function savedepartment($department)
|
||||
{
|
||||
|
||||
$builder = $this->db->table('t_departmentdetails');
|
||||
$builder->insert($department);
|
||||
|
||||
$SID = $this->db->affectedRows();
|
||||
|
||||
return $SID;
|
||||
|
||||
}
|
||||
|
||||
function getdepcode()
|
||||
{
|
||||
//$limit = 12;
|
||||
$builder = $this->db->table('t_departmentdetails')
|
||||
->distinct()
|
||||
->select('DEPCode, DepartmentName')
|
||||
->where('IsActive =', 1);
|
||||
//$this->db->limit($limit);
|
||||
$query =$builder->get();
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function used to get user information by id
|
||||
* @param number $userId : This is user id
|
||||
* @return array $result : This is user information
|
||||
*/
|
||||
function getDeptInfo($DEPCode='')
|
||||
|
||||
function savedepartment($department)
|
||||
{
|
||||
|
||||
$builder = $this->db->table('t_departmentdetails');
|
||||
$builder->insert($department);
|
||||
|
||||
$SID = $this->db->affectedRows();
|
||||
|
||||
return $SID;
|
||||
}
|
||||
|
||||
function getdepcode()
|
||||
{
|
||||
//$limit = 12;
|
||||
$builder = $this->db->table('t_departmentdetails')
|
||||
->select('*')
|
||||
->where('DEPCode', $DEPCode);
|
||||
$query =$builder->get();
|
||||
|
||||
->distinct()
|
||||
->select('DEPCode, DepartmentName')
|
||||
->where('IsActive =', 1);
|
||||
//$this->db->limit($limit);
|
||||
$query = $builder->get();
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
/* This function to get the Supplier Address on respective Supplier ID */
|
||||
|
||||
function Updatedepartment($department, $DEPCode)
|
||||
|
||||
/**
|
||||
* This function used to get user information by id
|
||||
* @param number $userId : This is user id
|
||||
* @return array $result : This is user information
|
||||
*/
|
||||
function getDeptInfo($DEPCode = '')
|
||||
{
|
||||
$builder = $this->db->table('t_departmentdetails')
|
||||
->select('*')
|
||||
->where('DEPCode', $DEPCode);
|
||||
$query = $builder->get();
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
/* This function to get the Supplier Address on respective Supplier ID */
|
||||
|
||||
function Updatedepartment($department, $DEPCode)
|
||||
{
|
||||
$this->db->table('t_departmentdetails')
|
||||
->where('DEPCode', $DEPCode)
|
||||
->update($department);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
|
||||
->where('DEPCode', $DEPCode)
|
||||
->update($department);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
}
|
||||
|
||||
function reActivateDepartment($depCode , $updateInfo){
|
||||
function reActivateDepartment($depCode, $updateInfo)
|
||||
{
|
||||
$this->db->table('t_departmentdetails')
|
||||
->where('DEPCode', $depCode)
|
||||
->update($updateInfo);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
->where('DEPCode', $depCode)
|
||||
->update($updateInfo);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
function deleteDepartment($depCode , $updateInfo){
|
||||
function deleteDepartment($depCode, $updateInfo)
|
||||
{
|
||||
$this->db->table('t_departmentdetails')
|
||||
->where('DEPCode', $depCode)
|
||||
->update($updateInfo);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
->where('DEPCode', $depCode)
|
||||
->update($updateInfo);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
function checkDepartmentName($depCode ,$departmentName){
|
||||
$builder = $this->db->table('t_departmentdetails');
|
||||
function checkDepartmentName($departmentName, $headDepCode, $depCode)
|
||||
{
|
||||
|
||||
if(!empty($depCode)){
|
||||
$builder = $builder -> where(' DEPCode !=', $depCode);
|
||||
}
|
||||
$builder = $this->db->table('t_departmentdetails');
|
||||
|
||||
$builder = $builder->where('REPLACE(DepartmentName , " ", "") ',$departmentName);
|
||||
$query = $builder->get();
|
||||
$result =$query->getResultArray();
|
||||
return $result;
|
||||
//post
|
||||
if(empty($depCode)) {
|
||||
$builder = $builder->where(' HeadDept =', $headDepCode);
|
||||
}
|
||||
|
||||
//put
|
||||
if(!empty($depCode)){
|
||||
|
||||
//allowing current department name to be changed
|
||||
//but not other department to get same name
|
||||
|
||||
$builder = $builder->where(' DEPCode !=', $depCode);
|
||||
$builder = $builder->where(' HeadDept =', $headDepCode);
|
||||
}
|
||||
|
||||
$builder = $builder->where('REPLACE(DepartmentName , " ", "") ', $departmentName);
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -323,6 +323,7 @@ class Rawmaterialdetails_model extends Model
|
||||
$builder->where('REPLACE(MaterialName, " ", "")' , $materialName);
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
if ($query->getNumRows() > 0) {
|
||||
return $query->getResultArray();
|
||||
} else {
|
||||
|
||||
@ -1,9 +1,22 @@
|
||||
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.batch-card-table th,
|
||||
.batch-card-table td {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.batch-card-table-cell-space {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fht-table,
|
||||
.fht-table thead,
|
||||
.fht-table tfoot,
|
||||
@ -30,7 +43,7 @@
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||||
white-space:nowrap;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fht-table th,
|
||||
@ -164,7 +177,6 @@
|
||||
border-right: 2px solid #ddd;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="content-page">
|
||||
@ -186,10 +198,17 @@
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-success" data-target="#coatingMachineDetailModal"
|
||||
data-toggle="modal">
|
||||
Add New Record
|
||||
</button>
|
||||
<div>
|
||||
<button type="button" class="btn btn-danger" data-target="#productionBatchCardDetailModalId"
|
||||
data-toggle="modal">
|
||||
Add Production Batch Card
|
||||
</button>
|
||||
<button type="button" class="btn btn-success" data-target="#coatingMachineDetailModal"
|
||||
data-toggle="modal">
|
||||
Add Shift Record
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -209,27 +228,27 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<form method='post' action="<?= base_url('/coatingMachineDetails');?>">
|
||||
<form method='post' action="<?= base_url('/coatingMachineDetails'); ?>">
|
||||
<div class="card-body">
|
||||
|
||||
<div class=form-row>
|
||||
<div class="form-group col-md-2 mt-2 ">
|
||||
<div class=form-row>
|
||||
<div class="form-group col-md-2 mt-2 ">
|
||||
|
||||
<input type="text"
|
||||
value="<?= $month; ?>" name="month"
|
||||
class="form-control monthpicker" id="monthpicker">
|
||||
|
||||
<input type="text"
|
||||
value="<?= $month; ?>" name="month"
|
||||
class="form-control monthpicker" id="monthpicker">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="coatingMachineDetailTableId" class="fht-table table-hover table-bordered"
|
||||
style="background-color:#fff;">
|
||||
@ -258,18 +277,19 @@
|
||||
if (!empty($coatingMachineDetails)) {
|
||||
|
||||
foreach ($coatingMachineDetails as $record) {
|
||||
?>
|
||||
?>
|
||||
<tr data-id="<?php echo $record['id']; ?>"
|
||||
<?php
|
||||
<?php
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat=DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
$dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) {
|
||||
echo 'style="background: #cef0ad;"';
|
||||
}
|
||||
?>>
|
||||
|
||||
<?php
|
||||
$date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
?>
|
||||
<?php
|
||||
$date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
?>
|
||||
|
||||
<td class="celda_normal"><?php echo $date ?></td>
|
||||
<td class="celda_normal"><?php echo $record['shift'] ?></td>
|
||||
@ -286,16 +306,16 @@
|
||||
<a data-toggle="tooltip" class="edit-btn"
|
||||
data-target="editCoatingMachineDetailModal" data-toggle="modal"
|
||||
style="cursor:pointer;">
|
||||
<i class="fa fa-pencil-alt"
|
||||
<i class="fa fa-pencil-alt"
|
||||
title="Click here to Edit "></i>
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<a data-toggle="tooltip" onclick="confirmDelete(event)" style="cursor:pointer ;"
|
||||
<a data-toggle="tooltip" onclick="confirmDelete(event)" style="cursor:pointer ;"
|
||||
href="<?php echo base_url(); ?>deleteCoatingMachineDetails?id=<?php echo $record['id'] ?>">
|
||||
<i class="fa fa-trash"
|
||||
<i class="fa fa-trash"
|
||||
title="Click here to Delete "></i>
|
||||
|
||||
</a>
|
||||
@ -305,7 +325,7 @@
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -316,20 +336,20 @@
|
||||
|
||||
|
||||
<br>
|
||||
<?php if(empty($coatingMachineDetails)){ ?>
|
||||
<h5 align="center" style="color:grey;">
|
||||
No Coating Machine Details present in this month
|
||||
</h5>
|
||||
<?php }?>
|
||||
<?php if (empty($coatingMachineDetails)) { ?>
|
||||
<h5 align="center" style="color:grey;">
|
||||
No Coating Machine Details present in this month
|
||||
</h5>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div> <!-- end card body-->
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
|
||||
@ -350,7 +370,7 @@
|
||||
</div>
|
||||
|
||||
<!-- form -->
|
||||
<form method="post" action="<?php echo base_url(); ?>addNewCoatingMachineDetails?month=<?=$month;?>">
|
||||
<form method="post" action="<?php echo base_url(); ?>addNewCoatingMachineDetails?month=<?= $month; ?>">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
@ -369,7 +389,7 @@
|
||||
<span class="badge mandatory">*</span>
|
||||
<select class="form-control" name="machineOnTime" id="machineOnTimeHrId" required>
|
||||
<option value="">Select Time</option>
|
||||
<option value="12:00 AM" >12:00 AM</option>
|
||||
<option value="12:00 AM">12:00 AM</option>
|
||||
<option value="12:30 AM"> 12:30 AM</option>
|
||||
<?php
|
||||
// Loop through the hours 1 to 12
|
||||
@ -380,7 +400,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -396,21 +415,20 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="machineOffTimeHrId">Machine Off Time</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
<select class="form-control" name="machineOffTime" id="machineOffTimeHrId" required>
|
||||
<option value="">Select Time</option>
|
||||
<option value="12:00 AM" > 12:00 AM</option>
|
||||
<option value="12:00 AM"> 12:00 AM</option>
|
||||
<option value="12:30 AM"> 12:30 AM</option>
|
||||
<?php
|
||||
// Loop through the hours 1 to 12
|
||||
@ -420,11 +438,10 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
<option value="12:00 PM" > 12:00 PM</option>
|
||||
<option value="12:00 PM"> 12:00 PM</option>
|
||||
<option value="12:30 PM"> 12:30 PM</option>
|
||||
<?php
|
||||
// Loop through the hours 1 to 12
|
||||
@ -434,7 +451,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -530,7 +546,7 @@
|
||||
|
||||
<!-- form -->
|
||||
<form method="post" id="editCoatingMachineDetailModalFormId"
|
||||
action="<?php echo base_url(); ?>updateCoatingMachineDetails?month=<?=$month;?>">
|
||||
action="<?php echo base_url(); ?>updateCoatingMachineDetails?month=<?= $month; ?>">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
@ -561,7 +577,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -576,13 +591,12 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="editMachineOffTimeHrId">Machine Off Time</label>
|
||||
<span class="badge mandatory">*</span>
|
||||
@ -599,11 +613,10 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
<option value="12:00 PM">12:00 PM</option>
|
||||
<option value="12:30 PM">12:30 PM</option>
|
||||
<option value="12:00 PM">12:00 PM</option>
|
||||
<option value="12:30 PM">12:30 PM</option>
|
||||
<?php
|
||||
// Loop through the hours 1 to 12
|
||||
for ($hour = 1; $hour < 12; $hour++) {
|
||||
@ -613,13 +626,12 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
@ -647,7 +659,7 @@
|
||||
<input type="text" class="form-control" id="editTotalGasConsumptionId"
|
||||
name="totalGasConsumption" value="" required>
|
||||
<input type="hidden" class="form-control" id="existingTotalGasConsumptionId"
|
||||
name="existingTotalGasConsumption" value="" >
|
||||
name="existingTotalGasConsumption" value="">
|
||||
</div>
|
||||
|
||||
|
||||
@ -691,9 +703,167 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- productionBatchCardModal -->
|
||||
|
||||
<div class="modal fade" id="productionBatchCardDetailModalId" tabindex="-1" role="dialog"
|
||||
aria-labelledby="productionBatchCardDetailModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" style="width:1060px !important ;" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<h5 class="modal-title" id="productionBatchCardDetailModalLabel">
|
||||
Production Batch Card Detail
|
||||
</h5>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- form -->
|
||||
<form method="post" id="productionBatchCardDetailModalFormId"
|
||||
action="<?php echo base_url(); ?>updateBatchCardDetail?month=<?= $month; ?>">
|
||||
|
||||
<div class="modal-body p-4">
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<table class="batch-card-table">
|
||||
<thead>
|
||||
<!-- Table Header Rows -->
|
||||
<tr>
|
||||
<th rowspan="5" colspan="1">logo</th>
|
||||
<th rowspan="5" colspan="7">resico name</th>
|
||||
<tr>
|
||||
<td colspan="1">one </td>
|
||||
<td colspan="1">one </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">one </td>
|
||||
<td colspan="1">one </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">one </td>
|
||||
<td colspan="1">one </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1">one </td>
|
||||
<td colspan="1">one </td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="batch-card-table-cell-space" colspan="10">Production Batch Card</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="batch-card-table-cell-space" >Customer Name</th>
|
||||
<td class="batch-card-table-cell-space"colspan="4">DR Axion India Pvt.Ltd (PCS ROUGH) </td>
|
||||
<th class="batch-card-table-cell-space" >P.Batch No</th>
|
||||
<td class="batch-card-table-cell-space" colspan="4">MI | 12 | 19 | C</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="batch-card-table-cell-space">Date</th>
|
||||
<td class="batch-card-table-cell-space" colspan="2">19/12/2024</td>
|
||||
<th class="batch-card-table-cell-space">Shift</th>
|
||||
<td class="batch-card-table-cell-space">III</td>
|
||||
|
||||
<th class="batch-card-table-cell-space">Batch No</th>
|
||||
<td class="batch-card-table-cell-space" colspan="4">123</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="batch-card-table-cell-space">Operator</th>
|
||||
<td class="batch-card-table-cell-space" colspan="4">KUMARAN</td>
|
||||
<th class="batch-card-table-cell-space">Helpers</th>
|
||||
<td class="batch-card-table-cell-space" colspan="4">MURUGESAN</td>
|
||||
</tr>
|
||||
|
||||
<!-- Sub Header -->
|
||||
<tr>
|
||||
<th class="batch-card-table-cell-space">S.No</th>
|
||||
<th class="batch-card-table-cell-space">Sand</th>
|
||||
<th class="batch-card-table-cell-space">Resin Solid</th>
|
||||
<th class="batch-card-table-cell-space">Hexamine</th>
|
||||
<th class="batch-card-table-cell-space">Water</th>
|
||||
<th class="batch-card-table-cell-space">Catalyst Calcium Stearat</th>
|
||||
<th class="batch-card-table-cell-space">Resin Mixing Time</th>
|
||||
<th class="batch-card-table-cell-space">Hexamine Mixing Time</th>
|
||||
<th class="batch-card-table-cell-space">Catalyst Mixing Time</th>
|
||||
<th class="batch-card-table-cell-space">TS</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>SPEC</th>
|
||||
<th>200KG-300KG</th>
|
||||
<th>3KG-6KG</th>
|
||||
<th>450G-900G</th>
|
||||
<th>900G-1800G</th>
|
||||
<th>150G-300G</th>
|
||||
<th>60-120 SEC</th>
|
||||
<th>60-120 SEC</th>
|
||||
<th>180-300 SEC</th>
|
||||
<th>50-60 KG/CM<sup>2</sup></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- Data Rows -->
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>300</td>
|
||||
<td>5.000</td>
|
||||
<td>7.30</td>
|
||||
<td>1500</td>
|
||||
<td>230</td>
|
||||
<td>60</td>
|
||||
<td>60</td>
|
||||
<td>180</td>
|
||||
<td>54.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>300</td>
|
||||
<td>5.000</td>
|
||||
<td>7.30</td>
|
||||
<td>1500</td>
|
||||
<td>230</td>
|
||||
<td>60</td>
|
||||
<td>60</td>
|
||||
<td>180</td>
|
||||
<td>52.4</td>
|
||||
</tr>
|
||||
<!-- Add more rows dynamically as needed -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8">
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@ -702,20 +872,22 @@
|
||||
function confirmDelete(event) {
|
||||
|
||||
let result = confirm(` Do you Confirm to Delete the Coating Machine Detail?`);
|
||||
if (result) { return result; } else { event.preventDefault(); }
|
||||
if (result) {
|
||||
return result;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
$('#exampleSelect2 ').select2();
|
||||
$('#machineOnTimeHrId ').select2();
|
||||
$('#machineOffTimeHrId ').select2();
|
||||
$('#editMachineOnTimeHrId ').select2();
|
||||
$('#editMachineOffTimeHrId ').select2();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -723,16 +895,16 @@
|
||||
<!-- appending values in the edit coating machine detail modal from the table -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#coatingMachineDetailTableId tbody').on('click', '.edit-btn', function () {
|
||||
$('#coatingMachineDetailTableId tbody').on('click', '.edit-btn', function() {
|
||||
|
||||
var row = $(this).closest('tr');
|
||||
|
||||
// Get values from the row
|
||||
|
||||
|
||||
var date = row.find('td:eq(0)').text().split('-');
|
||||
date=`${date[2]}-${date[1]}-${date[0]}`;
|
||||
date = `${date[2]}-${date[1]}-${date[0]}`;
|
||||
var shift = row.find('td:eq(1)').text();
|
||||
var machineOnTimeHr = row.find('td:eq(2)').text();
|
||||
var machineOffTimeHr = row.find('td:eq(3)').text();
|
||||
@ -750,7 +922,7 @@
|
||||
|
||||
$('#editCoatingMachineDetailId').val(row.data('id'));
|
||||
$('#editCustomerNameId').val(customerName);
|
||||
$('#editDateId').val(date);//convert this from d-m-y to Y-m-d in javascript
|
||||
$('#editDateId').val(date); //convert this from d-m-y to Y-m-d in javascript
|
||||
$('#editShiftId').val(shift);
|
||||
$('#editMachineOnTimeHrId').val(machineOnTimeHr).change();
|
||||
$('#editMachineOffTimeHrId').val(machineOffTimeHr).change();
|
||||
@ -768,17 +940,15 @@
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- calculations for some fields needed in onChange while adding coating machine details -->
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$('#machineOnTimeHrId , #dateId').change(function () {
|
||||
$('#machineOnTimeHrId , #dateId').change(function() {
|
||||
|
||||
let machineOnDate = $('#dateId').val();
|
||||
|
||||
@ -791,7 +961,7 @@
|
||||
let machineOnTimeHr = $('#machineOnTimeHrId').val();
|
||||
let machineOffTimeHr = $('#machineOffTimeHrId').val();
|
||||
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr );
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
|
||||
if (!machineRunningInHrs) {
|
||||
$('machineOnTimeHrId').val('');
|
||||
@ -806,7 +976,7 @@
|
||||
|
||||
});
|
||||
|
||||
$('#machineOffTimeHrId , #dateId').change(function () {
|
||||
$('#machineOffTimeHrId , #dateId').change(function() {
|
||||
|
||||
let machineOnDate = $('#dateId').val();
|
||||
|
||||
@ -821,7 +991,7 @@
|
||||
|
||||
|
||||
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
|
||||
if (!machineRunningInHrs) {
|
||||
|
||||
@ -836,7 +1006,7 @@
|
||||
|
||||
})
|
||||
|
||||
$('#totalCoatingSandId').change(function () {
|
||||
$('#totalCoatingSandId').change(function() {
|
||||
|
||||
let totalCoatingSandValue = $(this).val();
|
||||
let machineRunningInHrsValue = $('#machineRunningInHrsId').val();
|
||||
@ -849,7 +1019,7 @@
|
||||
|
||||
})
|
||||
|
||||
$('#totalGasConsumptionId').change(function () {
|
||||
$('#totalGasConsumptionId').change(function() {
|
||||
|
||||
let totalGasConsumptionValue = $(this).val();
|
||||
let machineRunningInHrsValue = $('#machineRunningInHrsId').val();
|
||||
@ -862,16 +1032,15 @@
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!-- calculations for some fields needed in onChange while editing coating machine details -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
$('#editMachineOnTimeHrId , #editDateId').change(function () {
|
||||
$('#editMachineOnTimeHrId , #editDateId').change(function() {
|
||||
|
||||
let machineOnDate = $('#editDateId').val();
|
||||
|
||||
@ -884,7 +1053,7 @@
|
||||
let machineOnTimeHr = $('#editMachineOnTimeHrId').val();
|
||||
let machineOffTimeHr = $('#editMachineOffTimeHrId').val();
|
||||
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
|
||||
if (!machineRunningInHrs) {
|
||||
$('#editMachineOnTimeHrId').val('');
|
||||
@ -899,7 +1068,7 @@
|
||||
|
||||
});
|
||||
|
||||
$('#editMachineOffTimeHrId , #editDateId').change(function () {
|
||||
$('#editMachineOffTimeHrId , #editDateId').change(function() {
|
||||
|
||||
let machineOnDate = $('#editDateId').val();
|
||||
|
||||
@ -913,7 +1082,7 @@
|
||||
let machineOnTimeHr = $('#editMachineOnTimeHrId').val();
|
||||
let machineOffTimeHr = $('#editMachineOffTimeHrId').val();
|
||||
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||
|
||||
if (!machineRunningInHrs) {
|
||||
|
||||
@ -928,7 +1097,7 @@
|
||||
|
||||
})
|
||||
|
||||
$('#editTotalCoatingSandId').change(function () {
|
||||
$('#editTotalCoatingSandId').change(function() {
|
||||
|
||||
let totalCoatingSandValue = $(this).val();
|
||||
let machineRunningInHrsValue = $('#editMachineRunningInHrsId').val();
|
||||
@ -941,7 +1110,7 @@
|
||||
|
||||
})
|
||||
|
||||
$('#editTotalGasConsumptionId').change(function () {
|
||||
$('#editTotalGasConsumptionId').change(function() {
|
||||
|
||||
let totalGasConsumptionValue = $(this).val();
|
||||
let machineRunningInHrsValue = $('#editMachineRunningInHrsId').val();
|
||||
@ -960,63 +1129,59 @@
|
||||
|
||||
|
||||
<script>
|
||||
function calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr) {
|
||||
function calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr) {
|
||||
|
||||
let machineOnTime12 = machineOnTimeHr;
|
||||
let machineOffTime12 = machineOffTimeHr;
|
||||
let machineOnTime12 = machineOnTimeHr;
|
||||
let machineOffTime12 = machineOffTimeHr;
|
||||
|
||||
let machineOnTime24 = convertTo24Hr(machineOnTime12);
|
||||
let machineOffTime24 = convertTo24Hr(machineOffTime12);
|
||||
let machineOnTime24 = convertTo24Hr(machineOnTime12);
|
||||
let machineOffTime24 = convertTo24Hr(machineOffTime12);
|
||||
|
||||
const startDate = new Date(`${machineOnDate}T${machineOnTime24}`);
|
||||
const endDate = new Date(`${machineOnDate}T${machineOffTime24}`);
|
||||
const startDate = new Date(`${machineOnDate}T${machineOnTime24}`);
|
||||
const endDate = new Date(`${machineOnDate}T${machineOffTime24}`);
|
||||
|
||||
// Handle the case where end time is on the next day
|
||||
if (endDate < startDate) {
|
||||
endDate.setDate(endDate.getDate() + 1);
|
||||
// Handle the case where end time is on the next day
|
||||
if (endDate < startDate) {
|
||||
endDate.setDate(endDate.getDate() + 1);
|
||||
}
|
||||
|
||||
// Calculate the difference in milliseconds
|
||||
const diffInMs = endDate - startDate;
|
||||
|
||||
// Convert milliseconds to hours and minutes
|
||||
const hours = Math.floor(diffInMs / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((diffInMs % (1000 * 60 * 60)) / (1000 * 60));
|
||||
|
||||
return `${hours}.${minutes >= 30 ? 5 : 0}`; // Return in HH.MM format
|
||||
}
|
||||
|
||||
// Calculate the difference in milliseconds
|
||||
const diffInMs = endDate - startDate;
|
||||
|
||||
// Convert milliseconds to hours and minutes
|
||||
const hours = Math.floor(diffInMs / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((diffInMs % (1000 * 60 * 60)) / (1000 * 60));
|
||||
|
||||
return `${hours}.${minutes >= 30 ? 5 : 0}`; // Return in HH.MM format
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function convertTo24Hr(time) {
|
||||
const [timePart, modifier] = time.split(" ");
|
||||
let [hours, minutes] = timePart.split(":");
|
||||
|
||||
function convertTo24Hr(time) {
|
||||
const [timePart, modifier] = time.split(" ");
|
||||
let [hours, minutes] = timePart.split(":");
|
||||
// Convert hours to a number
|
||||
hours = parseInt(hours, 10);
|
||||
|
||||
// Convert hours to a number
|
||||
hours = parseInt(hours, 10);
|
||||
// Adjust hours based on AM/PM
|
||||
if (modifier == "PM" && hours < 12) {
|
||||
hours += 12; // Convert PM times to 24-hour format (e.g., 1 PM becomes 13:00)
|
||||
} else if (modifier == "AM" && hours == 12) {
|
||||
hours = 0; // Convert 12 AM to 00:00 (midnight)
|
||||
}
|
||||
|
||||
// Adjust hours based on AM/PM
|
||||
if (modifier == "PM" && hours < 12) {
|
||||
hours += 12; // Convert PM times to 24-hour format (e.g., 1 PM becomes 13:00)
|
||||
} else if (modifier == "AM" && hours == 12) {
|
||||
hours = 0; // Convert 12 AM to 00:00 (midnight)
|
||||
// Format hours and minutes to ensure two digits
|
||||
return `${String(hours).padStart(2, '0')}:${minutes}:00`;
|
||||
}
|
||||
|
||||
// Format hours and minutes to ensure two digits
|
||||
return `${String(hours).padStart(2, '0')}:${minutes}:00`;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#monthpicker').datepicker({
|
||||
format: 'M-yyyy',
|
||||
viewMode: 'months',
|
||||
minViewMode: 'months',
|
||||
autoclose: true,
|
||||
format: 'M-yyyy',
|
||||
viewMode: 'months',
|
||||
minViewMode: 'months',
|
||||
autoclose: true,
|
||||
orientation: 'bottom'
|
||||
})
|
||||
|
||||
</script>
|
||||
@ -42,14 +42,14 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="p-2">
|
||||
<form role="form" id="addUser" action="<?php echo base_url() ?>addNewRawmaterial" method="post">
|
||||
<form role="form" id="addMaterialForm" action="<?php echo base_url() ?>addNewRawmaterial" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="MaterialName">Material Name<span class="badge">*</span></label>
|
||||
<input type="text" class="form-control required " onkeypress="return BlockSpecial(event);" required id="MaterialName" name="MaterialName" maxlength="255">
|
||||
<input type="text" class="form-control required " required id="MaterialName" name="MaterialName" maxlength="255">
|
||||
</div>
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="MaterialType">Material Type<span class="badge">*</span></label>
|
||||
@ -137,7 +137,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addMaterialBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -291,9 +291,18 @@
|
||||
|
||||
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
$('#addMaterialBtnId').click(function() {
|
||||
|
||||
var materialName = $('#MaterialName').val();
|
||||
|
||||
//validate
|
||||
|
||||
let validation = Validate();
|
||||
|
||||
if(!validation){
|
||||
return false;
|
||||
}
|
||||
|
||||
var materialName = $('#MaterialName').val().trim();
|
||||
var materialCode = '';
|
||||
|
||||
if(materialName == ''){
|
||||
@ -311,28 +320,35 @@
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>materialExist",
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
if (count >= 1) {
|
||||
|
||||
if (data && data.length >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('Material name already existed ! ');
|
||||
$('#MaterialName').val('');
|
||||
}else{
|
||||
alert('Material name already existing in the deleted section.!!');
|
||||
}
|
||||
|
||||
$('#MaterialName').val('');
|
||||
}
|
||||
|
||||
var related_name = "";
|
||||
var related_name = "" ;
|
||||
$.each(data, function(i, obj) {
|
||||
|
||||
related_name += obj.MaterialCode + " - " + obj.MaterialName + " - " + obj.MaterialType + " - " + obj.Category + "\n";
|
||||
|
||||
});
|
||||
|
||||
alert("'" + materialname + "' - related materials are , " + " \n \n" + related_name);
|
||||
$("#MaterialName").val('');
|
||||
$("#MaterialName").focus();
|
||||
} else {
|
||||
alert("'" + materialName + "' - related materials are , " + " \n \n" + related_name);
|
||||
$("#MaterialName").val('');
|
||||
$("#MaterialName").focus();
|
||||
|
||||
|
||||
} else{
|
||||
console.log("Material name is unique");
|
||||
$('#loader').hide();
|
||||
|
||||
$('#addMaterialForm').submit();
|
||||
}
|
||||
|
||||
},
|
||||
@ -348,6 +364,7 @@
|
||||
});
|
||||
|
||||
function Validate() {
|
||||
|
||||
if ($("#MaterialName").val().length < 1) {
|
||||
alert('Please Enter MaterialName');
|
||||
$("#MaterialName").focus();
|
||||
@ -369,6 +386,8 @@
|
||||
$("#MaterialType").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -432,4 +451,15 @@
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -199,7 +199,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addSupplierBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -237,6 +237,7 @@
|
||||
return false;
|
||||
}
|
||||
if (!getContactNumberValidation) {
|
||||
alert('Please Enter Valid Contact Number');
|
||||
$("#ContactNumber").focus();
|
||||
return false;
|
||||
}
|
||||
@ -252,13 +253,17 @@
|
||||
}
|
||||
|
||||
if (!validateEmail()) {
|
||||
alert('Please Enter Valid Email Address');
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
$('#supplierName').change(function() {
|
||||
$('#addSupplierBtnId').click(function() {
|
||||
|
||||
var supplierName = $('#supplierName').val().trim();
|
||||
var supplierId = $('#SupplierID').val();
|
||||
|
||||
@ -274,7 +279,7 @@
|
||||
var count = data?data.length:0;
|
||||
if (count >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('supplier already existed ! ');
|
||||
}else{
|
||||
alert('supplier already existing in the deleted section..!! ');
|
||||
@ -284,21 +289,17 @@
|
||||
$.each(data, function(i, obj) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").val('');
|
||||
alert("'" + supplierName + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
//4Debug
|
||||
// alert('This is New Supplier! ');
|
||||
if (Validate()) {
|
||||
$('#addsupplier').submit();
|
||||
}
|
||||
}
|
||||
//4Debug
|
||||
//console.log(data);
|
||||
|
||||
},
|
||||
error: function(error) {
|
||||
//4Debug
|
||||
// alert("Error Occur");
|
||||
$('#loader').hide();
|
||||
console.error("Error" , error);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addAssetBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -383,8 +383,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
@ -431,43 +430,68 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#AssetName').on('change',function(){
|
||||
$('#addAssetBtnId').on('click',function(){
|
||||
|
||||
let assetName = $(this).val().trim();
|
||||
let assetId = $('#AssetCode').val() ?? '';
|
||||
let validation = validate();
|
||||
|
||||
$('#loader').show();
|
||||
if(validation){
|
||||
|
||||
let assetName = $('#AssetName').val().trim();
|
||||
let assetId = $('#AssetCode').val() ?? '';
|
||||
|
||||
$('#loader').show();
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'<?php echo base_url()?>assetdetails/checkAssetName',
|
||||
data:{assetId,assetName},
|
||||
success: function(data){
|
||||
if(data && data.length>0){
|
||||
let IsActive = data[0]?.IsActive;
|
||||
if(IsActive == 1){
|
||||
alert("Asset Name Exists..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}else{
|
||||
alert("Asset Name Existing in deleted section..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}
|
||||
}else{
|
||||
$('#addAsset').submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
error: function(error){
|
||||
//error
|
||||
console.error('error ocurred' + error);
|
||||
},
|
||||
complete :function (){
|
||||
$('#loader').hide();
|
||||
console.log('ajax call completed..!!');
|
||||
}
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:'<?php echo base_url()?>assetdetails/checkAssetName',
|
||||
data:{assetId,assetName},
|
||||
success: function(data){
|
||||
if(data && data.length>0){
|
||||
let IsActive = data[0].IsActive;
|
||||
if(IsActive == 1){
|
||||
alert("Asset Name Exists..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}else{
|
||||
alert("Asset Name Existing in deleted section..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(error){
|
||||
//error
|
||||
console.error('error ocurred' + error);
|
||||
},
|
||||
complete :function (){
|
||||
$('#loader').hide();
|
||||
console.log('ajax call completed..!!');
|
||||
}
|
||||
})
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -92,7 +92,7 @@
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<a class="btn btn-secondary" href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addConFigBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -388,7 +388,7 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#configurationname').change(function () {
|
||||
$('#addConFigBtnId').click(function (){
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
|
||||
@ -399,7 +399,7 @@
|
||||
success: function (data) {
|
||||
if(data && data.length > 0){
|
||||
|
||||
if(data[0].isActive == 1){
|
||||
if(data[0]?.isActive == 1){
|
||||
alert("This Configuration Name is already present. kindly change it..!!");
|
||||
$('#configurationname').val('');
|
||||
return;
|
||||
@ -408,7 +408,9 @@
|
||||
$('#configurationname').val('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$('#addconfig').submit();
|
||||
}
|
||||
|
||||
},
|
||||
error:function(error){
|
||||
@ -438,4 +440,16 @@
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form role="form" id="adddepartment" action="<?php echo base_url() ?>savedepartment" method="post">
|
||||
<form role="form" id="addDepartment" action="<?php echo base_url() ?>savedepartment" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="deptBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -107,71 +107,30 @@
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// function blockKeyPress(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// alert(charCode);
|
||||
// if(charCode == 8 || charCode == 46 )
|
||||
//
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// function isNumberKey(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// if (charCode != 46 && charCode > 31
|
||||
// && (charCode < 48 || charCode > 57))
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
// function onlyAlphabets(evt) {
|
||||
// var charCode;
|
||||
// if (window.event)
|
||||
// charCode = window.event.keyCode; //for IE
|
||||
// else
|
||||
// charCode = evt.which; //for firefox
|
||||
// if (charCode == 32) //for <space> symbol
|
||||
// return true;
|
||||
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$("#DepartmentName").on('change',function(){
|
||||
$("#deptBtnId").on('click',function(){
|
||||
let departmentName = $("#DepartmentName").val().trim();
|
||||
let depCode =$("#DEPCode").val()??'';
|
||||
let headDepCode =$("#HeadDept").val()??'';
|
||||
let depCode =$("#DEPCode").val() ?? '';
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
data:{departmentName,depCode},
|
||||
data:{departmentName,headDepCode ,depCode},
|
||||
url:"<?php echo base_url();?>checkDepartmentName",
|
||||
success:function(data){
|
||||
|
||||
if(data && data.length >0){
|
||||
let isActive = data[0].IsActive;
|
||||
let isActive = data[0]. IsActive;
|
||||
if(isActive == 1){
|
||||
alert("Department name already Exists ..!! ");
|
||||
}else{
|
||||
alert("Department Name already Existing in the deleted section.!!");
|
||||
}
|
||||
window.location.reload();
|
||||
}else{
|
||||
console.log("submitting the form..!!")
|
||||
$("#addDepartment").submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -231,7 +231,7 @@
|
||||
},
|
||||
success: function (data) {
|
||||
$('#loader').hide();
|
||||
let isactive =data[0].IsActive;
|
||||
let isactive =data[0]?.IsActive;
|
||||
|
||||
if (data && data.length > 0) {
|
||||
|
||||
@ -429,4 +429,15 @@
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -156,7 +156,7 @@ if (!empty($assetList)) {
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form role="form" id="addAsset" action="<?php echo base_url() ?>editasset" method="post">
|
||||
<form role="form" id="editAsset" action="<?php echo base_url() ?>editasset" method="post">
|
||||
<div class="form-row">
|
||||
|
||||
<input type="text" class="form-control" id="AssetCode" name="AssetCode" value="<?php echo $AssetCode; ?>" hidden>
|
||||
@ -272,7 +272,7 @@ if (!empty($assetList)) {
|
||||
<div class="form-row mt-4 text-right">
|
||||
<div class="col-md-12">
|
||||
<a href="<?php echo base_url() ?>assetListing" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
<button type="button" id="editAssetBtnId" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -426,7 +426,7 @@ if (!empty($assetList)) {
|
||||
|
||||
|
||||
|
||||
$('#AssetName').on('change',function(){
|
||||
$('#editAssetBtnId').on('click',function(){
|
||||
|
||||
let assetId = $('#AssetCode').val();
|
||||
let assetName = $(this).val().trim();
|
||||
@ -438,18 +438,22 @@ if (!empty($assetList)) {
|
||||
url:'<?php echo base_url()?>assetdetails/checkAssetName',
|
||||
data:{assetId,assetName},
|
||||
success: function(data){
|
||||
if(data && data.length>0){
|
||||
let IsActive = data[0].IsActive;
|
||||
if(IsActive == 1){
|
||||
alert("Asset Name Exists..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
if(data && data.length>0){
|
||||
let IsActive = data[0]?.IsActive;
|
||||
if(IsActive == 1){
|
||||
alert("Asset Name Exists..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}else{
|
||||
alert("Asset Name Existing in deleted section..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}
|
||||
}else{
|
||||
alert("Asset Name Existing in deleted section..!!");
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
|
||||
$('#editAsset').submit();
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function(error){
|
||||
//error
|
||||
@ -465,4 +469,15 @@ if (!empty($assetList)) {
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -289,7 +289,7 @@ if ($total <= $reorder) {
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||
<span class="bold">Cancel</span>
|
||||
</button>
|
||||
<input type="submit" class="btn btn-success" value="Submit" />
|
||||
<input type="button" id="editRawMaterialBtnId" class="btn btn-success" value="Submit" />
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.card-body -->
|
||||
@ -438,7 +438,7 @@ if ($total <= $reorder) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
$('#editRawMaterialBtnId').click(function(){
|
||||
|
||||
var materialName = $('#MaterialName').val();
|
||||
var materialCode = $('#RMcode').val();
|
||||
@ -458,14 +458,15 @@ if ($total <= $reorder) {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>materialExist",
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
|
||||
if (count >= 1) {
|
||||
if (data && data.length >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('Material name already existed ! ');
|
||||
$('#MaterialName').val('');
|
||||
}else{
|
||||
alert('Material name already existing in the deleted section.!!');
|
||||
$('#MaterialName').val('');
|
||||
}
|
||||
var related_name = "";
|
||||
$.each(data, function(i, obj) {
|
||||
@ -474,12 +475,13 @@ if ($total <= $reorder) {
|
||||
|
||||
});
|
||||
|
||||
alert("'" + materialname + "' - related materials are , " + " \n \n" + related_name);
|
||||
alert("'" + materialName + "' - related materials are , " + " \n \n" + related_name);
|
||||
$("#MaterialName").val('');
|
||||
$("#MaterialName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
// alert("empty data");
|
||||
console.log("working")
|
||||
$('#editRawmaterial').submit();
|
||||
}
|
||||
|
||||
},
|
||||
@ -555,4 +557,15 @@ if ($total <= $reorder) {
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -296,6 +296,7 @@ if (!empty($supplier)) {
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<form class="form-horizontal" role="form" id="UpdateSupplier"
|
||||
action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
@ -530,7 +531,7 @@ if (!empty($supplier)) {
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||
<span class="bold">Cancel</span>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-info pull-right">Submit</button>
|
||||
<button type="button" id="updateSupplierBtnId" class="btn btn-info pull-right">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -560,11 +561,7 @@ if (!empty($supplier)) {
|
||||
}
|
||||
|
||||
function Validate() {
|
||||
// if(!validatePAN())
|
||||
// {
|
||||
// return false;
|
||||
// $('#panno').focus();
|
||||
// }
|
||||
|
||||
if ($("#supplierName").val().length < 1) {
|
||||
alert('Please Enter Supplier Name');
|
||||
$("#supplierName").focus();
|
||||
@ -585,17 +582,12 @@ if (!empty($supplier)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
if(!validateGST())
|
||||
{
|
||||
$('#GSTNo').focus();
|
||||
return false;
|
||||
}*/
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
//Call to ajax existing PAN
|
||||
$('#supplierName').change(function () {
|
||||
$('#updateSupplierBtnId').click(function () {
|
||||
var supplierName = $('#supplierName').val().trim();
|
||||
var supplierId = $('#SupplierID').val();
|
||||
|
||||
@ -612,7 +604,7 @@ if (!empty($supplier)) {
|
||||
var count = data.length;
|
||||
if (count >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('supplier already existed ! ');
|
||||
}else{
|
||||
alert('supplier already existing in the deleted section..!! ');
|
||||
@ -622,10 +614,12 @@ if (!empty($supplier)) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + supplierName + "' - supplier details are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").val('');
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
if (Validate()) {
|
||||
$('#UpdateSupplier').submit();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -37,7 +37,7 @@ if (!empty($master)) {
|
||||
helper('form');
|
||||
$error = session()->getFlashdata('error');
|
||||
if ($error) {
|
||||
?>
|
||||
?>
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('error'); ?>
|
||||
@ -47,7 +47,7 @@ if (!empty($master)) {
|
||||
<?php
|
||||
$success = session()->getFlashdata('success');
|
||||
if ($success) {
|
||||
?>
|
||||
?>
|
||||
<div class="alert alert-info alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<?php echo session()->getFlashdata('success'); ?>
|
||||
@ -77,13 +77,13 @@ if (!empty($master)) {
|
||||
<label class="col-form-label" for="ConfigName">Configuration Name</label>
|
||||
<font color="Red">*</font>
|
||||
<?php
|
||||
$data = array('name' => 'ConfigName', 'value' => set_value('ConfigName', $ConfigName), 'id' => 'ConfigName', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
|
||||
$data = array('name' => 'ConfigName', 'value' => set_value('ConfigName', $ConfigName), 'id' => 'ConfigName', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '30');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label" for="Remarks">Comments</label>
|
||||
<label class="col-form-label" for="Remarks"> Comments </label>
|
||||
<font color="Red">*</font>
|
||||
<?php
|
||||
$data = array('name' => 'Remarks', 'value' => set_value('Remarks', $Comments), 'id' => 'Remarks', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
|
||||
@ -95,8 +95,8 @@ if (!empty($master)) {
|
||||
<div class="form-row" style="margin-top:10px">
|
||||
<div class="col-md-12 text-right">
|
||||
<a data-toggle="modal" href="#AddConfiguration" style="margin-right: 10px;"
|
||||
class="btn btn-success"><i class="fa fa-plus"></i> Add
|
||||
Configuration</a>
|
||||
class="btn btn-success"><i class="fa fa-plus"></i>
|
||||
Configuration Value</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -134,7 +134,7 @@ if (!empty($master)) {
|
||||
$index = 0;
|
||||
foreach ($child as $con) {
|
||||
$index++;
|
||||
?>
|
||||
?>
|
||||
|
||||
<input type="hidden" name="DbKey<?php echo $index ?>"
|
||||
id="DbKey<?php echo $index ?>" value="<?php echo $con->Key ?>">
|
||||
@ -143,10 +143,10 @@ if (!empty($master)) {
|
||||
value="<?php echo $con->ConfigValue ?>">
|
||||
|
||||
<tr class="<?php if ($con->isActive == 0) {
|
||||
echo "deactivatedRow";
|
||||
} ?>" style="<?php if ($con->isActive == 0) {
|
||||
echo "display:none";
|
||||
} ?>">
|
||||
echo "deactivatedRow";
|
||||
} ?>" style="<?php if ($con->isActive == 0) {
|
||||
echo "display:none";
|
||||
} ?>">
|
||||
|
||||
<td><?php echo $index; ?></td>
|
||||
<td><?php echo $con->ConfigValue; ?></td>
|
||||
@ -168,8 +168,8 @@ if (!empty($master)) {
|
||||
title="Click here to Edit Config Value"></i>
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a onclick="confirmDeleteConfig(event)" href="<?php echo base_url() . 'configurationctrl/deleteConfigValue
|
||||
?ConfigValue=' . $con->ConfigValue . '
|
||||
&ConfigID=' . $con->Config_ID; ?>">
|
||||
@ -182,7 +182,7 @@ if (!empty($master)) {
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
<?php }
|
||||
} ?>
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount"
|
||||
value="<?php echo $index ?>" />
|
||||
@ -194,7 +194,7 @@ if (!empty($master)) {
|
||||
<div class="form-row text-right" style="margin-top:10px; text-align:right">
|
||||
<div class="col-md-12 text-right">
|
||||
<a href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
|
||||
<input type="submit" class="btn btn-success" value="Update" />
|
||||
<input type="button" id="updateConfigBtnId" class="btn btn-success" value="Update" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -234,8 +234,7 @@ if (!empty($master)) {
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px"
|
||||
data-dismiss="modal">Cancel</a>
|
||||
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"><i
|
||||
class="fa fa-plus"></i> Add</a>
|
||||
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"> Add </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -330,13 +329,14 @@ if (!empty($master)) {
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
|
||||
var index = $('#txtRowCount').val();
|
||||
var userid = '';
|
||||
|
||||
$("#Edit").on("shown.bs.modal", function (e) {
|
||||
$("#Edit").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
$('#key').val($('#configtable tr:eq(' + userid + ') td:eq(0)').text());
|
||||
$('#Config_ID').val($('#ConfigId').val());
|
||||
@ -345,7 +345,7 @@ if (!empty($master)) {
|
||||
|
||||
});
|
||||
|
||||
$('.tempClickAdd').click(function () {
|
||||
$('.tempClickAdd').click(function() {
|
||||
|
||||
var cid = $('#ConfigId').val()
|
||||
if ($("#AddConfigValue").val() != '-1' && $("#AddConfigValue").val() != null && $("#AddConfigValue").val() != '') {
|
||||
@ -404,7 +404,7 @@ if (!empty($master)) {
|
||||
theForm.append(input);
|
||||
}
|
||||
|
||||
$('.tempClickUpdate').click(function () {
|
||||
$('.tempClickUpdate').click(function() {
|
||||
|
||||
|
||||
if ($("#configValue").val() != '') {
|
||||
@ -450,7 +450,7 @@ if (!empty($master)) {
|
||||
}
|
||||
|
||||
//var baseurl = "<?php print base_url(); ?>";
|
||||
$(".editConfig").submit(function (e) {
|
||||
$(".editConfig").submit(function(e) {
|
||||
if (validate()) {
|
||||
|
||||
$('#loader').show();
|
||||
@ -458,7 +458,7 @@ if (!empty($master)) {
|
||||
data: $('.editConfig').serialize(),
|
||||
type: 'POST',
|
||||
url: "<?php echo base_url(); ?>configurationctrl/configedit",
|
||||
success: function (data) {
|
||||
success: function(data) {
|
||||
//alert(data);
|
||||
$('#loader').hide();
|
||||
|
||||
@ -493,57 +493,60 @@ if (!empty($master)) {
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#ConfigName').change(function () {
|
||||
$('#updateConfigBtnId').click(function() {
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
data: {
|
||||
configName: $('#ConfigName').val().trim(),
|
||||
configId : $('#ConfigId').val().trim()
|
||||
},
|
||||
configId: $('#ConfigId').val().trim()
|
||||
},
|
||||
type: 'POST',
|
||||
url: "<?php echo base_url(); ?>configurationctrl/configNameCheck",
|
||||
success: function (data) {
|
||||
success: function(data) {
|
||||
|
||||
if (data && data.length > 0) {
|
||||
|
||||
if (data[0].isActive == 1) {
|
||||
if (data[0]?.isActive == 1) {
|
||||
alert("This Configuration Name is already present. kindly change it..!!");
|
||||
$('#ConfigName').val('');
|
||||
return;
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
alert("This Configuration Name is already present in deleted section. kindly reactivate it If needed..!!");
|
||||
$('#ConfigName').val('');
|
||||
return;
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
$('#editConfig').submit();
|
||||
}
|
||||
|
||||
},
|
||||
error: function (error) {
|
||||
error: function(error) {
|
||||
console.log("error occured..!!", error);
|
||||
},
|
||||
complete: function () {
|
||||
complete: function() {
|
||||
$('#loader').hide();
|
||||
console.log('ajax call completed..!!');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#AddConfigValue, #configValue').change(function () {
|
||||
$('#AddConfigValue, #configValue').change(function() {
|
||||
|
||||
let configValue = $(this).val();
|
||||
let configTable = customTableToJson();
|
||||
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);
|
||||
let configTable = customTableToJson();
|
||||
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);
|
||||
|
||||
if(configValueExisting && configValueExisting.length > 0){
|
||||
alert('configuration value is already present , Kindly check in Table and archive too..!!');
|
||||
$(this).val('');
|
||||
if (configValueExisting && configValueExisting.length > 0) {
|
||||
alert('configuration value is already present , Kindly check in Table and archive too..!!');
|
||||
$(this).val('');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -553,14 +556,14 @@ if (!empty($master)) {
|
||||
let headers = [];
|
||||
|
||||
// Get table headers
|
||||
$(`#configtable thead tr th`).each(function () {
|
||||
$(`#configtable thead tr th`).each(function() {
|
||||
headers.push($(this).text().trim());
|
||||
});
|
||||
|
||||
// Get table rows including hidden ones
|
||||
$(`#configtable tbody tr`).each(function () {
|
||||
$(`#configtable tbody tr`).each(function() {
|
||||
let row = {};
|
||||
$(this).find('td').each(function (index) {
|
||||
$(this).find('td').each(function(index) {
|
||||
// Use the headers as keys for JSON
|
||||
let header = headers[index];
|
||||
row[header] = $(this).text().trim();
|
||||
@ -570,19 +573,17 @@ if (!empty($master)) {
|
||||
}
|
||||
});
|
||||
|
||||
return rows;
|
||||
return rows;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function showChildArchiveList() {
|
||||
let isChecked = $("#showChildArchiveId").prop('checked');
|
||||
|
||||
// Show or hide the rows based on checkbox status
|
||||
$(".deactivatedRow").each(function () {
|
||||
$(".deactivatedRow").each(function() {
|
||||
if (isChecked) {
|
||||
$(this).show();
|
||||
} else {
|
||||
@ -593,12 +594,12 @@ if (!empty($master)) {
|
||||
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).ready(function() {
|
||||
let table = $('#configtable');
|
||||
|
||||
showChildArchiveList();
|
||||
|
||||
table.on('draw', function () {
|
||||
table.on('draw', function() {
|
||||
showChildArchiveList();
|
||||
});
|
||||
|
||||
@ -606,12 +607,28 @@ if (!empty($master)) {
|
||||
|
||||
function confirmDeleteConfig(event) {
|
||||
let result = confirm("Do You want to delete this configuration ?");
|
||||
if (result) { return; } else { event.preventDefault(); }
|
||||
if (result) {
|
||||
return;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function confirmReActivateConfig(event) {
|
||||
let result = confirm("Do You want to Re activate deleted configuration ?");
|
||||
if (result) { return; } else { event.preventDefault(); }
|
||||
if (result) {
|
||||
return;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -104,7 +104,7 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<form role="form" id="Updatedepartment" action="<?php echo base_url() ?>editdepartment" method="post">
|
||||
<form role="form" id="updateDepartment" action="<?php echo base_url() ?>editdepartment" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Department Information -->
|
||||
<legend>Department Information</legend>
|
||||
@ -136,7 +136,7 @@
|
||||
<div class="form-row" style="margin-top:10px">
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red; color: white; margin-right: 15px; width: 80px;" value="Reset" />
|
||||
<input type="submit" value="Update" class="btn btn-success">
|
||||
<input type="button" id="deptBtnId" value="Update" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -173,13 +173,15 @@
|
||||
|
||||
<script>
|
||||
|
||||
$("#DepartmentName").on('change',function(){
|
||||
$("#deptBtnId").on('click',function(){
|
||||
let departmentName = $("#DepartmentName").val().trim();
|
||||
let depCode =$("#DEPCode").val();
|
||||
let headDepCode = $("#HeadDept").val();
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
data:{departmentName,depCode},
|
||||
data:{departmentName,headDepCode ,depCode},
|
||||
url:"<?php echo base_url();?>checkDepartmentName",
|
||||
success:function(data){
|
||||
|
||||
@ -190,7 +192,8 @@ $("#DepartmentName").on('change',function(){
|
||||
}else{
|
||||
alert("Department Name already Existing in the deleted section.!!");
|
||||
}
|
||||
window.location.reload();
|
||||
}else{
|
||||
$("#updateDepartment").submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -54,10 +54,18 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
|
||||
|
||||
|
||||
<form action="<?= empty($masterData)
|
||||
<form
|
||||
|
||||
|
||||
|
||||
action="<?= empty($masterData)
|
||||
? base_url('createFactoryMachineMasterDetails')
|
||||
: base_url('updateFactoryMachineMasterDetails?id=' . $masterData['id']); ?>" method="post"
|
||||
class="form-label-left">
|
||||
|
||||
id="factoryFormId"
|
||||
class="form-label-left">
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
@ -79,7 +87,7 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
class="text-danger">*</span></label>
|
||||
<select name="energyType" id="energyType"
|
||||
class="form-control searchabledropdown" data-toggle="select2" required>
|
||||
<option value="-1">Select Energy Type</option>
|
||||
<option value="">Select Energy Type</option>
|
||||
<option value="diesel" <?= $energyType == 'diesel' ? 'selected' : '' ?>> Diesel
|
||||
</option>
|
||||
<option value="petrol" <?= $energyType == 'petrol' ? 'selected' : '' ?>> Petrol
|
||||
@ -102,7 +110,7 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
|
||||
<div class="form-group col">
|
||||
|
||||
<button type="submit"
|
||||
<button type="button" id="submitBtnId"
|
||||
class="btn btn-info waves-effect waves-light">Submit</button>
|
||||
|
||||
<button type="button" class="btn btn-secondary"
|
||||
@ -127,8 +135,42 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
|
||||
|
||||
<script>
|
||||
$('#machineName').on('change', function () {
|
||||
let machineName = $(this).val().trim();
|
||||
|
||||
function validate(){
|
||||
|
||||
let machineName = $('#machineName').val().trim();
|
||||
let machineType = $('#machineType').val().trim();
|
||||
let energyType = $('#energyType').val().trim();
|
||||
|
||||
if(machineName == ''){
|
||||
alert('Machine Name is required..!!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(machineType == ''){
|
||||
alert('Machine Type is required..!!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(energyType == ''){
|
||||
alert('Energy Type is required..!!');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
$('#submitBtnId').on('click', function () {
|
||||
|
||||
|
||||
let validation = validate();
|
||||
|
||||
if(!validation){
|
||||
return;
|
||||
}
|
||||
|
||||
let machineName = $('#machineName').val().trim();
|
||||
let machineId = $('#machineId').val()??'';
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
@ -145,6 +187,9 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
alert("Machine Name already existing in the deleted section ..!!");
|
||||
$('#machineName').val('');
|
||||
}
|
||||
}else{
|
||||
|
||||
validation === true ? $('#factoryFormId').submit():'' ;
|
||||
}
|
||||
|
||||
},
|
||||
@ -158,4 +203,17 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -634,7 +634,7 @@
|
||||
|
||||
|
||||
|
||||
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor'){?>
|
||||
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor' || session()->get('roleText') == 'Security'){?>
|
||||
<!-- Sales module -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
||||
@ -643,7 +643,8 @@
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-hr">
|
||||
<a href="<?php echo base_url(); ?>sales_invoice" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>Invoice</a>
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
|
||||
<?php if(session()->get('roleText') == 'System Administrator'){?>
|
||||
<!-- <a href="<?php echo base_url(); ?>dashboard" class="dropdown-item"><i class="ri-refresh-line align-middle mr-1"></i>Sync With Zoho Books</a> -->
|
||||
<a href="javascript:void(0)" type="button" class="dropdown-item" title="Sync With Zoho Books" onclick="synczohobooks()"> <i class="ri-refresh-line align-middle mr-1"></i>Sync With Zoho Books </a>
|
||||
<?php } ?>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
helper('form');
|
||||
helper('form');
|
||||
$error = session()->getFlashdata('error');
|
||||
if ($error) {
|
||||
$type = "error";
|
||||
|
||||
@ -251,10 +251,11 @@
|
||||
$('#tempClick').click(function () {
|
||||
//loader is initiated
|
||||
$('#loader').show();
|
||||
|
||||
if ($('#transportername').val() === '') {
|
||||
|
||||
if ($('#transportername').val().trim() === '') {
|
||||
alert('Please Enter the Transporter Name');
|
||||
return;
|
||||
$('#loader').hide();
|
||||
return false;
|
||||
}
|
||||
|
||||
var formData = {
|
||||
@ -275,7 +276,7 @@
|
||||
success: function (data) {
|
||||
|
||||
if (data && data.length > 0) {
|
||||
let isactive = data[0].isactive;
|
||||
let isactive = data[0]?.isactive;
|
||||
if (isactive == 1 ) { alert(" Transporter with this Name Exists..!!"); }
|
||||
else { alert(" Transporter with this Name Existing in deleted section ..!!"); }
|
||||
|
||||
@ -448,4 +449,15 @@
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user