Report show set default financial year filter..
This commit is contained in:
parent
a9c4a7db08
commit
8cc4e32e04
@ -190,22 +190,14 @@ trait DateTime
|
||||
|
||||
public function getMonthlyDateFormat($year = null)
|
||||
{
|
||||
$format = 'M';
|
||||
|
||||
if ($this->getFinancialStart($year)->month != 1) {
|
||||
$format = 'M Y';
|
||||
}
|
||||
$format = 'M Y';
|
||||
|
||||
return $format;
|
||||
}
|
||||
|
||||
public function getQuarterlyDateFormat($year = null)
|
||||
{
|
||||
$format = 'M';
|
||||
|
||||
if ($this->getFinancialStart($year)->month != 1) {
|
||||
$format = 'M Y';
|
||||
}
|
||||
$format = 'M Y';
|
||||
|
||||
return $format;
|
||||
}
|
||||
|
@ -160,6 +160,7 @@ return [
|
||||
'recurring_and_more' => 'Recurring and more..',
|
||||
'due_on' => 'Due on',
|
||||
'amount_due' => 'Amount due',
|
||||
'financial_year' => 'Financial Year',
|
||||
|
||||
'card' => [
|
||||
'cards' => 'Card|Cards',
|
||||
|
@ -38,6 +38,10 @@
|
||||
$value = (strpos(trans('general.' . $filter_name), '|') !== false) ? trans_choice('general.' . $filter_name, 1) : trans('general.' . $filter_name);
|
||||
}
|
||||
|
||||
if ($key == 'year') {
|
||||
$value = trans('general.financial_year');
|
||||
}
|
||||
|
||||
$type = 'select';
|
||||
|
||||
if (isset($class->filters['types']) && !empty($class->filters['types'][$filter_name])) {
|
||||
@ -60,10 +64,16 @@
|
||||
'values' => $filter_values,
|
||||
];
|
||||
}
|
||||
|
||||
$filtered[] = [
|
||||
'option' => 'year',
|
||||
'operator' => '=',
|
||||
'value' => \Date::now()->year,
|
||||
];
|
||||
@endphp
|
||||
|
||||
<div class="align-items-center">
|
||||
<x-search-string :filters="$filters" />
|
||||
<x-search-string :filters="$filters" :filtered="$filtered" />
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user