File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1148,7 +1148,9 @@ public function getAssetAcceptanceReport($deleted = false) : View
11481148 $ query ->withTrashed ();
11491149 }
11501150
1151- $ itemsForReport = $ query ->get ()->map (fn ($ unaccepted ) => Checkoutable::fromAcceptance ($ unaccepted ));
1151+ $ itemsForReport = $ query ->get ()
1152+ ->filter (fn ($ unaccepted ) => $ unaccepted ->checkoutable )
1153+ ->map (fn ($ unaccepted ) => Checkoutable::fromAcceptance ($ unaccepted ));
11521154
11531155 return view ('reports/unaccepted_assets ' , compact ('itemsForReport ' ,'showDeleted ' ));
11541156 }
@@ -1288,7 +1290,9 @@ public function postAssetAcceptanceReport($deleted = false) : Response
12881290 $ acceptances ->withTrashed ();
12891291 }
12901292
1291- $ itemsForReport = $ acceptances ->get ()->map (fn ($ unaccepted ) => Checkoutable::fromAcceptance ($ unaccepted ));
1293+ $ itemsForReport = $ acceptances ->get ()
1294+ ->filter (fn ($ unaccepted ) => $ unaccepted ->checkoutable )
1295+ ->map (fn ($ unaccepted ) => Checkoutable::fromAcceptance ($ unaccepted ));
12921296
12931297 $ rows = [];
12941298
You can’t perform that action at this time.
0 commit comments