v.2.24
1. Редактор карты зала.
This commit is contained in:
@@ -43,4 +43,20 @@ class Dishes extends Model {
|
||||
}
|
||||
return $isReal;
|
||||
}
|
||||
|
||||
public static function isServing($data) {
|
||||
$dish_isServing = Dishes::where('code', $data)->where('is_history', 0)->first();
|
||||
$isServing = 0;
|
||||
if ($dish_isServing) {
|
||||
$isServing = intval($dish_isServing['is_serving']);
|
||||
} else {
|
||||
$dish_isServing = Dishes::where('code', $data)->where('is_history', 1)->first();
|
||||
if ($dish_isServing) {
|
||||
$isServing = intval($dish_isServing['is_serving']);
|
||||
} else {
|
||||
$isServing = 0;
|
||||
}
|
||||
}
|
||||
return $isServing;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user