use path to open json file (sales)

This commit is contained in:
Martin Brodbeck 2018-08-09 13:02:33 +02:00
parent 7227cdc8a3
commit be1d731de3
1 changed files with 3 additions and 1 deletions

View File

@ -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,