formatting #1855
This commit is contained in:
parent
a64fe6f779
commit
8cdb9a2a21
@ -374,7 +374,7 @@ abstract class Report
|
||||
$financial_year = $this->getFinancialYear($this->year);
|
||||
|
||||
if ($date->greaterThanOrEqualTo($financial_year->getStartDate()) && $date->lessThanOrEqualTo($financial_year->getEndDate())) {
|
||||
if (setting('localisation.financial_year_denote') == 'begins') {
|
||||
if (setting('localisation.financial_denote') == 'begins') {
|
||||
$i = $financial_year->getStartDate()->copy()->format($this->getYearlyDateFormat());
|
||||
} else {
|
||||
$i = $financial_year->getEndDate()->copy()->format($this->getYearlyDateFormat());
|
||||
|
@ -41,9 +41,9 @@ class Localisation extends Controller
|
||||
'both' => trans('settings.localisation.discount_location.both'),
|
||||
];
|
||||
|
||||
$financial_year_denote_options = [
|
||||
'begins' => trans('settings.localisation.financial_year_denote.begins'),
|
||||
'ends' => trans('settings.localisation.financial_year_denote.ends'),
|
||||
$financial_denote_options = [
|
||||
'begins' => trans('settings.localisation.financial_denote.begins'),
|
||||
'ends' => trans('settings.localisation.financial_denote.ends'),
|
||||
];
|
||||
|
||||
return view('settings.localisation.edit', compact(
|
||||
@ -52,7 +52,7 @@ class Localisation extends Controller
|
||||
'date_separators',
|
||||
'percent_positions',
|
||||
'discount_locations',
|
||||
'financial_year_denote_options'
|
||||
'financial_denote_options'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ trait DateTime
|
||||
|
||||
$financial_start = Date::create($year, $month, $day);
|
||||
|
||||
if (setting('localisation.financial_year_denote') == 'ends' && $financial_start->dayOfYear != 1) {
|
||||
if ((setting('localisation.financial_denote') == 'ends') && ($financial_start->dayOfYear != 1)) {
|
||||
$financial_start->subYear();
|
||||
}
|
||||
|
||||
|
@ -98,12 +98,12 @@ return [
|
||||
'fallback' => [
|
||||
'localisation' => [
|
||||
'financial_start' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_START', '01-01'),
|
||||
'financial_denote' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_DENOTE', 'ends'),
|
||||
'timezone' => env('SETTING_FALLBACK_LOCALISATION_TIMEZONE', 'Europe/London'),
|
||||
'date_format' => env('SETTING_FALLBACK_LOCALISATION_DATE_FORMAT', 'd M Y'),
|
||||
'date_separator' => env('SETTING_FALLBACK_LOCALISATION_DATE_SEPARATOR', 'space'),
|
||||
'percent_position' => env('SETTING_FALLBACK_LOCALISATION_PERCENT_POSITION', 'after'),
|
||||
'discount_location' => env('SETTING_FALLBACK_LOCALISATION_DISCOUNT_LOCATION', 'total'),
|
||||
'financial_year_denote' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_YEAR_DENOTE', 'ends'),
|
||||
],
|
||||
'invoice' => [
|
||||
'number_prefix' => env('SETTING_FALLBACK_INVOICE_NUMBER_PREFIX', 'INV-'),
|
||||
|
@ -16,6 +16,11 @@ return [
|
||||
'description' => 'Set fiscal year, time zone, date format and more locals',
|
||||
'financial_start' => 'Financial Year Start',
|
||||
'timezone' => 'Time Zone',
|
||||
'financial_denote' => [
|
||||
'title' => 'Financial Year Denote',
|
||||
'begins' => 'By the year in which it begins',
|
||||
'ends' => 'By the year in which it ends',
|
||||
],
|
||||
'date' => [
|
||||
'format' => 'Date Format',
|
||||
'separator' => 'Date Separator',
|
||||
@ -36,11 +41,6 @@ return [
|
||||
'total' => 'At total',
|
||||
'both' => 'Both line and total',
|
||||
],
|
||||
'financial_year_denote' => [
|
||||
'title' => 'Financial Year Denote',
|
||||
'begins' => 'By the year it begins',
|
||||
'ends' => 'By the year it ends',
|
||||
],
|
||||
],
|
||||
|
||||
'invoice' => [
|
||||
|
@ -20,7 +20,7 @@
|
||||
<div class="row">
|
||||
{{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], setting('localisation.financial_start')) }}
|
||||
|
||||
{{ Form::selectGroup('financial_year_denote', trans('settings.localisation.financial_year_denote.title'), 'calendar', $financial_year_denote_options, setting('localisation.financial_year_denote'), []) }}
|
||||
{{ Form::selectGroup('financial_denote', trans('settings.localisation.financial_denote.title'), 'calendar', $financial_denote_options, setting('localisation.financial_denote'), []) }}
|
||||
|
||||
{{ Form::selectGroupGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, setting('localisation.timezone'), []) }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user