update to login controller to fix issues
updated moons controller to give total worth rather than renter. Left admin side as renter.
This commit is contained in:
@@ -276,8 +276,8 @@ class LoginController extends Controller
|
||||
'corporation_id' => $character_info->corporation_id,
|
||||
]);
|
||||
|
||||
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->get(['entity_id']);
|
||||
$renter = AllowedLogin::where(['login_type' => 'Renter'])->get(['entity_id']);
|
||||
$legacy = AllowedLogin::where(['login_type' => 'Legacy'])->pluck('entity_id')->toArray();
|
||||
$renter = AllowedLogin::where(['login_type' => 'Renter'])->pluck('entity_id')->toArray();
|
||||
|
||||
//Send back the appropriate group
|
||||
if(isset($corp_info->alliance_id)) {
|
||||
|
||||
@@ -33,11 +33,11 @@ class MoonsAdminController extends Controller
|
||||
|
||||
$journal = DB::select('SELECT amount,reason,description,date FROM `player_donation_journal` WHERE corporation_id=98287666 AND date >= DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 MONTH) ORDER BY date DESC');
|
||||
|
||||
return view('moons.admin.moonjournal')->with('journal', $journal);
|
||||
return view('moons/admin/moonjournal')->with('journal', $journal);
|
||||
}
|
||||
|
||||
public function updateMoon() {
|
||||
return view('moons.admin.updatemoon');
|
||||
return view('moons/admin/updatemoon');
|
||||
}
|
||||
|
||||
public function storeUpdateMoon(Request $request) {
|
||||
@@ -138,7 +138,7 @@ class MoonsAdminController extends Controller
|
||||
}
|
||||
|
||||
public function addMoon() {
|
||||
return view('moons.admin.addmoon');
|
||||
return view('moons/admin/addmoon');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -236,6 +236,6 @@ class MoonsAdminController extends Controller
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
return view('moons.admin.adminmoon')->with('html', $html);
|
||||
return view('moons/admin/adminmoon')->with('html', $html);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,10 @@ class MoonsController extends Controller
|
||||
$rentalEnd = $rentalEnd->format('m-d');
|
||||
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
|
||||
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
|
||||
|
||||
$worth = $moonCalc->SpatialMoonsTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity,
|
||||
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);
|
||||
|
||||
//Add the data to the html string to be passed to the view
|
||||
$html .= '<tr>';
|
||||
$html .= '<td>' . $spm . '</td>';
|
||||
@@ -63,16 +67,16 @@ class MoonsController extends Controller
|
||||
} else {
|
||||
$html .= '<td>N/A</td>';
|
||||
}
|
||||
$html .= '<td>' . $moon->RentalCorp . '</td>';
|
||||
$html .= '<td>' . number_format($worth, "2", ".", ",") . '</td>';
|
||||
$html .= '<td>' . $rentalEnd . '</td>';
|
||||
$html .= '</tr>';
|
||||
}
|
||||
|
||||
return view('moons.user.moon')->with('html', $html);
|
||||
return view('moons/user/moon')->with('html', $html);
|
||||
}
|
||||
|
||||
public function displayTotalWorthForm() {
|
||||
return view('moons.user.formTotalWorth');
|
||||
return view('moons/user/formTotalWorth');
|
||||
}
|
||||
|
||||
public function displayTotalWorth(Request $request) {
|
||||
@@ -90,16 +94,12 @@ class MoonsController extends Controller
|
||||
//Update the prices for the moon
|
||||
$moonCalc->FetchNewPrices();
|
||||
|
||||
$totalGoo = $moonCalc->SpatialMoonsOnlyGooTotalWorth($firstOre, $firstQuantity,
|
||||
$secondOre, $secondQuantity,
|
||||
$thirdOre, $thirdQuantity,
|
||||
$fourthOre, $fourthQuantity);
|
||||
$totalGoo = $moonCalc->SpatialMoonsOnlyGooTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity,
|
||||
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);
|
||||
$totalGoo = number_format($totalGoo, 2, ".", ",");
|
||||
|
||||
$totalWorth = $moonCalc->SpatialMoonsTotalWorth($firstOre, $firstQuantity,
|
||||
$secondOre, $secondQuantity,
|
||||
$thirdOre, $thirdQuantity,
|
||||
$fourthOre, $fourthQuantity);
|
||||
$totalWorth = $moonCalc->SpatialMoonsTotalWorth($firstOre, $firstQuantity, $secondOre, $secondQuantity,
|
||||
$thirdOre, $thirdQuantity, $fourthOre, $fourthQuantity);
|
||||
$totalWorth = number_format($totalWorth, 2, ".", ",");
|
||||
|
||||
return view('moons.user.displayTotalWorth')->with(['totalWorth' => $totalWorth, 'totalGoo' => $totalGoo]);
|
||||
|
||||
Reference in New Issue
Block a user