Field::notChanged()

Version 3.8

Check if value has not been modifyed

Returns TRUE if value has not been changed.

Return value

Bool

Full documentation

Subtract the change of hours_done from hours_todo, if hours_todo is not changed manually:

if ( $Order->hours_done->isChanged() && $Order->hours_todo->notChanged() ){
    $Order->hours_todo->vahenna( $Order->hours_done->getChange() );
}