mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +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 DB;
|
||||
use Utils;
|
||||
use Auth;
|
||||
|
||||
class PaymentRepository extends BaseRepository
|
||||
{
|
||||
@ -161,6 +162,10 @@ class PaymentRepository extends BaseRepository
|
||||
}
|
||||
} else {
|
||||
$payment = Payment::createNew();
|
||||
|
||||
if (Auth::check()) {
|
||||
$payment->payment_type_id = Auth::user()->account->payment_type_id;
|
||||
}
|
||||
}
|
||||
|
||||
if ($payment->is_deleted) {
|
||||
|
Loading…
Reference in New Issue
Block a user