Merge branch 'new_theme' of bitbucket.org:venbainformationtechnology/ria into new_theme
This commit is contained in:
commit
0eb98086b9
@ -42,23 +42,23 @@ class Amendmentpurchaseorder extends BaseController
|
||||
{
|
||||
|
||||
|
||||
if ($this->request->getMethod() === 'GET')
|
||||
{
|
||||
$currentYear = date('Y');
|
||||
$currentMonth = date('m');
|
||||
if ($this->request->getMethod() === 'GET')
|
||||
{
|
||||
$currentYear = date('Y');
|
||||
$currentMonth = date('m');
|
||||
$startOfMonth = "$currentYear-$currentMonth-01";
|
||||
$endOfMonth = date('Y-m-t');
|
||||
$fromDate = $startOfMonth;
|
||||
$toDate = $endOfMonth;
|
||||
} elseif ($this->request->getMethod() === 'POST') {
|
||||
$fromDate = $this->request->getPost('fromDate');
|
||||
$toDate = $this->request->getPost('toDate');
|
||||
$fromDate = $startOfMonth;
|
||||
$toDate = $endOfMonth;
|
||||
} elseif ($this->request->getMethod() === 'POST') {
|
||||
$fromDate = $this->request->getPost('fromDate');
|
||||
$toDate = $this->request->getPost('toDate');
|
||||
$fromDate = date('Y-m-d', strtotime($fromDate));
|
||||
$toDate = date('Y-m-d', strtotime($toDate));
|
||||
}
|
||||
|
||||
// $this->load->library('pagination');
|
||||
$forwhat = 'amendment';
|
||||
$forwhat = 'amendment';
|
||||
|
||||
$data['POData'] = $this->purchaseorder_model->purchaseorderListing($forwhat,$fromDate,$toDate);
|
||||
$data['fromDate'] = date('d-m-Y', strtotime($fromDate));
|
||||
@ -1340,8 +1340,6 @@ class Amendmentpurchaseorder extends BaseController
|
||||
$createddt = get_current_date_time();
|
||||
$updateddt = get_current_date_time();
|
||||
|
||||
|
||||
|
||||
$PaymentTerms = $this->request->getPost('PaymentTerms');
|
||||
$beforePaymentTerms = $this->request->getPost('beforePaymentterms');
|
||||
|
||||
@ -1410,20 +1408,17 @@ class Amendmentpurchaseorder extends BaseController
|
||||
}
|
||||
$LastPO = $this->purchaseorder_model->addAmendPOMaster($POMaster, $CreateBy, $PONO);
|
||||
$NewPO = '';
|
||||
// if (count($LastPO) > 0) {
|
||||
// $NewPO = $LastPO[0]['PONO'];
|
||||
// }
|
||||
// print_r($LastPO);die;
|
||||
|
||||
foreach ($LastPO as $PO) :
|
||||
$NewPO = $PO['PONO'];
|
||||
endforeach;
|
||||
$PODetail = array('Status' => PO_AMENDED); //TO SET PARENT PO AS AMENDMENT STATUS
|
||||
|
||||
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
|
||||
$APO = $this->purchaseorder_model->updateAmendPOMaster($PONO, $PODetail);
|
||||
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
$LineItemStatus = REQITEM_NEW;
|
||||
|
||||
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
|
||||
$igrvalue = $this->purchaseorder_model->selectigrmaster($PONO);
|
||||
|
||||
$po = '';
|
||||
$igrno = '';
|
||||
|
||||
@ -199,37 +199,7 @@ class Employeedetails extends BaseController
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
*/
|
||||
/**
|
||||
* This function is used to save the new Employee form in the database
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@ -249,6 +219,10 @@ class Employeedetails extends BaseController
|
||||
$photo->move($uploadDir, $newName);
|
||||
$Picture = $newName;
|
||||
}
|
||||
else{
|
||||
echo "Incorrect file format provided";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// $Profile = $this->request->getPost('photo');
|
||||
@ -661,38 +635,7 @@ class Employeedetails extends BaseController
|
||||
}
|
||||
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
/* To Update the employee details*/
|
||||
|
||||
|
||||
|
||||
function UpdateEmployee()
|
||||
@ -700,41 +643,12 @@ class Employeedetails extends BaseController
|
||||
|
||||
$EmpId = $this->request->getGet('empId');
|
||||
|
||||
$PictureName = $this->request->getPost('Image');
|
||||
$ModifyPictureName = $this->request->getPost('ModifyImage');
|
||||
//if it is empty it means the default image is selected
|
||||
$oldPictureName = $this->request->getPost('oldImageName');
|
||||
$Picture = "";
|
||||
if ($PictureName != '') {
|
||||
|
||||
|
||||
if (strlen((string)$ModifyPictureName) == 0) {
|
||||
|
||||
$Picture = $PictureName;
|
||||
} else {
|
||||
|
||||
$photo = $this->request->getFile('ModifyImage');
|
||||
if (!$photo || !$photo->isValid()) {
|
||||
$photo = $this->request->getFile('photo');
|
||||
}
|
||||
if (isset($photo)) {
|
||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
||||
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
||||
if (in_array($photo->getExtension(), $allowedTypes)) {
|
||||
$newName = $photo->getRandomName();
|
||||
if (!is_dir($uploadDir)) {
|
||||
mkdir($uploadDir, 0777, true);
|
||||
}
|
||||
$photo->move($uploadDir, $newName);
|
||||
$Picture = $newName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//echo 'Not Exists';
|
||||
$photo = $this->request->getFile('photo');
|
||||
if (isset($photo)) {
|
||||
if ($photo->isValid() && !$photo->hasMoved()) {
|
||||
$photo = $this->request->getFile('photo');
|
||||
|
||||
if (isset($photo) && $photo->isValid() && !$photo->hasMoved()) {
|
||||
$uploadDir = ROOTPATH . 'public/uploads/images/';
|
||||
$allowedTypes = ['jpg', 'jpeg', 'png', 'gif'];
|
||||
if (in_array($photo->getExtension(), $allowedTypes)) {
|
||||
@ -745,10 +659,11 @@ class Employeedetails extends BaseController
|
||||
$photo->move($uploadDir, $newName);
|
||||
$Picture = $newName;
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
$Picture=$oldPictureName;
|
||||
}
|
||||
}
|
||||
//echo $Picture;
|
||||
|
||||
|
||||
$FirstName = $this->request->getPost('FirstName');
|
||||
$LastName = $this->request->getPost('LastName');
|
||||
|
||||
@ -1670,64 +1670,72 @@ function updateIGRWeight(){
|
||||
}
|
||||
|
||||
public function downloadFilesAsZip($igrno)
|
||||
{
|
||||
// Get all file details for the given IGR number
|
||||
$fileDetails = $this->inwardgateregister_model->getAllIgrFileDetails($igrno);
|
||||
if (empty($fileDetails)) {
|
||||
// Display an alert message
|
||||
echo '<script>alert("There are no files.");</script>';
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
|
||||
// Define the root path for files
|
||||
$rootPath = ROOTPATH . 'public/uploads/Igrfiles/';
|
||||
|
||||
// Create a new ZIP archive
|
||||
$zip = new ZipArchive();
|
||||
|
||||
// Define the name of the ZIP file
|
||||
$zipFileName = $igrno . '.zip';
|
||||
$zipFilePath = $rootPath . $zipFileName;
|
||||
|
||||
if ($zip->open($zipFilePath, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
|
||||
$filesAdded = false;
|
||||
|
||||
// Add each file to the ZIP archive
|
||||
foreach ($fileDetails as $file) {
|
||||
$filePath = $rootPath . $file->file;
|
||||
if (file_exists($filePath)) {
|
||||
if (!$zip->addFile($filePath, $file->filename)) {
|
||||
// Handle error when adding file to ZIP
|
||||
echo '<script>alert("Failed to add file: ' . $file->filename . '");</script>';
|
||||
$zip->close();
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
$filesAdded = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Close the ZIP archive
|
||||
$zip->close();
|
||||
|
||||
if ($filesAdded) {
|
||||
// Return the ZIP file as a download
|
||||
return $this->response->download($zipFilePath, null)->setFileName($zipFileName);
|
||||
} else {
|
||||
// Delete the empty ZIP file
|
||||
if (file_exists($zipFilePath)) {
|
||||
unlink($zipFilePath);
|
||||
}
|
||||
echo '<script>alert("There are no files.");</script>';
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
echo '<script>alert("Failed to create ZIP file");</script>';
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
}
|
||||
{
|
||||
// Get all file details for the given IGR number
|
||||
$fileDetails = $this->inwardgateregister_model->getAllIgrFileDetails($igrno);
|
||||
if (empty($fileDetails)) {
|
||||
echo '<script>alert("There are no files.");</script>';
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
|
||||
// Define the root path for files
|
||||
$rootPath = ROOTPATH . 'public/uploads/Igrfiles/';
|
||||
|
||||
// Check if root path is valid
|
||||
if (!is_dir($rootPath)) {
|
||||
echo '<script>alert("Invalid file directory.");</script>';
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a new ZIP archive
|
||||
$zip = new ZipArchive();
|
||||
$zipFileName = $igrno . '.zip';
|
||||
$zipFilePath = $rootPath . $zipFileName;
|
||||
|
||||
if ($zip->open($zipFilePath, ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
|
||||
$filesAdded = false;
|
||||
|
||||
// Add each file to the ZIP archive
|
||||
foreach ($fileDetails as $file) {
|
||||
$filePath = $rootPath . $file->file;
|
||||
|
||||
// Check if file exists
|
||||
if (!file_exists($filePath)) {
|
||||
log_message('error', 'File not found: ' . $filePath);
|
||||
continue;
|
||||
}
|
||||
|
||||
$sanitizedFilename = preg_replace('/[^a-zA-Z0-9_\-\.]/', '_', $file->filename);
|
||||
|
||||
if (!$zip->addFile($filePath, $sanitizedFilename)) {
|
||||
log_message('error', 'Failed to add file: ' . $sanitizedFilename);
|
||||
$zip->close();
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
$filesAdded = true;
|
||||
}
|
||||
|
||||
// Close the ZIP archive
|
||||
$zip->close();
|
||||
|
||||
if ($filesAdded) {
|
||||
return $this->response->download($zipFilePath, null)->setFileName($zipFileName);
|
||||
} else {
|
||||
if (file_exists($zipFilePath)) {
|
||||
unlink($zipFilePath);
|
||||
}
|
||||
echo '<script>alert("No files were added to the ZIP.");</script>';
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
echo '<script>alert("Failed to create ZIP file");</script>';
|
||||
redirect('ViewIGR', 'refresh');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -24,16 +24,43 @@ class Sales extends BaseController
|
||||
$this->isLoggedIn();
|
||||
}
|
||||
|
||||
function formatIndianCurrency($amount) {
|
||||
// Convert the amount to a string with 2 decimal places
|
||||
$formattedAmount = number_format((float)$amount, 2, '.', '');
|
||||
|
||||
// Split the integer and decimal parts
|
||||
$parts = explode('.', $formattedAmount);
|
||||
$integerPart = $parts[0];
|
||||
$decimalPart = isset($parts[1]) ? $parts[1] : '00';
|
||||
|
||||
// Format the integer part for Indian numbering system
|
||||
if (strlen($integerPart) > 3) {
|
||||
$lastThreeDigits = substr($integerPart, -3); // Get the last 3 digits (thousands)
|
||||
$remainingDigits = substr($integerPart, 0, -3); // Get the remaining digits
|
||||
|
||||
// Add commas to the remaining digits in groups of 2
|
||||
$remainingDigits = preg_replace('/\B(?=(\d{2})+(?!\d))/', ',', $remainingDigits);
|
||||
|
||||
// Combine the formatted parts
|
||||
$integerPart = $remainingDigits . ',' . $lastThreeDigits;
|
||||
}
|
||||
|
||||
// Combine the integer and decimal parts
|
||||
return $integerPart . '.' . $decimalPart;
|
||||
}
|
||||
public function sales_dashboard()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Sales Dashboard';
|
||||
$data = [];
|
||||
$data['today_sales'] = $this->ipinvoice_model->todaySales();
|
||||
$data['today_sales']->Sales = $this->formatIndianCurrency($data['today_sales']->Sales, 2, '.', ',');
|
||||
$data['this_month_sales'] = $this->ipinvoice_model->thisMonthSales();
|
||||
$data['this_month_sales']->Sales = $this->formatIndianCurrency($data['this_month_sales']->Sales);
|
||||
$data['this_year_sales'] = $this->ipinvoice_model->thisYearSales();
|
||||
$data['this_year_sales']->Sales = $this->formatIndianCurrency($data['this_year_sales']->Sales, 2, '.', ',');
|
||||
$data['this_year_sales_trend'] = $this->ipinvoice_model->thisYearSalesTrend();
|
||||
$data['get_today_invoices'] = $this->ipinvoice_model->getTodayInvoices();
|
||||
|
||||
|
||||
// Define months from April to March
|
||||
$months = ['Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar'];
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ class Employeedetails_model extends Model
|
||||
$builder = $this->db->table('t_employee_details Emp')
|
||||
->select(' Emp.*,Dep.DepartmentName as DepartmentName')
|
||||
->join('t_departmentdetails Dep', 'Emp.Departmentcode = Dep.DEPCode', 'left')
|
||||
->orderBy("Emp.EmpID", "desc");
|
||||
->orderBy("Emp.EmpID", "asc");
|
||||
|
||||
$query = $builder->get();
|
||||
|
||||
|
||||
@ -389,8 +389,6 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
|
||||
function purchaseorderListing($forwhat ,$fromDate='',$toDate='')
|
||||
{
|
||||
|
||||
|
||||
|
||||
$builder = $this->db->table('t_purchaseorder_master POMast')->distinct()
|
||||
->select('POMast.PONO,POMast.CreatedDate,supp.SupplierName,TotalOrderValue,PODate,Stat.StatusName,Stat.StatusCode,POMast.POType as ReqType,DeliveryDate,DeliverySchedule,DeliveryOption,POMast.CapitalRange')
|
||||
@ -1595,8 +1593,6 @@ mstr.CourierNo,pom.Status,pom.POType') //,bill.BillNo,bill.FilePath,
|
||||
function getPOList($type, $fromDate , $toDate)
|
||||
{
|
||||
|
||||
|
||||
|
||||
$builder = $this->db->table('t_purchaseorder_master mast')->distinct()
|
||||
->select('mast.PODate,mast.PONO,mast.TotalOrderValue,st.StatusCode,st.StatusName,emp.FirstName,mast.CreatedDate,ccm.CostCenterName,ccm.CostCenterCode,mast.POType as RType,mast.Remarks,DepartmentName,mast.ApprovedBy,(select EmpID from tbl_users where userId=mast.ApprovedBy )as EID,rmast.ReqType,mast.Status,mast.CapitalRange,
|
||||
(select FirstName from t_employee_details where EmpID=EID)as Approver,sup.SupplierName,sup.MSME')
|
||||
|
||||
@ -4,8 +4,7 @@
|
||||
.pagination {
|
||||
margin: 0px !important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
.Date-filter-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -105,12 +104,12 @@
|
||||
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table id="amend_po_list" class="table dt-responsive wrap w-100">
|
||||
<div class="card-body" style="overflow-x:scroll;">
|
||||
<table id="amend_po_list" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th>#</th> -->
|
||||
<th>PO Date</th>
|
||||
<th>Created Date</th>
|
||||
<th>PONO</th>
|
||||
<th>PO Type</th>
|
||||
<th>Supplier Name</th>
|
||||
@ -132,7 +131,7 @@
|
||||
?>
|
||||
<tr id="<?php echo $index; ?>">
|
||||
<!-- <td align="left"><?php echo $index; ?></td> -->
|
||||
<td><?php $Pdt = new DateTime($record->PODate);
|
||||
<td><?php $Pdt = new DateTime($record->CreatedDate);
|
||||
$PODate = $Pdt->format('d-m-Y');
|
||||
echo $PODate
|
||||
?></td>
|
||||
@ -205,33 +204,8 @@
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- <script>
|
||||
$(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#example1').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
// "columnDefs" : [{"targets":3, "type":"date-eu"}],
|
||||
"aaSorting": [
|
||||
[2, "desc"]
|
||||
],
|
||||
|
||||
"info": true,
|
||||
"autoWidth": false
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||
var dateSplit = date.split('-');
|
||||
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.text-truncate', function() {
|
||||
@ -249,12 +223,8 @@
|
||||
[10, 20, 30, 50, "All"]
|
||||
], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
columnDefs: [{
|
||||
targets: '_all',
|
||||
className: 'text-truncate'
|
||||
}, // Apply truncation to all columns
|
||||
],
|
||||
order:false,
|
||||
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
|
||||
@ -131,8 +131,8 @@
|
||||
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table id="po_list" class="table dt-responsive wrap w-100">
|
||||
<div class="card-body" style="overflow-x:scroll;">
|
||||
<table id="po_list" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Created Date</th>
|
||||
@ -211,13 +211,13 @@
|
||||
?>
|
||||
|
||||
<td>
|
||||
|
||||
<?php if(session()->get('roleText') != 'Auditor'){ ?>
|
||||
<a data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details"
|
||||
href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType
|
||||
. '&CapitalRange=' . $record->CapitalRange; ?>">
|
||||
href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType. '&CapitalRange=' . $record->CapitalRange; ?>">
|
||||
<i class="fa fa-pencil-alt" data-toggle="tooltip"> </i>
|
||||
</a>
|
||||
|
||||
|
||||
</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php
|
||||
} else {
|
||||
@ -255,23 +255,13 @@
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.text-truncate', function() {
|
||||
$(this).toggleClass('expanded');
|
||||
});
|
||||
|
||||
|
||||
// Initialize the DataTable
|
||||
var table = $('#po_list').DataTable({
|
||||
@ -285,12 +275,7 @@
|
||||
[10, 20, 30, 50, "All"]
|
||||
], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
columnDefs: [{
|
||||
targets: '_all',
|
||||
className: 'text-truncate'
|
||||
}, // Apply truncation to all columns
|
||||
],
|
||||
ordering: false,
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
|
||||
@ -430,7 +430,7 @@
|
||||
|
||||
<div class="tab-pane active" id="first">
|
||||
|
||||
<form id="accountForm" method="post" action="#" class="form-horizontal">
|
||||
<form id="accountForm" method="post" enctype="multipart/form-data" action="#" class="form-horizontal">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
@ -439,7 +439,7 @@
|
||||
<div class="box-header">
|
||||
<img id="profilepicture"
|
||||
src="<?php echo base_url(); ?>public/assets/dist/img/avatar.png"
|
||||
alt="your image" style="width: 139px;" /><br />
|
||||
alt="your image" style="width: 139px;" /><br/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@ -109,10 +109,13 @@ if (!empty($EmpDetails)) {
|
||||
}
|
||||
|
||||
$isactive = $Emp->IsActive;
|
||||
$ProfilePicPath='';
|
||||
|
||||
if (!empty($Emp->ProfilePic)) {
|
||||
$ProfilePic = 'public/uploads/images/' . $Emp->ProfilePic;
|
||||
|
||||
$ProfilePicPath = base_url().'public/uploads/images/' . $Emp->ProfilePic;
|
||||
} else {
|
||||
$ProfilePic = 'public/assets/dist/img/avatar.png';
|
||||
$ProfilePicPath = base_url().'public/assets/dist/img/avatar.png';
|
||||
}
|
||||
$Reference_Name = $Emp->Reference_Name;
|
||||
$Reference_ContactNumber = $Emp->Reference_ContactNumber;
|
||||
@ -199,7 +202,9 @@ if (!empty($EmpDetails)) {
|
||||
|
||||
<div class="tab-pane active" id="first">
|
||||
|
||||
<form id="accountForm" method="post" action="#" class="form-horizontal">
|
||||
<form id="accountForm" method="post" action="#"
|
||||
enctype="multipart/form-data"
|
||||
class="form-horizontal">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">
|
||||
@ -208,7 +213,7 @@ if (!empty($EmpDetails)) {
|
||||
<div class="box-header">
|
||||
|
||||
<img id="profilepicture"
|
||||
src="<?php echo base_url() . $ProfilePic; ?>"
|
||||
src="<?php echo $ProfilePicPath; ?>"
|
||||
alt="your image" style="width: 139px;" />
|
||||
|
||||
|
||||
@ -229,15 +234,13 @@ if (!empty($EmpDetails)) {
|
||||
<br>
|
||||
|
||||
<input type='file' onchange="readURL(this);" id="photo"
|
||||
value="<?php echo base_url() . $ProfilePic; ?>"
|
||||
name="photo" />
|
||||
|
||||
|
||||
<input type="hidden" name="Image" id="Image"
|
||||
value="<?php echo $ProfilePic; ?>" class="form-control"
|
||||
readonly>
|
||||
<input type="hidden" name="ModifyImage" id="ModifyImage"
|
||||
class="form-control" readonly>
|
||||
<input type="hidden" name="oldImageName" id="Image"
|
||||
value="<?php echo $Emp->ProfilePic; ?>" class="form-control"
|
||||
readonly>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -155,24 +155,7 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
|
||||
<!-- <script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true,
|
||||
"pageLength": 10,
|
||||
"lengthMenu": [10, 25, 50, 100]
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script> -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||
@ -184,12 +167,12 @@
|
||||
var table = $('#datatable').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||
'csv', 'excel', 'pdf'
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
||||
// responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
order: false,
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="supplierid" class="col-form-label">Supplier </label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<select name="supplierid" id="supplierid" class="form-control" required>
|
||||
</select>
|
||||
</div>
|
||||
@ -211,7 +211,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="supplierid" class="col-form-label">Item Description </label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<textarea name="item_description" id="item_description" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@ -219,7 +219,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="cost" class="col-form-label">Cost</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<input type="number" name="cost" id="cost" class="form-control" required onchange="totalCalculate()">
|
||||
</div>
|
||||
</div>
|
||||
@ -227,7 +227,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="cost" class="col-form-label">CGST</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<input type="number" name="cgst" id="cgst" class="form-control" onchange="totalCalculate()">
|
||||
</div>
|
||||
</div>
|
||||
@ -235,7 +235,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="cost" class="col-form-label">SGST</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<input type="number" name="sgst" id="sgst" class="form-control" onchange="totalCalculate()">
|
||||
</div>
|
||||
</div>
|
||||
@ -243,7 +243,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="igst" class="col-form-label">IGST</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<input type="number" name="igst" id="igst" class="form-control" onchange="totalCalculate()">
|
||||
</div>
|
||||
</div>
|
||||
@ -251,7 +251,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="cost" class="col-form-label">Total</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<input type="number" name="total" id="total" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
@ -260,7 +260,7 @@
|
||||
<label for="transporterfile" class="col-form-label">Transporter File</label>
|
||||
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<input type="file" name="transporterfile" id="transporterfile" class="form-control">
|
||||
<input type="hidden" name="transporterfile_name" id="transporterfile_name">
|
||||
<small id="fileHelp" class="form-text text-muted">
|
||||
@ -272,7 +272,7 @@
|
||||
<div class="col-md-3">
|
||||
<label for="note" class="col-form-label">Notes</label>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col">
|
||||
<textarea name="remarks" id="remarks" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -465,23 +465,7 @@
|
||||
}
|
||||
</style>
|
||||
<!-- loader css code end -->
|
||||
<script>
|
||||
// window.addEventListener('load', function() {
|
||||
// document.body.classList.add('loaded');
|
||||
// });
|
||||
$(window).on('load', function() {
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').fadeOut('slow');
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
// $('.loader').fadeIn();
|
||||
// $('.loader-mask').fadeIn();
|
||||
|
||||
// $('.loader').fadeOut();
|
||||
// $('.loader-mask').delay(350).fadeOut('slow');
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
@ -609,7 +593,9 @@
|
||||
</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'){?>
|
||||
<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>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@ -621,6 +607,7 @@
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
|
||||
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
<div class="dropdown">
|
||||
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-requisition"
|
||||
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -631,6 +618,8 @@
|
||||
<a href="<?php echo base_url(); ?>CreatePO" class="dropdown-item">Purchase Order From Requisition</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="dropdown">
|
||||
<a class="dropdown-item dropdown-toggle arrow-none" href="#" id="topnav-po"
|
||||
role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
@ -639,9 +628,12 @@
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-po">
|
||||
<a href="<?php echo base_url(); ?>purchaseorderListing" class="dropdown-item">Purchase Order List</a>
|
||||
<a href="<?php echo base_url(); ?>PORelease" class="dropdown-item">Approve Purchase Order</a>
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
<a href="<?php echo base_url(); ?>EmergencyPO" class="dropdown-item">Emergency Purchase Order </a>
|
||||
<a href="<?php echo base_url(); ?>Report_pending_purchase" class="dropdown-item">Pending Purchase Order </a>
|
||||
<a href="<?php echo base_url(); ?>amendmentpurchaseorder" class="dropdown-item">Amendment Purchase Order</a>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -658,16 +650,16 @@
|
||||
<div class="dropdown-menu" aria-labelledby="topnav-purchase">
|
||||
|
||||
|
||||
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
<div class="">
|
||||
<a href="<?php echo base_url(); ?>AddIGR" class="dropdown-item"><i class="ri-task-line align-middle mr-1"></i>
|
||||
Inward Gate Register Entry</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="">
|
||||
|
||||
<a href="<?php echo base_url(); ?>ViewIGR" class="dropdown-item"><i class="ri-eye-fill mr-1"></i>
|
||||
View Inward Gate Register</a>
|
||||
|
||||
</div>
|
||||
<div class="">
|
||||
<a href="<?php echo base_url(); ?>ListIGR" class="dropdown-item"><i class="ri-file-list-3-line align-middle mr-1"></i>
|
||||
@ -719,7 +711,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
<!-- 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">
|
||||
@ -735,7 +727,7 @@
|
||||
</li>
|
||||
|
||||
<!-- master detail module -->
|
||||
<li class="nav-item dropdown">
|
||||
<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>
|
||||
@ -756,8 +748,8 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<!-- Stock module -->
|
||||
<li class="nav-item dropdown">
|
||||
<!-- 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>
|
||||
@ -783,6 +775,7 @@
|
||||
<i class="ri-keyboard-line mr-1"></i> Report Lists
|
||||
</a>
|
||||
</li> -->
|
||||
<?php }?>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -7,82 +7,17 @@ if (empty($Status)) {
|
||||
?>
|
||||
|
||||
<style>
|
||||
/* Default minimized state */
|
||||
.supplier-content {
|
||||
max-width: 150px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
cursor: pointer;
|
||||
height: 20px;
|
||||
/* Minimized height */
|
||||
transition: height 0.3s ease-out;
|
||||
/* Smooth transition */
|
||||
}
|
||||
|
||||
|
||||
/* Expanded state with fixed height and scrolling */
|
||||
.supplier-content.expand {
|
||||
height: 100px;
|
||||
/* Fixed height for expanded state */
|
||||
white-space: normal;
|
||||
/* Allows wrapping */
|
||||
overflow-y: auto;
|
||||
/* Enable vertical scrolling */
|
||||
transition: height 0.3s ease-in;
|
||||
/* Smooth transition for height */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.table-bordered>thead>tr>th,
|
||||
.table-bordered>tbody>tr>th,
|
||||
.table-bordered>tfoot>tr>th,
|
||||
.table-bordered>thead>tr>td,
|
||||
.table-bordered>tbody>tr>td,
|
||||
.table-bordered>tfoot>tr>td {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
width: 1000px ! important;
|
||||
}
|
||||
|
||||
.modal {
|
||||
padding-right: 25% ! important;
|
||||
}
|
||||
|
||||
#Requisition_filter {
|
||||
float: inline-end;
|
||||
}
|
||||
|
||||
#Requisition_wrapper .row .col-sm-4 {
|
||||
flex-basis: 50%;
|
||||
float: inline-end;
|
||||
}
|
||||
|
||||
#Requisition_paginate .pagination {
|
||||
flex-basis: 50%;
|
||||
float: inline-end;
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
#Requisition_wrapper .row:nth-child(3),
|
||||
#Requisition_wrapper .row:nth-child(1) {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
#Requisition_info {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.dataTables_wrapper {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.dataTables_wrapper .top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.Date-filter-form {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -169,23 +104,23 @@ if (empty($Status)) {
|
||||
|
||||
<div class="error" id="error"></div>
|
||||
</form>
|
||||
<div class="card-body">
|
||||
<table id="po_release" class="table dt-responsive wrap w-100">
|
||||
<div class="card-body" style="overflow-x:scroll;">
|
||||
<table id="po_release" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PO Date</th>
|
||||
<th>Created Date</th>
|
||||
<th>PONO</th>
|
||||
<th>PO Type</th>
|
||||
<th>Cost Center</th>
|
||||
<th>Supplier Name</th>
|
||||
<th>Created By</th>
|
||||
<th>Department</th>
|
||||
<!-- <th>Created Date</th> -->
|
||||
|
||||
<th>Total Order Value</th>
|
||||
<th>Approved By</th>
|
||||
<th>Status</th>
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
<th>Action</th>
|
||||
<?php } ?>
|
||||
<th>Remarks</th>
|
||||
|
||||
|
||||
@ -200,27 +135,22 @@ if (empty($Status)) {
|
||||
//echo $index;
|
||||
?>
|
||||
<tr id="<?php echo $index ?>">
|
||||
<td><?php $podt = new DateTime($record->PODate);
|
||||
<td><?php $podt = new DateTime($record->CreatedDate);
|
||||
$PODate = $podt->format('d-m-Y');
|
||||
echo $PODate;
|
||||
?></td>
|
||||
<td><a style="cursor: pointer; color: #039985; text-decoration: none;" target="_blank" href="<?php echo base_url() ?>purchaseorder/CreatePOPrint?PONO=<?php echo $record->PONO ?>&ReqType=<?php echo $record->RType ?>" data-id="<%=index%>" data-userid="<?php echo $record->PONO ?>"><?php echo $record->PONO ?> </td>
|
||||
<td><?php echo $record->RType ?> </td>
|
||||
<td><?php echo $record->CostCenterName ?> </td>
|
||||
<!-- <td><?php // echo $record->CostCenterCode
|
||||
?></td> -->
|
||||
<td class="supplier-name" style="text-wrap: balance;">
|
||||
<div class="supplier-content">
|
||||
|
||||
<td >
|
||||
|
||||
<?php echo $record->SupplierName ?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td><?php echo $record->FirstName ?></td>
|
||||
<td><?php echo $record->DepartmentName ?></td>
|
||||
<!-- <td align="right"><?php // $Cdt = new DateTime($record->CreatedDate);
|
||||
// $CreatedDate = $Cdt->format('d-m-Y');
|
||||
// echo $CreatedDate;
|
||||
?></td> -->
|
||||
|
||||
|
||||
|
||||
<td><?php echo $record->TotalOrderValue ?></td>
|
||||
|
||||
@ -250,20 +180,22 @@ if (empty($Status)) {
|
||||
?>
|
||||
</td>
|
||||
|
||||
<?php if(session()->get('roleText') != 'Auditor'){?>
|
||||
<td>
|
||||
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
|
||||
<?php if ($record->StatusCode == PO_APPROVER_ONHOLD or $record->StatusCode == PO_CREATED or $record->StatusCode == REQITEM_Emergency_PO_CREATED) { ?>
|
||||
|
||||
|
||||
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
|
||||
<option value="-1">Select Action</option>
|
||||
<!-- <option value="1">Release</option> -->
|
||||
<option value="1">Approve And Release</option>
|
||||
<option value="2">OnHold</option>
|
||||
</select>
|
||||
|
||||
<select name="selectId" id="selectId" onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');">
|
||||
<option value="-1">Select Action</option>
|
||||
<!-- <option value="1">Release</option> -->
|
||||
<option value="1">Approve And Release</option>
|
||||
<option value="2">OnHold</option>
|
||||
</select>
|
||||
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
|
||||
<td contenteditable="true" id="remarks<?php echo $index; ?>">
|
||||
<?php
|
||||
@ -525,47 +457,15 @@ if (empty($Status)) {
|
||||
|
||||
});
|
||||
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
// $('#Requisition').DataTable({
|
||||
// columnDefs: [{ width: 200}],
|
||||
// fixedColumns: true,
|
||||
// paging: true,
|
||||
// lengthChange: true,
|
||||
// searching: true,
|
||||
// ordering: true,
|
||||
// aaSorting: [[ 0, "desc" ]],
|
||||
|
||||
// info: true,
|
||||
// autoWidth: true,
|
||||
// pageLength: 10,
|
||||
// lengthMenu: [10, 25, 50, 100]
|
||||
|
||||
|
||||
// });
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.10.11/sorting/date-eu.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.3.4/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/plug-ins/1.13.6/sorting/datetime-moment.js"></script>
|
||||
<script>
|
||||
$.fn.dataTable.ext.type.order['date-eu-pre'] = function(date) {
|
||||
var dateSplit = date.split('/');
|
||||
return (dateSplit[2] + dateSplit[1] + dateSplit[0]) * 1;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.text-truncate', function() {
|
||||
$(this).toggleClass('expanded');
|
||||
});
|
||||
|
||||
|
||||
// Initialize the DataTable
|
||||
var table = $('#po_release').DataTable({
|
||||
@ -578,13 +478,9 @@ if (empty($Status)) {
|
||||
[10, 20, 30, 50, -1],
|
||||
[10, 20, 30, 50, "All"]
|
||||
], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [], // Default ordering (column index 0, descending)
|
||||
columnDefs: [{
|
||||
targets: '_all',
|
||||
className: 'text-truncate'
|
||||
},
|
||||
],
|
||||
responsive: true,
|
||||
order: false,
|
||||
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
@ -601,26 +497,10 @@ if (empty($Status)) {
|
||||
window.location="PORelease"
|
||||
});
|
||||
|
||||
// Automatically focus and open the To Date picker when From Date is selected
|
||||
|
||||
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('.supplier-content').on('click', function() {
|
||||
var $this = $(this);
|
||||
|
||||
if (!$this.hasClass('expand')) {
|
||||
// Expand: Set to fixed height with scroll
|
||||
$this.addClass('expand');
|
||||
} else {
|
||||
// Collapse: Reset to minimized height
|
||||
// $this.css('height', '20px').removeClass('expand');
|
||||
$this.removeClass('expand');
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@ -638,7 +518,7 @@ if (empty($Status)) {
|
||||
$('#toDate').val('');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Today Sales -->
|
||||
<div class="col-xl-4">
|
||||
<div class="col-lg-4 col-xl-4">
|
||||
<div class="card">
|
||||
<div class="card-body" style="height: 150px;">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -41,7 +41,7 @@
|
||||
<div class="text-left">
|
||||
<p class="text-muted mb-0">Sales in Rs.</p>
|
||||
<h4 class="mb-1 mt-0">
|
||||
<span data-plugin="counterup" class="card_font_colorset_green"><?php echo number_format($today_sales->Sales, 2); ?></span>
|
||||
<span class="card_font_colorset_green"><?php echo $today_sales->Sales; ?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
@ -50,7 +50,7 @@
|
||||
</div>
|
||||
|
||||
<!-- This Month Sales -->
|
||||
<div class="col-xl-4">
|
||||
<div class="col-lg-4 col-xl-4">
|
||||
<div class="card">
|
||||
<div class="card-body" style="height: 150px;">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -71,7 +71,7 @@
|
||||
<div class="text-left">
|
||||
<p class="text-muted mb-0">Sales in Rs.</p>
|
||||
<h4 class="mb-1 mt-0">
|
||||
<span data-plugin="counterup" class="card_font_colorset_bule"><?php echo number_format($this_month_sales->Sales, 2); ?></span>
|
||||
<span class="card_font_colorset_bule"><?php echo $this_month_sales->Sales; ?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
|
||||
<!-- This Year Sales -->
|
||||
<div class="col-xl-4">
|
||||
<div class="col-lg-4 col-xl-4">
|
||||
<div class="card">
|
||||
<div class="card-body" style="height: 150px;">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
@ -101,7 +101,7 @@
|
||||
<div class="text-left">
|
||||
<p class="text-muted mb-0">Sales in Rs.</p>
|
||||
<h4 class="mb-1 mt-0">
|
||||
<span data-plugin="counterup" class="card_font_colorset_red"><?php echo number_format($this_year_sales->Sales, 2); ?></span>
|
||||
<span class="card_font_colorset_red"><?php echo $this_year_sales->Sales; ?></span>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
@ -109,6 +109,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-md-12">
|
||||
@ -195,7 +197,7 @@
|
||||
$('#datatable-buttonss').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||
'csv', 'excel', 'pdf'
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [
|
||||
@ -203,9 +205,7 @@
|
||||
[10, 20, 30, 50, "All"]
|
||||
], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [
|
||||
[0, 'desc']
|
||||
], // Default ordering (column index 0, ascending)
|
||||
order:false,
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
@ -244,12 +244,13 @@
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
|
||||
y: {
|
||||
beginAtZero: true, // Ensures the y-axis starts at zero
|
||||
ticks: {
|
||||
stepSize: 10000000, // Sets the interval between ticks
|
||||
callback: function(value) {
|
||||
return value; // Return plain number without formatting
|
||||
return value.toLocaleString('en-IN'); // Return plain number without formatting
|
||||
}
|
||||
},
|
||||
min: 0, // Minimum value for y-axis
|
||||
|
||||
@ -280,7 +280,7 @@
|
||||
var table = $('#datatable-buttosns').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
buttons: [
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||
'csv', 'excel', 'pdf'
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [
|
||||
@ -290,7 +290,7 @@
|
||||
responsive: true, // Responsive table
|
||||
order: [
|
||||
[0, 'desc']
|
||||
], // Default ordering (column index 0, descending)
|
||||
],
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
|
||||
@ -245,10 +245,13 @@
|
||||
<td><?php echo $record->TransporterName ?></td>
|
||||
<td><?php echo $record->IGRStatus == 'ST074' ? 'Draft' : 'Completed'; ?></td>
|
||||
<td>
|
||||
<?php if(!empty($record->IGRNO)){ ?>
|
||||
<a target="_blank" href="<?php echo base_url('download-files/' . $record->IGRNO); ?>">
|
||||
<i class="fa fa-download" style="text-align: center;"></i>
|
||||
</a>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!empty($record->FilePath)) { ?>
|
||||
<!-- <a target="_blank" data-toggle="modal" data-target="#Fileshow" data-id="<%=index%>" title="Files" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>"><i class="fa fa-clone" style="text-align: center;"></i></a> -->
|
||||
<?php } else if (!empty($record->file)) { ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user