cancel invoice/bill

This commit is contained in:
denisdulici
2020-03-28 17:54:36 +03:00
parent 889be5fd98
commit 75413a0496
30 changed files with 445 additions and 104 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Listeners\Purchase;
use App\Events\Purchase\BillCancelled as Event;
use App\Jobs\Purchase\CancelBill;
use App\Jobs\Purchase\CreateBillHistory;
use App\Traits\Jobs;
class MarkBillCancelled
{
use Jobs;
/**
* Handle the event.
*
* @param $event
* @return void
*/
public function handle(Event $event)
{
$this->dispatch(new CancelBill($event->bill));
$this->dispatch(new CreateBillHistory($event->bill, 0, trans('bills.messages.marked_cancelled')));
}
}

View File

@@ -24,6 +24,6 @@ class MarkBillReceived
$event->bill->save();
}
$this->dispatch(new CreateBillHistory($event->bill, 0, trans('bills.mark_received')));
$this->dispatch(new CreateBillHistory($event->bill, 0, trans('bills.messages.marked_received')));
}
}