garcez Posted March 17, 2020 Report Share Posted March 17, 2020 Is there a way to prevent the same aircraft from being booked by two pilots at the same time? And what about this aircraft that was reserved to be released again to be reserved only after the flight has ended? Thanks for any help. Quote Link to comment Share on other sites More sharing options...
web541 Posted March 17, 2020 Report Share Posted March 17, 2020 You'd have to adjust the schedule_results.php file and add some lines of code there, maybe before this line https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/templates/schedule_results.php#L18 For example: <?php $allbids = SchedulesData::getAllBids(); foreach($allbids as $bid) { if ($bid->aircraft == $schedule->aircraft) { continue; } } ?> That will hide the schedule completely if the aircraft has been booked already, if you want to show the schedule but not show the "Add to bid" button then you will need to add that further down in the file and adjust the code here https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/templates/schedule_results.php#L43 Quote Link to comment Share on other sites More sharing options...
garcez Posted March 17, 2020 Author Report Share Posted March 17, 2020 20 minutes ago, web541 said: You'd have to adjust the schedule_results.php file and add some lines of code there, maybe before this line https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/templates/schedule_results.php#L18 For example: <?php $allbids = SchedulesData::getAllBids(); foreach($allbids as $bid) { if ($bid->aircraft == $schedule->aircraft) { continue; } } ?> That will hide the schedule completely if the aircraft has been booked already, if you want to show the schedule but not show the "Add to bid" button then you will need to add that further down in the file and adjust the code here https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/templates/schedule_results.php#L43 Thank you I will try and return. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.