v2.31
Fix migrations
This commit is contained in:
@@ -2353,7 +2353,7 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
|||||||
$item_staff = Staff::getName($create_action['who']);
|
$item_staff = Staff::getName($create_action['who']);
|
||||||
$item_time = $create_action['time'];
|
$item_time = $create_action['time'];
|
||||||
$item_printer = Printer::getName(Dishes::GetPrinterCode($item_menu_code));
|
$item_printer = Printer::getName(Dishes::GetPrinterCode($item_menu_code));
|
||||||
$item_work_place = Terminal::getNameByWorkGroup($create_action['work_group'], $create_action['work_code']);
|
$item_work_place = Terminal::getNameByWorkGroup(intval($create_action['work_group']), intval($create_action['work_code']));
|
||||||
$items_array = array(
|
$items_array = array(
|
||||||
'shift_id' => $shift_id,
|
'shift_id' => $shift_id,
|
||||||
'work_place' => $item_work_place,
|
'work_place' => $item_work_place,
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ class UpdateCoreInterface230 extends Migration
|
|||||||
if (!is_dir(CORE_PATH . '/../../web/libs/datatables/')) {
|
if (!is_dir(CORE_PATH . '/../../web/libs/datatables/')) {
|
||||||
mkdir(CORE_PATH . '/../../web/libs/datatables/', 0777);
|
mkdir(CORE_PATH . '/../../web/libs/datatables/', 0777);
|
||||||
} else {
|
} else {
|
||||||
|
if (!is_dir(CORE_PATH . '/../../web/libs/datatables/backup/')) {
|
||||||
mkdir(CORE_PATH . '/../../web/libs/datatables/backup/', 0777);
|
mkdir(CORE_PATH . '/../../web/libs/datatables/backup/', 0777);
|
||||||
|
}
|
||||||
$old_files = array_diff(scandir(CORE_PATH . '/../../web/libs/datatables/'), array('.', '..'));
|
$old_files = array_diff(scandir(CORE_PATH . '/../../web/libs/datatables/'), array('.', '..'));
|
||||||
foreach ($old_files as $old_file) {
|
foreach ($old_files as $old_file) {
|
||||||
copy(CORE_PATH . '/../../web/libs/datatables/' . $old_file, CORE_PATH . '/../../web/libs/datatables/backup/' . $old_file);
|
copy(CORE_PATH . '/../../web/libs/datatables/' . $old_file, CORE_PATH . '/../../web/libs/datatables/backup/' . $old_file);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Terminal extends Model {
|
|||||||
{
|
{
|
||||||
$terminal_name = self::where('id', intval($id))
|
$terminal_name = self::where('id', intval($id))
|
||||||
->first();
|
->first();
|
||||||
if ($terminal_name) {
|
if ($terminal_name && $terminal_name['name'] !== null) {
|
||||||
$terminal_name = $terminal_name['name'];
|
$terminal_name = $terminal_name['name'];
|
||||||
} else {
|
} else {
|
||||||
$terminal_name = 'Наименование рабочего места отсутствует';
|
$terminal_name = 'Наименование рабочего места отсутствует';
|
||||||
@@ -23,8 +23,9 @@ class Terminal extends Model {
|
|||||||
{
|
{
|
||||||
$terminal_name = self::where('work_group', intval($group_id))
|
$terminal_name = self::where('work_group', intval($group_id))
|
||||||
->where('work_code', intval($group_code))
|
->where('work_code', intval($group_code))
|
||||||
|
->where('is_active', 1)
|
||||||
->first();
|
->first();
|
||||||
if ($terminal_name) {
|
if ($terminal_name && $terminal_name['name'] !== null) {
|
||||||
$terminal_name = $terminal_name['name'];
|
$terminal_name = $terminal_name['name'];
|
||||||
} else {
|
} else {
|
||||||
$terminal_name = 'Наименование рабочего места отсутствует';
|
$terminal_name = 'Наименование рабочего места отсутствует';
|
||||||
|
|||||||
Reference in New Issue
Block a user