diff --git a/app/Classes/Modules/Exports/Services/ExportsAnalyticBillingTransactions.php b/app/Classes/Modules/Exports/Services/ExportsAnalyticBillingTransactions.php index 6f2ed686..3aad5c9d 100644 --- a/app/Classes/Modules/Exports/Services/ExportsAnalyticBillingTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsAnalyticBillingTransactions.php @@ -53,7 +53,11 @@ class ExportsAnalyticBillingTransactions implements FromCollection, WithHeadings */ public function collection() { - return Transaction::where('type', 3)->where('created_at', '>=', Carbon::now()->subYear())->get(); + return Transaction::where('type', 3) + ->where('created_at', '>=', Carbon::now()->subYear()) + ->orderBy('created_at', 'desc') + ->take(10) + ->get(); } /**