diff --git a/app/User.php b/app/User.php index 90c6efb..9fb3dcf 100644 --- a/app/User.php +++ b/app/User.php @@ -618,7 +618,7 @@ class User extends Authenticatable { $payment = (new Payment) ->select([ - 'payment_id', + DB::raw('payment_id AS id'), DB::raw('SUM(allocate) AS allocate'), ]) @@ -628,14 +628,15 @@ class User extends Authenticatable return (new Payment) ->select([ - DB::raw('payment_id AS id'), + DB::raw('ab_payment.id AS id'), 'date_orig', 'date_payment', 'total_amt', //'fees_amt', DB::raw('total_amt-allocate AS balance'), ]) - ->join('ab_payment',['ab_payment.id'=>'payment_id']) + ->rightJoin('ab_payment',['ab_payment.id'=>'summary.id']) + //->where('ab_payment.active',TRUE) // @todo To implement ->whereIN('account_id',$this->all_accounts()->pluck('id')->unique()->toArray()) ->from($payment,'summary'); } diff --git a/resources/views/theme/backend/adminlte/widgets/payment.blade.php b/resources/views/theme/backend/adminlte/widgets/payment.blade.php index 60729f2..9987410 100644 --- a/resources/views/theme/backend/adminlte/widgets/payment.blade.php +++ b/resources/views/theme/backend/adminlte/widgets/payment.blade.php @@ -14,7 +14,7 @@ @foreach ($x as $oo)