akaunting 3.0 (the last dance)
This commit is contained in:
25
app/Listeners/Banking/IncreaseNextTransactionNumber.php
Normal file
25
app/Listeners/Banking/IncreaseNextTransactionNumber.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners\Banking;
|
||||
|
||||
use App\Events\Banking\TransactionCreated as Event;
|
||||
use App\Traits\Transactions;
|
||||
|
||||
class IncreaseNextTransactionNumber
|
||||
{
|
||||
use Transactions;
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$suffix = $event->transaction->isRecurringTransaction() ? '-recurring' : '';
|
||||
|
||||
// Update next transaction number
|
||||
$this->increaseNextTransactionNumber($suffix);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user