Merge branch 'master' of github.com:akaunting/akaunting

This commit is contained in:
Cüneyt Şentürk
2020-08-28 13:38:04 +03:00
2 changed files with 112 additions and 140 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Utilities;
use App\Events\Module\PaymentMethodShowing;
use Cache;
use Date;
@@ -16,8 +17,8 @@ class Modules
$contact = true;
if (user()) {
$contact = user()->contact;
if ($user = user()) {
$contact = $user->contact;
}
if ($contact && ($type != 'all')) {
@@ -34,9 +35,9 @@ class Modules
$modules->payment_methods = [];
// Fire the event to get the list of payment methods
event(new \App\Events\Module\PaymentMethodShowing($modules));
event(new PaymentMethodShowing($modules));
foreach ($modules->payment_methods as $method) {
foreach ((array) $modules->payment_methods as $method) {
if (!isset($method['name']) || !isset($method['code'])) {
continue;
}