FIX_REPORT ALIGNMENT FOR COSTS

This commit is contained in:
Srinivas-Saravanan 2024-12-19 12:27:30 +05:30
parent 5fdc773cee
commit 89d7b3be03
9 changed files with 19 additions and 22 deletions

View File

@ -153,7 +153,7 @@ class Invoice extends BaseController
$where = ['customer_addresses.isactive' => 1, 'customer_addresses.customer_id' => (int)$id];
$where['address_type'] = 1;
$data['customer_billing'] = $this->get_customer_address($where, []);
$select = ["customer_address_id", "CONCAT(address_1,' ',address_2) as address","first_name"];
$select = ["customer_address_id", "CONCAT(address_1,' ',address_2) as address"];
$where['address_type'] = 2;
$data['customer_shipping'] = $this->get_customer_address($where, $select);
return $this->response->setJSON(['data' => $data]);

View File

@ -82,7 +82,7 @@
<th>Invoice Date</th>
<th>Customer Name</th>
<th>Status</th>
<th>Total ()</th>
<th style="text-align: center;">Total ()</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
@ -99,7 +99,7 @@
<td class="preview-pdf" data-order="<?= strtotime($row['invoice_date']); ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $invoice_date; ?></td>
<td class="preview-pdf" data-order="<?= $row['customer_name']; ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['customer_name']; ?></td>
<td class="preview-pdf" data-order="<?= $row['status']; ?>;" id="status-column" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['status']; ?></td>
<td class="preview-pdf" data-order="<?= $row['total_amount']; ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['total_amount']; ?></td>
<td style="text-align: right;padding-right: 47px;" class="preview-pdf" data-order="<?= $row['total_amount']; ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['total_amount']; ?></td>
<td>
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>&nbsp;
<a style="display: none;" href="<?= base_url("print_address/{$row['invoice_id']}") ?>" class="print-address-button" title="Print Address"><i class="ri-printer-line"></i></a>

View File

@ -38,8 +38,8 @@
<th><b>Publisher Total Cost</b></th>
<th style="width: 10%;"><b>Book Name</b></th>
<th><b>Item Count</b></th>
<th><b>Total Cost</b></th>
<th><b>Payment method</b></th>
<th style="text-align: center;"><b>Total Cost</b></th>
</tr>
</thead>
<tbody>
@ -51,8 +51,8 @@
<td style="text-align: right;"><?= number_format($row->publisher_total_cost, 2) ?></td>
<td style="text-align: left;"><?= $book->book_name ?></td>
<td style="text-align: center;"><?= $book->item_count ?></td>
<td style="text-align: left;"><?= number_format($book->total_cost, 2) ?></td>
<td style="text-align: center;"><?= strtoupper($row->payment_method) ?></td>
<td style="text-align: left;"><?= strtoupper($row->payment_method) ?></td>
<td style="text-align: right;"><?= number_format($book->total_cost, 2) ?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>

View File

@ -111,7 +111,7 @@
<th>Invoice Date</th>
<th>Customer Name</th>
<th>Status</th>
<th>Total ()</th>
<th style="text-align: center;">Total ()</th>
<th align="center" id="action-column">Action</th>
</tr>
</thead>
@ -128,7 +128,7 @@
<td class="preview-pdf" data-order="<?= strtotime($row['invoice_date']); ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $invoice_date; ?></td>
<td class="preview-pdf" data-order="<?= $row['customer_name']; ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['customer_name']; ?></td>
<td class="preview-pdf" data-order="<?= $row['status']; ?>;" id="status-column" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['status']; ?></td>
<td class="preview-pdf" data-order="<?= $row['total_amount']; ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['total_amount']; ?></td>
<td style = "text-align:right;padding-right: 67px;" class="preview-pdf" data-order="<?= $row['total_amount']; ?>" data-invoice-id="<?= $row['invoice_id']; ?>"><?= $row['total_amount']; ?></td>
<td>
<a href="<?= base_url("generate_invoice_pdf/{$row['invoice_id']}") ?>" class="download-pdf-button" title="Download the Invoice"><i class="ri-file-download-line"></i></a>&nbsp;
<a style="display: none;" href="<?= base_url("print_address/{$row['invoice_id']}") ?>" class="print-address-button" title="Print Address"><i class="ri-printer-line"></i></a>

View File

@ -121,7 +121,7 @@
<th>Customer Name</th>
<th>Payment Method</th>
<th>Payment Status</th>
<th>Total Amount</th>
<th style="text-align: center;">Total Amount</th>
</tr>
</thead>
<tbody>
@ -134,8 +134,8 @@
<td><?= $invoice_date ?></td>
<td style="text-align: left;"><?= $row['first_name'] ?></td>
<td style="text-align: left;"><?= strtoupper($row['payment_method'])?></td>
<td><?= $row['payment_status'] ?></td>
<td style="text-align: left;"><?= $row['total_amount'] ?></td>
<td style="text-align: center;"><?= $row['payment_status'] ?></td>
<td style="text-align:right;padding-right: 67px;"><?= $row['total_amount'] ?></td>
<?php
$total += $row['total_amount']; // Add each row's total_amount to $total
?>

View File

@ -45,8 +45,8 @@
<th style="text-align: center;">Invoice Date</th>
<th>Book Name</th>
<th>Author</th>
<th>Published By</th>
<th>Cost</th>
<th style="text-align: center;">Published By</th>
<th style="text-align: center;">Cost</th>
</tr>
</thead>
@ -58,8 +58,8 @@
<td style = "text-align:center"><?php echo date("d/m/Y",strtotime($row->invoice_date)) ?></td>
<td style="text-align: left;"><?php echo $row->title; ?></td>
<td style="text-align: left;"><?php echo $row->author; ?></td>
<td style="text-align: left;"><?php echo $row->publishers_code?></td>
<td style="text-align: left;"><?php echo $row->price ?></td>
<td style="text-align: center;"><?php echo $row->publishers_code?></td>
<td style="text-align: right;max-width:fit-content;"><?php echo $row->price ?></td>
</tr>
<?php } ?>
</tbody>

View File

@ -52,9 +52,7 @@
<th>OT Charges ()</th>
<th>GST (%)</th>
<th>Total ()</th>
</tr>
</thead>
@ -73,8 +71,7 @@
<td style="text-align: right;"><?php echo number_format($row->discount, 2, '.', ','); ?></td>
<td style="text-align: right;"><?php echo number_format($row->shipping_charge, 2, '.', ','); ?></td>
<td style="text-align: right;"><?php echo $row->tax ? $row->tax : '0.00'; ?></td>
<td style="text-align: left;"><?php echo number_format($row->total_amount, 2, '.', ','); ?></td>
<td style="text-align: right;max: width 5%;"><?php echo number_format($row->total_amount, 2, '.', ','); ?></td>
</tr>
<?php } ?>
</tbody>

View File

@ -78,7 +78,7 @@
<td style="text-align: right;"><?php echo number_format($row->publisher_total_cost, 2); ?></td>
<td style="text-align: left;"><?php echo $book->book_name; ?></td>
<td style="text-align: center;"><?php echo $book->item_count; ?></td>
<td style="text-align: left;"><?php echo number_format($book->total_cost, 2); ?></td>
<td style="text-align: right;"><?php echo number_format($book->total_cost, 2); ?></td>
</tr>
<?php } ?>

View File

@ -53,7 +53,7 @@
<td style="text-align: left;"><?= $row['first_name'].' ('.$row['role'].')'?></td>
<td style="text-align: center;"><?= $row['books_sold'] ?></td>
<td style="text-align: left;"><?= strtoupper($row['payment_method'])?></td>
<td style="text-align: left;"><?= $row['total_amount'] ?></td>
<td style="text-align:right;padding-right: 67px;"><?= $row['total_amount'] ?></td>
</tr>
<?php } ?>
</tbody>