Skip to content

Commit

Permalink
Исправлена ошибка при выдаче устройства: Query error in SRepairModel:…
Browse files Browse the repository at this point in the history
… "Column 'reject_reason' cannot be null QMYSQL: Unable to execute query".
  • Loading branch information
solderercb committed Jan 10, 2024
1 parent 72c7c15 commit 3fb2fee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 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 285
#define APP_COMMIT 286

#define FILE_VER APP_MAJOR,APP_MINOR,APP_PATCH,APP_COMMIT // обязательно запятые!
#define PRODUCT_VER FILE_VER
Expand Down
3 changes: 2 additions & 1 deletion widgets/sdialogissuerepair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ void SDialogIssueRepair::issueRepairs()

repairModel->setBoxIndex(-1);
repairModel->setState(newState);
repairModel->setRejectReason(m_rejectReason);
if(!m_rejectReason.isEmpty())
repairModel->setRejectReason(m_rejectReason);
BOQModel->repair_saveTables(SSaleTableModel::RepairOpType::Sale);
repairModel->commit();
nErr = workshopIssuedModel->commit();
Expand Down
2 changes: 1 addition & 1 deletion widgets/sdialogissuerepair.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SDialogIssueRepair : public SModalWidget
bool m_isPayFromBalance = 0;
bool m_isIssuingInCredit = 0;
int m_paymentSystemId = 0;
QString m_rejectReason;
QString m_rejectReason = "";
QMap<QString, double> m_repairsWithPayment; // QString для удобства обработки
void setDefaultStyleSheets();
void initWidgets();
Expand Down

0 comments on commit 3fb2fee

Please sign in to comment.