Add Income/Expense type for document transactions

This commit is contained in:
Burak Çakırel
2020-12-25 18:19:16 +03:00
parent 3d1522f545
commit e27ccfa46c
11 changed files with 20 additions and 7 deletions

View File

@ -308,7 +308,7 @@ class Bills extends Controller
public function markPaid(Document $bill)
{
try {
$this->dispatch(new CreateBankingDocumentTransaction($bill, []));
$this->dispatch(new CreateBankingDocumentTransaction($bill, ['type' => 'expense']));
$message = trans('bills.messages.marked_paid');

View File

@ -358,7 +358,7 @@ class Invoices extends Controller
public function markPaid(Document $invoice)
{
try {
event(new \App\Events\Document\PaymentReceived($invoice));
event(new \App\Events\Document\PaymentReceived($invoice, ['type' => 'income']));
$message = trans('invoices.messages.marked_paid');