minor changes made to make compatible with code structure

This commit is contained in:
Sevan Nerse 2020-04-15 19:41:01 +03:00
parent 4c988cb373
commit d3e7b863da
7 changed files with 10 additions and 8 deletions

View File

@ -2,6 +2,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Events\Purchase\BillReminded;
use App\Models\Common\Company; use App\Models\Common\Company;
use App\Models\Purchase\Bill; use App\Models\Purchase\Bill;
use App\Utilities\Overrider; use App\Utilities\Overrider;
@ -77,7 +78,7 @@ class BillReminder extends Command
$bills = Bill::with('contact')->accrued()->notPaid()->due($date)->cursor(); $bills = Bill::with('contact')->accrued()->notPaid()->due($date)->cursor();
foreach ($bills as $bill) { foreach ($bills as $bill) {
event(new \App\Events\Purchase\BillReminding($bill)); event(new BillReminded($bill));
} }
} }

View File

@ -2,6 +2,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Events\Sale\InvoiceReminded;
use App\Models\Common\Company; use App\Models\Common\Company;
use App\Models\Sale\Invoice; use App\Models\Sale\Invoice;
use App\Utilities\Overrider; use App\Utilities\Overrider;
@ -77,7 +78,7 @@ class InvoiceReminder extends Command
$invoices = Invoice::with('contact')->accrued()->notPaid()->due($date)->cursor(); $invoices = Invoice::with('contact')->accrued()->notPaid()->due($date)->cursor();
foreach ($invoices as $invoice) { foreach ($invoices as $invoice) {
event(new \App\Events\Sale\InvoiceReminding($invoice)); event(new InvoiceReminded($invoice));
} }
} }
} }

View File

@ -4,7 +4,7 @@ namespace App\Events\Purchase;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
class BillReminding class BillReminded
{ {
use SerializesModels; use SerializesModels;

View File

@ -4,7 +4,7 @@ namespace App\Events\Sale;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
class InvoiceReminding class InvoiceReminded
{ {
use SerializesModels; use SerializesModels;

View File

@ -5,7 +5,7 @@ namespace App\Listeners\Purchase;
use App\Events\Purchase\BillReminding as Event; use App\Events\Purchase\BillReminding as Event;
use App\Notifications\Purchase\Bill as Notification; use App\Notifications\Purchase\Bill as Notification;
class SendBillRemindingNotification class SendBillReminderNotification
{ {
/** /**
* Handle the event. * Handle the event.

View File

@ -5,7 +5,7 @@ namespace App\Listeners\Sale;
use App\Events\Sale\InvoiceReminding as Event; use App\Events\Sale\InvoiceReminding as Event;
use App\Notifications\Sale\Invoice as Notification; use App\Notifications\Sale\Invoice as Notification;
class SendInvoiceRemindingNotification class SendInvoiceReminderNotification
{ {
/** /**
* Handle the event. * Handle the event.

View File

@ -40,7 +40,7 @@ class Event extends Provider
'App\Listeners\Purchase\SendBillRecurringNotification', 'App\Listeners\Purchase\SendBillRecurringNotification',
], ],
'App\Events\Purchase\BillReminding' => [ 'App\Events\Purchase\BillReminding' => [
'App\Listeners\Purchase\SendBillRemindingNotification', 'App\Listeners\Purchase\SendBillReminderNotification',
], ],
'App\Events\Sale\PaymentReceived' => [ 'App\Events\Sale\PaymentReceived' => [
'App\Listeners\Sale\CreateInvoiceTransaction', 'App\Listeners\Sale\CreateInvoiceTransaction',
@ -63,7 +63,7 @@ class Event extends Provider
'App\Listeners\Sale\SendInvoiceRecurringNotification', 'App\Listeners\Sale\SendInvoiceRecurringNotification',
], ],
'App\Events\Sale\InvoiceReminding' => [ 'App\Events\Sale\InvoiceReminding' => [
'App\Listeners\Sale\SendInvoiceRemindingNotification', 'App\Listeners\Sale\SendInvoiceReminderNotification',
], ],
'App\Events\Menu\AdminCreated' => [ 'App\Events\Menu\AdminCreated' => [
'App\Listeners\Menu\AddAdminItems', 'App\Listeners\Menu\AddAdminItems',