Field::isBefore($value)
Version 3.8
Check if value is smaller than given value
Version 3.8
Check if value is smaller than given value
Return true if value is smaller than given value.
Can be used for semantic clarification: - amount->isUnder() - date->isBefore()
Bool
Date: Set status to 'Due' if duedate has gone:
if ( $Invoice->duedate->isBefore('today') ){
$Invoice->status->setValue('Due');
}
Selection: Set 'Billed' to 'No' if status is something before 'Billed' -option:
if ( $Invoice->status->isBefore('Billed') ){
$Invoice->billed->setValue('No');
}