latest commit 17-05-2025

This commit is contained in:
vadivelJ96 2025-05-17 15:18:50 +05:30
parent 60a02138ae
commit 52d96bf4a9
6 changed files with 238 additions and 136 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

@ -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

@ -155,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>
@ -190,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>