From cb9fdaeb6340b8a8fe736ad2dfb8b0123f727e69 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Tue, 25 May 2021 00:39:13 +0900 Subject: [PATCH] created simplified mining tax invoice --- app/Http/Controllers/Test/TestController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Test/TestController.php b/app/Http/Controllers/Test/TestController.php index fd844c086..d8a2d7b4c 100644 --- a/app/Http/Controllers/Test/TestController.php +++ b/app/Http/Controllers/Test/TestController.php @@ -85,21 +85,20 @@ class TestController extends Controller */ foreach($mains as $main) { //Declare some variables for each run through the for loop - $ledge = array(); - $ledgers = array(); $mainLedgerCount = 0; - $alts = new Collection; + $ledgers = array(); //Count the ledgers for the main $mainLedgerCount = Ledger::where([ 'character_id' => $main->character_id, + 'invoiced' => 'Yes', ])->where('last_updated', '>', Carbon::now()->subMonths(3))->count(); //If there are ledgers for the main, then let's grab them if($mainLedgerCount > 0) { $mainLedgers = Ledger::where([ 'character_id' => $main->character_id, - 'invoiced' => 'No', + 'invoiced' => 'Yes', ])->where('last_updated', '>', Carbon::now()->subMonths(3))->get(); //Cycle through the entries, and add them to the ledger to send with the invoice