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(){
|
function checkAssetName(){
|
||||||
|
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
|
|
||||||
$assetId = $data['assetId']??'';
|
$assetId = $data['assetId']??'';
|
||||||
$assetName = str_replace(" ","",$data['assetName']) ;
|
$assetName = str_replace(" ","",$data['assetName']) ;
|
||||||
|
|
||||||
$result = $this->assetdetails_model->checkAssetName($assetId,$assetName);
|
$result = $this->assetdetails_model->checkAssetName($assetId,$assetName);
|
||||||
|
|
||||||
return $this->response->setJSON($result);
|
return $this->response->setJSON($result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -140,6 +140,8 @@ class CostCenter extends BaseController
|
|||||||
$CostCenterId = $data['CostCenterId'];
|
$CostCenterId = $data['CostCenterId'];
|
||||||
$CostCenterName = $data['CostCenterName'];
|
$CostCenterName = $data['CostCenterName'];
|
||||||
|
|
||||||
|
$CostCenterName = str_replace(' ', '', $CostCenterName);
|
||||||
|
|
||||||
$result = $this->costcenter_model->checkCostCenter( $CostCenterId,$CostCenterName);
|
$result = $this->costcenter_model->checkCostCenter( $CostCenterId,$CostCenterName);
|
||||||
|
|
||||||
return $this->response->setJSON($result);
|
return $this->response->setJSON($result);
|
||||||
|
|||||||
@ -251,9 +251,18 @@ class Department extends BaseController
|
|||||||
|
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$departmentName = str_replace(" ","",$data['departmentName']);
|
$departmentName = str_replace(" ","",$data['departmentName']);
|
||||||
$depCode =$data['depCode'];
|
|
||||||
|
$depCode = $data['depCode'];
|
||||||
|
|
||||||
|
$headDepCode =$data['headDepCode'];
|
||||||
|
|
||||||
$departmentName = $data['departmentName'];
|
$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);
|
return $this->response->setJSON($result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -190,7 +190,7 @@ class Rawmaterialdetails extends BaseController
|
|||||||
function addNewRawMaterial()
|
function addNewRawMaterial()
|
||||||
{
|
{
|
||||||
|
|
||||||
//echo "HI";die();
|
|
||||||
$TempArr = [];
|
$TempArr = [];
|
||||||
|
|
||||||
$MaterialName = $this->request->getPost('MaterialName');
|
$MaterialName = $this->request->getPost('MaterialName');
|
||||||
|
|||||||
@ -478,6 +478,7 @@ class Supplier extends BaseController
|
|||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$transporterId = $data['transporterid']??'';
|
$transporterId = $data['transporterid']??'';
|
||||||
$transporterName = $data['transportername'];
|
$transporterName = $data['transportername'];
|
||||||
|
$transporterName = str_replace(' ', '', $transporterName);
|
||||||
$message = $this->supplier_model->checkTransporter($transporterId,$transporterName);
|
$message = $this->supplier_model->checkTransporter($transporterId,$transporterName);
|
||||||
|
|
||||||
return $this->response->setJSON($message);
|
return $this->response->setJSON($message);
|
||||||
|
|||||||
@ -278,7 +278,7 @@ class Assetdetails_model extends Model
|
|||||||
$builder = $builder->where('AssetCode !=', $assetId);
|
$builder = $builder->where('AssetCode !=', $assetId);
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder = $builder->where('REPLACE(AssetName , " ", "") ',$assetName);
|
$builder = $builder->where('REPLACE(AssetName, " ", "")',$assetName);
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
|
|||||||
@ -436,7 +436,7 @@ where Dept.DEPCode not in
|
|||||||
if(!empty($CostCenterId)){
|
if(!empty($CostCenterId)){
|
||||||
$builder = $builder -> where('id !=' ,$CostCenterId);
|
$builder = $builder -> where('id !=' ,$CostCenterId);
|
||||||
}
|
}
|
||||||
$builder = $builder->where('REPLACE(CostCenterName , " ", "") ',$CostCenterName);
|
$builder = $builder->where('REPLACE(CostCenterName," ", "")',$CostCenterName);
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
@ -10,38 +11,38 @@ class Department_model extends Model
|
|||||||
* @param string $searchText : This is optional search text
|
* @param string $searchText : This is optional search text
|
||||||
* @return number $count : This is row count
|
* @return number $count : This is row count
|
||||||
*/
|
*/
|
||||||
// function departmentListingCount($searchText = '')
|
// 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');
|
// ->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');
|
// $builder = $this->db->table('t_departmentdetails as BaseT');
|
||||||
// //->join('tbl_users as users', 'users.userId = BaseT.userId','left');
|
// //->join('tbl_users as users', 'users.userId = BaseT.userId','left');
|
||||||
// //->join('T_SupplierDetails as ID', 'ID.DepartmentID = BaseT.DepartmentID','left');
|
// //->join('T_SupplierDetails as ID', 'ID.DepartmentID = BaseT.DepartmentID','left');
|
||||||
// if(!empty($searchText)) {
|
// if(!empty($searchText)) {
|
||||||
// $likeCriteria = "(BaseT.DepartmentID LIKE '%".$searchText."%'
|
// $likeCriteria = "(BaseT.DepartmentID LIKE '%".$searchText."%'
|
||||||
// OR BaseT.SupplierName LIKE '%".$searchText."%'
|
// OR BaseT.SupplierName LIKE '%".$searchText."%'
|
||||||
// OR BaseT.Address LIKE '%".$searchText."%'
|
// OR BaseT.Address LIKE '%".$searchText."%'
|
||||||
// OR BaseT.ContactNumber LIKE '%".$searchText."%'
|
// OR BaseT.ContactNumber LIKE '%".$searchText."%'
|
||||||
// OR BaseT.AlternateContactNumber LIKE '%".$searchText."%'
|
// OR BaseT.AlternateContactNumber LIKE '%".$searchText."%'
|
||||||
// OR BaseT.EmailAddress LIKE '%".$searchText."%'
|
// OR BaseT.EmailAddress LIKE '%".$searchText."%'
|
||||||
// OR BaseT.Exiseregistration LIKE '%".$searchText."%'
|
// OR BaseT.Exiseregistration LIKE '%".$searchText."%'
|
||||||
// OR BaseT.TIN LIKE '%".$searchText."%'
|
// OR BaseT.TIN LIKE '%".$searchText."%'
|
||||||
// OR BaseT.PAN LIKE '%".$searchText."%'
|
// OR BaseT.PAN LIKE '%".$searchText."%'
|
||||||
// OR BaseT.GSTNO LIKE '%".$searchText."%'
|
// OR BaseT.GSTNO LIKE '%".$searchText."%'
|
||||||
// OR BaseT.GSTRange LIKE '%".$searchText."%'
|
// OR BaseT.GSTRange LIKE '%".$searchText."%'
|
||||||
// OR BaseT.CollectrateAddress LIKE '%".$searchText."%'
|
// OR BaseT.CollectrateAddress LIKE '%".$searchText."%'
|
||||||
// OR BaseT.UANumber LIKE '%".$searchText."%'
|
// OR BaseT.UANumber LIKE '%".$searchText."%'
|
||||||
// OR BaseT.PaymentTerms LIKE '%".$searchText."%'
|
// OR BaseT.PaymentTerms LIKE '%".$searchText."%'
|
||||||
// OR BaseT.PaymentDays LIKE '%".$searchText."%'
|
// OR BaseT.PaymentDays LIKE '%".$searchText."%'
|
||||||
// OR BaseT.PayableAT LIKE '%".$searchText."%')";
|
// OR BaseT.PayableAT LIKE '%".$searchText."%')";
|
||||||
// $this->db->where($likeCriteria);
|
// $this->db->where($likeCriteria);
|
||||||
// }
|
// }
|
||||||
// //$this->db->where('BaseT.isDeleted', 0);
|
// //$this->db->where('BaseT.isDeleted', 0);
|
||||||
// //$this->db->where('BaseT.userId !=', 1);
|
// //$this->db->where('BaseT.userId !=', 1);
|
||||||
// $query =$builder->get();
|
// $query =$builder->get();
|
||||||
|
|
||||||
// return count($query-getResult());
|
// return count($query-getResult());
|
||||||
// }
|
// }
|
||||||
/**
|
/**
|
||||||
* This function is used to get the user listing count
|
* This function is used to get the user listing count
|
||||||
* @param string $searchText : This is optional search text
|
* @param string $searchText : This is optional search text
|
||||||
* @param number $page : This is pagination offset
|
* @param number $page : This is pagination offset
|
||||||
@ -51,9 +52,9 @@ class Department_model extends Model
|
|||||||
function departmentListing()
|
function departmentListing()
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_departmentdetails as BaseT')
|
$builder = $this->db->table('t_departmentdetails as BaseT')
|
||||||
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
->select('BaseT.CreatedDt,BaseT.DepartmentName, BaseT.DEPCode, BaseT.HeadDept, BaseT.IsActive')
|
||||||
->orderBy("BaseT.DEPCode", "desc");
|
->orderBy("BaseT.DEPCode", "desc");
|
||||||
$query =$builder->get();
|
$query = $builder->get();
|
||||||
$result = $query->getResult();
|
$result = $query->getResult();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@ -75,95 +76,137 @@ class Department_model extends Model
|
|||||||
// $result = $query->getResult();
|
// $result = $query->getResult();
|
||||||
// return $result;
|
// return $result;
|
||||||
// }
|
// }
|
||||||
/**
|
/**
|
||||||
* This function used to get user information by id
|
* This function used to get user information by id
|
||||||
* @param number $userId : This is user id
|
* @param number $userId : This is user id
|
||||||
* @return array $result : This is user information
|
* @return array $result : This is user information
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function savedepartment($department)
|
function savedepartment($department)
|
||||||
{
|
{
|
||||||
|
|
||||||
$builder = $this->db->table('t_departmentdetails');
|
$builder = $this->db->table('t_departmentdetails');
|
||||||
$builder->insert($department);
|
$builder->insert($department);
|
||||||
|
|
||||||
$SID = $this->db->affectedRows();
|
$SID = $this->db->affectedRows();
|
||||||
|
|
||||||
return $SID;
|
return $SID;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getdepcode()
|
function getdepcode()
|
||||||
{
|
{
|
||||||
//$limit = 12;
|
//$limit = 12;
|
||||||
$builder = $this->db->table('t_departmentdetails')
|
$builder = $this->db->table('t_departmentdetails')
|
||||||
->distinct()
|
->distinct()
|
||||||
->select('DEPCode, DepartmentName')
|
->select('DEPCode, DepartmentName')
|
||||||
->where('IsActive =', 1);
|
->where('IsActive =', 1);
|
||||||
//$this->db->limit($limit);
|
//$this->db->limit($limit);
|
||||||
$query =$builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function used to get user information by id
|
* This function used to get user information by id
|
||||||
* @param number $userId : This is user id
|
* @param number $userId : This is user id
|
||||||
* @return array $result : This is user information
|
* @return array $result : This is user information
|
||||||
*/
|
*/
|
||||||
function getDeptInfo($DEPCode='')
|
function getDeptInfo($DEPCode = '')
|
||||||
{
|
{
|
||||||
$builder = $this->db->table('t_departmentdetails')
|
$builder = $this->db->table('t_departmentdetails')
|
||||||
->select('*')
|
->select('*')
|
||||||
->where('DEPCode', $DEPCode);
|
->where('DEPCode', $DEPCode);
|
||||||
$query =$builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
return $query->getResult();
|
return $query->getResult();
|
||||||
}
|
}
|
||||||
/* This function to get the Supplier Address on respective Supplier ID */
|
/* This function to get the Supplier Address on respective Supplier ID */
|
||||||
|
|
||||||
function Updatedepartment($department, $DEPCode)
|
function Updatedepartment($department, $DEPCode)
|
||||||
{
|
{
|
||||||
$this->db->table('t_departmentdetails')
|
$this->db->table('t_departmentdetails')
|
||||||
->where('DEPCode', $DEPCode)
|
->where('DEPCode', $DEPCode)
|
||||||
->update($department);
|
->update($department);
|
||||||
$res = $this->db->affectedRows();
|
$res = $this->db->affectedRows();
|
||||||
return $res;
|
return $res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function reActivateDepartment($depCode , $updateInfo){
|
function reActivateDepartment($depCode, $updateInfo)
|
||||||
|
{
|
||||||
$this->db->table('t_departmentdetails')
|
$this->db->table('t_departmentdetails')
|
||||||
->where('DEPCode', $depCode)
|
->where('DEPCode', $depCode)
|
||||||
->update($updateInfo);
|
->update($updateInfo);
|
||||||
$res = $this->db->affectedRows();
|
$res = $this->db->affectedRows();
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function deleteDepartment($depCode , $updateInfo){
|
function deleteDepartment($depCode, $updateInfo)
|
||||||
|
{
|
||||||
$this->db->table('t_departmentdetails')
|
$this->db->table('t_departmentdetails')
|
||||||
->where('DEPCode', $depCode)
|
->where('DEPCode', $depCode)
|
||||||
->update($updateInfo);
|
->update($updateInfo);
|
||||||
$res = $this->db->affectedRows();
|
$res = $this->db->affectedRows();
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function checkDepartmentName($depCode ,$departmentName){
|
function checkDepartmentName($departmentName, $headDepCode, $depCode)
|
||||||
$builder = $this->db->table('t_departmentdetails');
|
{
|
||||||
|
|
||||||
if(!empty($depCode)){
|
$builder = $this->db->table('t_departmentdetails');
|
||||||
$builder = $builder -> where(' DEPCode !=', $depCode);
|
|
||||||
}
|
//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;
|
||||||
|
|
||||||
$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);
|
$builder->where('REPLACE(MaterialName, " ", "")' , $materialName);
|
||||||
|
|
||||||
$query = $builder->get();
|
$query = $builder->get();
|
||||||
|
|
||||||
if ($query->getNumRows() > 0) {
|
if ($query->getNumRows() > 0) {
|
||||||
return $query->getResultArray();
|
return $query->getResultArray();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,9 +1,22 @@
|
|||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.num {
|
.num {
|
||||||
text-align: right;
|
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,
|
||||||
.fht-table thead,
|
.fht-table thead,
|
||||||
.fht-table tfoot,
|
.fht-table tfoot,
|
||||||
@ -30,7 +43,7 @@
|
|||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
/*table-layout: fixed; Algoritmo de distribucion fijo */
|
||||||
white-space:nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fht-table th,
|
.fht-table th,
|
||||||
@ -164,7 +177,6 @@
|
|||||||
border-right: 2px solid #ddd;
|
border-right: 2px solid #ddd;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="content-page">
|
<div class="content-page">
|
||||||
@ -186,10 +198,17 @@
|
|||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="button" class="btn btn-success" data-target="#coatingMachineDetailModal"
|
<div>
|
||||||
data-toggle="modal">
|
<button type="button" class="btn btn-danger" data-target="#productionBatchCardDetailModalId"
|
||||||
Add New Record
|
data-toggle="modal">
|
||||||
</button>
|
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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -209,25 +228,25 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form method='post' action="<?= base_url('/coatingMachineDetails');?>">
|
<form method='post' action="<?= base_url('/coatingMachineDetails'); ?>">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
||||||
<div class=form-row>
|
<div class=form-row>
|
||||||
<div class="form-group col-md-2 mt-2 ">
|
<div class="form-group col-md-2 mt-2 ">
|
||||||
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
value="<?= $month; ?>" name="month"
|
value="<?= $month; ?>" name="month"
|
||||||
class="form-control monthpicker" id="monthpicker">
|
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>
|
||||||
|
|
||||||
<div class="form-group col-md-2">
|
|
||||||
<button type="submit" class="btn btn-success"> Change Month </button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@ -258,18 +277,19 @@
|
|||||||
if (!empty($coatingMachineDetails)) {
|
if (!empty($coatingMachineDetails)) {
|
||||||
|
|
||||||
foreach ($coatingMachineDetails as $record) {
|
foreach ($coatingMachineDetails as $record) {
|
||||||
?>
|
?>
|
||||||
<tr data-id="<?php echo $record['id']; ?>"
|
<tr data-id="<?php echo $record['id']; ?>"
|
||||||
<?php
|
<?php
|
||||||
$currentDate = date('d-m-Y');
|
$currentDate = date('d-m-Y');
|
||||||
$dateInMonthDmYFormat=DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
$dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
if ($dateInMonthDmYFormat === $currentDate) {
|
||||||
?>
|
echo 'style="background: #cef0ad;"';
|
||||||
>
|
}
|
||||||
|
?>>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
$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 $date ?></td>
|
||||||
<td class="celda_normal"><?php echo $record['shift'] ?></td>
|
<td class="celda_normal"><?php echo $record['shift'] ?></td>
|
||||||
@ -293,7 +313,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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'] ?>">
|
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>
|
title="Click here to Delete "></i>
|
||||||
@ -305,7 +325,7 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -316,20 +336,20 @@
|
|||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<?php if(empty($coatingMachineDetails)){ ?>
|
<?php if (empty($coatingMachineDetails)) { ?>
|
||||||
<h5 align="center" style="color:grey;">
|
<h5 align="center" style="color:grey;">
|
||||||
No Coating Machine Details present in this month
|
No Coating Machine Details present in this month
|
||||||
</h5>
|
</h5>
|
||||||
<?php }?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
</div> <!-- end card body-->
|
</div> <!-- end card body-->
|
||||||
</div> <!-- end card -->
|
</div> <!-- end card -->
|
||||||
</div><!-- end col-->
|
</div><!-- end col-->
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- container -->
|
</div>
|
||||||
</div> <!-- content -->
|
</div> <!-- container -->
|
||||||
|
</div> <!-- content -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -350,7 +370,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- form -->
|
<!-- 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="modal-body">
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -369,7 +389,7 @@
|
|||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<select class="form-control" name="machineOnTime" id="machineOnTimeHrId" required>
|
<select class="form-control" name="machineOnTime" id="machineOnTimeHrId" required>
|
||||||
<option value="">Select Time</option>
|
<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>
|
<option value="12:30 AM"> 12:30 AM</option>
|
||||||
<?php
|
<?php
|
||||||
// Loop through the hours 1 to 12
|
// 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 . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -396,7 +415,6 @@
|
|||||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@ -410,7 +428,7 @@
|
|||||||
<span class="badge mandatory">*</span>
|
<span class="badge mandatory">*</span>
|
||||||
<select class="form-control" name="machineOffTime" id="machineOffTimeHrId" required>
|
<select class="form-control" name="machineOffTime" id="machineOffTimeHrId" required>
|
||||||
<option value="">Select Time</option>
|
<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>
|
<option value="12:30 AM"> 12:30 AM</option>
|
||||||
<?php
|
<?php
|
||||||
// Loop through the hours 1 to 12
|
// 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 . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 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>
|
<option value="12:30 PM"> 12:30 PM</option>
|
||||||
<?php
|
<?php
|
||||||
// Loop through the hours 1 to 12
|
// 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 . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@ -530,7 +546,7 @@
|
|||||||
|
|
||||||
<!-- form -->
|
<!-- form -->
|
||||||
<form method="post" id="editCoatingMachineDetailModalFormId"
|
<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="modal-body">
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -561,7 +577,6 @@
|
|||||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -576,7 +591,6 @@
|
|||||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@ -599,11 +613,10 @@
|
|||||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 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>
|
<option value="12:30 PM">12:30 PM</option>
|
||||||
<?php
|
<?php
|
||||||
// Loop through the hours 1 to 12
|
// Loop through the hours 1 to 12
|
||||||
for ($hour = 1; $hour < 12; $hour++) {
|
for ($hour = 1; $hour < 12; $hour++) {
|
||||||
@ -613,7 +626,6 @@
|
|||||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||||
|
|
||||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
@ -647,7 +659,7 @@
|
|||||||
<input type="text" class="form-control" id="editTotalGasConsumptionId"
|
<input type="text" class="form-control" id="editTotalGasConsumptionId"
|
||||||
name="totalGasConsumption" value="" required>
|
name="totalGasConsumption" value="" required>
|
||||||
<input type="hidden" class="form-control" id="existingTotalGasConsumptionId"
|
<input type="hidden" class="form-control" id="existingTotalGasConsumptionId"
|
||||||
name="existingTotalGasConsumption" value="" >
|
name="existingTotalGasConsumption" value="">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -691,9 +703,167 @@
|
|||||||
</div>
|
</div>
|
||||||
</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">
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -702,14 +872,16 @@
|
|||||||
function confirmDelete(event) {
|
function confirmDelete(event) {
|
||||||
|
|
||||||
let result = confirm(` Do you Confirm to Delete the Coating Machine Detail?`);
|
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>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
$('#exampleSelect2 ').select2();
|
$('#exampleSelect2 ').select2();
|
||||||
$('#machineOnTimeHrId ').select2();
|
$('#machineOnTimeHrId ').select2();
|
||||||
$('#machineOffTimeHrId ').select2();
|
$('#machineOffTimeHrId ').select2();
|
||||||
@ -723,16 +895,16 @@
|
|||||||
<!-- appending values in the edit coating machine detail modal from the table -->
|
<!-- appending values in the edit coating machine detail modal from the table -->
|
||||||
|
|
||||||
<script>
|
<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');
|
var row = $(this).closest('tr');
|
||||||
|
|
||||||
// Get values from the row
|
// Get values from the row
|
||||||
|
|
||||||
var date = row.find('td:eq(0)').text().split('-');
|
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 shift = row.find('td:eq(1)').text();
|
||||||
var machineOnTimeHr = row.find('td:eq(2)').text();
|
var machineOnTimeHr = row.find('td:eq(2)').text();
|
||||||
var machineOffTimeHr = row.find('td:eq(3)').text();
|
var machineOffTimeHr = row.find('td:eq(3)').text();
|
||||||
@ -750,7 +922,7 @@
|
|||||||
|
|
||||||
$('#editCoatingMachineDetailId').val(row.data('id'));
|
$('#editCoatingMachineDetailId').val(row.data('id'));
|
||||||
$('#editCustomerNameId').val(customerName);
|
$('#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);
|
$('#editShiftId').val(shift);
|
||||||
$('#editMachineOnTimeHrId').val(machineOnTimeHr).change();
|
$('#editMachineOnTimeHrId').val(machineOnTimeHr).change();
|
||||||
$('#editMachineOffTimeHrId').val(machineOffTimeHr).change();
|
$('#editMachineOffTimeHrId').val(machineOffTimeHr).change();
|
||||||
@ -768,17 +940,15 @@
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- calculations for some fields needed in onChange while adding coating machine details -->
|
<!-- calculations for some fields needed in onChange while adding coating machine details -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
$(document).ready(function () {
|
|
||||||
|
|
||||||
|
|
||||||
$('#machineOnTimeHrId , #dateId').change(function () {
|
$('#machineOnTimeHrId , #dateId').change(function() {
|
||||||
|
|
||||||
let machineOnDate = $('#dateId').val();
|
let machineOnDate = $('#dateId').val();
|
||||||
|
|
||||||
@ -791,7 +961,7 @@
|
|||||||
let machineOnTimeHr = $('#machineOnTimeHrId').val();
|
let machineOnTimeHr = $('#machineOnTimeHrId').val();
|
||||||
let machineOffTimeHr = $('#machineOffTimeHrId').val();
|
let machineOffTimeHr = $('#machineOffTimeHrId').val();
|
||||||
|
|
||||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr );
|
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||||
|
|
||||||
if (!machineRunningInHrs) {
|
if (!machineRunningInHrs) {
|
||||||
$('machineOnTimeHrId').val('');
|
$('machineOnTimeHrId').val('');
|
||||||
@ -806,7 +976,7 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#machineOffTimeHrId , #dateId').change(function () {
|
$('#machineOffTimeHrId , #dateId').change(function() {
|
||||||
|
|
||||||
let machineOnDate = $('#dateId').val();
|
let machineOnDate = $('#dateId').val();
|
||||||
|
|
||||||
@ -821,7 +991,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||||
|
|
||||||
if (!machineRunningInHrs) {
|
if (!machineRunningInHrs) {
|
||||||
|
|
||||||
@ -836,7 +1006,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#totalCoatingSandId').change(function () {
|
$('#totalCoatingSandId').change(function() {
|
||||||
|
|
||||||
let totalCoatingSandValue = $(this).val();
|
let totalCoatingSandValue = $(this).val();
|
||||||
let machineRunningInHrsValue = $('#machineRunningInHrsId').val();
|
let machineRunningInHrsValue = $('#machineRunningInHrsId').val();
|
||||||
@ -849,7 +1019,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#totalGasConsumptionId').change(function () {
|
$('#totalGasConsumptionId').change(function() {
|
||||||
|
|
||||||
let totalGasConsumptionValue = $(this).val();
|
let totalGasConsumptionValue = $(this).val();
|
||||||
let machineRunningInHrsValue = $('#machineRunningInHrsId').val();
|
let machineRunningInHrsValue = $('#machineRunningInHrsId').val();
|
||||||
@ -862,16 +1032,15 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- calculations for some fields needed in onChange while editing coating machine details -->
|
<!-- calculations for some fields needed in onChange while editing coating machine details -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
$('#editMachineOnTimeHrId , #editDateId').change(function () {
|
$('#editMachineOnTimeHrId , #editDateId').change(function() {
|
||||||
|
|
||||||
let machineOnDate = $('#editDateId').val();
|
let machineOnDate = $('#editDateId').val();
|
||||||
|
|
||||||
@ -884,7 +1053,7 @@
|
|||||||
let machineOnTimeHr = $('#editMachineOnTimeHrId').val();
|
let machineOnTimeHr = $('#editMachineOnTimeHrId').val();
|
||||||
let machineOffTimeHr = $('#editMachineOffTimeHrId').val();
|
let machineOffTimeHr = $('#editMachineOffTimeHrId').val();
|
||||||
|
|
||||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||||
|
|
||||||
if (!machineRunningInHrs) {
|
if (!machineRunningInHrs) {
|
||||||
$('#editMachineOnTimeHrId').val('');
|
$('#editMachineOnTimeHrId').val('');
|
||||||
@ -899,7 +1068,7 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#editMachineOffTimeHrId , #editDateId').change(function () {
|
$('#editMachineOffTimeHrId , #editDateId').change(function() {
|
||||||
|
|
||||||
let machineOnDate = $('#editDateId').val();
|
let machineOnDate = $('#editDateId').val();
|
||||||
|
|
||||||
@ -913,7 +1082,7 @@
|
|||||||
let machineOnTimeHr = $('#editMachineOnTimeHrId').val();
|
let machineOnTimeHr = $('#editMachineOnTimeHrId').val();
|
||||||
let machineOffTimeHr = $('#editMachineOffTimeHrId').val();
|
let machineOffTimeHr = $('#editMachineOffTimeHrId').val();
|
||||||
|
|
||||||
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
let machineRunningInHrs = calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr);
|
||||||
|
|
||||||
if (!machineRunningInHrs) {
|
if (!machineRunningInHrs) {
|
||||||
|
|
||||||
@ -928,7 +1097,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#editTotalCoatingSandId').change(function () {
|
$('#editTotalCoatingSandId').change(function() {
|
||||||
|
|
||||||
let totalCoatingSandValue = $(this).val();
|
let totalCoatingSandValue = $(this).val();
|
||||||
let machineRunningInHrsValue = $('#editMachineRunningInHrsId').val();
|
let machineRunningInHrsValue = $('#editMachineRunningInHrsId').val();
|
||||||
@ -941,7 +1110,7 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$('#editTotalGasConsumptionId').change(function () {
|
$('#editTotalGasConsumptionId').change(function() {
|
||||||
|
|
||||||
let totalGasConsumptionValue = $(this).val();
|
let totalGasConsumptionValue = $(this).val();
|
||||||
let machineRunningInHrsValue = $('#editMachineRunningInHrsId').val();
|
let machineRunningInHrsValue = $('#editMachineRunningInHrsId').val();
|
||||||
@ -960,54 +1129,51 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr) {
|
function calculateMachineRunInHrs(machineOnDate, machineOnTimeHr, machineOffTimeHr) {
|
||||||
|
|
||||||
let machineOnTime12 = machineOnTimeHr;
|
let machineOnTime12 = machineOnTimeHr;
|
||||||
let machineOffTime12 = machineOffTimeHr;
|
let machineOffTime12 = machineOffTimeHr;
|
||||||
|
|
||||||
let machineOnTime24 = convertTo24Hr(machineOnTime12);
|
let machineOnTime24 = convertTo24Hr(machineOnTime12);
|
||||||
let machineOffTime24 = convertTo24Hr(machineOffTime12);
|
let machineOffTime24 = convertTo24Hr(machineOffTime12);
|
||||||
|
|
||||||
const startDate = new Date(`${machineOnDate}T${machineOnTime24}`);
|
const startDate = new Date(`${machineOnDate}T${machineOnTime24}`);
|
||||||
const endDate = new Date(`${machineOnDate}T${machineOffTime24}`);
|
const endDate = new Date(`${machineOnDate}T${machineOffTime24}`);
|
||||||
|
|
||||||
// Handle the case where end time is on the next day
|
// Handle the case where end time is on the next day
|
||||||
if (endDate < startDate) {
|
if (endDate < startDate) {
|
||||||
endDate.setDate(endDate.getDate() + 1);
|
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>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
function convertTo24Hr(time) {
|
||||||
|
const [timePart, modifier] = time.split(" ");
|
||||||
|
let [hours, minutes] = timePart.split(":");
|
||||||
|
|
||||||
function convertTo24Hr(time) {
|
// Convert hours to a number
|
||||||
const [timePart, modifier] = time.split(" ");
|
hours = parseInt(hours, 10);
|
||||||
let [hours, minutes] = timePart.split(":");
|
|
||||||
|
|
||||||
// Convert hours to a number
|
// Adjust hours based on AM/PM
|
||||||
hours = parseInt(hours, 10);
|
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
|
// Format hours and minutes to ensure two digits
|
||||||
if (modifier == "PM" && hours < 12) {
|
return `${String(hours).padStart(2, '0')}:${minutes}:00`;
|
||||||
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`;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -1018,5 +1184,4 @@ function convertTo24Hr(time) {
|
|||||||
autoclose: true,
|
autoclose: true,
|
||||||
orientation: 'bottom'
|
orientation: 'bottom'
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -42,14 +42,14 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="p-2">
|
<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">
|
<div class="box-body">
|
||||||
<!-- Supplier Information -->
|
<!-- Supplier Information -->
|
||||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class=" col-md-3">
|
<div class=" col-md-3">
|
||||||
<label class="col-form-label" for="MaterialName">Material Name<span class="badge">*</span></label>
|
<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>
|
||||||
<div class=" col-md-3">
|
<div class=" col-md-3">
|
||||||
<label class="col-form-label" for="MaterialType">Material Type<span class="badge">*</span></label>
|
<label class="col-form-label" for="MaterialType">Material Type<span class="badge">*</span></label>
|
||||||
@ -137,7 +137,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 text-right">
|
<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="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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</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 = '';
|
var materialCode = '';
|
||||||
|
|
||||||
if(materialName == ''){
|
if(materialName == ''){
|
||||||
@ -311,28 +320,35 @@
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url(); ?>materialExist",
|
url: "<?php echo base_url(); ?>materialExist",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var count = data.length;
|
|
||||||
if (count >= 1) {
|
if (data && data.length >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
if(data[0].IsActive == 1){
|
|
||||||
|
if(data[0]?.IsActive == 1){
|
||||||
alert('Material name already existed ! ');
|
alert('Material name already existed ! ');
|
||||||
|
$('#MaterialName').val('');
|
||||||
}else{
|
}else{
|
||||||
alert('Material name already existing in the deleted section.!!');
|
alert('Material name already existing in the deleted section.!!');
|
||||||
|
$('#MaterialName').val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var related_name = "" ;
|
||||||
var related_name = "";
|
|
||||||
$.each(data, function(i, obj) {
|
$.each(data, function(i, obj) {
|
||||||
|
|
||||||
related_name += obj.MaterialCode + " - " + obj.MaterialName + " - " + obj.MaterialType + " - " + obj.Category + "\n";
|
related_name += obj.MaterialCode + " - " + obj.MaterialName + " - " + obj.MaterialType + " - " + obj.Category + "\n";
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
alert("'" + materialname + "' - related materials are , " + " \n \n" + related_name);
|
alert("'" + materialName + "' - related materials are , " + " \n \n" + related_name);
|
||||||
$("#MaterialName").val('');
|
$("#MaterialName").val('');
|
||||||
$("#MaterialName").focus();
|
$("#MaterialName").focus();
|
||||||
} else {
|
|
||||||
|
|
||||||
|
} else{
|
||||||
|
console.log("Material name is unique");
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
|
||||||
|
$('#addMaterialForm').submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -348,6 +364,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function Validate() {
|
function Validate() {
|
||||||
|
|
||||||
if ($("#MaterialName").val().length < 1) {
|
if ($("#MaterialName").val().length < 1) {
|
||||||
alert('Please Enter MaterialName');
|
alert('Please Enter MaterialName');
|
||||||
$("#MaterialName").focus();
|
$("#MaterialName").focus();
|
||||||
@ -369,6 +386,8 @@
|
|||||||
$("#MaterialType").focus();
|
$("#MaterialType").focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -433,3 +452,14 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</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>
|
||||||
<div class="col-md-12 text-right">
|
<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="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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -237,6 +237,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!getContactNumberValidation) {
|
if (!getContactNumberValidation) {
|
||||||
|
alert('Please Enter Valid Contact Number');
|
||||||
$("#ContactNumber").focus();
|
$("#ContactNumber").focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -252,13 +253,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!validateEmail()) {
|
if (!validateEmail()) {
|
||||||
|
alert('Please Enter Valid Email Address');
|
||||||
$('#emailid').focus();
|
$('#emailid').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#supplierName').change(function() {
|
$('#addSupplierBtnId').click(function() {
|
||||||
|
|
||||||
var supplierName = $('#supplierName').val().trim();
|
var supplierName = $('#supplierName').val().trim();
|
||||||
var supplierId = $('#SupplierID').val();
|
var supplierId = $('#SupplierID').val();
|
||||||
|
|
||||||
@ -274,7 +279,7 @@
|
|||||||
var count = data?data.length:0;
|
var count = data?data.length:0;
|
||||||
if (count >= 1) {
|
if (count >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
if(data[0].IsActive == 1){
|
if(data[0]?.IsActive == 1){
|
||||||
alert('supplier already existed ! ');
|
alert('supplier already existed ! ');
|
||||||
}else{
|
}else{
|
||||||
alert('supplier already existing in the deleted section..!! ');
|
alert('supplier already existing in the deleted section..!! ');
|
||||||
@ -284,21 +289,17 @@
|
|||||||
$.each(data, function(i, obj) {
|
$.each(data, function(i, obj) {
|
||||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||||
});
|
});
|
||||||
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
alert("'" + supplierName + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||||
$("#supplierName").val('');
|
|
||||||
$("#supplierName").focus();
|
$("#supplierName").focus();
|
||||||
} else {
|
} else {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
//4Debug
|
if (Validate()) {
|
||||||
// alert('This is New Supplier! ');
|
$('#addsupplier').submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//4Debug
|
|
||||||
//console.log(data);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function(error) {
|
error: function(error) {
|
||||||
//4Debug
|
|
||||||
// alert("Error Occur");
|
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.error("Error" , error);
|
console.error("Error" , error);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,7 +158,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 text-right">
|
<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="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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -383,8 +383,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -431,43 +430,68 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#AssetName').on('change',function(){
|
$('#addAssetBtnId').on('click',function(){
|
||||||
|
|
||||||
let assetName = $(this).val().trim();
|
let validation = validate();
|
||||||
let assetId = $('#AssetCode').val() ?? '';
|
|
||||||
|
|
||||||
$('#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();
|
|
||||||
}
|
}
|
||||||
}
|
else{
|
||||||
},
|
return false;
|
||||||
error: function(error){
|
}
|
||||||
//error
|
|
||||||
console.error('error ocurred' + error);
|
|
||||||
},
|
|
||||||
complete :function (){
|
|
||||||
$('#loader').hide();
|
|
||||||
console.log('ajax call completed..!!');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</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">
|
<div class="col-md-12 text-right">
|
||||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||||
<a class="btn btn-secondary" href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -388,7 +388,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#configurationname').change(function () {
|
$('#addConFigBtnId').click(function (){
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
||||||
@ -399,7 +399,7 @@
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
if(data && data.length > 0){
|
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..!!");
|
alert("This Configuration Name is already present. kindly change it..!!");
|
||||||
$('#configurationname').val('');
|
$('#configurationname').val('');
|
||||||
return;
|
return;
|
||||||
@ -408,7 +408,9 @@
|
|||||||
$('#configurationname').val('');
|
$('#configurationname').val('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}else{
|
||||||
|
$('#addconfig').submit();
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error:function(error){
|
error:function(error){
|
||||||
@ -439,3 +441,15 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</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="card-body" style="padding: 1rem 2rem !important;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<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">
|
<div class="box-body">
|
||||||
<!-- Supplier Information -->
|
<!-- Supplier Information -->
|
||||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||||
@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 text-right">
|
<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="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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -107,71 +107,30 @@
|
|||||||
</div> <!-- content -->
|
</div> <!-- content -->
|
||||||
</div>
|
</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>
|
<script>
|
||||||
|
|
||||||
$("#DepartmentName").on('change',function(){
|
$("#deptBtnId").on('click',function(){
|
||||||
let departmentName = $("#DepartmentName").val().trim();
|
let departmentName = $("#DepartmentName").val().trim();
|
||||||
let depCode =$("#DEPCode").val()??'';
|
let headDepCode =$("#HeadDept").val()??'';
|
||||||
|
let depCode =$("#DEPCode").val() ?? '';
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
data:{departmentName,depCode},
|
data:{departmentName,headDepCode ,depCode},
|
||||||
url:"<?php echo base_url();?>checkDepartmentName",
|
url:"<?php echo base_url();?>checkDepartmentName",
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
if(data && data.length >0){
|
if(data && data.length >0){
|
||||||
let isActive = data[0].IsActive;
|
let isActive = data[0]. IsActive;
|
||||||
if(isActive == 1){
|
if(isActive == 1){
|
||||||
alert("Department name already Exists ..!! ");
|
alert("Department name already Exists ..!! ");
|
||||||
}else{
|
}else{
|
||||||
alert("Department Name already Existing in the deleted section.!!");
|
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) {
|
success: function (data) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
let isactive =data[0].IsActive;
|
let isactive =data[0]?.IsActive;
|
||||||
|
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
|
|
||||||
@ -430,3 +430,14 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</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="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<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">
|
<div class="form-row">
|
||||||
|
|
||||||
<input type="text" class="form-control" id="AssetCode" name="AssetCode" value="<?php echo $AssetCode; ?>" hidden>
|
<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="form-row mt-4 text-right">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<a href="<?php echo base_url() ?>assetListing" class="btn btn-secondary">Cancel</a>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -426,7 +426,7 @@ if (!empty($assetList)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#AssetName').on('change',function(){
|
$('#editAssetBtnId').on('click',function(){
|
||||||
|
|
||||||
let assetId = $('#AssetCode').val();
|
let assetId = $('#AssetCode').val();
|
||||||
let assetName = $(this).val().trim();
|
let assetName = $(this).val().trim();
|
||||||
@ -438,18 +438,22 @@ if (!empty($assetList)) {
|
|||||||
url:'<?php echo base_url()?>assetdetails/checkAssetName',
|
url:'<?php echo base_url()?>assetdetails/checkAssetName',
|
||||||
data:{assetId,assetName},
|
data:{assetId,assetName},
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if(data && data.length>0){
|
if(data && data.length>0){
|
||||||
let IsActive = data[0].IsActive;
|
let IsActive = data[0]?.IsActive;
|
||||||
if(IsActive == 1){
|
if(IsActive == 1){
|
||||||
alert("Asset Name Exists..!!");
|
alert("Asset Name Exists..!!");
|
||||||
$('#AssetName').val('');
|
$('#AssetName').val('');
|
||||||
$('#AssetName').focus();
|
$('#AssetName').focus();
|
||||||
|
}else{
|
||||||
|
alert("Asset Name Existing in deleted section..!!");
|
||||||
|
$('#AssetName').val('');
|
||||||
|
$('#AssetName').focus();
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
alert("Asset Name Existing in deleted section..!!");
|
|
||||||
$('#AssetName').val('');
|
$('#editAsset').submit();
|
||||||
$('#AssetName').focus();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
error: function(error){
|
error: function(error){
|
||||||
//error
|
//error
|
||||||
@ -466,3 +470,14 @@ if (!empty($assetList)) {
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</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()">
|
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||||
<span class="bold">Cancel</span>
|
<span class="bold">Cancel</span>
|
||||||
</button>
|
</button>
|
||||||
<input type="submit" class="btn btn-success" value="Submit" />
|
<input type="button" id="editRawMaterialBtnId" class="btn btn-success" value="Submit" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div><!-- /.card-body -->
|
</div><!-- /.card-body -->
|
||||||
@ -438,7 +438,7 @@ if ($total <= $reorder) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#MaterialName').change(function() {
|
$('#editRawMaterialBtnId').click(function(){
|
||||||
|
|
||||||
var materialName = $('#MaterialName').val();
|
var materialName = $('#MaterialName').val();
|
||||||
var materialCode = $('#RMcode').val();
|
var materialCode = $('#RMcode').val();
|
||||||
@ -458,14 +458,15 @@ if ($total <= $reorder) {
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
url: "<?php echo base_url(); ?>materialExist",
|
url: "<?php echo base_url(); ?>materialExist",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
var count = data.length;
|
|
||||||
|
|
||||||
if (count >= 1) {
|
if (data && data.length >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
if(data[0].IsActive == 1){
|
if(data[0]?.IsActive == 1){
|
||||||
alert('Material name already existed ! ');
|
alert('Material name already existed ! ');
|
||||||
|
$('#MaterialName').val('');
|
||||||
}else{
|
}else{
|
||||||
alert('Material name already existing in the deleted section.!!');
|
alert('Material name already existing in the deleted section.!!');
|
||||||
|
$('#MaterialName').val('');
|
||||||
}
|
}
|
||||||
var related_name = "";
|
var related_name = "";
|
||||||
$.each(data, function(i, obj) {
|
$.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").val('');
|
||||||
$("#MaterialName").focus();
|
$("#MaterialName").focus();
|
||||||
} else {
|
} else {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
// alert("empty data");
|
console.log("working")
|
||||||
|
$('#editRawmaterial').submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -556,3 +558,14 @@ 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="card-body" style="padding: 1rem 2rem !important;">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
||||||
<form class="form-horizontal" role="form" id="UpdateSupplier"
|
<form class="form-horizontal" role="form" id="UpdateSupplier"
|
||||||
action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
|
action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
@ -530,7 +531,7 @@ if (!empty($supplier)) {
|
|||||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||||
<span class="bold">Cancel</span>
|
<span class="bold">Cancel</span>
|
||||||
</button>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -560,11 +561,7 @@ if (!empty($supplier)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Validate() {
|
function Validate() {
|
||||||
// if(!validatePAN())
|
|
||||||
// {
|
|
||||||
// return false;
|
|
||||||
// $('#panno').focus();
|
|
||||||
// }
|
|
||||||
if ($("#supplierName").val().length < 1) {
|
if ($("#supplierName").val().length < 1) {
|
||||||
alert('Please Enter Supplier Name');
|
alert('Please Enter Supplier Name');
|
||||||
$("#supplierName").focus();
|
$("#supplierName").focus();
|
||||||
@ -585,17 +582,12 @@ if (!empty($supplier)) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
return true;
|
||||||
if(!validateGST())
|
|
||||||
{
|
|
||||||
$('#GSTNo').focus();
|
|
||||||
return false;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Call to ajax existing PAN
|
//Call to ajax existing PAN
|
||||||
$('#supplierName').change(function () {
|
$('#updateSupplierBtnId').click(function () {
|
||||||
var supplierName = $('#supplierName').val().trim();
|
var supplierName = $('#supplierName').val().trim();
|
||||||
var supplierId = $('#SupplierID').val();
|
var supplierId = $('#SupplierID').val();
|
||||||
|
|
||||||
@ -612,7 +604,7 @@ if (!empty($supplier)) {
|
|||||||
var count = data.length;
|
var count = data.length;
|
||||||
if (count >= 1) {
|
if (count >= 1) {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
if(data[0].IsActive == 1){
|
if(data[0]?.IsActive == 1){
|
||||||
alert('supplier already existed ! ');
|
alert('supplier already existed ! ');
|
||||||
}else{
|
}else{
|
||||||
alert('supplier already existing in the deleted section..!! ');
|
alert('supplier already existing in the deleted section..!! ');
|
||||||
@ -622,10 +614,12 @@ if (!empty($supplier)) {
|
|||||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||||
});
|
});
|
||||||
alert("'" + supplierName + "' - supplier details are , " + " \n \n" + related_supplier);
|
alert("'" + supplierName + "' - supplier details are , " + " \n \n" + related_supplier);
|
||||||
$("#supplierName").val('');
|
|
||||||
$("#supplierName").focus();
|
$("#supplierName").focus();
|
||||||
} else {
|
} else {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
if (Validate()) {
|
||||||
|
$('#UpdateSupplier').submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if (!empty($master)) {
|
|||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
if ($error) {
|
if ($error) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-danger alert-dismissable">
|
<div class="alert alert-danger alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<?php echo session()->getFlashdata('error'); ?>
|
<?php echo session()->getFlashdata('error'); ?>
|
||||||
@ -47,7 +47,7 @@ if (!empty($master)) {
|
|||||||
<?php
|
<?php
|
||||||
$success = session()->getFlashdata('success');
|
$success = session()->getFlashdata('success');
|
||||||
if ($success) {
|
if ($success) {
|
||||||
?>
|
?>
|
||||||
<div class="alert alert-info alert-dismissable">
|
<div class="alert alert-info alert-dismissable">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
<?php echo session()->getFlashdata('success'); ?>
|
<?php echo session()->getFlashdata('success'); ?>
|
||||||
@ -77,13 +77,13 @@ if (!empty($master)) {
|
|||||||
<label class="col-form-label" for="ConfigName">Configuration Name</label>
|
<label class="col-form-label" for="ConfigName">Configuration Name</label>
|
||||||
<font color="Red">*</font>
|
<font color="Red">*</font>
|
||||||
<?php
|
<?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);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<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>
|
<font color="Red">*</font>
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'Remarks', 'value' => set_value('Remarks', $Comments), 'id' => 'Remarks', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
|
$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="form-row" style="margin-top:10px">
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-12 text-right">
|
||||||
<a data-toggle="modal" href="#AddConfiguration" style="margin-right: 10px;"
|
<a data-toggle="modal" href="#AddConfiguration" style="margin-right: 10px;"
|
||||||
class="btn btn-success"><i class="fa fa-plus"></i> Add
|
class="btn btn-success"><i class="fa fa-plus"></i>
|
||||||
Configuration</a>
|
Configuration Value</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ if (!empty($master)) {
|
|||||||
$index = 0;
|
$index = 0;
|
||||||
foreach ($child as $con) {
|
foreach ($child as $con) {
|
||||||
$index++;
|
$index++;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="hidden" name="DbKey<?php echo $index ?>"
|
<input type="hidden" name="DbKey<?php echo $index ?>"
|
||||||
id="DbKey<?php echo $index ?>" value="<?php echo $con->Key ?>">
|
id="DbKey<?php echo $index ?>" value="<?php echo $con->Key ?>">
|
||||||
@ -143,10 +143,10 @@ if (!empty($master)) {
|
|||||||
value="<?php echo $con->ConfigValue ?>">
|
value="<?php echo $con->ConfigValue ?>">
|
||||||
|
|
||||||
<tr class="<?php if ($con->isActive == 0) {
|
<tr class="<?php if ($con->isActive == 0) {
|
||||||
echo "deactivatedRow";
|
echo "deactivatedRow";
|
||||||
} ?>" style="<?php if ($con->isActive == 0) {
|
} ?>" style="<?php if ($con->isActive == 0) {
|
||||||
echo "display:none";
|
echo "display:none";
|
||||||
} ?>">
|
} ?>">
|
||||||
|
|
||||||
<td><?php echo $index; ?></td>
|
<td><?php echo $index; ?></td>
|
||||||
<td><?php echo $con->ConfigValue; ?></td>
|
<td><?php echo $con->ConfigValue; ?></td>
|
||||||
@ -168,7 +168,7 @@ if (!empty($master)) {
|
|||||||
title="Click here to Edit Config Value"></i>
|
title="Click here to Edit Config Value"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a onclick="confirmDeleteConfig(event)" href="<?php echo base_url() . 'configurationctrl/deleteConfigValue
|
<a onclick="confirmDeleteConfig(event)" href="<?php echo base_url() . 'configurationctrl/deleteConfigValue
|
||||||
?ConfigValue=' . $con->ConfigValue . '
|
?ConfigValue=' . $con->ConfigValue . '
|
||||||
@ -182,7 +182,7 @@ if (!empty($master)) {
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }
|
<?php }
|
||||||
} ?>
|
} ?>
|
||||||
<input type="hidden" name="txtRowCount" id="txtRowCount"
|
<input type="hidden" name="txtRowCount" id="txtRowCount"
|
||||||
value="<?php echo $index ?>" />
|
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="form-row text-right" style="margin-top:10px; text-align:right">
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-12 text-right">
|
||||||
<a href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -234,8 +234,7 @@ if (!empty($master)) {
|
|||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px"
|
<a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px"
|
||||||
data-dismiss="modal">Cancel</a>
|
data-dismiss="modal">Cancel</a>
|
||||||
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"><i
|
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"> Add </a>
|
||||||
class="fa fa-plus"></i> Add</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -330,13 +329,14 @@ if (!empty($master)) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var index = $('#txtRowCount').val();
|
var index = $('#txtRowCount').val();
|
||||||
var userid = '';
|
var userid = '';
|
||||||
|
|
||||||
$("#Edit").on("shown.bs.modal", function (e) {
|
$("#Edit").on("shown.bs.modal", function(e) {
|
||||||
userid = $(e.relatedTarget).data('userid');
|
userid = $(e.relatedTarget).data('userid');
|
||||||
$('#key').val($('#configtable tr:eq(' + userid + ') td:eq(0)').text());
|
$('#key').val($('#configtable tr:eq(' + userid + ') td:eq(0)').text());
|
||||||
$('#Config_ID').val($('#ConfigId').val());
|
$('#Config_ID').val($('#ConfigId').val());
|
||||||
@ -345,7 +345,7 @@ if (!empty($master)) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.tempClickAdd').click(function () {
|
$('.tempClickAdd').click(function() {
|
||||||
|
|
||||||
var cid = $('#ConfigId').val()
|
var cid = $('#ConfigId').val()
|
||||||
if ($("#AddConfigValue").val() != '-1' && $("#AddConfigValue").val() != null && $("#AddConfigValue").val() != '') {
|
if ($("#AddConfigValue").val() != '-1' && $("#AddConfigValue").val() != null && $("#AddConfigValue").val() != '') {
|
||||||
@ -404,7 +404,7 @@ if (!empty($master)) {
|
|||||||
theForm.append(input);
|
theForm.append(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.tempClickUpdate').click(function () {
|
$('.tempClickUpdate').click(function() {
|
||||||
|
|
||||||
|
|
||||||
if ($("#configValue").val() != '') {
|
if ($("#configValue").val() != '') {
|
||||||
@ -450,7 +450,7 @@ if (!empty($master)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//var baseurl = "<?php print base_url(); ?>";
|
//var baseurl = "<?php print base_url(); ?>";
|
||||||
$(".editConfig").submit(function (e) {
|
$(".editConfig").submit(function(e) {
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
@ -458,7 +458,7 @@ if (!empty($master)) {
|
|||||||
data: $('.editConfig').serialize(),
|
data: $('.editConfig').serialize(),
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: "<?php echo base_url(); ?>configurationctrl/configedit",
|
url: "<?php echo base_url(); ?>configurationctrl/configedit",
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
//alert(data);
|
//alert(data);
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
|
|
||||||
@ -493,57 +493,60 @@ if (!empty($master)) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#ConfigName').change(function () {
|
$('#updateConfigBtnId').click(function() {
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: {
|
data: {
|
||||||
configName: $('#ConfigName').val().trim(),
|
configName: $('#ConfigName').val().trim(),
|
||||||
configId : $('#ConfigId').val().trim()
|
configId: $('#ConfigId').val().trim()
|
||||||
},
|
},
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: "<?php echo base_url(); ?>configurationctrl/configNameCheck",
|
url: "<?php echo base_url(); ?>configurationctrl/configNameCheck",
|
||||||
success: function (data) {
|
success: function(data) {
|
||||||
|
|
||||||
if (data && data.length > 0) {
|
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..!!");
|
alert("This Configuration Name is already present. kindly change it..!!");
|
||||||
$('#ConfigName').val('');
|
$('#ConfigName').val('');
|
||||||
return;
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
alert("This Configuration Name is already present in deleted section. kindly reactivate it If needed..!!");
|
alert("This Configuration Name is already present in deleted section. kindly reactivate it If needed..!!");
|
||||||
$('#ConfigName').val('');
|
$('#ConfigName').val('');
|
||||||
return;
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
$('#editConfig').submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function (error) {
|
error: function(error) {
|
||||||
console.log("error occured..!!", error);
|
console.log("error occured..!!", error);
|
||||||
},
|
},
|
||||||
complete: function () {
|
complete: function() {
|
||||||
$('#loader').hide();
|
$('#loader').hide();
|
||||||
console.log('ajax call completed..!!');
|
console.log('ajax call completed..!!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
$('#AddConfigValue, #configValue').change(function() {
|
||||||
$('#AddConfigValue, #configValue').change(function () {
|
|
||||||
|
|
||||||
let configValue = $(this).val();
|
let configValue = $(this).val();
|
||||||
let configTable = customTableToJson();
|
let configTable = customTableToJson();
|
||||||
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);
|
let configValueExisting = configTable.filter(element => element['Configuration Value'] == configValue);
|
||||||
|
|
||||||
if(configValueExisting && configValueExisting.length > 0){
|
if (configValueExisting && configValueExisting.length > 0) {
|
||||||
alert('configuration value is already present , Kindly check in Table and archive too..!!');
|
alert('configuration value is already present , Kindly check in Table and archive too..!!');
|
||||||
$(this).val('');
|
$(this).val('');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -553,14 +556,14 @@ if (!empty($master)) {
|
|||||||
let headers = [];
|
let headers = [];
|
||||||
|
|
||||||
// Get table headers
|
// Get table headers
|
||||||
$(`#configtable thead tr th`).each(function () {
|
$(`#configtable thead tr th`).each(function() {
|
||||||
headers.push($(this).text().trim());
|
headers.push($(this).text().trim());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Get table rows including hidden ones
|
// Get table rows including hidden ones
|
||||||
$(`#configtable tbody tr`).each(function () {
|
$(`#configtable tbody tr`).each(function() {
|
||||||
let row = {};
|
let row = {};
|
||||||
$(this).find('td').each(function (index) {
|
$(this).find('td').each(function(index) {
|
||||||
// Use the headers as keys for JSON
|
// Use the headers as keys for JSON
|
||||||
let header = headers[index];
|
let header = headers[index];
|
||||||
row[header] = $(this).text().trim();
|
row[header] = $(this).text().trim();
|
||||||
@ -576,13 +579,11 @@ if (!empty($master)) {
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
||||||
function showChildArchiveList() {
|
function showChildArchiveList() {
|
||||||
let isChecked = $("#showChildArchiveId").prop('checked');
|
let isChecked = $("#showChildArchiveId").prop('checked');
|
||||||
|
|
||||||
// Show or hide the rows based on checkbox status
|
// Show or hide the rows based on checkbox status
|
||||||
$(".deactivatedRow").each(function () {
|
$(".deactivatedRow").each(function() {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
$(this).show();
|
$(this).show();
|
||||||
} else {
|
} else {
|
||||||
@ -593,12 +594,12 @@ if (!empty($master)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
let table = $('#configtable');
|
let table = $('#configtable');
|
||||||
|
|
||||||
showChildArchiveList();
|
showChildArchiveList();
|
||||||
|
|
||||||
table.on('draw', function () {
|
table.on('draw', function() {
|
||||||
showChildArchiveList();
|
showChildArchiveList();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -606,12 +607,28 @@ if (!empty($master)) {
|
|||||||
|
|
||||||
function confirmDeleteConfig(event) {
|
function confirmDeleteConfig(event) {
|
||||||
let result = confirm("Do You want to delete this configuration ?");
|
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) {
|
function confirmReActivateConfig(event) {
|
||||||
let result = confirm("Do You want to Re activate deleted configuration ?");
|
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>
|
</script>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
<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">
|
<div class="box-body">
|
||||||
<!-- Department Information -->
|
<!-- Department Information -->
|
||||||
<legend>Department Information</legend>
|
<legend>Department Information</legend>
|
||||||
@ -136,7 +136,7 @@
|
|||||||
<div class="form-row" style="margin-top:10px">
|
<div class="form-row" style="margin-top:10px">
|
||||||
<div class="col-md-12 text-right">
|
<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="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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -173,13 +173,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$("#DepartmentName").on('change',function(){
|
$("#deptBtnId").on('click',function(){
|
||||||
let departmentName = $("#DepartmentName").val().trim();
|
let departmentName = $("#DepartmentName").val().trim();
|
||||||
let depCode =$("#DEPCode").val();
|
let depCode =$("#DEPCode").val();
|
||||||
|
let headDepCode = $("#HeadDept").val();
|
||||||
|
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
data:{departmentName,depCode},
|
data:{departmentName,headDepCode ,depCode},
|
||||||
url:"<?php echo base_url();?>checkDepartmentName",
|
url:"<?php echo base_url();?>checkDepartmentName",
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
@ -190,7 +192,8 @@ $("#DepartmentName").on('change',function(){
|
|||||||
}else{
|
}else{
|
||||||
alert("Department Name already Existing in the deleted section.!!");
|
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('createFactoryMachineMasterDetails')
|
||||||
: base_url('updateFactoryMachineMasterDetails?id=' . $masterData['id']); ?>" method="post"
|
: base_url('updateFactoryMachineMasterDetails?id=' . $masterData['id']); ?>" method="post"
|
||||||
class="form-label-left">
|
|
||||||
|
id="factoryFormId"
|
||||||
|
class="form-label-left">
|
||||||
|
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|
||||||
|
|
||||||
@ -79,7 +87,7 @@ $energyType = $masterData['energy_type'] ?? '';
|
|||||||
class="text-danger">*</span></label>
|
class="text-danger">*</span></label>
|
||||||
<select name="energyType" id="energyType"
|
<select name="energyType" id="energyType"
|
||||||
class="form-control searchabledropdown" data-toggle="select2" required>
|
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 value="diesel" <?= $energyType == 'diesel' ? 'selected' : '' ?>> Diesel
|
||||||
</option>
|
</option>
|
||||||
<option value="petrol" <?= $energyType == 'petrol' ? 'selected' : '' ?>> Petrol
|
<option value="petrol" <?= $energyType == 'petrol' ? 'selected' : '' ?>> Petrol
|
||||||
@ -102,7 +110,7 @@ $energyType = $masterData['energy_type'] ?? '';
|
|||||||
|
|
||||||
<div class="form-group col">
|
<div class="form-group col">
|
||||||
|
|
||||||
<button type="submit"
|
<button type="button" id="submitBtnId"
|
||||||
class="btn btn-info waves-effect waves-light">Submit</button>
|
class="btn btn-info waves-effect waves-light">Submit</button>
|
||||||
|
|
||||||
<button type="button" class="btn btn-secondary"
|
<button type="button" class="btn btn-secondary"
|
||||||
@ -127,8 +135,42 @@ $energyType = $masterData['energy_type'] ?? '';
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<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()??'';
|
let machineId = $('#machineId').val()??'';
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -145,6 +187,9 @@ $energyType = $masterData['energy_type'] ?? '';
|
|||||||
alert("Machine Name already existing in the deleted section ..!!");
|
alert("Machine Name already existing in the deleted section ..!!");
|
||||||
$('#machineName').val('');
|
$('#machineName').val('');
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
|
||||||
|
validation === true ? $('#factoryFormId').submit():'' ;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -159,3 +204,16 @@ $energyType = $masterData['energy_type'] ?? '';
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</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 -->
|
<!-- Sales module -->
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
||||||
@ -643,7 +643,8 @@
|
|||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu" aria-labelledby="topnav-hr">
|
<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>
|
<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="<?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>
|
<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 } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
helper('form');
|
helper('form');
|
||||||
$error = session()->getFlashdata('error');
|
$error = session()->getFlashdata('error');
|
||||||
if ($error) {
|
if ($error) {
|
||||||
$type = "error";
|
$type = "error";
|
||||||
|
|||||||
@ -252,9 +252,10 @@
|
|||||||
//loader is initiated
|
//loader is initiated
|
||||||
$('#loader').show();
|
$('#loader').show();
|
||||||
|
|
||||||
if ($('#transportername').val() === '') {
|
if ($('#transportername').val().trim() === '') {
|
||||||
alert('Please Enter the Transporter Name');
|
alert('Please Enter the Transporter Name');
|
||||||
return;
|
$('#loader').hide();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var formData = {
|
var formData = {
|
||||||
@ -275,7 +276,7 @@
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
let isactive = data[0].isactive;
|
let isactive = data[0]?.isactive;
|
||||||
if (isactive == 1 ) { alert(" Transporter with this Name Exists..!!"); }
|
if (isactive == 1 ) { alert(" Transporter with this Name Exists..!!"); }
|
||||||
else { alert(" Transporter with this Name Existing in deleted section ..!!"); }
|
else { alert(" Transporter with this Name Existing in deleted section ..!!"); }
|
||||||
|
|
||||||
@ -449,3 +450,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</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