From 0b4041c13a43f67a5324318c7dc634b5a2d66595 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Tue, 9 Oct 2018 11:55:20 +0200 Subject: [PATCH] propose filename when exporting sales as json --- src/gui/mainwindow.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 929ee2c..3460e10 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -163,7 +163,6 @@ void MainWindow::onActionEditSellerTriggered() setSaleModel(); updateStatLabel(); - } void MainWindow::setSaleModel() @@ -195,7 +194,6 @@ void MainWindow::onPaidButtonTriggered() ui_.sellerNoEdit->setFocus(); statusBar()->showMessage("Verkaufsvorgang erfolgreich durchgeführt.", STATUSBAR_TIMEOUT); updateStatLabel(); - } } @@ -445,7 +443,6 @@ void MainWindow::onImportSellerExcelActionTriggered() ExcelReader::readSellersFromFile(filePath, marketplace_.get()); updateStatLabel(); - } void MainWindow::onImportSellerJsonActionTriggered() @@ -468,7 +465,6 @@ void MainWindow::onImportSellerJsonActionTriggered() JsonUtil::importSellers(filePath, marketplace_.get()); updateStatLabel(); - } void MainWindow::onExportSellerJsonActionTriggered() @@ -488,8 +484,10 @@ void MainWindow::onExportSalesJsonActionTriggered() { QSettings settings; - auto filename = QFileDialog::getSaveFileName(this, "Umsätze/Transaktionen exportieren", - QString(), "JSON Dateien (*.json)"); + auto filename = QFileDialog::getSaveFileName( + this, "Umsätze/Transaktionen exportieren", + QString("kima2_umsaetze_kasse") + settings.value("global/cashPointNo").toString() + ".json", + "JSON Dateien (*.json)"); if (filename.isEmpty()) return; @@ -523,7 +521,6 @@ void MainWindow::onImportSalesJsonActionTriggered() } setSaleModel(); updateStatLabel(); - } void MainWindow::writeGeometry()