Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme

This commit is contained in:
vadivelJ96 2024-10-16 17:41:19 +05:30
commit 10e7599752
9 changed files with 140 additions and 237 deletions

View File

@ -222,15 +222,11 @@ class Employeedetails extends BaseController
$FatherName = $this->request->getPost('FatherName');
$DateofBirth = $this->request->getPost('DateofBirth');
$ContactNumber = $this->request->getPost('ContactNumber');
$EmailId = $this->request->getPost('emailid');
$comEmailId = $this->request->getPost('comemailid');
$Gender = $this->request->getPost('gender');
$MartialStatus = $this->request->getPost('MartialStatus');
$BloodGroup = $this->request->getPost('bloodgroup');
$CurrentAddress = $this->request->getPost('currentaddress');
$permanentaddress = $this->request->getPost('permanentaddress');
$emergencycontactname = $this->request->getPost('emergencycontactname');
$emergencycontactnumber = $this->request->getPost('emergencycontactnumber');
$desigination = $this->request->getPost('desigination');
$departmentCode = $this->request->getPost('departmentname');
$dateofjoining = $this->request->getPost('dateofjoining');
@ -300,7 +296,6 @@ class Employeedetails extends BaseController
'Gender' => $Gender,
'DateofBirth' => $DOB,
'ContactNumber' => $ContactNumber,
'EmailId' => $EmailId,
'BloodGroup' => $BloodGroup,
'MartialStatus' => $MartialStatus,
'DateofJoining' => $DOJ,
@ -309,8 +304,6 @@ class Employeedetails extends BaseController
'Departmentcode' => $departmentCode,
'PresentAddress' => $CurrentAddress,
'PermanentAddress' => $permanentaddress,
'EmergencyContactName' => $emergencycontactname,
'EmergencyContactNumber' => $emergencycontactnumber,
'Edu_Qualification' => $eduqualifaction,
'Additional_Qualification' => $addqualification,
'AadharNo' => $aadharno,
@ -327,7 +320,6 @@ class Employeedetails extends BaseController
'Reference_ContactNumber' => $referrercontno,
'Remarks' => $addinfo,
'CreatedBy' => $createdby,
'personalEmailId' => $comEmailId,
'DriverLicense' => $driverlicense,
'LicenseValidtill' => $License_ExpiryDate,
'VoterID' => $VoterID,
@ -633,29 +625,10 @@ class Employeedetails extends BaseController
$EmpId = $this->request->getPost('employeeid');
//$mail = $this->this->.post('emailid');
// $this->validator->setRules([
// 'ContactNumber'=> 'trim|required|min_length[10]|max_length[10]',
// 'emailid'=> 'trim|required|valid_email|callback_checkMailEmp',
// 'gender'=> 'callback_Gender_validate',
// 'MartialStatus'=> 'callback_Martial_validate',
// 'bloodgroup'=> 'callback_Blood_validate',
// 'emergencycontactnumber'=> 'trim|required|min_length[10]|max_length[10]',
// 'desigination'=> 'callback_Des_validate',
// 'departmentname'=> 'callback_Dep_validate',
// 'eduqualifaction'=> 'callback_select_validate',
// 'referrercontno'=> 'trim|min_length[10]|max_length[10]',
// 'aadharno'=> 'trim|max_length[14]',
// 'panno'=> 'trim|max_length[10]',
// 'passportno'=> 'trim|min_length[9]|max_length[9]',
// 'accountno'=> 'trim|min_length[10]|max_length[20]',
// 'pfno'=> 'trim|min_length[22]|max_length[22]',
// 'esino'=> 'trim|min_length[10]|max_length[10]']);
// if ($this->validator->run() == FALSE) {
// $this->ViewEmployee($EmpId);
// } else {
$EmpId = $this->request->getPost('employeeid');
@ -664,19 +637,12 @@ class Employeedetails extends BaseController
$Picture = "";
if ($PictureName != '') {
//echo 'Exists';
//$Picture = $PictureName;
if (strlen((string)$ModifyPictureName) == 0) {
//echo 'Exists But Not replace';
$Picture = $PictureName;
} else {
// echo "<pre>";
// // print_r($this->request->getPost());
// print_r($this->request->getFile('photo'));
// die;
//echo 'Exists But Replace';
//$Picture = $ModifyPictureName;
//$Picture = $this->editimage($ModifyPictureName);
$photo = $this->request->getFile('ModifyImage');
if (!$photo || !$photo->isValid()) {
$photo = $this->request->getFile('photo');
@ -724,15 +690,12 @@ class Employeedetails extends BaseController
// dd($DateofBirth);
$ContactNumber = $this->request->getPost('ContactNumber');
$EmailId = $this->request->getPost('emailid');
$comEmailId = $this->request->getPost('comemailid');
$Gender = $this->request->getPost('gender');
$MartialStatus = $this->request->getPost('MartialStatus');
$BloodGroup = $this->request->getPost('bloodgroup');
$CurrentAddress = $this->request->getPost('currentaddress');
$permanentaddress = $this->request->getPost('permanentaddress');
$emergencycontactname = $this->request->getPost('emergencycontactname');
$emergencycontactnumber = $this->request->getPost('emergencycontactnumber');
$desigination = $this->request->getPost('desigination');
$departmentCode = $this->request->getPost('departmentname');
$dateofjoining = $this->request->getPost('dateofjoining');
@ -823,7 +786,6 @@ class Employeedetails extends BaseController
'Gender' => $Gender,
'DateofBirth' => $DOB,
'ContactNumber' => $ContactNumber,
'EmailId' => $EmailId,
'BloodGroup' => $BloodGroup,
'MartialStatus' => $MartialStatus,
'DateofJoining' => $DOJ,
@ -832,8 +794,6 @@ class Employeedetails extends BaseController
'Departmentcode' => $departmentCode,
'PresentAddress' => $CurrentAddress,
'PermanentAddress' => $permanentaddress,
'EmergencyContactName' => $emergencycontactname,
'EmergencyContactNumber' => $emergencycontactnumber,
'Edu_Qualification' => $eduqualifaction,
'Additional_Qualification' => $addqualification,
'AadharNo' => $aadharno,
@ -850,7 +810,6 @@ class Employeedetails extends BaseController
'Reference_ContactNumber' => $referrercontno,
'Remarks' => $addinfo,
'UpdatedBY' => $UpdatedBY,
'personalEmailId' => $comEmailId,
'DriverLicense' => $driverlicense,
'LicenseValidtill' => $License_ExpiryDate,
'VoterID' => $VoterID,

View File

@ -1135,7 +1135,7 @@ class User extends BaseController
$userInfo = array();
// $userInfo = array('password' => getHashedPassword($password), 'roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
$userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate);
$userInfo = array('roleId' => $role, 'EmpId' => $EmpID, 'updatedDtm' => $updatedDate , 'email'=> $this->request->getPost('MailID'));
$result = $this->user_model->editUser($userInfo, $EmpID);

View File

@ -193,9 +193,11 @@ class User_model extends Model
function GetEmployeeDetails($UserId)
{
//echo $UserId;
$subQuery = 'select EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,EMP.EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName from
t_employee_details EMP join t_departmentdetails DEPT on
EMP.Departmentcode = DEPT.DEPCode where EMP.EmpID= (select EmpID from tbl_users where userId=?)';
$subQuery = 'select EMP.EmpID,EMP.FirstName,EMP.LastName,EMP.Designation,user.email as EmailId,EMP.ContactNumber,DEPT.DEPCode,DEPT.DepartmentName from
t_employee_details EMP
join t_departmentdetails DEPT on EMP.Departmentcode = DEPT.DEPCode
join tbl_users user on EMP.EmpID = user.EmpID
where EMP.EmpID= (select EmpID from tbl_users where userId=?)';
$query = $this->db->query($subQuery, array($UserId));

View File

@ -520,8 +520,11 @@
<input type="text" name="age" id="age" class="form-control"
readonly>
</div>
</div>
<div class="row mb-3">
<!-- <div class="row mb-3">
<div class="col-md-4 pad">
<label>Official Email ID</label><span class="badge">*</span>
<input type="email" name="emailid" id="emailid" maxlength="100"
@ -532,25 +535,8 @@
<input type="email" name="comemailid" id="mail" maxlength="100"
class="form-control">
</div>
<div class="col-md-4 pad">
<label>Blood group</label><span class="badge">*</span>
<select class="form-control" id="bloodgroup" name="bloodgroup" required
class="form-control select2">
<option value="">Select Blood group</option>
<?php
if (!empty($BloodGroup)) {
foreach ($BloodGroup as $rl) {
?>
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
</div>
</div> -->
<div class="row mb-3">
@ -581,6 +567,25 @@
<div class="row mb-3">
<div class="col-md-4 pad">
<label>Blood group</label><span class="badge">*</span>
<select class="form-control" id="bloodgroup" name="bloodgroup" required
class="form-control select2">
<option value="">Select Blood group</option>
<?php
if (!empty($BloodGroup)) {
foreach ($BloodGroup as $rl) {
?>
<option value="<?php echo $rl->ConfigValue ?>">
<?php echo $rl->ConfigValue ?></option>
<?php
}
}
?>
</select>
</div>
<div class="col-md-4 pad">
<label>Marital Status</label><span class="badge">*</span>
<select id="MartialStatus" name="MartialStatus" type="text"
@ -600,7 +605,7 @@
</select>
</div>
<div class="col-md-4 pad">
<!-- <div class="col-md-4 pad">
<label>Emergency Contact Name</label>
<input type="text" id="emergencycontactname"
onkeypress="return onlyAlphabets(event);" maxlength="100"
@ -614,7 +619,7 @@
onchange="return getValidEmergencyNumber();" pattern="(.){10,10}"
maxlength="10" class="form-control"
onkeypress="return isNumberKey(event)">
</div>
</div> -->
</div>

View File

@ -46,20 +46,18 @@
<label class="col-form-label" for="FirstName">First Name</label>
<input type="text" class="form-control required" readonly id="FirstName" name="FirstName" maxlength="128">
</div>
<div class="col-md-3">
<label class="col-form-label" for="LastName">Last Name</label>
<input type="text" class="form-control required" readonly id="LastName" name="LastName" maxlength="128">
</div>
<div class="col-md-3">
<label class="col-form-label" for="Designation">Designation</label>
<input type="text" class="form-control required " readonly id="Designation" name="Designation" maxlength="128">
</div>
<div class="col-md-3">
<label for="Emailaddress">Email address</label><span class="badge">*</span>
<input type="text" class="form-control required " id="MailID" name="MailID" maxlength="128">
</div>
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="Emailaddress">Email address</label>
<input type="text" class="form-control required " readonly id="MailID" name="MailID" maxlength="128">
</div>
<div class="col-md-3">
<label for="ContactNumber">Contact Number</label>
<input type="text" class="form-control required digits" readonly id="ContactNo" name="ContactNo" minlength="10" maxlength="10">
@ -79,11 +77,7 @@
?>
</select>
</div>
</div>
<div class="form-row" style="margin-top:20px">
</div>
<div class="form-row" style="margin-top:20px">
<div class="col-md-3">
<label for="Password">Password</label>
<input type="password" class="form-control required" id="password" required name="password" maxlength="10">
@ -171,9 +165,7 @@
success: function(data) {
if (data.success) {
$("#FirstName").val(data.userInfo[0].FirstName);
$("#LastName").val(data.userInfo[0].LastName);
$("#Designation").val(data.userInfo[0].Designation);
$("#MailID").val(data.userInfo[0].EmailId);
$("#ContactNo").val(data.userInfo[0].ContactNumber);
$('#loader').hide();
} else {
@ -189,7 +181,6 @@
} else {
// Clear fields if no employee ID is selected
$("#FirstName").val('');
$("#LastName").val('');
$("#Designation").val('');
$("#MailID").val('');
$("#ContactNo").val('');

View File

@ -354,7 +354,7 @@ if (!empty($EmpDetails)) {
</div>
<div class="row mb-3">
<!-- <div class="row mb-3">
<div class="col-md-4 pad">
<label>Official Email ID</label><span class="badge">*</span>
@ -371,33 +371,9 @@ if (!empty($EmpDetails)) {
class="form-control">
</div>
<div class="col-md-4 pad">
<label>Blood group</label><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required
class="form-control select2">
<option value="<?php echo $BloodGroup; ?>">
<?php echo $BloodGroup ?>
</option>
<?php foreach ($BloodGroupList as $rl): ?>
<?php $rl1 = $rl->ConfigValue; ?>
<?php if (trim($rl1) != trim($BloodGroup)): ?>
<?php if (isset($_POST['BloodGroup']) && $_POST['BloodGroup'] == $rl1): ?>
<option value="<?= esc($rl1) ?>" selected="selected">
<?= esc($rl->ConfigValue) ?>
</option>
<?php else: ?>
<option value="<?= esc($rl1) ?>">
<?= esc($rl->ConfigValue) ?>
</option>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
</div>
</div> -->
<div class="row mb-3">
@ -429,6 +405,32 @@ if (!empty($EmpDetails)) {
<div class="row mb-3">
<div class="col-md-4 pad">
<label>Blood group</label><span class="badge">*</span>
<select id="bloodgroup" name="bloodgroup" required
class="form-control select2">
<option value="<?php echo $BloodGroup; ?>">
<?php echo $BloodGroup ?>
</option>
<?php foreach ($BloodGroupList as $rl): ?>
<?php $rl1 = $rl->ConfigValue; ?>
<?php if (trim($rl1) != trim($BloodGroup)): ?>
<?php if (isset($_POST['BloodGroup']) && $_POST['BloodGroup'] == $rl1): ?>
<option value="<?= esc($rl1) ?>" selected="selected">
<?= esc($rl->ConfigValue) ?>
</option>
<?php else: ?>
<option value="<?= esc($rl1) ?>">
<?= esc($rl->ConfigValue) ?>
</option>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
<div class="col-md-4 pad">
<label>Marital Status</label><span class="badge">*</span>
@ -455,7 +457,7 @@ if (!empty($EmpDetails)) {
</select>
</div>
<div class="col-md-4 pad">
<!-- <div class="col-md-4 pad">
<label>Emergency Contact Name</label>
<input type="text" id="emergencycontactname" maxlength="100"
name="emergencycontactname"
@ -471,7 +473,7 @@ if (!empty($EmpDetails)) {
value="<?php echo $EmergencyContactNumber; ?>"
placeholder="Emergency Contact Number" class="form-control"
onkeypress="return isNumberKey(event)">
</div>
</div> -->
</div>

View File

@ -55,26 +55,25 @@ if (!empty($EmpList)) {
<label class="col-form-label" for="FirstName">First Name</label>
<input type="text" class="form-control required" value="<?php echo $FirstName ?>" readonly id="FirstName" name="FirstName" maxlength="128">
</div>
<div class="col-md-3">
<label class="col-form-label" for="LastName">Last Name</label>
<input type="text" class="form-control required" value="<?php echo $LastName ?>" readonly id="LastName" name="LastName" maxlength="128">
</div>
<div class="col-md-3">
<label class="col-form-label" for="Designation">Designation</label>
<input type="text" class="form-control required" value="<?php echo $Designation ?>" readonly id="Designation" name="Designation" maxlength="128">
</div>
<div class="col-md-3">
<label class="col-form-label">Email address</label><span class="badge">*</span>
<input type="text" class="form-control required email" value="<?php echo $EmailId ?>" id="MailID" name="MailID" maxlength="128">
</div>
</div>
<div class="form-row">
<div class="col-md-3">
<label for="MailID">Email address</label>
<input type="text" class="form-control required email" value="<?php echo $EmailId ?>" readonly id="MailID" name="MailID" maxlength="128">
</div>
<div class="col-md-3">
<label for="ContactNo">Contact Number</label>
<label class="col-form-label">Contact Number</label>
<input type="text" class="form-control required digits" value="<?php echo $ContactNo ?>" readonly id="ContactNo" name="ContactNo" minlength="10" maxlength="10">
</div>
<div class="col-md-3">
<label for="Role">Role</label>
<label class="col-form-label">Role</label>
<select class="form-control required" id="role" name="role" required>
<option value="0">Select Role</option>
<?php

View File

@ -592,23 +592,15 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>sales_dashboard" role="button"
aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i>DASHBOARD</a>
<!-- <a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-dashboard" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-dashboard-line mr-1"></i> DASHBOARD <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-dashboard">
<a href="<?php echo base_url(); ?>dashboard" class="dropdown-item">Home</a>
<a href="https://vu.venbait.in/d/d9eb820b-60aa-4fe6-9de0-531924185b77/sales-at-a-glance?orgId=2&from=1715215911333&to=1715237511333" class="dropdown-item">Sales</a>
<a href="<?php echo base_url(); ?>sales_dashboard" class="dropdown-item">Sales</a>
</div> -->
<i class="ri-dashboard-line mr-1"></i>Dashboard</a>
</li>
<!-- Sales module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-hr" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-file-paper-2-line mr-1"></i> SALES <div class="arrow-down"></div>
<i class="ri-file-paper-2-line mr-1"></i> Sales <div class="arrow-down"></div>
</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>
@ -620,7 +612,7 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-shopping-cart-2-line mr-1"></i> PURCHASE <div class="arrow-down"></div>
<i class="ri-shopping-cart-2-line mr-1"></i> Purchase <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
@ -656,7 +648,7 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-purchase" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-ancient-gate-fill mr-1"></i> INWARD<div class="arrow-down"></div>
<i class="ri-ancient-gate-fill mr-1"></i> Inward<div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
@ -679,19 +671,7 @@
</div>
</li>
<!-- Stock module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-stock" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-shopping-bag-line"></i> Stock <div class="arrow-down"></div>
</a>
<div class="dropdown-menu" aria-labelledby="topnav-stock">
<div class="">
<a href="<?php echo base_url(); ?>coatingMachineDetails" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>Coating Machine Details</a>
</div>
</div>
</li>
<!-- HR module -->
@ -732,8 +712,25 @@
</div>
</li>
<!-- master detail module -->
<!-- supplier module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>supplierlisting" role="button" aria-expanded="false">
<i class="fas fa-truck mr-1" style="color: gray;"></i>Supplier
</a>
</li>
<!-- material module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>rawmaterialListing" role="button" aria-expanded="false">
<i class="fas fa-cubes mr-1"></i>Material
</a>
</li>
<!-- master detail module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-others" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-list-settings-line align-middle mr-1"></i> Master Details <div class="arrow-down"></div>
@ -753,28 +750,27 @@
</div>
</li>
<!-- supplier module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>supplierlisting" role="button" aria-expanded="false">
<i class="fas fa-truck mr-1" style="color: gray;"></i>Supplier
<!-- Stock module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="#" id="topnav-stock" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="ri-shopping-bag-line"></i> Stock <div class="arrow-down"></div>
</a>
</li>
<div class="dropdown-menu" aria-labelledby="topnav-stock">
<!-- material module -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>rawmaterialListing" role="button" aria-expanded="false">
<i class="fas fa-cubes mr-1"></i>Material
</a>
<div class="">
<a href="<?php echo base_url(); ?>coatingMachineDetails" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>Coating Machine Details</a>
</div>
</div>
</li>
<!-- report list module -->
<li class="nav-item dropdown">
<!-- <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle arrow-none" href="<?php echo base_url(); ?>reports" role="button"
aria-expanded="false">
<i class="ri-keyboard-line mr-1"></i> Report Lists
</a>
</li>
</li> -->

View File

@ -170,7 +170,7 @@
<div class="card">
<div class="row">
<div class="col-md-8">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 47px;">
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 26px;">
<input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label>
<input class="form-control date_range form-date-search" id="fromDate" name="fromDate" placeholder="Select From Date" autocomplete="off" required>
@ -183,12 +183,12 @@
<div class="error" id="error"></div>
</form>
</div>
<div class="col-md-4">
<!-- <div class="col-md-4">
<button id="downloadExcel" class="btn btn-primary" style="margin-top: 14px;margin-bottom: -11px;margin-right: 25px;float: right;">Download Excel</button>
</div>
</div> -->
</div>
<div class="card-body">
<table id="view_inward_gate_register" class="table dt-responsive nowrap w-100">
<div class="card-body" style="overflow-x:scroll;">
<table id="view_inward_gate_register" class="table table-bordered table-hover">
<thead>
<tr>
<th>Create Date</th>
@ -263,60 +263,6 @@
</table>
<table id="InwardgateregistertableForDownload" class="table table-bordered table-hover" style="display: none;">
<thead style="background-color: #ddd;">
<tr>
<th>Create Date</th>
<th>IGR No</th>
<th>PO No</th>
<th>Supplier Name</th>
<th>Invoice No</th>
<th>Invoice Date </th>
<th>Item</th>
<th>Rec Qty</th>
<th>Net Weight</th>
<th>Vechicle No</th>
<th>Driver</th>
<th>Transporter</th>
<th>IGR Status</th>
</tr>
</thead>
<tbody>
<?php
if(!empty($IGRDownload))
{ $index = 0;
foreach($IGRDownload as $record)
{ $index = $index +1;
$createddate = new DateTime($record->CreatedDate);
$date = $createddate->format('d-m-Y');
$time = $createddate->format('h:i A');
?>
<tr id="<?php echo $index ?>" >
<td align="right"><?php echo $date; ?></td>
<td><a data-toggle="modal" data-target="#Igrshow" data-id="<?php echo $index;?>" data-inx="<?php echo $index;?>" data-userid="<?php echo $record->IGRNO ?>" data-igrstatus="<?php echo $record->IGRStatus ?>"> <u><?php echo $record->IGRNO ?></u></a></td>
<td><a data-toggle="modal" data-target="#CostCentershow" data-id="<?php echo $index;?>" data-igno="<?php echo $record->IGRNO;?>" data-pono="<?php echo $record->PONO ?>" target="_blank"> <u><?php echo $record->PONO ?></u></a></td>
<td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->DeliveryChellanOrInvoiceNo ?></td>
<td align="right"><?php
$date = new DateTime($record->DeliveryChellanDate);
echo $date->format('d-m-Y'); ?></td>
<td><?php echo $record->MaterialName ?></td>
<td><?php echo $record->ReceivedQuantity ?></td>
<td><?php echo $record->NetWeight ?></td>
<td><?php echo $record->VehicleNo ?></td>
<td><?php echo $record->DriverName ?></td>
<td><?php echo $record->TransporterName ?></td>
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div> <!-- end card body-->
</div> <!-- end card -->
</div><!-- end col-->
@ -1674,13 +1620,16 @@
$(document).ready(function() {
table = $('#view_inward_gate_register').DataTable({
dom: 'Blfrtip',
buttons: [
'csv', 'excel', 'pdf'
],
pageLength: 10,
lengthMenu: [
[10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"]
],
responsive: true,
// responsive: true,
ordering:false,
language: {
paginate: {
@ -1755,14 +1704,14 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.0/xlsx.full.min.js"></script>
<script>
document.getElementById('downloadExcel').addEventListener('click', function() {
// Get the HTML table element
var table = document.getElementById('InwardgateregistertableForDownload');
// document.getElementById('downloadExcel').addEventListener('click', function() {
// var table = document.getElementById('InwardgateregistertableForDownload');
// Convert the HTML table to a worksheet
var wb = XLSX.utils.table_to_book(table, { sheet: "Inward Gate Register" });
// Generate Excel file and trigger the download
XLSX.writeFile(wb, 'InwardGateRegister.xlsx');
});
// var wb = XLSX.utils.table_to_book(table, { sheet: "Inward Gate Register" });
// XLSX.writeFile(wb, 'InwardGateRegister.xlsx');
// });
</script>