diff --git a/app/Ninja/Reports/AbstractReport.php b/app/Ninja/Reports/AbstractReport.php
index 7d90eef54ac6..83fa60f83a3b 100644
--- a/app/Ninja/Reports/AbstractReport.php
+++ b/app/Ninja/Reports/AbstractReport.php
@@ -70,6 +70,8 @@ class AbstractReport
$class[] = 'group-letter-100';
} elseif (in_array($field, ['amount', 'paid', 'balance'])) {
$class[] = 'group-number-50';
+ } elseif (in_array($field, ['age'])) {
+ $class[] = 'group-number-30';
}
$class = count($class) ? implode(' ', $class) : 'group-false';
@@ -90,8 +92,9 @@ class AbstractReport
$columns_labeled = $this->tableHeaderArray();
$str = '';
- foreach ($columns_labeled as $field => $attr)
- $str .= "
{$attr['label']} | ";
+ foreach ($columns_labeled as $field => $attr) {
+ $str .= sprintf('%s | ', $attr['class'], $attr['label']);
+ }
return $str;
}
diff --git a/app/Ninja/Reports/AgingReport.php b/app/Ninja/Reports/AgingReport.php
index dc0ec6381da6..b34ca6326f1a 100644
--- a/app/Ninja/Reports/AgingReport.php
+++ b/app/Ninja/Reports/AgingReport.php
@@ -12,7 +12,7 @@ class AgingReport extends AbstractReport
'invoice_number',
'invoice_date',
'due_date',
- 'age' => ['group-number-30'],
+ 'age',
'amount',
'balance',
];
diff --git a/app/Ninja/Reports/QuoteReport.php b/app/Ninja/Reports/QuoteReport.php
index d7ed1f0ade76..704bc4820bd7 100644
--- a/app/Ninja/Reports/QuoteReport.php
+++ b/app/Ninja/Reports/QuoteReport.php
@@ -19,19 +19,17 @@ class QuoteReport extends AbstractReport
public function run()
{
$account = Auth::user()->account;
- $status = $this->options['invoice_status'];
+ $statusIds = $this->options['status_ids'];
$exportFormat = $this->options['export_format'];
$clients = Client::scope()
->orderBy('name')
->withArchived()
->with('contacts')
- ->with(['invoices' => function ($query) use ($status) {
- if ($status == 'draft') {
- $query->whereIsPublic(false);
- }
+ ->with(['invoices' => function ($query) use ($statusIds) {
$query->quotes()
->withArchived()
+ ->statusIds($statusIds)
->where('invoice_date', '>=', $this->startDate)
->where('invoice_date', '<=', $this->endDate)
->with(['invoice_items']);
diff --git a/resources/views/reports/report_builder.blade.php b/resources/views/reports/report_builder.blade.php
index 74aa6acdc260..457e96886bbc 100644
--- a/resources/views/reports/report_builder.blade.php
+++ b/resources/views/reports/report_builder.blade.php
@@ -247,14 +247,16 @@
->appendIcon(Icon::create('play'))
->large() !!}
-
+ @if (request()->report_type)
+
-
+
+ @endif
@@ -298,7 +300,7 @@
@endif
-
+
{!! $report ? $report->tableHeader() : '' !!}
@@ -424,7 +426,7 @@
function setFiltersShown() {
var val = $('#report_type').val();
$('#dateField').toggle(val == '{{ ENTITY_TAX_RATE }}');
- $('#statusField').toggle(val == '{{ ENTITY_INVOICE }}' || val == '{{ ENTITY_PRODUCT }}');
+ $('#statusField').toggle(['invoice', 'quote', 'product'].indexOf(val) >= 0);
$('#invoiceOrExpenseField').toggle(val == '{{ ENTITY_DOCUMENT }}');
$('#currencyType').toggle(val == '{{ ENTITY_PAYMENT }}');
}
@@ -536,6 +538,9 @@
},
widgetOptions : {
columnSelector_mediaqueryName: "{{ trans('texts.auto') }}",
+ columnSelector_mediaqueryHidden: true,
+ columnSelector_saveColumns: true,
+ //storage_useSessionStorage: true,
filter_cssFilter: 'form-control',
group_collapsed: true,
group_saveGroups: false,
@@ -557,15 +562,15 @@
}
}).show();
- // call this function to copy the column selection code into the popover
- $.tablesorter.columnSelector.attachTo( $('.tablesorter-data'), '#popover-target');
-
- $('#popover')
- .popover({
- placement: 'right',
- html: true, // required if content has HTML
- content: $('#popover-target')
- });
+ @if (request()->report_type)
+ $.tablesorter.columnSelector.attachTo( $('.tablesorter-data'), '#popover-target');
+ $('#popover')
+ .popover({
+ placement: 'right',
+ html: true, // required if content has HTML
+ content: $('#popover-target')
+ });
+ @endif
$(".tablesorter-totals").tablesorter({
theme: 'bootstrap',