Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
1acde857df
@ -346,9 +346,12 @@ class Assetdetails extends BaseController
|
||||
function checkAssetName(){
|
||||
|
||||
$data = $this->request->getPost();
|
||||
|
||||
$assetId = $data['assetId']??'';
|
||||
$assetName = str_replace(" ","",$data['assetName']) ;
|
||||
|
||||
$result = $this->assetdetails_model->checkAssetName($assetId,$assetName);
|
||||
|
||||
return $this->response->setJSON($result);
|
||||
|
||||
}
|
||||
|
||||
@ -140,6 +140,8 @@ class CostCenter extends BaseController
|
||||
$CostCenterId = $data['CostCenterId'];
|
||||
$CostCenterName = $data['CostCenterName'];
|
||||
|
||||
$CostCenterName = str_replace(' ', '', $CostCenterName);
|
||||
|
||||
$result = $this->costcenter_model->checkCostCenter( $CostCenterId,$CostCenterName);
|
||||
|
||||
return $this->response->setJSON($result);
|
||||
|
||||
@ -251,9 +251,18 @@ class Department extends BaseController
|
||||
|
||||
$data = $this->request->getPost();
|
||||
$departmentName = str_replace(" ","",$data['departmentName']);
|
||||
|
||||
$depCode = $data['depCode'];
|
||||
|
||||
$headDepCode =$data['headDepCode'];
|
||||
|
||||
$departmentName = $data['departmentName'];
|
||||
$result = $this->department_model->checkDepartmentName($depCode,$departmentName);
|
||||
|
||||
$departmentName = str_replace(" ","",$departmentName);
|
||||
|
||||
$result = $this->department_model->checkDepartmentName($departmentName , $headDepCode , $depCode);
|
||||
|
||||
|
||||
return $this->response->setJSON($result);
|
||||
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ class Rawmaterialdetails extends BaseController
|
||||
function addNewRawMaterial()
|
||||
{
|
||||
|
||||
//echo "HI";die();
|
||||
|
||||
$TempArr = [];
|
||||
|
||||
$MaterialName = $this->request->getPost('MaterialName');
|
||||
|
||||
@ -478,6 +478,7 @@ class Supplier extends BaseController
|
||||
$data = $this->request->getPost();
|
||||
$transporterId = $data['transporterid']??'';
|
||||
$transporterName = $data['transportername'];
|
||||
$transporterName = str_replace(' ', '', $transporterName);
|
||||
$message = $this->supplier_model->checkTransporter($transporterId,$transporterName);
|
||||
|
||||
return $this->response->setJSON($message);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
@ -90,7 +91,6 @@ function savedepartment($department)
|
||||
$SID = $this->db->affectedRows();
|
||||
|
||||
return $SID;
|
||||
|
||||
}
|
||||
|
||||
function getdepcode()
|
||||
@ -129,10 +129,10 @@ function getdepcode()
|
||||
->update($department);
|
||||
$res = $this->db->affectedRows();
|
||||
return $res;
|
||||
|
||||
}
|
||||
|
||||
function reActivateDepartment($depCode , $updateInfo){
|
||||
function reActivateDepartment($depCode, $updateInfo)
|
||||
{
|
||||
$this->db->table('t_departmentdetails')
|
||||
->where('DEPCode', $depCode)
|
||||
->update($updateInfo);
|
||||
@ -141,7 +141,8 @@ function getdepcode()
|
||||
}
|
||||
|
||||
|
||||
function deleteDepartment($depCode , $updateInfo){
|
||||
function deleteDepartment($depCode, $updateInfo)
|
||||
{
|
||||
$this->db->table('t_departmentdetails')
|
||||
->where('DEPCode', $depCode)
|
||||
->update($updateInfo);
|
||||
@ -150,20 +151,62 @@ function getdepcode()
|
||||
}
|
||||
|
||||
|
||||
function checkDepartmentName($depCode ,$departmentName){
|
||||
function checkDepartmentName($departmentName, $headDepCode, $depCode)
|
||||
{
|
||||
|
||||
$builder = $this->db->table('t_departmentdetails');
|
||||
|
||||
//post
|
||||
if(empty($depCode)) {
|
||||
$builder = $builder->where(' HeadDept =', $headDepCode);
|
||||
}
|
||||
|
||||
//put
|
||||
if(!empty($depCode)){
|
||||
|
||||
//allowing current department name to be changed
|
||||
//but not other department to get same name
|
||||
|
||||
$builder = $builder->where(' DEPCode !=', $depCode);
|
||||
$builder = $builder->where(' HeadDept =', $headDepCode);
|
||||
}
|
||||
|
||||
$builder = $builder->where('REPLACE(DepartmentName , " ", "") ', $departmentName);
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
$result = $query->getResultArray();
|
||||
|
||||
return $result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
@ -323,6 +323,7 @@ class Rawmaterialdetails_model extends Model
|
||||
$builder->where('REPLACE(MaterialName, " ", "")' , $materialName);
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
if ($query->getNumRows() > 0) {
|
||||
return $query->getResultArray();
|
||||
} else {
|
||||
|
||||
@ -1,9 +1,22 @@
|
||||
|
||||
<style type="text/css">
|
||||
.num {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.batch-card-table th,
|
||||
.batch-card-table td {
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.batch-card-table-cell-space {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fht-table,
|
||||
.fht-table thead,
|
||||
.fht-table tfoot,
|
||||
@ -164,7 +177,6 @@
|
||||
border-right: 2px solid #ddd;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="content-page">
|
||||
@ -186,11 +198,18 @@
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="button" class="btn btn-danger" data-target="#productionBatchCardDetailModalId"
|
||||
data-toggle="modal">
|
||||
Add Production Batch Card
|
||||
</button>
|
||||
<button type="button" class="btn btn-success" data-target="#coatingMachineDetailModal"
|
||||
data-toggle="modal">
|
||||
Add New Record
|
||||
Add Shift Record
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -263,9 +282,10 @@
|
||||
<?php
|
||||
$currentDate = date('d-m-Y');
|
||||
$dateInMonthDmYFormat = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
if ($dateInMonthDmYFormat === $currentDate) { echo 'style="background: #cef0ad;"';}
|
||||
?>
|
||||
>
|
||||
if ($dateInMonthDmYFormat === $currentDate) {
|
||||
echo 'style="background: #cef0ad;"';
|
||||
}
|
||||
?>>
|
||||
|
||||
<?php
|
||||
$date = DateTime::createFromFormat('Y-m-d', $record['date'])->format('d-m-Y');
|
||||
@ -380,7 +400,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -396,7 +415,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -420,7 +438,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -434,7 +451,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -561,7 +577,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -576,7 +591,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -599,7 +613,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 AM"> ' . $formattedHour . ':00 AM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 AM">' . $formattedHour . ':30 AM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
<option value="12:00 PM">12:00 PM</option>
|
||||
@ -613,7 +626,6 @@
|
||||
echo '<option value="' . $formattedHour . ':00 PM"> ' . $formattedHour . ':00 PM</option>';
|
||||
|
||||
echo '<option value="' . $formattedHour . ':30 PM">' . $formattedHour . ':30 PM</option>';
|
||||
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@ -691,9 +703,167 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- productionBatchCardModal -->
|
||||
|
||||
<div class="modal fade" id="productionBatchCardDetailModalId" tabindex="-1" role="dialog"
|
||||
aria-labelledby="productionBatchCardDetailModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" style="width:1060px !important ;" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<h5 class="modal-title" id="productionBatchCardDetailModalLabel">
|
||||
Production Batch Card Detail
|
||||
</h5>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- form -->
|
||||
<form method="post" id="productionBatchCardDetailModalFormId"
|
||||
action="<?php echo base_url(); ?>updateBatchCardDetail?month=<?= $month; ?>">
|
||||
|
||||
<div class="modal-body p-4">
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<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,10 +872,12 @@
|
||||
function confirmDelete(event) {
|
||||
|
||||
let result = confirm(` Do you Confirm to Delete the Coating Machine Detail?`);
|
||||
if (result) { return result; } else { event.preventDefault(); }
|
||||
if (result) {
|
||||
return result;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@ -768,13 +940,11 @@
|
||||
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- calculations for some fields needed in onChange while adding coating machine details -->
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
@ -862,7 +1032,6 @@
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!-- calculations for some fields needed in onChange while editing coating machine details -->
|
||||
@ -988,7 +1157,6 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function convertTo24Hr(time) {
|
||||
const [timePart, modifier] = time.split(" ");
|
||||
let [hours, minutes] = timePart.split(":");
|
||||
@ -1006,8 +1174,6 @@ function convertTo24Hr(time) {
|
||||
// Format hours and minutes to ensure two digits
|
||||
return `${String(hours).padStart(2, '0')}:${minutes}:00`;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@ -1018,5 +1184,4 @@ function convertTo24Hr(time) {
|
||||
autoclose: true,
|
||||
orientation: 'bottom'
|
||||
})
|
||||
|
||||
</script>
|
||||
@ -42,14 +42,14 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="p-2">
|
||||
<form role="form" id="addUser" action="<?php echo base_url() ?>addNewRawmaterial" method="post">
|
||||
<form role="form" id="addMaterialForm" action="<?php echo base_url() ?>addNewRawmaterial" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
<div class="form-row">
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="MaterialName">Material Name<span class="badge">*</span></label>
|
||||
<input type="text" class="form-control required " onkeypress="return BlockSpecial(event);" required id="MaterialName" name="MaterialName" maxlength="255">
|
||||
<input type="text" class="form-control required " required id="MaterialName" name="MaterialName" maxlength="255">
|
||||
</div>
|
||||
<div class=" col-md-3">
|
||||
<label class="col-form-label" for="MaterialType">Material Type<span class="badge">*</span></label>
|
||||
@ -137,7 +137,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addMaterialBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -291,9 +291,18 @@
|
||||
|
||||
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
$('#addMaterialBtnId').click(function() {
|
||||
|
||||
var materialName = $('#MaterialName').val();
|
||||
|
||||
//validate
|
||||
|
||||
let validation = Validate();
|
||||
|
||||
if(!validation){
|
||||
return false;
|
||||
}
|
||||
|
||||
var materialName = $('#MaterialName').val().trim();
|
||||
var materialCode = '';
|
||||
|
||||
if(materialName == ''){
|
||||
@ -311,16 +320,18 @@
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>materialExist",
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
if (count >= 1) {
|
||||
|
||||
if (data && data.length >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('Material name already existed ! ');
|
||||
$('#MaterialName').val('');
|
||||
}else{
|
||||
alert('Material name already existing in the deleted section.!!');
|
||||
$('#MaterialName').val('');
|
||||
}
|
||||
|
||||
|
||||
var related_name = "" ;
|
||||
$.each(data, function(i, obj) {
|
||||
|
||||
@ -328,11 +339,16 @@
|
||||
|
||||
});
|
||||
|
||||
alert("'" + materialname + "' - related materials are , " + " \n \n" + related_name);
|
||||
alert("'" + materialName + "' - related materials are , " + " \n \n" + related_name);
|
||||
$("#MaterialName").val('');
|
||||
$("#MaterialName").focus();
|
||||
|
||||
|
||||
} else{
|
||||
console.log("Material name is unique");
|
||||
$('#loader').hide();
|
||||
|
||||
$('#addMaterialForm').submit();
|
||||
}
|
||||
|
||||
},
|
||||
@ -348,6 +364,7 @@
|
||||
});
|
||||
|
||||
function Validate() {
|
||||
|
||||
if ($("#MaterialName").val().length < 1) {
|
||||
alert('Please Enter MaterialName');
|
||||
$("#MaterialName").focus();
|
||||
@ -369,6 +386,8 @@
|
||||
$("#MaterialType").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -433,3 +452,14 @@
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -199,7 +199,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addSupplierBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -237,6 +237,7 @@
|
||||
return false;
|
||||
}
|
||||
if (!getContactNumberValidation) {
|
||||
alert('Please Enter Valid Contact Number');
|
||||
$("#ContactNumber").focus();
|
||||
return false;
|
||||
}
|
||||
@ -252,13 +253,17 @@
|
||||
}
|
||||
|
||||
if (!validateEmail()) {
|
||||
alert('Please Enter Valid Email Address');
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
$('#supplierName').change(function() {
|
||||
$('#addSupplierBtnId').click(function() {
|
||||
|
||||
var supplierName = $('#supplierName').val().trim();
|
||||
var supplierId = $('#SupplierID').val();
|
||||
|
||||
@ -274,7 +279,7 @@
|
||||
var count = data?data.length:0;
|
||||
if (count >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('supplier already existed ! ');
|
||||
}else{
|
||||
alert('supplier already existing in the deleted section..!! ');
|
||||
@ -284,21 +289,17 @@
|
||||
$.each(data, function(i, obj) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + suppliername + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").val('');
|
||||
alert("'" + supplierName + "' - related supplier are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
//4Debug
|
||||
// alert('This is New Supplier! ');
|
||||
if (Validate()) {
|
||||
$('#addsupplier').submit();
|
||||
}
|
||||
}
|
||||
//4Debug
|
||||
//console.log(data);
|
||||
|
||||
},
|
||||
error: function(error) {
|
||||
//4Debug
|
||||
// alert("Error Occur");
|
||||
$('#loader').hide();
|
||||
console.error("Error" , error);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addAssetBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -383,8 +383,7 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
}
|
||||
@ -431,9 +430,13 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#AssetName').on('change',function(){
|
||||
$('#addAssetBtnId').on('click',function(){
|
||||
|
||||
let assetName = $(this).val().trim();
|
||||
let validation = validate();
|
||||
|
||||
if(validation){
|
||||
|
||||
let assetName = $('#AssetName').val().trim();
|
||||
let assetId = $('#AssetCode').val() ?? '';
|
||||
|
||||
$('#loader').show();
|
||||
@ -444,7 +447,7 @@ $.ajax({
|
||||
data:{assetId,assetName},
|
||||
success: function(data){
|
||||
if(data && data.length>0){
|
||||
let IsActive = data[0].IsActive;
|
||||
let IsActive = data[0]?.IsActive;
|
||||
if(IsActive == 1){
|
||||
alert("Asset Name Exists..!!");
|
||||
$('#AssetName').val('');
|
||||
@ -454,7 +457,12 @@ $.ajax({
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}
|
||||
}else{
|
||||
$('#addAsset').submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
error: function(error){
|
||||
//error
|
||||
@ -466,8 +474,24 @@ $.ajax({
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -92,7 +92,7 @@
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="hidden" name="txtRowCount" id="txtRowCount" />
|
||||
<a class="btn btn-secondary" href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="addConFigBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -388,7 +388,7 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#configurationname').change(function () {
|
||||
$('#addConFigBtnId').click(function (){
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
|
||||
@ -399,7 +399,7 @@
|
||||
success: function (data) {
|
||||
if(data && data.length > 0){
|
||||
|
||||
if(data[0].isActive == 1){
|
||||
if(data[0]?.isActive == 1){
|
||||
alert("This Configuration Name is already present. kindly change it..!!");
|
||||
$('#configurationname').val('');
|
||||
return;
|
||||
@ -408,6 +408,8 @@
|
||||
$('#configurationname').val('');
|
||||
return;
|
||||
}
|
||||
}else{
|
||||
$('#addconfig').submit();
|
||||
}
|
||||
|
||||
},
|
||||
@ -439,3 +441,15 @@
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -29,7 +29,7 @@
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<form role="form" id="adddepartment" action="<?php echo base_url() ?>savedepartment" method="post">
|
||||
<form role="form" id="addDepartment" action="<?php echo base_url() ?>savedepartment" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Supplier Information -->
|
||||
<div class="col-md-12" style="margin-bottom: 27px;">
|
||||
@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red;color: white; margin-right: 15px;width: 80px;" value="Reset" />
|
||||
<input type="submit" onclick="return Validate();" value="Submit" class="btn btn-success">
|
||||
<input type="button" id="deptBtnId" value="Submit" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -107,63 +107,20 @@
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// function blockKeyPress(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// alert(charCode);
|
||||
// if(charCode == 8 || charCode == 46 )
|
||||
//
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
|
||||
// function isNumberKey(evt)
|
||||
// {
|
||||
// var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
// if (charCode != 46 && charCode > 31
|
||||
// && (charCode < 48 || charCode > 57))
|
||||
// return false;
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
// function onlyAlphabets(evt) {
|
||||
// var charCode;
|
||||
// if (window.event)
|
||||
// charCode = window.event.keyCode; //for IE
|
||||
// else
|
||||
// charCode = evt.which; //for firefox
|
||||
// if (charCode == 32) //for <space> symbol
|
||||
// return true;
|
||||
// if (charCode > 31 && charCode < 65) //for characters before 'A' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 90 && charCode < 97) //for characters between 'Z' and 'a' in ASCII Table
|
||||
// return false;
|
||||
// if (charCode > 122) //for characters beyond 'z' in ASCII Table
|
||||
// return false;
|
||||
// return true;
|
||||
// }
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$("#DepartmentName").on('change',function(){
|
||||
$("#deptBtnId").on('click',function(){
|
||||
let departmentName = $("#DepartmentName").val().trim();
|
||||
let headDepCode =$("#HeadDept").val()??'';
|
||||
let depCode =$("#DEPCode").val() ?? '';
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
data:{departmentName,depCode},
|
||||
data:{departmentName,headDepCode ,depCode},
|
||||
url:"<?php echo base_url();?>checkDepartmentName",
|
||||
success:function(data){
|
||||
|
||||
if(data && data.length >0){
|
||||
let isActive = data[0]. IsActive;
|
||||
if(isActive == 1){
|
||||
@ -171,7 +128,9 @@
|
||||
}else{
|
||||
alert("Department Name already Existing in the deleted section.!!");
|
||||
}
|
||||
window.location.reload();
|
||||
}else{
|
||||
console.log("submitting the form..!!")
|
||||
$("#addDepartment").submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -231,7 +231,7 @@
|
||||
},
|
||||
success: function (data) {
|
||||
$('#loader').hide();
|
||||
let isactive =data[0].IsActive;
|
||||
let isactive =data[0]?.IsActive;
|
||||
|
||||
if (data && data.length > 0) {
|
||||
|
||||
@ -430,3 +430,14 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -156,7 +156,7 @@ if (!empty($assetList)) {
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form role="form" id="addAsset" action="<?php echo base_url() ?>editasset" method="post">
|
||||
<form role="form" id="editAsset" action="<?php echo base_url() ?>editasset" method="post">
|
||||
<div class="form-row">
|
||||
|
||||
<input type="text" class="form-control" id="AssetCode" name="AssetCode" value="<?php echo $AssetCode; ?>" hidden>
|
||||
@ -272,7 +272,7 @@ if (!empty($assetList)) {
|
||||
<div class="form-row mt-4 text-right">
|
||||
<div class="col-md-12">
|
||||
<a href="<?php echo base_url() ?>assetListing" class="btn btn-secondary">Cancel</a>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
<button type="button" id="editAssetBtnId" class="btn btn-success">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -426,7 +426,7 @@ if (!empty($assetList)) {
|
||||
|
||||
|
||||
|
||||
$('#AssetName').on('change',function(){
|
||||
$('#editAssetBtnId').on('click',function(){
|
||||
|
||||
let assetId = $('#AssetCode').val();
|
||||
let assetName = $(this).val().trim();
|
||||
@ -439,7 +439,7 @@ if (!empty($assetList)) {
|
||||
data:{assetId,assetName},
|
||||
success: function(data){
|
||||
if(data && data.length>0){
|
||||
let IsActive = data[0].IsActive;
|
||||
let IsActive = data[0]?.IsActive;
|
||||
if(IsActive == 1){
|
||||
alert("Asset Name Exists..!!");
|
||||
$('#AssetName').val('');
|
||||
@ -449,6 +449,10 @@ if (!empty($assetList)) {
|
||||
$('#AssetName').val('');
|
||||
$('#AssetName').focus();
|
||||
}
|
||||
}else{
|
||||
|
||||
$('#editAsset').submit();
|
||||
|
||||
}
|
||||
},
|
||||
error: function(error){
|
||||
@ -466,3 +470,14 @@ if (!empty($assetList)) {
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -289,7 +289,7 @@ if ($total <= $reorder) {
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||
<span class="bold">Cancel</span>
|
||||
</button>
|
||||
<input type="submit" class="btn btn-success" value="Submit" />
|
||||
<input type="button" id="editRawMaterialBtnId" class="btn btn-success" value="Submit" />
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.card-body -->
|
||||
@ -438,7 +438,7 @@ if ($total <= $reorder) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$('#MaterialName').change(function() {
|
||||
$('#editRawMaterialBtnId').click(function(){
|
||||
|
||||
var materialName = $('#MaterialName').val();
|
||||
var materialCode = $('#RMcode').val();
|
||||
@ -458,14 +458,15 @@ if ($total <= $reorder) {
|
||||
type: "POST",
|
||||
url: "<?php echo base_url(); ?>materialExist",
|
||||
success: function(data) {
|
||||
var count = data.length;
|
||||
|
||||
if (count >= 1) {
|
||||
if (data && data.length >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('Material name already existed ! ');
|
||||
$('#MaterialName').val('');
|
||||
}else{
|
||||
alert('Material name already existing in the deleted section.!!');
|
||||
$('#MaterialName').val('');
|
||||
}
|
||||
var related_name = "";
|
||||
$.each(data, function(i, obj) {
|
||||
@ -474,12 +475,13 @@ if ($total <= $reorder) {
|
||||
|
||||
});
|
||||
|
||||
alert("'" + materialname + "' - related materials are , " + " \n \n" + related_name);
|
||||
alert("'" + materialName + "' - related materials are , " + " \n \n" + related_name);
|
||||
$("#MaterialName").val('');
|
||||
$("#MaterialName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
// alert("empty data");
|
||||
console.log("working")
|
||||
$('#editRawmaterial').submit();
|
||||
}
|
||||
|
||||
},
|
||||
@ -556,3 +558,14 @@ if ($total <= $reorder) {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -296,6 +296,7 @@ if (!empty($supplier)) {
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
<form class="form-horizontal" role="form" id="UpdateSupplier"
|
||||
action="<?php echo base_url() ?>editsupplier" method="post" enctype="multipart/form-data">
|
||||
<div class="box-body">
|
||||
@ -530,7 +531,7 @@ if (!empty($supplier)) {
|
||||
<button type="button" class="btn btn-secondary" onclick="history.back()">
|
||||
<span class="bold">Cancel</span>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-info pull-right">Submit</button>
|
||||
<button type="button" id="updateSupplierBtnId" class="btn btn-info pull-right">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -560,11 +561,7 @@ if (!empty($supplier)) {
|
||||
}
|
||||
|
||||
function Validate() {
|
||||
// if(!validatePAN())
|
||||
// {
|
||||
// return false;
|
||||
// $('#panno').focus();
|
||||
// }
|
||||
|
||||
if ($("#supplierName").val().length < 1) {
|
||||
alert('Please Enter Supplier Name');
|
||||
$("#supplierName").focus();
|
||||
@ -585,17 +582,12 @@ if (!empty($supplier)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
if(!validateGST())
|
||||
{
|
||||
$('#GSTNo').focus();
|
||||
return false;
|
||||
}*/
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
//Call to ajax existing PAN
|
||||
$('#supplierName').change(function () {
|
||||
$('#updateSupplierBtnId').click(function () {
|
||||
var supplierName = $('#supplierName').val().trim();
|
||||
var supplierId = $('#SupplierID').val();
|
||||
|
||||
@ -612,7 +604,7 @@ if (!empty($supplier)) {
|
||||
var count = data.length;
|
||||
if (count >= 1) {
|
||||
$('#loader').hide();
|
||||
if(data[0].IsActive == 1){
|
||||
if(data[0]?.IsActive == 1){
|
||||
alert('supplier already existed ! ');
|
||||
}else{
|
||||
alert('supplier already existing in the deleted section..!! ');
|
||||
@ -622,10 +614,12 @@ if (!empty($supplier)) {
|
||||
related_supplier += obj.SupplierID + " - " + obj.SupplierName + " - " + obj.Address + "\n";
|
||||
});
|
||||
alert("'" + supplierName + "' - supplier details are , " + " \n \n" + related_supplier);
|
||||
$("#supplierName").val('');
|
||||
$("#supplierName").focus();
|
||||
} else {
|
||||
$('#loader').hide();
|
||||
if (Validate()) {
|
||||
$('#UpdateSupplier').submit();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -77,7 +77,7 @@ if (!empty($master)) {
|
||||
<label class="col-form-label" for="ConfigName">Configuration Name</label>
|
||||
<font color="Red">*</font>
|
||||
<?php
|
||||
$data = array('name' => 'ConfigName', 'value' => set_value('ConfigName', $ConfigName), 'id' => 'ConfigName', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '20');
|
||||
$data = array('name' => 'ConfigName', 'value' => set_value('ConfigName', $ConfigName), 'id' => 'ConfigName', 'class' => 'form-control', 'required' => 'true', 'maxlength' => '30');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -95,8 +95,8 @@ if (!empty($master)) {
|
||||
<div class="form-row" style="margin-top:10px">
|
||||
<div class="col-md-12 text-right">
|
||||
<a data-toggle="modal" href="#AddConfiguration" style="margin-right: 10px;"
|
||||
class="btn btn-success"><i class="fa fa-plus"></i> Add
|
||||
Configuration</a>
|
||||
class="btn btn-success"><i class="fa fa-plus"></i>
|
||||
Configuration Value</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -194,7 +194,7 @@ if (!empty($master)) {
|
||||
<div class="form-row text-right" style="margin-top:10px; text-align:right">
|
||||
<div class="col-md-12 text-right">
|
||||
<a href="<?php echo base_url() ?>configlisting" class="btn btn-secondary">Cancel</a>
|
||||
<input type="submit" class="btn btn-success" value="Update" />
|
||||
<input type="button" id="updateConfigBtnId" class="btn btn-success" value="Update" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -234,8 +234,7 @@ if (!empty($master)) {
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-success" style="background-color: grey;border: none;margin-right:10px"
|
||||
data-dismiss="modal">Cancel</a>
|
||||
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"><i
|
||||
class="fa fa-plus"></i> Add</a>
|
||||
<a class="btn btn-success font tempClickAdd" id="tempClickAdd"> Add </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -330,6 +329,7 @@ if (!empty($master)) {
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
@ -493,7 +493,8 @@ if (!empty($master)) {
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$('#ConfigName').change(function () {
|
||||
$('#updateConfigBtnId').click(function() {
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
data: {
|
||||
@ -506,15 +507,19 @@ if (!empty($master)) {
|
||||
|
||||
if (data && data.length > 0) {
|
||||
|
||||
if (data[0].isActive == 1) {
|
||||
if (data[0]?.isActive == 1) {
|
||||
alert("This Configuration Name is already present. kindly change it..!!");
|
||||
$('#ConfigName').val('');
|
||||
return;
|
||||
event.preventDefault();
|
||||
return false;
|
||||
} else {
|
||||
alert("This Configuration Name is already present in deleted section. kindly reactivate it If needed..!!");
|
||||
$('#ConfigName').val('');
|
||||
return;
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
$('#editConfig').submit();
|
||||
}
|
||||
|
||||
},
|
||||
@ -528,11 +533,9 @@ if (!empty($master)) {
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$('#AddConfigValue, #configValue').change(function() {
|
||||
|
||||
let configValue = $(this).val();
|
||||
@ -576,8 +579,6 @@ if (!empty($master)) {
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function showChildArchiveList() {
|
||||
let isChecked = $("#showChildArchiveId").prop('checked');
|
||||
|
||||
@ -606,12 +607,28 @@ if (!empty($master)) {
|
||||
|
||||
function confirmDeleteConfig(event) {
|
||||
let result = confirm("Do You want to delete this configuration ?");
|
||||
if (result) { return; } else { event.preventDefault(); }
|
||||
if (result) {
|
||||
return;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function confirmReActivateConfig(event) {
|
||||
let result = confirm("Do You want to Re activate deleted configuration ?");
|
||||
if (result) { return; } else { event.preventDefault(); }
|
||||
if (result) {
|
||||
return;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@ -104,7 +104,7 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body" style="padding: 1rem 2rem !important;">
|
||||
<form role="form" id="Updatedepartment" action="<?php echo base_url() ?>editdepartment" method="post">
|
||||
<form role="form" id="updateDepartment" action="<?php echo base_url() ?>editdepartment" method="post">
|
||||
<div class="box-body">
|
||||
<!-- Department Information -->
|
||||
<legend>Department Information</legend>
|
||||
@ -136,7 +136,7 @@
|
||||
<div class="form-row" style="margin-top:10px">
|
||||
<div class="col-md-12 text-right">
|
||||
<input type="reset" id="reset" class="btn btn-reset" style="background-color: red; color: white; margin-right: 15px; width: 80px;" value="Reset" />
|
||||
<input type="submit" value="Update" class="btn btn-success">
|
||||
<input type="button" id="deptBtnId" value="Update" class="btn btn-success">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -173,13 +173,15 @@
|
||||
|
||||
<script>
|
||||
|
||||
$("#DepartmentName").on('change',function(){
|
||||
$("#deptBtnId").on('click',function(){
|
||||
let departmentName = $("#DepartmentName").val().trim();
|
||||
let depCode =$("#DEPCode").val();
|
||||
let headDepCode = $("#HeadDept").val();
|
||||
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
data:{departmentName,depCode},
|
||||
data:{departmentName,headDepCode ,depCode},
|
||||
url:"<?php echo base_url();?>checkDepartmentName",
|
||||
success:function(data){
|
||||
|
||||
@ -190,7 +192,8 @@ $("#DepartmentName").on('change',function(){
|
||||
}else{
|
||||
alert("Department Name already Existing in the deleted section.!!");
|
||||
}
|
||||
window.location.reload();
|
||||
}else{
|
||||
$("#updateDepartment").submit();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
@ -54,10 +54,18 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
|
||||
|
||||
|
||||
<form action="<?= empty($masterData)
|
||||
<form
|
||||
|
||||
|
||||
|
||||
action="<?= empty($masterData)
|
||||
? base_url('createFactoryMachineMasterDetails')
|
||||
: base_url('updateFactoryMachineMasterDetails?id=' . $masterData['id']); ?>" method="post"
|
||||
|
||||
id="factoryFormId"
|
||||
class="form-label-left">
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
|
||||
@ -79,7 +87,7 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
class="text-danger">*</span></label>
|
||||
<select name="energyType" id="energyType"
|
||||
class="form-control searchabledropdown" data-toggle="select2" required>
|
||||
<option value="-1">Select Energy Type</option>
|
||||
<option value="">Select Energy Type</option>
|
||||
<option value="diesel" <?= $energyType == 'diesel' ? 'selected' : '' ?>> Diesel
|
||||
</option>
|
||||
<option value="petrol" <?= $energyType == 'petrol' ? 'selected' : '' ?>> Petrol
|
||||
@ -102,7 +110,7 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
|
||||
<div class="form-group col">
|
||||
|
||||
<button type="submit"
|
||||
<button type="button" id="submitBtnId"
|
||||
class="btn btn-info waves-effect waves-light">Submit</button>
|
||||
|
||||
<button type="button" class="btn btn-secondary"
|
||||
@ -127,8 +135,42 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
|
||||
|
||||
<script>
|
||||
$('#machineName').on('change', function () {
|
||||
let machineName = $(this).val().trim();
|
||||
|
||||
function validate(){
|
||||
|
||||
let machineName = $('#machineName').val().trim();
|
||||
let machineType = $('#machineType').val().trim();
|
||||
let energyType = $('#energyType').val().trim();
|
||||
|
||||
if(machineName == ''){
|
||||
alert('Machine Name is required..!!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(machineType == ''){
|
||||
alert('Machine Type is required..!!');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(energyType == ''){
|
||||
alert('Energy Type is required..!!');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
$('#submitBtnId').on('click', function () {
|
||||
|
||||
|
||||
let validation = validate();
|
||||
|
||||
if(!validation){
|
||||
return;
|
||||
}
|
||||
|
||||
let machineName = $('#machineName').val().trim();
|
||||
let machineId = $('#machineId').val()??'';
|
||||
$('#loader').show();
|
||||
$.ajax({
|
||||
@ -145,6 +187,9 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
alert("Machine Name already existing in the deleted section ..!!");
|
||||
$('#machineName').val('');
|
||||
}
|
||||
}else{
|
||||
|
||||
validation === true ? $('#factoryFormId').submit():'' ;
|
||||
}
|
||||
|
||||
},
|
||||
@ -159,3 +204,16 @@ $energyType = $masterData['energy_type'] ?? '';
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault(); // Prevent default Enter key behavior
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -634,7 +634,7 @@
|
||||
|
||||
|
||||
|
||||
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor'){?>
|
||||
<?php if(session()->get('roleText') == 'System Administrator' || session()->get('roleText') == 'Auditor' || session()->get('roleText') == 'Security'){?>
|
||||
<!-- Sales module -->
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
|
||||
@ -643,7 +643,8 @@
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-hr">
|
||||
<a href="<?php echo base_url(); ?>sales_invoice" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>Invoice</a>
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
|
||||
<?php if(session()->get('roleText') == 'System Administrator'){?>
|
||||
<!-- <a href="<?php echo base_url(); ?>dashboard" class="dropdown-item"><i class="ri-refresh-line align-middle mr-1"></i>Sync With Zoho Books</a> -->
|
||||
<a href="javascript:void(0)" type="button" class="dropdown-item" title="Sync With Zoho Books" onclick="synczohobooks()"> <i class="ri-refresh-line align-middle mr-1"></i>Sync With Zoho Books </a>
|
||||
<?php } ?>
|
||||
|
||||
@ -252,9 +252,10 @@
|
||||
//loader is initiated
|
||||
$('#loader').show();
|
||||
|
||||
if ($('#transportername').val() === '') {
|
||||
if ($('#transportername').val().trim() === '') {
|
||||
alert('Please Enter the Transporter Name');
|
||||
return;
|
||||
$('#loader').hide();
|
||||
return false;
|
||||
}
|
||||
|
||||
var formData = {
|
||||
@ -275,7 +276,7 @@
|
||||
success: function (data) {
|
||||
|
||||
if (data && data.length > 0) {
|
||||
let isactive = data[0].isactive;
|
||||
let isactive = data[0]?.isactive;
|
||||
if (isactive == 1 ) { alert(" Transporter with this Name Exists..!!"); }
|
||||
else { alert(" Transporter with this Name Existing in deleted section ..!!"); }
|
||||
|
||||
@ -449,3 +450,14 @@
|
||||
});
|
||||
|
||||
</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