This commit is contained in:
denisdulici
2018-12-31 14:41:17 +03:00
parent a702d1ccba
commit 09366fa243
11 changed files with 85 additions and 26 deletions

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Listeners\Updates;
use App\Events\UpdateFinished;
use Date;
class Version138 extends Listener
{
const ALIAS = 'core';
const VERSION = '1.3.8';
/**
* Handle the event.
*
* @param $event
* @return void
*/
public function handle(UpdateFinished $event)
{
// Check if should listen
if (!$this->check($event)) {
return;
}
// Re-format financial start
$current_setting = setting('general.financial_start', Date::now()->startOfYear()->format('d F'));
setting(['general.financial_start' => Date::parse($current_setting)->format('d-m')]);
setting()->save();
}
}