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