Add Income/Expense type for document transactions
This commit is contained in:
11
modules/BC21/Jobs/Banking/CreateDocumentTransaction.php
Normal file
11
modules/BC21/Jobs/Banking/CreateDocumentTransaction.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Banking;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateBankingDocumentTransaction
|
||||
*/
|
||||
class CreateDocumentTransaction extends CreateBankingDocumentTransaction
|
||||
{
|
||||
}
|
@@ -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>
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user