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>"; // echo "<pre>";
// print_r($data); // print_r($data);
// die; // die;

View File

@ -616,7 +616,7 @@ class Ipinvoice_model extends Model
$builder = $this->db->table('t_bagstockdetails tbd') $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') ->join('t_materialmaster tmm', 'tmm.MaterialCode = tbd.materialCode')
->where('tbd.date', $lastDateOfCurrentMonth) ->where('tbd.date', $lastDateOfCurrentMonth)
->get() ->get()
@ -628,6 +628,8 @@ class Ipinvoice_model extends Model
$body = array_column($builder,'balanceStock'); $body = array_column($builder,'balanceStock');
$uom = array_column($builder,'UOM');
$result [] = ['header' => $header]; $result [] = ['header' => $header];
@ -635,6 +637,7 @@ class Ipinvoice_model extends Model
$result [] = ['body' => $body ?? "Not Opened Yet" ] ; $result [] = ['body' => $body ?? "Not Opened Yet" ] ;
$result [] = ['uom' => $uom ?? "No Units Pecified" ] ;
break; break;
@ -643,7 +646,7 @@ class Ipinvoice_model extends Model
case "resin": case "resin":
$builder = $this->db->table('t_resinStockDetails trd') $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') ->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
->where('trd.date', $lastDateOfCurrentMonth) ->where('trd.date', $lastDateOfCurrentMonth)
->get() ->get()
@ -655,6 +658,8 @@ class Ipinvoice_model extends Model
$body =array_column($builder,'balanceStock'); $body =array_column($builder,'balanceStock');
$uom =array_column($builder,'UOM');
$result [] = ['header' => $header]; $result [] = ['header' => $header];
@ -662,6 +667,8 @@ class Ipinvoice_model extends Model
$result [] = ['body' => $body ?? "Not Opened Yet" ] ; $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') $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') ->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode')
->where('trd.date', $lastDateOfCurrentMonth) ->where('trd.date', $lastDateOfCurrentMonth)
->get() ->get()
@ -685,6 +692,8 @@ class Ipinvoice_model extends Model
$body =array_column($builder,'balanceStock'); $body =array_column($builder,'balanceStock');
$uom =array_column($builder,'UOM');
$result [] = ['header' => $header]; $result [] = ['header' => $header];
@ -692,6 +701,10 @@ class Ipinvoice_model extends Model
$result [] = ['body' => $body ?? "Not Opened Yet" ] ; $result [] = ['body' => $body ?? "Not Opened Yet" ] ;
$result [] = ['uom' => $uom ?? "No Units Pecified" ] ;
break;
} }
return $result; 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;"> --> <!-- <table class="table table-bordered table-hover" id="asset_list_table" style="background-color:#fff;font-size:12px;"> -->
<thead> <thead>
<tr> <tr>
<th>HSN NO</th> <th style="text-align: center;">HSN NO</th>
<th>Quantity</th> <th style="text-align: center;">Quantity</th>
<th>Total Taxable Amount</th> <th style="text-align: center;">Total Taxable Amount</th>
<th>CGST</th> <th style="text-align: center;">CGST</th>
<th>SGST</th> <th style="text-align: center;">SGST</th>
<th>IGST</th> <th style="text-align: center;">IGST</th>
<th>Net Invoice Amount</th> <th style="text-align: center;">Net Invoice Amount</th>
<th>Rate Of Tax</th> <th style="text-align: center;">Rate Of Tax</th>
</tr> </tr>
</thead> </thead>
<tbody> <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> <tr>
<td><?php echo $hcn['hsnOrSac']; ?></td> <td style="text-align: center;"><?php echo $hcn['hsnOrSac']; ?></td>
<td><?php echo $hcn['quantity']; ?></td> <td style="text-align: right;"><?php echo $hcn['quantity']; ?></td>
<td><?php echo $hcn['totalTaxableAmount']; ?></td> <td style="text-align: right;"><?php echo $hcn['totalTaxableAmount']; ?></td>
<td><?php echo $hcn['cgst']== 0 ? " " : $hcn['cgst']; ?></td> <td style="text-align: right;"><?php echo $hcn['cgst']== 0 ? " " : $hcn['cgst']; ?></td>
<td><?php echo $hcn['sgst']== 0 ? " " : $hcn['sgst']; ?></td> <td style="text-align: right;"><?php echo $hcn['sgst']== 0 ? " " : $hcn['sgst']; ?></td>
<td><?php echo $hcn['igst']== 0 ? " " : $hcn['igst']; ?></td> <td style="text-align: right;"><?php echo $hcn['igst']== 0 ? " " : $hcn['igst']; ?></td>
<td><?php echo $hcn['netInvoiceAmount']; ?></td> <td style="text-align: right;"><?php echo $hcn['netInvoiceAmount']; ?></td>
<td><?php echo $hcn['rateOfTax']; ?></td> <td style="text-align: center;"><?php echo $hcn['rateOfTax']; ?></td>
</tr> </tr>
@ -179,6 +196,17 @@
</tbody> </tbody>
<tfoot width="100%"> <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> </tfoot>
</table> </table>
</div> <!-- end card body--> </div> <!-- end card body-->
@ -202,26 +230,26 @@
// Bootstrap datepicker // Bootstrap datepicker
// Set up your table // Set up your table
$(document).ready(function () { $(document).ready(function () {
// Initialize the DataTable with only pagination enabled
var table = $('#cc').DataTable({ var table = $('#cc').DataTable({
dom: 'Blfrtip', dom: 'Blfrtip',
buttons: [ buttons: [
{ {
extend: 'excel', extend: 'excel',
text: 'Excel', text: 'Excel',
footer: true // ✅ This includes the footer in the exported Excel file
} }
], ],
paging: true, // Enable pagination paging: true,
searching: true, // Disable search searching: true, // You had this as 'true', so I left it unless you meant to disable it
ordering: false, // Disable column sorting ordering: false,
info: false, // Disable table information info: false,
lengthChange: false, // Disable page length options lengthChange: false,
pageLength: 10, // Default rows per page pageLength: 10,
responsive: true, // Keep responsive design responsive: true,
language: { language: {
paginate: { paginate: {
next: '<i class="fas fa-angle-right"></i>', // Next button icon next: '<i class="fas fa-angle-right"></i>',
previous: '<i class="fas fa-angle-left"></i>' // Previous button icon previous: '<i class="fas fa-angle-left"></i>'
} }
} }
}); });
@ -231,4 +259,5 @@
</script> </script>

View File

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

View File

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

View File

@ -161,6 +161,7 @@
<th>S.NO</th> <th>S.NO</th>
<th>Material Code</th> <th>Material Code</th>
<th>Material Description</th> <th>Material Description</th>
<th>Unit Of Measurement</th>
<th>Closing Stock</th> <th>Closing Stock</th>
</tr> </tr>
@ -190,6 +191,7 @@
<?php echo $stock[0]['header'][$index] ?> <?php echo $stock[0]['header'][$index] ?>
</a> </a>
</td> </td>
<td><?php echo $stock[3]['uom'][$index] ?> </td>
<td> <?php echo $body ?></td> <td> <?php echo $body ?></td>
</tr> </tr>