Add checking for rider availability when saving JO. #422
This commit is contained in:
parent
86a5c117e3
commit
661e048206
1 changed files with 4 additions and 0 deletions
|
|
@ -544,6 +544,10 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
|
||||
if (empty($rider)) {
|
||||
$error_array['rider'] = 'Invalid rider specified.';
|
||||
} else {
|
||||
// check if rider is still available
|
||||
if (!($rider->isAvailable()))
|
||||
$error_array['rider'] = 'Selected rider is unavailable.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue