1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

Schedule Entity

This commit is contained in:
David Bomba 2023-03-18 20:06:42 +11:00
parent 46dceaf17d
commit b47bac317c
2 changed files with 6 additions and 4 deletions

View File

@ -12,6 +12,7 @@
namespace App\Services\Scheduler;
use App\Models\Scheduler;
use Illuminate\Support\Str;
use App\Utils\Traits\MakesHash;
class ScheduleEntity
@ -23,7 +24,11 @@ class ScheduleEntity
}
public function run()
{
{nlog("here");
$class = 'App\\Models\\' . Str::camel($this->scheduler->parameters['entity']);
nlog($class);
$class::find($this->decodePrimaryKey($this->scheduler->parameters['entity_id']))->service()->sendEmail();
$this->scheduler->forceDelete();
}
}

View File

@ -11,9 +11,6 @@
namespace App\Services\Scheduler;
use App\DataMapper\Schedule\EmailStatement;
use App\Models\Client;
use App\Models\RecurringInvoice;
use App\Models\Scheduler;
use App\Utils\Traits\MakesDates;
use App\Utils\Traits\MakesHash;