mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 15:13:29 +01:00
Use default payment type for all payments
This commit is contained in:
parent
022852b0c8
commit
3e9c8e7d5b
@ -7,6 +7,7 @@ use App\Models\Invoice;
|
|||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
use DB;
|
use DB;
|
||||||
use Utils;
|
use Utils;
|
||||||
|
use Auth;
|
||||||
|
|
||||||
class PaymentRepository extends BaseRepository
|
class PaymentRepository extends BaseRepository
|
||||||
{
|
{
|
||||||
@ -161,6 +162,10 @@ class PaymentRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$payment = Payment::createNew();
|
$payment = Payment::createNew();
|
||||||
|
|
||||||
|
if (Auth::check()) {
|
||||||
|
$payment->payment_type_id = Auth::user()->account->payment_type_id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($payment->is_deleted) {
|
if ($payment->is_deleted) {
|
||||||
|
Loading…
Reference in New Issue
Block a user