Duplicating Restruants not working #4750

This commit is contained in:
Pererinha 2015-02-13 16:43:33 -02:00
parent 82fbf156c4
commit e7e03ef539

View File

@ -247,12 +247,15 @@ class Crunchbutton_Restaurant extends Cana_Table_Trackchange {
public function activeDrivers(){
$community = $this->community()->get( 0 );
$activeDrivers = 0;
if( $community->id_community ){
$drivers = $community->getDriversOfCommunity();
foreach( $drivers as $driver ){
if( $driver->isWorking() ){
$activeDrivers++;
}
}
}
return $activeDrivers;
}