Skip to content

Commit

Permalink
Исправлена ошибка при приёме в ремонт устройств и картриджей.
Browse files Browse the repository at this point in the history
  • Loading branch information
solderercb committed Jan 12, 2024
1 parent 80e5376 commit d820ae6
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion appver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions lang/snap_ru_RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3832,52 +3832,52 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="434"/>
<location filename="../models/srepairmodel.cpp" line="437"/>
<source>Результат диагностики изменён на &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="481"/>
<location filename="../models/srepairmodel.cpp" line="484"/>
<source>Статус заказа изменён на &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="632"/>
<location filename="../models/srepairmodel.cpp" line="635"/>
<source>Заказаз-наряд %1 изъят из ячейки &quot;%2&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="640"/>
<location filename="../models/srepairmodel.cpp" line="643"/>
<source>Заказаз-наряд %1 перемещён в ячейку &quot;%2&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="642"/>
<location filename="../models/srepairmodel.cpp" line="645"/>
<source>Заказаз-наряд %1 помещён в ячейку &quot;%2&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="730"/>
<location filename="../models/srepairmodel.cpp" line="733"/>
<source>Предоплата в размере %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="735"/>
<location filename="../models/srepairmodel.cpp" line="738"/>
<source>Возврат предоплаты в размере %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="781"/>
<location filename="../models/srepairmodel.cpp" line="784"/>
<source>Стоимость ремонта в результатах диагностики изменёна на %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="948"/>
<location filename="../models/srepairmodel.cpp" line="951"/>
<source>Статус информирования клиента изменён на &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../models/srepairmodel.cpp" line="1086"/>
<location filename="../models/srepairmodel.cpp" line="1089"/>
<source>Устройство принято в ремонт №%1</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion models/sabstractitemmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
3 changes: 3 additions & 0 deletions models/srepairmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
2 changes: 1 addition & 1 deletion tabrepairnew.ui
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="labelIsQuick">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="text">
<string>Быстрый ремонт</string>
Expand Down
12 changes: 9 additions & 3 deletions widgets/srepairstablefiltermenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d820ae6

Please sign in to comment.