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

This commit is contained in:
vadivel J 2024-10-29 17:23:23 +05:30
commit ba3c123f61
22 changed files with 140 additions and 169 deletions

View File

@ -225,8 +225,7 @@ class Assetdetails extends BaseController
if (false) { if (false) {
// $this->addasset(); // $this->addasset();
} else { } else {
$assetName = $this->request->getPost('AssetName'); $AssetName = $this->request->getPost('AssetName');
$AssetName = (!empty($assetName)) ? strtoupper((string)$assetName) : "";
$Description = $this->request->getPost('Description'); $Description = $this->request->getPost('Description');
$Department = $this->request->getPost('AssetDept'); $Department = $this->request->getPost('AssetDept');
$Location = $this->request->getPost('Location'); $Location = $this->request->getPost('Location');
@ -375,8 +374,7 @@ class Assetdetails extends BaseController
$this->editOldasset($Asset_Code); $this->editOldasset($Asset_Code);
} else { } else {
$Asset_Code = $this->request->getPost('AssetCode'); $Asset_Code = $this->request->getPost('AssetCode');
$assetName = $this->request->getPost('AssetName'); $AssetName = $this->request->getPost('AssetName');
$AssetName = (!empty($assetName)) ? strtoupper((string)$assetName) : '';
$Description = $this->request->getPost('PODescription'); $Description = $this->request->getPost('PODescription');
$Department = $this->request->getPost('AssetDept'); $Department = $this->request->getPost('AssetDept');
$Location = $this->request->getPost('Location'); $Location = $this->request->getPost('Location');

View File

@ -58,7 +58,6 @@ class CostCenter extends BaseController
$id = $this->request->getPost('id'); $id = $this->request->getPost('id');
log_message('error', 'id: ' . $id); log_message('error', 'id: ' . $id);
$CostCenterName = $this->request->getPost('CostCenterName'); $CostCenterName = $this->request->getPost('CostCenterName');
$CostCenterName = ($CostCenterName !== null && is_string($CostCenterName)) ? strtoupper(trim($CostCenterName)) : null;
$userId = $this->session->get('userId'); $userId = $this->session->get('userId');
$approverId = $this->session->get('EmpID'); $approverId = $this->session->get('EmpID');
$currentdt = get_current_date_time(); $currentdt = get_current_date_time();

View File

@ -24,43 +24,42 @@ class Sales extends BaseController
$this->isLoggedIn(); $this->isLoggedIn();
} }
function formatIndianCurrency($amount) { function formatIndianCurrency($num,$type) {
// Convert the amount to a string with 2 decimal places $num = explode('.', $num); // Split the number into integer and decimal parts
$formattedAmount = number_format((float)$amount, 2, '.', ''); $integerPart = $num[0]; // Get the integer part
if($type == 'qty'){ return $integerPart; }
// Split the integer and decimal parts // Apply the Indian number format to the integer part
$parts = explode('.', $formattedAmount); $lastThreeDigits = substr($integerPart, -3);
$integerPart = $parts[0]; $remainingDigits = substr($integerPart, 0, -3);
$decimalPart = isset($parts[1]) ? $parts[1] : '00';
if ($remainingDigits != '') {
// Format the integer part for Indian numbering system $formattedNumber = preg_replace('/\B(?=(\d{2})+(?!\d))/', ',', $remainingDigits) . ',' . $lastThreeDigits;
if (strlen($integerPart) > 3) { } else {
$lastThreeDigits = substr($integerPart, -3); // Get the last 3 digits (thousands) $formattedNumber = $lastThreeDigits;
$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 $formattedNumber;
return $integerPart . '.' . $decimalPart;
} }
public function sales_dashboard() public function sales_dashboard()
{ {
$this->global['pageTitle'] = 'Sales Dashboard'; $this->global['pageTitle'] = 'Sales Dashboard';
$data = []; $data = [];
$data['today_sales'] = $this->ipinvoice_model->todaySales(); $data['today_sales'] = $this->ipinvoice_model->todaySales();
$data['today_sales']->Sales = $this->formatIndianCurrency($data['today_sales']->Sales, 2, '.', ','); $data['today_sales']->Sales = $this->formatIndianCurrency($data['today_sales']->Sales,'money');
$data['today_sales']->Qty = $this->formatIndianCurrency($data['today_sales']->Qty,'qty');
$data['this_month_sales'] = $this->ipinvoice_model->thisMonthSales(); $data['this_month_sales'] = $this->ipinvoice_model->thisMonthSales();
$data['this_month_sales']->Sales = $this->formatIndianCurrency($data['this_month_sales']->Sales); $data['this_month_sales']->Sales = $this->formatIndianCurrency($data['this_month_sales']->Sales,'money');
$data['this_month_sales']->Qty = $this->formatIndianCurrency($data['this_month_sales']->Qty,'qty');
$data['this_year_sales'] = $this->ipinvoice_model->thisYearSales(); $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']->Sales = $this->formatIndianCurrency($data['this_year_sales']->Sales,'money');
$data['this_year_sales']->Qty = $this->formatIndianCurrency($data['this_year_sales']->Qty,'qty');
$data['this_year_sales_trend'] = $this->ipinvoice_model->thisYearSalesTrend(); $data['this_year_sales_trend'] = $this->ipinvoice_model->thisYearSalesTrend();
$data['get_today_invoices'] = $this->ipinvoice_model->getTodayInvoices(); $data['get_today_invoices'] = $this->ipinvoice_model->getTodayInvoices();
// Define months from April to March // Define months from April to March
$months = ['Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar']; $months = ['Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb', 'Mar'];

View File

@ -423,14 +423,14 @@ class Supplier extends BaseController
$id = $this->request->getPost('transporterid'); $id = $this->request->getPost('transporterid');
$name = $this->request->getPost('transportername'); $name = $this->request->getPost('transportername');
$name = ($name !== null && is_string($name)) ? strtoupper(trim($name)) : null;
$userId = $this->session->get('userId'); $userId = $this->session->get('userId');
$data = ['status' => false, 'message' => 'An error occurred while creating transporter details'.gettype($id)]; $data = ['status' => false, 'message' => 'An error occurred while creating transporter details'.gettype($id)];
$id = trim($id); $id = trim($id);
if ((int)$id === 0) { if ((int)$id === 0) {
$addarr = ['name' => $name, $addarr = [
'name' => $name,
'created_by' => $userId, 'created_by' => $userId,
]; ];
if ($this->supplier_model->saveTransporter($addarr) > 0) { if ($this->supplier_model->saveTransporter($addarr) > 0) {

View File

@ -213,16 +213,16 @@
}); });
// Initialize the DataTable // Initialize the DataTable
var table = $('#amend_po_list').DataTable({ var table = $('#amend_po_list').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' // Export buttons 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order:false, order:false,
language: { language: {

View File

@ -265,16 +265,16 @@
// Initialize the DataTable // Initialize the DataTable
var table = $('#po_list').DataTable({ var table = $('#po_list').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf', // Export buttons 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
ordering: false, ordering: false,
language: { language: {
paginate: { paginate: {

View File

@ -73,7 +73,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table class="table dt-responsive nowrap w-100" id="asset_list_table" > <table class="table dt-responsive nowrap w-100" id="asset_list_table" >
<thead> <thead>
@ -105,7 +105,7 @@
$cdate = date('d-m-Y', strtotime($record->CreatedDt)); $cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?> } ?>
<td><?php echo $cdate; ?></td> <td><?php echo $cdate; ?></td>
<td><u><a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?> <td><a href="<?php echo base_url() . 'assetdetails/editOldasset/?AssetID=' . $record->AssetCode ?>" data-toggle="tooltip" title="<?php echo $record->AssetCode; ?> - Click here to view Asset details"><?php echo substr($record->AssetCode, 5) ?>
<td><?php echo $record->AssetName ?></td> <td><?php echo $record->AssetName ?></td>
<td><?php echo $record->Description ?></td> <td><?php echo $record->Description ?></td>
<td><?php echo $record->DepartmentName ?></td> <td><?php echo $record->DepartmentName ?></td>
@ -144,17 +144,17 @@
$(document).ready(function() { $(document).ready(function() {
// Initialize the DataTable // Initialize the DataTable
var table = $('#asset_list_table').DataTable({ var table = $('#asset_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon
@ -168,8 +168,6 @@
function(settings, data, dataIndex) { function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val(); var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val(); var toDate = $('#toDate').val();
console.log(fromDate); // e.g., 01-09-2024
console.log(toDate); // e.g., 08-09-2024
if (!fromDate || !toDate) { if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter return true; // If no dates selected, don't filter

View File

@ -116,7 +116,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="config_list_table" class="table dt-responsive nowrap w-100"> <table id="config_list_table" class="table dt-responsive nowrap w-100">
<thead> <thead>
<tr> <tr>
@ -186,17 +186,17 @@
// Initialize the DataTable // Initialize the DataTable
var table = $('#config_list_table').DataTable({ var table = $('#config_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -73,7 +73,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="cost_listing" class="table dt-responsive nowrap w-100"> <table id="cost_listing" class="table dt-responsive nowrap w-100">
<thead> <thead>
@ -221,17 +221,17 @@
// Initialize the DataTable // Initialize the DataTable
var table = $('#cost_listing').DataTable({ var table = $('#cost_listing').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -303,7 +303,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</span> </span>
<div class="card-body"> <div class="card-body" >
<table id="create_po_from_requistion" class="table dt-responsive nowrap w-100"> <table id="create_po_from_requistion" class="table dt-responsive nowrap w-100">
<thead> <thead>
@ -401,19 +401,17 @@
}); });
var table = $('#create_po_from_requistion').DataTable({ var table = $('#create_po_from_requistion').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: false, // Responsive table responsive: false,
order: [ order: false,
// [0, 'desc']
], // Default ordering (column index 0, descending)
scrollX: true, scrollX: true,
language: { language: {
paginate: { paginate: {

View File

@ -102,7 +102,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="department_list_table" class="table dt-responsive nowrap w-100"> <table id="department_list_table" class="table dt-responsive nowrap w-100">
<thead> <thead>
<tr> <tr>
@ -127,7 +127,7 @@
$cdate = date('d-m-Y', strtotime($record->CreatedDt)); $cdate = date('d-m-Y', strtotime($record->CreatedDt));
} ?> } ?>
<td><?php echo $cdate; ?> </td> <td><?php echo $cdate; ?> </td>
<td><u><a href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td> <td><a href="<?php echo base_url() . 'editOlddepartment/?SID=' . $record->DEPCode ?>" data-toggle="tooltip" title="<?php echo $record->DEPCode ?> - Click here to view Department details"><?php echo $record->DEPCode; ?></a></u></td>
<td><?php echo $record->DepartmentName ?></td> <td><?php echo $record->DepartmentName ?></td>
<td><?php echo $record->HeadDept ?></td> <td><?php echo $record->HeadDept ?></td>
<td><?php if ($record->IsActive == 1) { <td><?php if ($record->IsActive == 1) {
@ -164,17 +164,17 @@
// Initialize the DataTable // Initialize the DataTable
var table = $('#department_list_table').DataTable({ var table = $('#department_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -107,7 +107,7 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;"> <table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;">
<thead> <thead>
@ -131,7 +131,7 @@
} else { } else {
$cdate = date('d-m-Y', strtotime($record->Created_date)); $cdate = date('d-m-Y', strtotime($record->Created_date));
} ?> } ?>
<td><u><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td> <td><a class="a_tag_link" href="<?php echo base_url() . 'employeedetails/ViewEmployee/?EmpID=' . $record->EmpID; ?>" data-toggle="tooltip" title="<?php echo $record->EmpID; ?> - Click here to view Employee details"><?php echo $record->EmpID ?> </a></u></td>
<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>
@ -165,13 +165,13 @@
// Initialize the DataTable // Initialize the DataTable
var table = $('#datatable').DataTable({ var table = $('#datatable').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
// responsive: true, // Responsive table responsive: false,
order: false, order: false,
language: { language: {
paginate: { paginate: {

View File

@ -103,12 +103,11 @@
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table class="table table-bordered table-hover" id="expense_list_table" style="background-color:#fff;"> <table class="table table-bordered table-hover" id="expense_list_table" style="background-color:#fff;">
<thead> <thead>
<tr> <tr>
<th align="left" style="width: 10%;">Created Date</th> <th align="left" style="width: 10%;">Created Date</th>
<!-- <th align="right">Expense Id</th> -->
<th align="left" style="width: 20%;">Supplier Name</th> <th align="left" style="width: 20%;">Supplier Name</th>
<th align="left" style="width: 25%;">Item Description</th> <th align="left" style="width: 25%;">Item Description</th>
<th align="left" style="width: 7%;">Cost</th> <th align="left" style="width: 7%;">Cost</th>
@ -471,15 +470,15 @@
var table = $('#expense_list_table').DataTable({ var table = $('#expense_list_table').DataTable({
dom: 'Blfrtip', dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], ],
// responsive: true, responsive: false,
order: [], order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', next: '<i class="fas fa-angle-right"></i>',

View File

@ -108,7 +108,7 @@
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;"> <table id="datatable" class="table table-hover table-bordered" style="background-color:#fff;">
@ -182,14 +182,14 @@
// Initialize the DataTable // Initialize the DataTable
var table = $('#datatable').DataTable({ var table = $('#datatable').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ],
// responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -397,6 +397,7 @@
} }
function validate() { function validate() {
var rowcount = $("#txtRowCount").val(); var rowcount = $("#txtRowCount").val();
var isOpenOrder = parseInt($("#hiddenIsOpenOrder").val(), 2); var isOpenOrder = parseInt($("#hiddenIsOpenOrder").val(), 2);
var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? 0 : 1; var formatted_IsOpenOrder = (isOpenOrder === 0 || isNaN(isOpenOrder)) ? 0 : 1;
@ -406,11 +407,12 @@
var InvoiceQty = parseFloat($('#QuantityAsPerInvoice' + k).val() == '' ? '0.00' : $('#QuantityAsPerInvoice' + k).val()); var InvoiceQty = parseFloat($('#QuantityAsPerInvoice' + k).val() == '' ? '0.00' : $('#QuantityAsPerInvoice' + k).val());
var RecQty = parseFloat($('#txtReceivedQuantity' + k).val() == '' ? '0.00' : $('#txtReceivedQuantity' + k).val()); var RecQty = parseFloat($('#txtReceivedQuantity' + k).val() == '' ? '0.00' : $('#txtReceivedQuantity' + k).val());
var OrderedQty = parseFloat($('#Quantity_1' + k).text()); var OrderedQty = parseFloat($('#Quantity_1' + k).text());
if (InvoiceQty != '0.00') { if (InvoiceQty != '0.00') {
if (OrderedQty < (InvoiceQty + RecQty)) { if (OrderedQty < (InvoiceQty + RecQty)) {
isExceed = 1; isExceed = 1;
return false; // return false;
} }
Noval = 1; Noval = 1;
} }

View File

@ -66,7 +66,7 @@
?> ?>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card" >
<form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;"> <form class="Date-filter-form" id="DateRangeFilter" style="margin-top: 14px;margin-bottom: -11px;margin-left: 33px;">
<input type="hidden" name="table" value="requisition"> <input type="hidden" name="table" value="requisition">
<label for="fromDate">From:</label> <label for="fromDate">From:</label>
@ -79,7 +79,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="raw_material_list_table" class="table dt-responsive"> <table id="raw_material_list_table" class="table dt-responsive">
<thead> <thead>
@ -112,9 +112,9 @@
<td style="width:10%;"><?php echo $record->MaterialType ?></td> <td style="width:10%;"><?php echo $record->MaterialType ?></td>
<td style="width:7%;"><?php echo $record->UOM ?></td> <td style="width:7%;"><?php echo $record->UOM ?></td>
<?php if ($record->stock != null || '') { ?> <?php if ($record->stock != null || '') { ?>
<td style="width:7%;"><?php echo $record->stock ?></td> <td style="width:10%;"><?php echo $record->stock ?></td>
<?php } else { ?> <?php } else { ?>
<td style="width:7%;">0</td> <td style="width:10%;">0</td>
<?php } ?> <?php } ?>
<td style="width:11%;"><?php echo $record->Category ?></td> <td style="width:11%;"><?php echo $record->Category ?></td>
<td style="width:8%;"><?php echo $record->HSNCODE ?></td> <td style="width:8%;"><?php echo $record->HSNCODE ?></td>
@ -144,17 +144,17 @@
$(document).ready(function() { $(document).ready(function() {
// Initialize the DataTable // Initialize the DataTable
var table = $('#raw_material_list_table').DataTable({ var table = $('#raw_material_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ], // Rows per page options
responsive: true, // Responsive table responsive: false, // Responsive table
order: [], // Default ordering (column index 0, descending) order: false, // Default ordering (column index 0, descending)
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon
@ -168,8 +168,6 @@
function(settings, data, dataIndex) { function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val(); var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val(); var toDate = $('#toDate').val();
console.log(fromDate); // e.g., 01-09-2024
console.log(toDate); // e.g., 08-09-2024
if (!fromDate || !toDate) { if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter return true; // If no dates selected, don't filter

View File

@ -133,7 +133,7 @@
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<!-- <div class="row"> <!-- <div class="row">
<div class="col-12"> <div class="col-12">
<div class="page-title-box page-title-box-alt"> <div class="page-title-box page-title-box-alt">
@ -195,16 +195,13 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('#datatable-buttonss').DataTable({ $('#datatable-buttonss').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [[10, 20, 30, 50, -1],[10, 20, 30, 50, "All"] ],
[10, 20, 30, 50, -1], responsive: false,
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order:false, order:false,
language: { language: {
paginate: { paginate: {

View File

@ -163,7 +163,7 @@
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="datatable-buttosns" class="table dt-responsive nowrap w-100"> <table id="datatable-buttosns" class="table dt-responsive nowrap w-100">
<thead> <thead>
<tr> <tr>
@ -296,16 +296,13 @@
$(document).ready(function() { $(document).ready(function() {
// Initialize the DataTable // Initialize the DataTable
var table = $('#datatable-buttosns').DataTable({ var table = $('#datatable-buttosns').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [[10, 20, 30, 50, -1],[10, 20, 30, 50, "All"]],
[10, 20, 30, 50, -1], responsive: false,
[10, 20, 30, 50, "All"]
], // Rows per page options
responsive: true, // Responsive table
order: false, order: false,
language: { language: {
paginate: { paginate: {
@ -314,6 +311,7 @@
} }
} }
}); });
// Reset button functionality // Reset button functionality

View File

@ -80,7 +80,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table class="table dt-responsive nowrap w-100" id="datatable"> <table class="table dt-responsive nowrap w-100" id="datatable">
<thead> <thead>
<tr> <tr>
@ -110,13 +110,13 @@
<td style="width:75px" align="right"><?php echo $cdate; ?></td> <td style="width:75px" align="right"><?php echo $cdate; ?></td>
<td> <td>
<u>
<a class="a-tag-link" <a class="a-tag-link"
href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>" href="<?= base_url() ?>viewsupplier?SID=<?= $record->SupplierID ?>&Payment=<?= $record->PaymentTerms ?>"
data-toggle="tooltip" data-toggle="tooltip"
title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?> title="<?= $record->SupplierID ?> - Click here to view Supplier details"><?= $record->SupplierID ?>
</a> </a>
</u>
</td> </td>
<td><?php echo $record->SupplierName ?></td> <td><?php echo $record->SupplierName ?></td>
<td><?php echo $record->Address ?></td> <td><?php echo $record->Address ?></td>
@ -182,15 +182,15 @@
var table = $('#datatable').DataTable({ var table = $('#datatable').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10, // Default rows per page
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ], // Rows per page options
responsive: true, // Responsive table responsive: false, // Responsive table
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon

View File

@ -111,7 +111,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="transporter_list" class="table dt-responsive nowrap w-100"> <table id="transporter_list" class="table dt-responsive nowrap w-100">
<thead> <thead>
@ -250,17 +250,17 @@
$(document).ready(function() { $(document).ready(function() {
// Initialize the DataTable // Initialize the DataTable
var table = $('#transporter_list').DataTable({ var table = $('#transporter_list').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon
@ -274,8 +274,6 @@
function(settings, data, dataIndex) { function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val(); var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val(); var toDate = $('#toDate').val();
console.log(fromDate); // e.g., 01-09-2024
console.log(toDate); // e.g., 08-09-2024
if (!fromDate || !toDate) { if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter return true; // If no dates selected, don't filter

View File

@ -89,7 +89,7 @@
<i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i> <i class="fe-rotate-cw range_reset_button" aria-hidden="true" class="icon-button" id="resetButton" title="Reset"></i>
<div class="error" id="error"></div> <div class="error" id="error"></div>
</form> </form>
<div class="card-body"> <div class="card-body" style="overflow-x:scroll;">
<table id="user_list_table" class="table dt-responsive nowrap w-100"> <table id="user_list_table" class="table dt-responsive nowrap w-100">
<thead> <thead>
@ -148,18 +148,7 @@
<script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script> <script type="text/javascript" src="<?php echo base_url(); ?>public/assets/js/common.js" charset="utf-8"></script>
<script type="text/javascript"> <script type="text/javascript">
// $(function () {
// $('#datatable').DataTable({
// "paging": true,
// "lengthChange": true,
// "searching": true,
// "ordering": true,
// "info": true,
// "autoWidth": true
// });
// });
@ -197,17 +186,17 @@
$(document).ready(function() { $(document).ready(function() {
// Initialize the DataTable // Initialize the DataTable
var table = $('#user_list_table').DataTable({ var table = $('#user_list_table').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, // Default rows per page pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], // Rows per page options ],
responsive: true, // Responsive table responsive: false,
order: [], // Default ordering (column index 0, descending) order: false,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>', // Next button icon
@ -221,8 +210,6 @@
function(settings, data, dataIndex) { function(settings, data, dataIndex) {
var fromDate = $('#fromDate').val(); var fromDate = $('#fromDate').val();
var toDate = $('#toDate').val(); var toDate = $('#toDate').val();
console.log(fromDate); // e.g., 01-09-2024
console.log(toDate); // e.g., 08-09-2024
if (!fromDate || !toDate) { if (!fromDate || !toDate) {
return true; // If no dates selected, don't filter return true; // If no dates selected, don't filter

View File

@ -1713,14 +1713,14 @@
table = $('#view_inward_gate_register').DataTable({ table = $('#view_inward_gate_register').DataTable({
dom: 'Blfrtip', dom: 'Blfrtip',
buttons: [ buttons: [
'csv', 'excel', 'pdf' 'excel', 'pdf'
], ],
pageLength: 10, pageLength: 10,
lengthMenu: [ lengthMenu: [
[10, 20, 30, 50, -1], [10, 20, 30, 50, -1],
[10, 20, 30, 50, "All"] [10, 20, 30, 50, "All"]
], ],
// responsive: true, responsive: false,
ordering:false, ordering:false,
language: { language: {
paginate: { paginate: {