diff --git a/Http/Controllers/ReportController.php b/Http/Controllers/ReportController.php index bdd7af0..ed50a66 100644 --- a/Http/Controllers/ReportController.php +++ b/Http/Controllers/ReportController.php @@ -72,6 +72,8 @@ ->leftJoin('detail_pembayaran', 'hapus_buku.nomor_pinjaman', '=', 'detail_pembayaran.nomor_pinjaman') ->where('tanggal_hapus_buku', '<=', request()->get('start_date')) ->whereRelation('debitur', 'name', 'like', '%' . request()->get('debitur') . '%') + ->where('detail_pembayaran.deleted_at', null) + ->groupBy('detail_pembayaran.tanggal_pembayaran') ->get(); } else { $data = HapusBuku::with([ @@ -86,6 +88,8 @@ ->where('tanggal_hapus_buku', '<=', request()->get('start_date')) ->where('kode_cabang', request()->get('kode_cabang')) ->whereRelation('debitur', 'name', 'like', '%' . request()->get('debitur') . '%') + ->where('detail_pembayaran.deleted_at', null) + ->groupBy('detail_pembayaran.tanggal_pembayaran') ->get(); }