v.2.28
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user