Customer invoice payment method some fix
This commit is contained in:
parent
1e96c7ef6e
commit
f894e15451
@ -23,7 +23,7 @@ class Payments extends Controller
|
||||
{
|
||||
$payments = Payment::with(['account', 'category'])->where('customer_id', '=', Auth::user()->customer->id)->paginate();
|
||||
|
||||
$payment_methods = Modules::getPaymentMethods();
|
||||
$payment_methods = Modules::getPaymentMethods('all');
|
||||
|
||||
$categories = collect(Category::enabled()->type('income')->pluck('name', 'id'))
|
||||
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
|
||||
|
@ -11,14 +11,14 @@ use App\Events\PaymentGatewayListing;
|
||||
class Modules
|
||||
{
|
||||
|
||||
public static function getPaymentMethods()
|
||||
public static function getPaymentMethods($type = null)
|
||||
{
|
||||
|
||||
$payment_methods = Cache::get('payment_methods.admin');
|
||||
|
||||
$customer = auth()->user()->customer;
|
||||
|
||||
if ($customer) {
|
||||
if ($customer && $type != 'all') {
|
||||
$payment_methods = Cache::get('payment_methods.customer');
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ class Modules
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($customer && empty($gateway['customer'])) {
|
||||
if (($customer && empty($gateway['customer'])) && $type != 'all') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user