moon rental update

This commit is contained in:
2019-06-05 02:55:04 -05:00
parent 78271d7ffa
commit 1778b61018

View File

@@ -320,30 +320,30 @@ class MoonsAdminController extends Controller
'Moon' => $moon,
])->delete();
if($allianceId = 99004116) {
MoonRental::insert([
'System' => $system,
'Planet' => $planet,
'Moon' => $moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['alliance'],
'Type' => 'alliance',
'Paid' => 'No',
]);
if($allianceId == 99004116) {
$store = new MoonRental;
$store->System = $system;
$store->Planet = $planet;
$store->Moon = $moon;
$store->RentalCorp = $request->renter;
$store->RentalEnd = $date;
$store->Contact = $contact;
$store->Price = $price['alliance'];
$store->Type = 'alliance';
$store->Paid = $paid;
$store->save();
} else {
MoonRental::insert([
'System' => $system,
'Planet' => $planet,
'Moon' => $moon,
'RentalCorp' => $request->renter,
'RentalEnd' => $date,
'Contact' => $contact,
'Price' => $price['outofalliance'],
'Type' => 'outofalliance',
'Paid' => 'No',
]);
$store = new MoonRental;
$store->System = $system;
$store->Planet = $planet;
$store->Moon = $moon;
$store->RentalCorp = $request->renter;
$store->RentalEnd = $date;
$store->Contact = $contact;
$store->Price = $price['outofalliance'];
$store->Type = 'outofalliance';
$store->Paid = $paid;
$store->save();
}
}