Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $firstTime=strtotime($model->in_time);
- $lastTime=strtotime($model->out_time);
- $timeDiff=ceil(($lastTime-$firstTime)/60);
- if($timeDiff <=30)
- $model->price_charged = 4;
- elseif($timeDiff >30 && $timeDiff <=60)
- $model->price_charged = 6;
- else{
- }
- throw new CException ( $model->out_time.'-'.$model->in_time.'='.$timeDiff.' Amount '.$model->price_charged);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement