employee module changes-1 vadivel J 12-12-2024
This commit is contained in:
parent
4f4d2747e9
commit
450c8acd06
@ -379,7 +379,12 @@ class StockController extends BaseController
|
|||||||
->where('id', $id)
|
->where('id', $id)
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
!empty($resultExists) ? $updates[] = $dbData : $inserts[] = $dbData;
|
if(!empty($resultExists)){
|
||||||
|
$dbData['id'] = $resultExists['id'];
|
||||||
|
$updates[] = $dbData ;
|
||||||
|
}else{
|
||||||
|
$inserts[] = $dbData;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -771,10 +771,8 @@
|
|||||||
<div class="col-md-3"><label>IFSC Code</label></span><span
|
<div class="col-md-3"><label>IFSC Code</label></span><span
|
||||||
class="badge">*</span>
|
class="badge">*</span>
|
||||||
<input type="text" id="ifsccode" name="ifsccode"
|
<input type="text" id="ifsccode" name="ifsccode"
|
||||||
title="Only letters and numbers are allowed"
|
title="Only letters and numbers are allowed" onkeyup="convertToUpperCase()"
|
||||||
onchange="ifscCodeValidation(this.value)"
|
class="form-control" onkeypress="return alpha(event);" required>
|
||||||
class="form-control" onkeypress="return alpha(event);"
|
|
||||||
style="text-transform: uppercase" required>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3"><label>Bank Address</label>
|
<div class="col-md-3"><label>Bank Address</label>
|
||||||
<input type="text" id="bankaddress" name="bankaddress"
|
<input type="text" id="bankaddress" name="bankaddress"
|
||||||
@ -1557,18 +1555,15 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ifscCodeValidation(value) {
|
|
||||||
|
|
||||||
// Define the regex pattern for a valid IFSC code
|
|
||||||
const ifscPattern = /^[A-Z]{4}0[A-Z0-9]{6}$/;
|
</script>
|
||||||
// Check if the value matches the pattern
|
|
||||||
if (ifscPattern.test(capitalizeFirstFourLetters(value))) {
|
|
||||||
return;
|
<script>
|
||||||
} else {
|
function convertToUpperCase() {
|
||||||
alert("Invalid IFSC Code. Please enter a valid one.");
|
const input = document.getElementById("ifsccode");
|
||||||
$('#ifsccode').val('');
|
input.value = input.value.toUpperCase();
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -690,8 +690,7 @@ if (!empty($EmpDetails)) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<label>IFSC Code</label>
|
<label>IFSC Code</label>
|
||||||
<input type="text" id="ifsccode" name="ifsccode"
|
<input type="text" id="ifsccode" name="ifsccode" onkeyup="convertToUpperCase()"
|
||||||
onchange="ifscCodeValidation(this.value)"
|
|
||||||
placeholder="IFSC Code" class="form-control"
|
placeholder="IFSC Code" class="form-control"
|
||||||
value="<?php echo $IFSCCode; ?>">
|
value="<?php echo $IFSCCode; ?>">
|
||||||
</div>
|
</div>
|
||||||
@ -1169,7 +1168,8 @@ if (!empty($EmpDetails)) {
|
|||||||
<input type="text" id="aadharno" name="aadharno"
|
<input type="text" id="aadharno" name="aadharno"
|
||||||
maxlength="14" onchange="ValidateAadhar();"
|
maxlength="14" onchange="ValidateAadhar();"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
onkeypress="return isNumberKey(event)" required>
|
onkeypress="return isNumberKey(event)" required
|
||||||
|
value="<?= $AadharNo ?>">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>Aadhar File Name</label>
|
<label>Aadhar File Name</label>
|
||||||
@ -1190,7 +1190,8 @@ if (!empty($EmpDetails)) {
|
|||||||
onchange="validatePAN();" class="form-control"
|
onchange="validatePAN();" class="form-control"
|
||||||
pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}"
|
pattern="([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}"
|
||||||
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) "
|
title=" 5 character,4 Digit Numbers,1 character (ex:ABCDE1234A) "
|
||||||
onkeypress="return alpha(event);">
|
onkeypress="return alpha(event);"
|
||||||
|
value="<?= $PANNo ?>" >
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>PAN File Name</label>
|
<label>PAN File Name</label>
|
||||||
@ -1208,6 +1209,7 @@ if (!empty($EmpDetails)) {
|
|||||||
<div class="col-md-4"><label>Passport Number</label>
|
<div class="col-md-4"><label>Passport Number</label>
|
||||||
<input type="text" id="passportno" maxlength="9"
|
<input type="text" id="passportno" maxlength="9"
|
||||||
name="passportno" style="text-transform:uppercase"
|
name="passportno" style="text-transform:uppercase"
|
||||||
|
value="<?= $PassportNo ?>"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
pattern="^[A-Z][1-9]\d\s?\d{4}[1-9]$"
|
pattern="^[A-Z][1-9]\d\s?\d{4}[1-9]$"
|
||||||
title="
|
title="
|
||||||
@ -1367,13 +1369,7 @@ if (!empty($EmpDetails)) {
|
|||||||
|
|
||||||
if (aadhar != '') // && aadhar_count != '')
|
if (aadhar != '') // && aadhar_count != '')
|
||||||
{
|
{
|
||||||
//alert('this is aadhar :'+aadhar);
|
|
||||||
// if(aadhar_count < 14)
|
|
||||||
// {
|
|
||||||
// //alert(aadhar1);
|
|
||||||
// alert('Aadhar card should be in 12 digits');
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
if (reg.test(aadhar) == false) {
|
if (reg.test(aadhar) == false) {
|
||||||
//alert('alskdjsakjf');
|
//alert('alskdjsakjf');
|
||||||
alert('Please Enter Valid Aadhar Number');
|
alert('Please Enter Valid Aadhar Number');
|
||||||
@ -1383,12 +1379,7 @@ if (!empty($EmpDetails)) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//{
|
|
||||||
//alert('aadhar is blank');
|
|
||||||
//alert('please Enter Aadhar number');
|
|
||||||
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2065,19 +2056,16 @@ if (!empty($EmpDetails)) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ifscCodeValidation(value) {
|
|
||||||
|
|
||||||
|
|
||||||
// Define the regex pattern for a valid IFSC code
|
</script>
|
||||||
const ifscPattern = /^[A-Z]{4}0[A-Z0-9]{6}$/;
|
|
||||||
// Check if the value matches the pattern
|
|
||||||
if (ifscPattern.test(capitalizeFirstFourLetters(value))) {
|
|
||||||
return;
|
<script>
|
||||||
} else {
|
function convertToUpperCase() {
|
||||||
alert("Invalid IFSC Code. Please enter a valid one.");
|
const input = document.getElementById("ifsccode");
|
||||||
$('#ifsccode').val('');
|
input.value = input.value.toUpperCase();
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -116,6 +116,7 @@
|
|||||||
<th>Employee Name</th>
|
<th>Employee Name</th>
|
||||||
<th>Contact Number</th>
|
<th>Contact Number</th>
|
||||||
<th>Designation</th>
|
<th>Designation</th>
|
||||||
|
<th>Date Of Joining</th>
|
||||||
<th>Department</th>
|
<th>Department</th>
|
||||||
<th>Active</th>
|
<th>Active</th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -124,6 +125,9 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!empty($userRecords)) {
|
if (!empty($userRecords)) {
|
||||||
foreach ($userRecords as $record) {
|
foreach ($userRecords as $record) {
|
||||||
|
$dateOfJoining = new DateTime($record->DateofJoining);
|
||||||
|
$dateOfJoining = $dateOfJoining->format('d-m-Y');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if (date('d-m-Y', strtotime($record->Created_date)) == "30-11--0001") {
|
<?php if (date('d-m-Y', strtotime($record->Created_date)) == "30-11--0001") {
|
||||||
@ -135,7 +139,9 @@
|
|||||||
<td><?php echo $record->FirstName; ?></td>
|
<td><?php echo $record->FirstName; ?></td>
|
||||||
<td><?php echo $record->ContactNumber ?></td>
|
<td><?php echo $record->ContactNumber ?></td>
|
||||||
<td><?php echo $record->Designation ?></td>
|
<td><?php echo $record->Designation ?></td>
|
||||||
|
<td><?php echo $dateOfJoining?></td>
|
||||||
<td><?php echo $record->DepartmentName ?></td>
|
<td><?php echo $record->DepartmentName ?></td>
|
||||||
|
|
||||||
<td><?php echo ($record->IsActive == 1) ? ' Active ' : ' In Active '; ?></td>
|
<td><?php echo ($record->IsActive == 1) ? ' Active ' : ' In Active '; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
@ -699,8 +699,8 @@
|
|||||||
let _140Mm = row.find('td:eq(17)').text().trim();
|
let _140Mm = row.find('td:eq(17)').text().trim();
|
||||||
let _200Mm = row.find('td:eq(18)').text().trim();
|
let _200Mm = row.find('td:eq(18)').text().trim();
|
||||||
let _300Mm = row.find('td:eq(19)').text().trim();
|
let _300Mm = row.find('td:eq(19)').text().trim();
|
||||||
let total = row.find('td:eq(20)').text().trim();
|
let pan = row.find('td:eq(20)').text().trim();
|
||||||
let pan = row.find('td:eq(21)').text().trim();
|
let total = row.find('td:eq(21)').text().trim();
|
||||||
let plus20loss = row.find('td:eq(24)').text().trim();
|
let plus20loss = row.find('td:eq(24)').text().trim();
|
||||||
let plus30Loss = row.find('td:eq(25)').text().trim();
|
let plus30Loss = row.find('td:eq(25)').text().trim();
|
||||||
let moistureSpec = row.find('td:eq(26)').text().trim();
|
let moistureSpec = row.find('td:eq(26)').text().trim();
|
||||||
@ -778,20 +778,24 @@
|
|||||||
let sieveLossQty = parseFloat($('#sieveLossQty').val().trim());
|
let sieveLossQty = parseFloat($('#sieveLossQty').val().trim());
|
||||||
let salableQty = parseFloat($('#salableQty').val().trim());
|
let salableQty = parseFloat($('#salableQty').val().trim());
|
||||||
|
|
||||||
let newTotal = _10Mm + _20Mm + _30Mm + _40Mm + _50Mm + _70Mm + _100Mm + _140Mm + _200Mm + _300Mm + pan;
|
let newTotal = (_10Mm + _20Mm + _30Mm + _40Mm + _50Mm + _70Mm + _100Mm + _140Mm + _200Mm + _300Mm + pan).toFixed(2);
|
||||||
|
|
||||||
let newPlus20Loss = _10Mm + _20Mm ;
|
let newPlus20Loss = (_10Mm + _20Mm).toFixed(2) ;
|
||||||
|
|
||||||
let newPlus30Loss = _10Mm + _20Mm + _30Mm ;
|
console.log(newPlus20Loss);
|
||||||
|
|
||||||
|
let newPlus30Loss =( _10Mm + _20Mm + _30Mm).toFixed(2) ;
|
||||||
|
|
||||||
|
console.log(newPlus30Loss);
|
||||||
|
|
||||||
|
|
||||||
let newSieveLossQty = Math.floor((qty * newPlus30Loss) / 100);
|
let newSieveLossQty = ((qty * newPlus30Loss) / 100).toFixed(2);;
|
||||||
|
|
||||||
let newMoistureLoss = moistureActual - moistureSpec ;
|
let newMoistureLoss = (moistureActual - moistureSpec).toFixed(2); ;
|
||||||
|
|
||||||
let newMoistureLossQty = Math.round((qty * newMoistureLoss) / 100 ) ;
|
let newMoistureLossQty = ((qty * newMoistureLoss) / 100 ).toFixed(2); ;
|
||||||
|
|
||||||
let newSalableQty = Math.floor(qty - newMoistureLossQty - newSieveLossQty);
|
let newSalableQty = (qty - newMoistureLossQty - newSieveLossQty).toFixed(2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user