diff --git a/app/Console/Commands/GetAssets.php b/app/Console/Commands/GetAssets.php index daea9b7e5..8c76ce9c6 100644 --- a/app/Console/Commands/GetAssets.php +++ b/app/Console/Commands/GetAssets.php @@ -20,7 +20,7 @@ use Seat\Eseye\Eseye; use App\Models\Jobs\JobProcessAssets; -class GetAssets extends Command +class GetAssetsCommand extends Command { /** * The name and signature of the console command. diff --git a/app/Console/Commands/GetStructures.php b/app/Console/Commands/GetStructures.php index 8e8db9c24..5c08d8d55 100644 --- a/app/Console/Commands/GetStructures.php +++ b/app/Console/Commands/GetStructures.php @@ -19,7 +19,7 @@ use Seat\Eseye\Eseye; //Models use App\Models\Jobs\JobProcessStructure; -class GetStructures extends Command +class GetStructuresCommand extends Command { /** * The name and signature of the console command. diff --git a/app/Http/Controllers/Moons/MoonsAdminController.php b/app/Http/Controllers/Moons/MoonsAdminController.php index 69e6544f8..241d1e8a1 100644 --- a/app/Http/Controllers/Moons/MoonsAdminController.php +++ b/app/Http/Controllers/Moons/MoonsAdminController.php @@ -87,6 +87,16 @@ class MoonsAdminController extends Controller 'Contact' => $contact, ])->first(); + //Calculate the price of the moon for when it's updated + $moon = Moon::where([ + 'System' => $request->system, + 'Planet' => $request->planet, + 'Moon' => $request->moon, + ])->get()->toArray(); + + $price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity, + $moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity); + if($found && $request->removal != true) { if($allianceId = 99004116) { MoonRental::where([ @@ -178,8 +188,6 @@ class MoonsAdminController extends Controller //Setup calls to the MoonCalc class $moonCalc = new MoonCalc(); - //Update the prices for the moon - $moonCalc->FetchNewPrices(); //Get all of the moons from the database $moons = Moon::orderBy('System', 'asc')->get(); //Declare the html variable and set it to null diff --git a/app/Http/Controllers/Moons/MoonsController.php b/app/Http/Controllers/Moons/MoonsController.php index 364b8f7f2..0a980ae3e 100644 --- a/app/Http/Controllers/Moons/MoonsController.php +++ b/app/Http/Controllers/Moons/MoonsController.php @@ -37,8 +37,6 @@ class MoonsController extends Controller $type = Auth::user()->user_type; //Setup calls to the MoonCalc class $moonCalc = new MoonCalc(); - //Update the prices for the moon - $moonCalc->FetchNewPrices(); //get all of the moons from the database $moons = DB::table('Moons')->orderBy('System', 'asc')->get(); //Set the rental date as last month for moons not rented @@ -126,8 +124,6 @@ class MoonsController extends Controller //Setup calls to the MoonCalc class $moonCalc = new MoonCalc(); - //Update the prices for the moon - $moonCalc->FetchNewPrices(); $totalGoo = $moonCalc->SpatialMoonsOnlyGooTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity, $thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);