Jump to content

Prevent the same aircraft from being booked by two pilots


garcez

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...