Merge pull request #2802 from FELDSAM-INC/feature/schd-reports-ranges

Scheduled Reports - Add ranges with quarters
This commit is contained in:
Hillel Coren 2019-04-29 09:45:17 +03:00 committed by GitHub
commit 503178693f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View File

@ -46,6 +46,14 @@ class RunReport extends Job
$startDate = Carbon::now()->subMonth()->firstOfMonth()->toDateString(); $startDate = Carbon::now()->subMonth()->firstOfMonth()->toDateString();
$endDate = Carbon::now()->subMonth()->lastOfMonth()->toDateString(); $endDate = Carbon::now()->subMonth()->lastOfMonth()->toDateString();
break; 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': case 'this_year':
$startDate = Carbon::now()->firstOfYear()->toDateString(); $startDate = Carbon::now()->firstOfYear()->toDateString();
$endDate = Carbon::now()->lastOfYear()->toDateString(); $endDate = Carbon::now()->lastOfYear()->toDateString();

View File

@ -135,6 +135,7 @@ $LANG = array(
'status' => 'Status', 'status' => 'Status',
'invoice_total' => 'Invoice Total', 'invoice_total' => 'Invoice Total',
'frequency' => 'Frequency', 'frequency' => 'Frequency',
'range' => 'Range',
'start_date' => 'Start Date', 'start_date' => 'Start Date',
'end_date' => 'End Date', 'end_date' => 'End Date',
'transaction_reference' => 'Transaction Reference', 'transaction_reference' => 'Transaction Reference',

View File

@ -359,6 +359,16 @@
<div id="scheduleHelp"></div> <div id="scheduleHelp"></div>
</center> </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') {!! Former::select('frequency')
->addOption(trans('texts.freq_daily'), REPORT_FREQUENCY_DAILY) ->addOption(trans('texts.freq_daily'), REPORT_FREQUENCY_DAILY)
->addOption(trans('texts.freq_weekly'), REPORT_FREQUENCY_WEEKLY) ->addOption(trans('texts.freq_weekly'), REPORT_FREQUENCY_WEEKLY)