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

This commit is contained in:
VE10-Sanjeev 2025-05-17 10:45:15 +00:00
commit 9448b5d26d
11 changed files with 378 additions and 153 deletions

View File

@ -95,7 +95,6 @@ class Sales extends BaseController
// echo "<pre>";
// print_r($data);
// die;

View File

@ -616,7 +616,7 @@ class Ipinvoice_model extends Model
$builder = $this->db->table('t_bagstockdetails tbd')
->select('tbd.balanceStock, tmm.MaterialName ,tmm.MaterialCode')
->select('tbd.balanceStock, tmm.MaterialName ,tmm.MaterialCode ,tmm.UOM')
->join('t_materialmaster tmm', 'tmm.MaterialCode = tbd.materialCode')
->where('tbd.date', $lastDateOfCurrentMonth)
->get()
@ -626,7 +626,9 @@ class Ipinvoice_model extends Model
$materialCode =array_column($builder,'MaterialCode');
$body =array_column($builder,'balanceStock');
$body = array_column($builder,'balanceStock');
$uom = array_column($builder,'UOM');
$result [] = ['header' => $header];
@ -635,6 +637,7 @@ class Ipinvoice_model extends Model
$result [] = ['body' => $body ?? "Not Opened Yet" ] ;
$result [] = ['uom' => $uom ?? "No Units Pecified" ] ;
break;
@ -643,7 +646,7 @@ class Ipinvoice_model extends Model
case "resin":
$builder = $this->db->table('t_resinStockDetails trd')
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode')
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode ,tmm.UOM')
->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
->where('trd.date', $lastDateOfCurrentMonth)
->get()
@ -654,6 +657,8 @@ class Ipinvoice_model extends Model
$materialCode =array_column($builder,'MaterialCode');
$body =array_column($builder,'balanceStock');
$uom =array_column($builder,'UOM');
$result [] = ['header' => $header];
@ -662,6 +667,8 @@ class Ipinvoice_model extends Model
$result [] = ['body' => $body ?? "Not Opened Yet" ] ;
$result [] = ['uom' => $uom ?? "No Units Pecified" ] ;
@ -673,7 +680,7 @@ class Ipinvoice_model extends Model
$builder = $this->db->table('t_resinStockDetails trd')
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode')
->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode , tmm.UOM')
->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
->where('trd.date', $lastDateOfCurrentMonth)
->get()
@ -684,6 +691,8 @@ class Ipinvoice_model extends Model
$materialCode =array_column($builder,'MaterialCode');
$body =array_column($builder,'balanceStock');
$uom =array_column($builder,'UOM');
$result [] = ['header' => $header];
@ -692,6 +701,10 @@ class Ipinvoice_model extends Model
$result [] = ['body' => $body ?? "Not Opened Yet" ] ;
$result [] = ['uom' => $uom ?? "No Units Pecified" ] ;
break;
}
return $result;

View File

@ -194,7 +194,7 @@
<td>
<a data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details" class="auditor-restricted-btn"
<a class="edit-btn" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Edit Purchase Order details" class="auditor-restricted-btn"
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>
&nbsp;&nbsp;&nbsp;
@ -204,7 +204,7 @@
<?php
} else if ($statusCode == PO_AMENDED ) { ?>
<td>
<a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType. '&CapitalRange=' . $record->CapitalRange; ?>">
<a class="edit-btn" data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType. '&CapitalRange=' . $record->CapitalRange; ?>">
<i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Amendment Purchase Order details"></i>
&nbsp;&nbsp;&nbsp;
</a>
@ -214,15 +214,16 @@
<a data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType
. '&CapitalRange=' . $record->CapitalRange; ?>"><i class="fa fa-eye" data-toggle="tooltip"
title="<?php echo $record->PONO; ?> - Click here to view Purchase Order details"></i>
&nbsp;&nbsp;&nbsp;</a> &nbsp;&nbsp;&nbsp;
<a class="edit-btn" data-toggle="tooltip" href="<?php echo base_url() . 'EditPO?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType . '&CapitalRange=' . $record->CapitalRange; ?>">
<i class="fa fa-eye" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to view Purchase Order details"></i>
&nbsp;&nbsp;&nbsp;
</a>
&nbsp;&nbsp;&nbsp;
<a data-toggle="tooltip" href="<?php echo base_url() . 'purchaseorder/CreatePOPrint?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType; ?>"
target="new"><i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?>
- Click here to Print the Purchase Order details"></i>
<a data-toggle="tooltip" href="<?php echo base_url() . 'purchaseorder/CreatePOPrint?PONO=' . $record->PONO . '&ReqType=' . $record->ReqType; ?>" target="new">
<i class="fa fa-print" data-toggle="tooltip" title="<?php echo $record->PONO; ?> - Click here to Print the Purchase Order details"></i>
&nbsp;&nbsp;&nbsp;
</a>
@ -314,3 +315,31 @@
});
</script>
<script>
$(document).ready(function () {
// Ensure DataTable is initialized
let table = $('#po_list').DataTable();
console.log("DataTable initialized:", table ? "Yes" : "No");
// Store page number on edit button click
$('#po_list').on('click', '.edit-btn', function () {
const pageInfo = table.page.info();
console.log("Edit clicked, current page info:", pageInfo);
sessionStorage.setItem("datatablePage", pageInfo.page);
});
// Restore page if saved
let startPage = sessionStorage.getItem("datatablePage");
if (startPage !== null) {
console.log("Restoring to page:", startPage);
table.page(parseInt(startPage)).draw('page');
sessionStorage.removeItem("datatablePage");
} else {
console.log("No page info found in sessionStorage.");
}
});
</script>

View File

@ -142,31 +142,48 @@
<!-- <table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;"> -->
<thead>
<tr>
<th>HSN NO</th>
<th>Quantity</th>
<th>Total Taxable Amount</th>
<th>CGST</th>
<th>SGST</th>
<th>IGST</th>
<th>Net Invoice Amount</th>
<th>Rate Of Tax</th>
<th style="text-align: center;">HSN NO</th>
<th style="text-align: center;">Quantity</th>
<th style="text-align: center;">Total Taxable Amount</th>
<th style="text-align: center;">CGST</th>
<th style="text-align: center;">SGST</th>
<th style="text-align: center;">IGST</th>
<th style="text-align: center;">Net Invoice Amount</th>
<th style="text-align: center;">Rate Of Tax</th>
</tr>
</thead>
<tbody>
<?php if(!empty($hsnCreditNoteRegister)){ ?>
<?php if(!empty($hsnCreditNoteRegister)){
$totalQuantity = 0;
$totalTaxableAmount = 0;
$totalCgst = 0;
$totalSgst = 0;
$totalIgst = 0;
$totalNetInvoiceAmount = 0;
?>
<?php foreach($hsnCreditNoteRegister as $index => $hcn) { ?>
<?php foreach($hsnCreditNoteRegister as $index => $hcn) {
$totalQuantity += $hcn['quantity'];
$totalTaxableAmount += $hcn['totalTaxableAmount'];
$totalCgst += $hcn['cgst'];
$totalSgst += $hcn['sgst'];
$totalIgst += $hcn['igst'];
$totalNetInvoiceAmount += $hcn['netInvoiceAmount'];
?>
<tr>
<td><?php echo $hcn['hsnOrSac']; ?></td>
<td><?php echo $hcn['quantity']; ?></td>
<td><?php echo $hcn['totalTaxableAmount']; ?></td>
<td><?php echo $hcn['cgst']== 0 ? " " : $hcn['cgst']; ?></td>
<td><?php echo $hcn['sgst']== 0 ? " " : $hcn['sgst']; ?></td>
<td><?php echo $hcn['igst']== 0 ? " " : $hcn['igst']; ?></td>
<td><?php echo $hcn['netInvoiceAmount']; ?></td>
<td><?php echo $hcn['rateOfTax']; ?></td>
<td style="text-align: center;"><?php echo $hcn['hsnOrSac']; ?></td>
<td style="text-align: right;"><?php echo $hcn['quantity']; ?></td>
<td style="text-align: right;"><?php echo $hcn['totalTaxableAmount']; ?></td>
<td style="text-align: right;"><?php echo $hcn['cgst']== 0 ? " " : $hcn['cgst']; ?></td>
<td style="text-align: right;"><?php echo $hcn['sgst']== 0 ? " " : $hcn['sgst']; ?></td>
<td style="text-align: right;"><?php echo $hcn['igst']== 0 ? " " : $hcn['igst']; ?></td>
<td style="text-align: right;"><?php echo $hcn['netInvoiceAmount']; ?></td>
<td style="text-align: center;"><?php echo $hcn['rateOfTax']; ?></td>
</tr>
@ -179,6 +196,17 @@
</tbody>
<tfoot width="100%">
<tr>
<th colspan="1" style="text-align: right;">Total:</th>
<th colspan="1" style="text-align: right;"><?php echo $totalQuantity; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalTaxableAmount; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalCgst== 0 ? " " : $totalCgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalSgst== 0 ? " " : $totalSgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalIgst== 0 ? " " : $totalIgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalNetInvoiceAmount; ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div> <!-- end card body-->
@ -201,31 +229,32 @@
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Initialize the DataTable with only pagination enabled
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [
{
extend: 'excel',
text: 'Excel',
}
],
paging: true, // Enable pagination
searching: true, // Disable search
ordering: false, // Disable column sorting
info: false, // Disable table information
lengthChange: false, // Disable page length options
pageLength: 10, // Default rows per page
responsive: true, // Keep responsive design
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
$(document).ready(function () {
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [
{
extend: 'excel',
text: 'Excel',
footer: true // ✅ This includes the footer in the exported Excel file
}
],
paging: true,
searching: true, // You had this as 'true', so I left it unless you meant to disable it
ordering: false,
info: false,
lengthChange: false,
pageLength: 10,
responsive: true,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>',
previous: '<i class="fas fa-angle-left"></i>'
}
}
});
});

View File

@ -139,31 +139,50 @@
<!-- <table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;"> -->
<thead>
<tr>
<th>HSN NO</th>
<th>Quantity</th>
<th>Total Taxable Amount</th>
<th>CGST</th>
<th>SGST</th>
<th>IGST</th>
<th>Net Invoice Amount</th>
<th>Rate Of Tax</th>
<th style="text-align: center;">HSN NO</th>
<th style="text-align: center;">Quantity</th>
<th style="text-align: center;">Total Taxable Amount</th>
<th style="text-align: center;">CGST</th>
<th style="text-align: center;">SGST</th>
<th style="text-align: center;">IGST</th>
<th style="text-align: center;">Net Invoice Amount</th>
<th style="text-align: center;">Rate Of Tax</th>
</tr>
</thead>
<tbody>
<?php if(!empty($hsnSalesRegister)){ ?>
<?php if(!empty($hsnSalesRegister)){
$totalQuantity = 0;
$totalTaxableAmount = 0;
$totalCgst = 0;
$totalSgst = 0;
$totalIgst = 0;
$totalNetInvoiceAmount = 0;
?>
<?php foreach($hsnSalesRegister as $index => $hs) { ?>
<?php foreach($hsnSalesRegister as $index => $hs) {
$totalQuantity += $hs['quantity'];
$totalTaxableAmount += $hs['totalTaxableAmount'];
$totalCgst += $hs['cgst'];
$totalSgst += $hs['sgst'];
$totalIgst += $hs['igst'];
$totalNetInvoiceAmount += $hs['netInvoiceAmount'];
?>
<tr>
<td><?php echo $hs['hsnOrSac']; ?></td>
<td><?php echo $hs['quantity']; ?></td>
<td><?php echo $hs['totalTaxableAmount']; ?></td>
<td><?php echo $hs['cgst']== 0 ? " " : $hs['cgst']; ?></td>
<td><?php echo $hs['sgst']== 0 ? " " : $hs['sgst']; ?></td>
<td><?php echo $hs['igst']== 0 ? " " : $hs['igst']; ?></td>
<td><?php echo $hs['netInvoiceAmount']; ?></td>
<td><?php echo $hs['rateOfTax']; ?></td>
<td style="text-align: center;"><?php echo $hs['hsnOrSac']; ?></td>
<td style="text-align: right;"><?php echo $hs['quantity']; ?></td>
<td style="text-align: right;"><?php echo $hs['totalTaxableAmount']; ?></td>
<td style="text-align: right;"><?php echo $hs['cgst']== 0 ? " " : $hs['cgst']; ?></td>
<td style="text-align: right;"><?php echo $hs['sgst']== 0 ? " " : $hs['sgst']; ?></td>
<td style="text-align: right;"><?php echo $hs['igst']== 0 ? " " : $hs['igst']; ?></td>
<td style="text-align: right;"><?php echo $hs['netInvoiceAmount']; ?></td>
<td style="text-align: center;"><?php echo $hs['rateOfTax']; ?></td>
</tr>
@ -176,6 +195,17 @@
</tbody>
<tfoot width="100%">
<tr>
<th colspan="1" style="text-align: right;">Total:</th>
<th colspan="1" style="text-align: right;"><?php echo $totalQuantity; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalTaxableAmount; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalCgst== 0 ? " " : $totalCgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalSgst== 0 ? " " : $totalSgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalIgst== 0 ? " " : $totalIgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalNetInvoiceAmount; ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div> <!-- end card body-->
@ -198,31 +228,32 @@
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Initialize the DataTable with only pagination enabled
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [
{
extend: 'excel',
text: 'Excel',
}
],
paging: true, // Enable pagination
searching: true, // Disable search
ordering: false, // Disable column sorting
info: false, // Disable table information
lengthChange: false, // Disable page length options
pageLength: 10, // Default rows per page
responsive: true, // Keep responsive design
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
$(document).ready(function () {
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [
{
extend: 'excel',
text: 'Excel',
footer: true // ✅ This includes the footer in the exported Excel file
}
],
paging: true,
searching: true, // You had this as 'true', so I left it unless you meant to disable it
ordering: false,
info: false,
lengthChange: false,
pageLength: 10,
responsive: true,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>',
previous: '<i class="fas fa-angle-left"></i>'
}
}
});
});

View File

@ -142,31 +142,49 @@
<!-- <table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;"> -->
<thead>
<tr>
<th>HSN NO</th>
<th>Quantity</th>
<th>Total Taxable Amount</th>
<th>CGST</th>
<th>SGST</th>
<th>IGST</th>
<th>Net Invoice Amount</th>
<th>Rate Of Tax</th>
<th style="text-align: center;">HSN NO</th>
<th style="text-align: center;">Quantity</th>
<th style="text-align: center;">Total Taxable Amount</th>
<th style="text-align: center;">CGST</th>
<th style="text-align: center;">SGST</th>
<th style="text-align: center;">IGST</th>
<th style="text-align: center;">Net Invoice Amount</th>
<th style="text-align: center;">Rate Of Tax</th>
</tr>
</thead>
<tbody>
<?php if(!empty($hsnSummaryRegister)){ ?>
<?php if(!empty($hsnSummaryRegister)){
$totalQuantity = 0;
$totalTaxableAmount = 0;
$totalCgst = 0;
$totalSgst = 0;
$totalIgst = 0;
$totalNetInvoiceAmount = 0;
?>
<?php foreach($hsnSummaryRegister as $index => $hsm) { ?>
<?php foreach($hsnSummaryRegister as $index => $hsm) {
$totalQuantity += $hsm['quantity'];
$totalTaxableAmount += $hsm['totalTaxableAmount'];
$totalCgst += $hsm['cgst'];
$totalSgst += $hsm['sgst'];
$totalIgst += $hsm['igst'];
$totalNetInvoiceAmount += $hsm['netInvoiceAmount'];
?>
<tr>
<td><?php echo $hsm['hsnOrSac']; ?></td>
<td><?php echo $hsm['quantity']; ?></td>
<td><?php echo $hsm['totalTaxableAmount']; ?></td>
<td><?php echo $hsm['cgst']== 0 ? " " : $hsm['cgst']; ?></td>
<td><?php echo $hsm['sgst']== 0 ? " " : $hsm['sgst']; ?></td>
<td><?php echo $hsm['igst']== 0 ? " " : $hsm['igst']; ?></td>
<td><?php echo $hsm['netInvoiceAmount']; ?></td>
<td><?php echo $hsm['rateOfTax']; ?></td>
<td style="text-align: center;"><?php echo $hsm['hsnOrSac']; ?></td>
<td style="text-align: right;"><?php echo $hsm['quantity']; ?></td>
<td style="text-align: right;"><?php echo $hsm['totalTaxableAmount']; ?></td>
<td style="text-align: right;"><?php echo $hsm['cgst']== 0 ? " " : round($hsm['cgst'],2); ?></td>
<td style="text-align: right;"><?php echo $hsm['sgst']== 0 ? " " : round($hsm['sgst'],2); ?></td>
<td style="text-align: right;"><?php echo $hsm['igst']== 0 ? " " : round($hsm['igst'],2); ?></td>
<td style="text-align: right;"><?php echo $hsm['netInvoiceAmount']; ?></td>
<td style="text-align: center;"><?php echo $hsm['rateOfTax']; ?></td>
</tr>
@ -178,7 +196,16 @@
</tbody>
<tfoot width="100%">
<tr>
<th colspan="1" style="text-align: right;">Total:</th>
<th colspan="1" style="text-align: right;"><?php echo $totalQuantity; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalTaxableAmount; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalCgst== 0 ? " " : $totalCgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalSgst== 0 ? " " : $totalSgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalIgst== 0 ? " " : $totalIgst; ?></th>
<th colspan="1" style="text-align: right;"><?php echo $totalNetInvoiceAmount; ?></th>
<th></th>
</tr>
</tfoot>
</table>
</div> <!-- end card body-->
@ -201,31 +228,32 @@
<script>
// Bootstrap datepicker
// Set up your table
$(document).ready(function() {
// Initialize the DataTable with only pagination enabled
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [
{
extend: 'excel',
text: 'Excel',
}
],
paging: true, // Enable pagination
searching: true, // Disable search
ordering: false, // Disable column sorting
info: false, // Disable table information
lengthChange: false, // Disable page length options
pageLength: 10, // Default rows per page
responsive: true, // Keep responsive design
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon
}
}
});
});
$(document).ready(function () {
var table = $('#cc').DataTable({
dom: 'Blfrtip',
buttons: [
{
extend: 'excel',
text: 'Excel',
footer: true // ✅ This includes the footer in the exported Excel file
}
],
paging: true,
searching: true, // You had this as 'true', so I left it unless you meant to disable it
ordering: false,
info: false,
lengthChange: false,
pageLength: 10,
responsive: true,
language: {
paginate: {
next: '<i class="fas fa-angle-right"></i>',
previous: '<i class="fas fa-angle-left"></i>'
}
}
});
});

View File

@ -58,7 +58,7 @@
<td>
<a href="<?php echo base_url() . 'emppaydate/downloadEmpLoanData/' . $record->Pay_Data_ID; ?>"><i class="fas fa-download"></i></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="<?php echo base_url() . 'emppaydate/editOldemppay/' . $record->Pay_Data_ID; ?>"><i class="fas fa-pencil-alt"></i></a>
<a class="edit-btn" href="<?php echo base_url() . 'emppaydate/editOldemppay/' . $record->Pay_Data_ID; ?>"><i class="fas fa-pencil-alt"></i></a>
</td>
</tr>
<?php }
@ -84,4 +84,32 @@
]
});
});
</script>
</script>
<script>
$(document).ready(function () {
// Ensure DataTable is initialized
let table = $('#datatable').DataTable();
console.log("DataTable initialized:", table ? "Yes" : "No");
// Store page number on edit button click
$('#datatable').on('click', '.edit-btn', function () {
const pageInfo = table.page.info();
console.log("Edit clicked, current page info:", pageInfo);
sessionStorage.setItem("datatablePage", pageInfo.page);
});
// Restore page if saved
let startPage = sessionStorage.getItem("datatablePage");
if (startPage !== null) {
console.log("Restoring to page:", startPage);
table.page(parseInt(startPage)).draw('page');
sessionStorage.removeItem("datatablePage");
} else {
console.log("No page info found in sessionStorage.");
}
});
</script>

View File

@ -140,7 +140,15 @@ if (empty($Status)) {
$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> <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-userid="<?php echo $record->PONO ?>"
>
<?php echo $record->PONO ?>
</a>
</td>
<td><?php echo $record->RType ?> </td>
<td><?php echo $record->CostCenterName ?> </td>
@ -186,7 +194,7 @@ if (empty($Status)) {
<select
class="form-control"
class="form-control edit-btn"
name="selectId" id="selectId"
onchange="showvalue('<?php echo $record->PONO ?>','<?php echo $index; ?>',this.options[this.selectedIndex].value,'<?php echo $record->Remarks ?>');"
style="width: 193px;">
@ -525,4 +533,32 @@ if (empty($Status)) {
});
});
</script>
<script>
$(document).ready(function () {
// Ensure DataTable is initialized
let table = $('#po_release').DataTable();
console.log("DataTable initialized:", table ? "Yes" : "No");
// Store page number on edit button click
$('#po_release').on('change', '.edit-btn', function () {
const pageInfo = table.page.info();
console.log("Edit clicked, current page info:", pageInfo);
sessionStorage.setItem("datatablePage", pageInfo.page);
});
// Restore page if saved
let startPage = sessionStorage.getItem("datatablePage");
if (startPage !== null) {
console.log("Restoring to page:", startPage);
table.page(parseInt(startPage)).draw('page');
sessionStorage.removeItem("datatablePage");
} else {
console.log("No page info found in sessionStorage.");
}
});
</script>

View File

@ -264,7 +264,7 @@
var table = $('#cc').DataTable({
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
buttons: [
'copy', 'csv' // Export buttons
'excel' // Export buttons
],
pageLength: 10, // Default rows per page
lengthMenu: [

View File

@ -173,7 +173,7 @@ if (!empty($Status)) {
<td align="left" style="padding-left: 3%;"><?php echo strtoupper($record->StatusName); ?></td>
<td> <a data-toggle="tooltip"
<td> <a class="edit-btn" data-toggle="tooltip"
href="<?php echo base_url() . 'EditRequisitionForm?ReqNo=' . $record->ReqNo . '&ReqType=' . $record->ReqType; ?>"><i
class="fas fa-pencil-alt" data-toggle="tooltip"
title="<?php echo $record->ReqNo; ?> - Click here to view Requisition details"></i>&nbsp;&nbsp;&nbsp;</a>
@ -314,4 +314,33 @@ if (!empty($Status)) {
}
});
});
</script>
</script>
<script>
$(document).ready(function () {
// Ensure DataTable is initialized
let table = $('#requisition_listing').DataTable();
console.log("DataTable initialized:", table ? "Yes" : "No");
// Store page number on edit button click
$('#requisition_listing').on('click', '.edit-btn', function () {
const pageInfo = table.page.info();
console.log("Edit clicked, current page info:", pageInfo);
sessionStorage.setItem("datatablePage", pageInfo.page);
});
// Restore page if saved
let startPage = sessionStorage.getItem("datatablePage");
if (startPage !== null) {
console.log("Restoring to page:", startPage);
table.page(parseInt(startPage)).draw('page');
sessionStorage.removeItem("datatablePage");
} else {
console.log("No page info found in sessionStorage.");
}
});
</script>

View File

@ -121,8 +121,9 @@
<div>
<a class="btn btn-primary btn-sm px-2" href="<?php echo base_url(); ?>sales_dashboard?stock=resin">Resin</a>
<a class="btn btn-secondary btn-sm px-2" href="<?php echo base_url(); ?>sales_dashboard?stock=bag">Bag</a>
<a class="btn btn-danger btn-sm px-2" href="<?php echo base_url(); ?>sales_dashboard?stock=diesel">Diesel</a>
<a class="btn btn-success btn-sm px-2" href="<?php echo base_url(); ?>sales_dashboard?stock=gas">Gas</a>
<a class="btn btn-danger btn-sm px-2" href="<?php echo base_url(); ?>sales_dashboard?stock=diesel">Diesel</a>
</div>
<div>
@ -154,12 +155,13 @@
<table id="stockClosing" class="table dt-responsive nowrap w-100">
<thead>
<?php if (is_array($stock[0]['header'])) { ?>
<?php if (is_array($stock[0]['header'])) { ?>
<tr>
<th>S.NO</th>
<th>Material Code</th>
<th>Material Description</th>
<th>Unit Of Measurement</th>
<th>Closing Stock</th>
</tr>
@ -189,6 +191,7 @@
<?php echo $stock[0]['header'][$index] ?>
</a>
</td>
<td><?php echo $stock[3]['uom'][$index] ?> </td>
<td> <?php echo $body ?></td>
</tr>