mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Scheduled Reports - Add ranges with quarters
Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
This commit is contained in:
parent
258b5c6453
commit
ec9f77b53d
@ -46,6 +46,14 @@ class RunReport extends Job
|
||||
$startDate = Carbon::now()->subMonth()->firstOfMonth()->toDateString();
|
||||
$endDate = Carbon::now()->subMonth()->lastOfMonth()->toDateString();
|
||||
break;
|
||||
case 'this_quarter':
|
||||
$startDate = Carbon::now()->firstOfQuarter()->toDateString();
|
||||
$endDate = Carbon::now()->lastOfQuarter()->toDateString();
|
||||
break;
|
||||
case 'last_quarter':
|
||||
$startDate = Carbon::now()->subMonth(3)->firstOfQuarter()->toDateString();
|
||||
$endDate = Carbon::now()->subMonth(3)->lastOfQuarter()->toDateString();
|
||||
break;
|
||||
case 'this_year':
|
||||
$startDate = Carbon::now()->firstOfYear()->toDateString();
|
||||
$endDate = Carbon::now()->lastOfYear()->toDateString();
|
||||
|
@ -135,6 +135,7 @@ $LANG = array(
|
||||
'status' => 'Status',
|
||||
'invoice_total' => 'Invoice Total',
|
||||
'frequency' => 'Frequency',
|
||||
'range' => 'Range',
|
||||
'start_date' => 'Start Date',
|
||||
'end_date' => 'End Date',
|
||||
'transaction_reference' => 'Transaction Reference',
|
||||
|
@ -358,6 +358,16 @@
|
||||
<div id="scheduleHelp"></div>
|
||||
</center>
|
||||
|
||||
{!! Former::select('range')
|
||||
->addOption(trans('texts.none'), '')
|
||||
->addOption(trans('texts.this_month'), 'this_month')
|
||||
->addOption(trans('texts.last_month'), 'last_month')
|
||||
->addOption(trans('texts.current_quarter'), 'this_quarter')
|
||||
->addOption(trans('texts.last_quarter'), 'last_quarter')
|
||||
->addOption(trans('texts.this_year'), 'this_year')
|
||||
->addOption(trans('texts.last_year'), 'last_year')
|
||||
->value('') !!}
|
||||
|
||||
{!! Former::select('frequency')
|
||||
->addOption(trans('texts.freq_daily'), REPORT_FREQUENCY_DAILY)
|
||||
->addOption(trans('texts.freq_weekly'), REPORT_FREQUENCY_WEEKLY)
|
||||
|
Loading…
Reference in New Issue
Block a user