FIX_ALIGNMENT IN REPORTS
This commit is contained in:
parent
1797974fc0
commit
0b134896d0
@ -656,9 +656,9 @@ class Customer extends BaseController
|
||||
|
||||
$shippingData = [
|
||||
'customer_id' => $this->request->getPost('customer_id'),
|
||||
'first_name' => $this->request->getPost('first_name'),
|
||||
'last_name' => $this->request->getPost('last_name'),
|
||||
'shipping_address1'=> $shipping_address_name . ','.$this->request->getPost('QS_address'),
|
||||
'first_name' => isset($shipping_address_name)?$shipping_address_name:$this->request->getPost('first_name'),
|
||||
'last_name' => '',
|
||||
'shipping_address1'=> $this->request->getPost('QS_address'),
|
||||
'shipping_address2'=> '',
|
||||
'shipping_country' => $this->request->getPost('QS_country'),
|
||||
'shipping_state' => $this->request->getPost('QS_state'),
|
||||
|
||||
@ -2503,7 +2503,7 @@ $('#saveButton').click(function() {
|
||||
var QS_AddressId = response['data']['shipping_addr_id'];
|
||||
|
||||
if(QB_AddressId !== null ){
|
||||
var quick_billing_Address = QB_AddressLine + ','+QB_City + ',' + QB_State + ',' +QB_Country + '-' + QB_PostalCode + '.' ;
|
||||
var quick_billing_Address =QB_AddressLine + ','+QB_City + ',' + QB_State + ',' +QB_Country + '-' + QB_PostalCode + '.' ;
|
||||
$('#storeBillingAddress').empty();
|
||||
$('#storeBillingAddress').val(quick_billing_Address).prop("readonly", true);
|
||||
$('#hiddenBillingAddressId').val(QB_AddressId);
|
||||
@ -2514,7 +2514,7 @@ $('#saveButton').click(function() {
|
||||
$('#storeShippingAddress').empty();
|
||||
var new_QS_ShippingAddrOption = $('<option>', {
|
||||
value: QS_AddressId,
|
||||
text: QS_AddressLine,
|
||||
text: shipping_address_name+','+ QS_AddressLine,
|
||||
selected: true
|
||||
});
|
||||
$('#storeShippingAddress').val(quick_shipping_Address).prop("readonly", true);
|
||||
|
||||
@ -46,12 +46,12 @@
|
||||
<?php foreach ($report_data as $row): ?>
|
||||
<?php foreach ($row->books as $book): ?>
|
||||
<tr>
|
||||
<td style="text-align: left;"><?= isset($row->publisher_code) ? $row->publisher_code : '-' ?></td>
|
||||
<td style="text-align: center;"><?= isset($row->publisher_code) ? $row->publisher_code : '-' ?></td>
|
||||
<td style="text-align: center;"><?= $row->publisher_item_count ?></td>
|
||||
<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: left;"><?= $book->item_count ?></td>
|
||||
<td style="text-align: right;"><?= number_format($book->total_cost, 2) ?></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>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@ -133,9 +133,9 @@
|
||||
$invoice_date = date("d/m/Y", $unixTime);?>
|
||||
<td><?= $invoice_date ?></td>
|
||||
<td style="text-align: left;"><?= $row['first_name'] ?></td>
|
||||
<td style="text-align: center;"><?= strtoupper($row['payment_method'])?></td>
|
||||
<td style="text-align: left;"><?= strtoupper($row['payment_method'])?></td>
|
||||
<td><?= $row['payment_status'] ?></td>
|
||||
<td style="text-align: right;"><?= $row['total_amount'] ?></td>
|
||||
<td style="text-align: left;"><?= $row['total_amount'] ?></td>
|
||||
<?php
|
||||
$total += $row['total_amount']; // Add each row's total_amount to $total
|
||||
?>
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
<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: end;"><?php echo $row->price ?></td>
|
||||
<td style="text-align: left;"><?php echo $row->price ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
@ -115,22 +115,40 @@ Sri Kasi, 12, M.V. Naidu Street, Chetpet,Chennai -
|
||||
]
|
||||
});
|
||||
|
||||
$('#datatable-buttons thead tr').clone(true).appendTo('#datatable-buttons thead');
|
||||
$('#datatable-buttons thead tr:eq(1) th').each(function(i) {
|
||||
var title = $(this).text();
|
||||
var uniqueValues = table.column(i).data().unique().sort();
|
||||
var select = $('<select class="form-control form-control-sm"><option value="">Search ' + title + '</option></select>')
|
||||
.appendTo($(this).empty())
|
||||
.on('change', function() {
|
||||
var val = $.fn.dataTable.util.escapeRegex($(this).val());
|
||||
table.column(i)
|
||||
.search(val ? '^' + val + '$' : '', true, false)
|
||||
.draw();
|
||||
});
|
||||
$('#datatable-buttons thead tr:eq(1)').remove(); // Remove any existing second row in the header
|
||||
$('#datatable-buttons thead tr').clone(true).appendTo('#datatable-buttons thead'); // Clone the header row
|
||||
|
||||
$('#datatable-buttons thead tr:eq(1) th').each(function(i) {
|
||||
var title = $(this).text(); // Get the column title
|
||||
var visibleColumns = table.columns(':visible'); // Get only visible columns
|
||||
var visibleColumnIndex = visibleColumns.indexes()[i]; // Map header index to visible column index
|
||||
|
||||
// Skip if the column is not visible or has no title
|
||||
if (visibleColumnIndex === undefined || !title) {
|
||||
$(this).empty(); // Clear the header cell
|
||||
return;
|
||||
}
|
||||
|
||||
var column = table.column(visibleColumnIndex); // Get the visible column object
|
||||
var uniqueValues = column.data().unique().sort(); // Fetch unique values for the column
|
||||
|
||||
// Create a dropdown for filtering
|
||||
var select = $('<select class="form-control form-control-sm"><option value="">Search ' + title + '</option></select>')
|
||||
.appendTo($(this).empty()) // Append the dropdown to the header cell
|
||||
.on('change', function() {
|
||||
var val = $.fn.dataTable.util.escapeRegex($(this).val());
|
||||
column
|
||||
.search(val ? '^' + val + '$' : '', true, false) // Apply exact match filtering
|
||||
.draw();
|
||||
});
|
||||
|
||||
// Populate the dropdown with unique values
|
||||
uniqueValues.each(function(d) {
|
||||
if (d) { // Only add non-empty values
|
||||
select.append('<option value="' + d + '">' + d + '</option>');
|
||||
}
|
||||
});
|
||||
|
||||
uniqueValues.each(function(d, j) {
|
||||
select.append('<option value="' + d + '">' + d + '</option>');
|
||||
});
|
||||
|
||||
$('input', this).on('keyup change', function() {
|
||||
if (table.column(i).search() !== this.value) {
|
||||
|
||||
@ -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: center;"><?= strtoupper($row['payment_method'])?></td>
|
||||
<td style="text-align: right;"><?= $row['total_amount'] ?></td>
|
||||
<td style="text-align: left;"><?= $row['total_amount'] ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user