diff --git a/appver.h b/appver.h
index 760f9a3..0d5920d 100644
--- a/appver.h
+++ b/appver.h
@@ -8,7 +8,7 @@
#define APP_MAJOR 0
#define APP_MINOR 0
#define APP_PATCH 0
-#define APP_COMMIT 287
+#define APP_COMMIT 288
#define FILE_VER APP_MAJOR,APP_MINOR,APP_PATCH,APP_COMMIT // обязательно запятые!
#define PRODUCT_VER FILE_VER
diff --git a/lang/snap_ru_RU.ts b/lang/snap_ru_RU.ts
index 9f6e56a..fe1b425 100644
--- a/lang/snap_ru_RU.ts
+++ b/lang/snap_ru_RU.ts
@@ -3832,52 +3832,52 @@ p, li { white-space: pre-wrap; }
-
+
Результат диагностики изменён на "%1"
-
+
Статус заказа изменён на "%1"
-
+
Заказаз-наряд %1 изъят из ячейки "%2"
-
+
Заказаз-наряд %1 перемещён в ячейку "%2"
-
+
Заказаз-наряд %1 помещён в ячейку "%2"
-
+
Предоплата в размере %1
-
+
Возврат предоплаты в размере %1
-
+
Стоимость ремонта в результатах диагностики изменёна на %1
-
+
Статус информирования клиента изменён на "%1"
-
+
Устройство принято в ремонт №%1
diff --git a/models/sabstractitemmodel.cpp b/models/sabstractitemmodel.cpp
index fbaeda9..47a3658 100644
--- a/models/sabstractitemmodel.cpp
+++ b/models/sabstractitemmodel.cpp
@@ -106,7 +106,7 @@ int SAbstractItemModel::rowByDatabaseID(int id, QString searchField)
int SAbstractItemModel::databaseIDByRow(int row, int column)
{
if(row == -1)
- return -1;
+ return 0;
return abstractItemModel->index(row, column).data().toInt();
}
diff --git a/models/srepairmodel.cpp b/models/srepairmodel.cpp
index c8b1e28..c4e74de 100644
--- a/models/srepairmodel.cpp
+++ b/models/srepairmodel.cpp
@@ -413,7 +413,10 @@ void SRepairModel::setEngineer(const int id)
void SRepairModel::setEngineerIndex(const int index)
{
if(index == -1)
+ {
setEngineer(0);
+ return;
+ }
setEngineer(engineersModel->databaseIDByRow(index));
}
diff --git a/tabrepairnew.ui b/tabrepairnew.ui
index 9071f95..8b6a6db 100644
--- a/tabrepairnew.ui
+++ b/tabrepairnew.ui
@@ -417,7 +417,7 @@
-
- false
+ true
Быстрый ремонт
diff --git a/widgets/srepairstablefiltermenu.cpp b/widgets/srepairstablefiltermenu.cpp
index fda7aaf..6585018 100644
--- a/widgets/srepairstablefiltermenu.cpp
+++ b/widgets/srepairstablefiltermenu.cpp
@@ -158,16 +158,22 @@ void SRepairsTableFilterMenu::slotHidden()
m_filter->onlyCurrentUsersRepairs = ui->checkBoxOnlyCurrentUsersRepairs->isChecked();
m_filter->officeNot = ui->pushButtonOfficeNot->isChecked();
- if (officeModelBuf)
+ if (officeModelBuf && ui->comboBoxOffice->currentIndex() >= 0)
m_filter->office = officeModelBuf->databaseIDByRow(ui->comboBoxOffice->currentIndex());
+ else
+ m_filter->office = -1;
m_filter->repairStateNot = ui->pushButtonRepairStateNot->isChecked();
- if (repairStateModelBuf)
+ if (repairStateModelBuf && ui->comboBoxRepairState->currentIndex() >= 0)
m_filter->repairState = repairStateModelBuf->databaseIDByRow(ui->comboBoxRepairState->currentIndex());
+ else
+ m_filter->repairState = -1;
m_filter->employeeNot = ui->pushButtonEmployeeNot->isChecked();
- if (employeeModelBuf)
+ if (employeeModelBuf && ui->comboBoxEmployee->currentIndex() >= 0)
m_filter->employee = employeeModelBuf->databaseIDByRow(ui->comboBoxEmployee->currentIndex());
+ else
+ m_filter->employee = -1;
m_filter->clientsCatNot = ui->pushButtonClientsCatNot->isChecked();
if (clientsCatModelBuf)