use path to open json file (sales)
This commit is contained in:
parent
7227cdc8a3
commit
be1d731de3
1 changed files with 3 additions and 1 deletions
|
@ -439,9 +439,11 @@ void MainWindow::onImportSalesJsonActionTriggered()
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
std::filesystem::path filePath(filename.toStdWString());
|
||||||
|
|
||||||
delete ui_.salesView->model();
|
delete ui_.salesView->model();
|
||||||
try {
|
try {
|
||||||
JsonUtil::importSales(filename.toStdString(), marketplace_.get(),
|
JsonUtil::importSales(filePath, marketplace_.get(),
|
||||||
settings.value("global/cashPointNo").toInt());
|
settings.value("global/cashPointNo").toInt());
|
||||||
} catch (std::runtime_error& err) {
|
} catch (std::runtime_error& err) {
|
||||||
QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok,
|
QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok,
|
||||||
|
|
Loading…
Reference in a new issue