diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 4d4659f..280ca62 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -439,9 +439,11 @@ void MainWindow::onImportSalesJsonActionTriggered() if (filename.isEmpty()) return; + std::filesystem::path filePath(filename.toStdWString()); + delete ui_.salesView->model(); try { - JsonUtil::importSales(filename.toStdString(), marketplace_.get(), + JsonUtil::importSales(filePath, marketplace_.get(), settings.value("global/cashPointNo").toInt()); } catch (std::runtime_error& err) { QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok,