From 0d7f2b7523d95e88a201ff8d2816fd83e931fc1b Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sat, 29 Dec 2018 21:26:11 -0600 Subject: [PATCH] mailer --- app/Console/Commands/calculatemarkettax.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/calculatemarkettax.php b/app/Console/Commands/calculatemarkettax.php index 0e16170ff..a1360c54e 100644 --- a/app/Console/Commands/calculatemarkettax.php +++ b/app/Console/Commands/calculatemarkettax.php @@ -15,6 +15,7 @@ use App\Models\Market\MonthlyMarketTax; use App\Models\ScheduledTask\ScheduleJob; use App\Models\Finances\CorpMarketJournal; use App\Models\Corporation\CorpStructure; +use App\Models\Character\CharacterToCorporation; @@ -83,12 +84,15 @@ class CalculateMarketTax extends Command //Get the info about the structures from the database $info = CorpStructure::where(['corporation_id' => $corp->corporation_id])->first(); + + $character = UserToCorporation::where(['character_id' => $info->character_id])->first(); + //Store the value in the database $bill = new MonthlyMarketTax; $bill->character_id = $info->character_id; - $bill->character_name = $info->character_name; + $bill->character_name = $character->character_name; $bill->corporation_id = $corp->corporation_id; - $bill->corporation_name = $info->corporation_name; + $bill->corporation_name = $character->corporation_name; $bill->tax_owed = $finalTaxes; $bill->month = $start->month; $bill->year = $start->year;