make document notification agnostic #1991

This commit is contained in:
Denis Duliçi
2021-04-21 00:54:14 +03:00
parent 8f2f360ad6
commit 15ac33cb46
4 changed files with 81 additions and 65 deletions

View File

@ -133,11 +133,7 @@ class RecurringCheck extends Command
case 'App\Models\Document\Document':
event(new DocumentCreated($clone, request()));
if ($clone->type === Document::INVOICE_TYPE) {
event(new DocumentRecurring($clone, InvoiceNotification::class));
} elseif ($clone->type === Document::BILL_TYPE) {
event(new DocumentRecurring($clone, BillNotification::class));
}
event(new DocumentRecurring($clone));
break;
case 'App\Models\Banking\Transaction':