fixed financial start

This commit is contained in:
denisdulici 2018-12-31 18:07:56 +03:00
parent c3720fcd2e
commit bc9fbfb3fb
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,7 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\Wizard\Company as Request;
use App\Models\Common\Company;
use App\Traits\Uploads;
use Date;
class Companies extends Controller
{
@ -70,6 +71,11 @@ class Companies extends Controller
}
}
// Format financial year
if ($key == 'financial_start') {
$value = Date::parse($value)->format('d-m');
}
setting()->set('general.' . $key, $value);
}

View File

@ -28,7 +28,7 @@ class Settings extends Seeder
$company_id = $this->command->argument('company');
Setting::set([
'general.financial_start' => Date::now()->startOfYear()->format('d F'),
'general.financial_start' => Date::now()->startOfYear()->format('d-m'),
'general.timezone' => 'Europe/London',
'general.date_format' => 'd M Y',
'general.date_separator' => 'space',