This commit is contained in:
miroman-afk
2023-05-04 10:41:36 +03:00
parent fb46c8e739
commit 5c3a8a464b
13 changed files with 623 additions and 251 deletions

View File

@@ -78,7 +78,7 @@ class Client extends Model
if (isset($client_name)) {
$client_name = $client_name['name'];
} else {
$client_name = 'Связанный персонал не найден';
$client_name = 'Связанный гость не найден';
}
return $client_name;
}

View File

@@ -85,6 +85,19 @@ class Dishes extends Model {
$printer_code = 0;
}
}
if ($printer_code == 0) {
$dish = Dishes::where('code', $data)->where('is_history', 0)->first();
if ($dish) {
$printer_code = $dish['printer_code'];
} else {
$dish = Dishes::where('code', $data)->where('is_history', 1)->first();
if ($dish) {
$printer_code = $dish['printer_code'];
} else {
$printer_code = 0;
}
}
}
return $printer_code;
}
}