fix: Check empty scan validity date when empty scan data is empty.
This commit is contained in:
@@ -160,8 +160,7 @@ void MainWindow::checkEmptyScanValidity()
|
||||
QDate lastScanDate = SQLHelper::queryValue("SELECT ScanDateTime FROM EScan ORDER BY ScanDateTime DESC LIMIT 1").toDate();
|
||||
QDate expirationScanDate = lastScanDate.addMonths(1);
|
||||
QDate currentDate = QDate::currentDate();
|
||||
|
||||
if(currentDate.daysTo(expirationScanDate) < 0)
|
||||
if(lastScanDate.isNull() || currentDate.daysTo(expirationScanDate) < 0)
|
||||
{
|
||||
mTabWidget->setTabEnabled(0, false);
|
||||
mTabWidget->setTabEnabled(1, false);
|
||||
|
||||
Reference in New Issue
Block a user