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

@@ -0,0 +1,11 @@
<?php
namespace App\Jobs\Banking;
/**
* @deprecated
* @see CreateBankingDocumentTransaction
*/
class CreateDocumentTransaction extends CreateBankingDocumentTransaction
{
}

View File

@@ -23,6 +23,7 @@
{{ trans('general.confirm') }}
</button>
{!! Form::hidden('payment_method', $setting['code'], ['v-model' => 'form.payment_method']) !!}
{!! Form::hidden('type', 'income', ['v-model' => 'form.type']) !!}
{!! Form::close() !!}
</div>
</div>

View File

@@ -118,7 +118,7 @@ class Payment extends PaymentController
$total_paid_match = ((double) $request['mc_gross'] == $document->amount);
if ($receiver_match && $total_paid_match) {
event(new PaymentReceived($document, $request));
event(new PaymentReceived($document, $request->merge(['type' => 'income'])));
}
if (!$receiver_match) {