export sales works now
This commit is contained in:
parent
dc54809146
commit
c82378dfa9
5 changed files with 61 additions and 8 deletions
|
@ -68,6 +68,8 @@ MainWindow::MainWindow()
|
|||
&MainWindow::onImportSellerJsonActionTriggered);
|
||||
connect(ui_.exportSellerJsonAction, &QAction::triggered, this,
|
||||
&MainWindow::onExportSellerJsonActionTriggered);
|
||||
connect(ui_.exportSalesJsonAction, &QAction::triggered, this,
|
||||
&MainWindow::onExportSalesJsonActionTriggered);
|
||||
}
|
||||
|
||||
void MainWindow::onActionEditSellerTriggered()
|
||||
|
@ -276,11 +278,19 @@ void MainWindow::onImportSellerJsonActionTriggered()
|
|||
JsonUtil::importSellers(filename.toStdString(), marketplace_.get());
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::onExportSellerJsonActionTriggered()
|
||||
{
|
||||
auto filename = QFileDialog::getSaveFileName(this, "Verkäufer exportieren", QString(),
|
||||
"JSON Dateien (*.json)");
|
||||
|
||||
JsonUtil::exportSellers(filename.toStdString(), marketplace_.get());
|
||||
}
|
||||
|
||||
void MainWindow::onExportSalesJsonActionTriggered()
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
auto filename = QFileDialog::getSaveFileName(this, "Umsätze/Transaktionen exportieren",
|
||||
QString(), "JSON Dateien (*.json)");
|
||||
JsonUtil::exportSales(filename.toStdString(), marketplace_.get(), settings.value("global/cashPointNo").toInt());
|
||||
}
|
|
@ -35,6 +35,7 @@ class MainWindow : public QMainWindow
|
|||
void onImportSellerExcelActionTriggered();
|
||||
void onImportSellerJsonActionTriggered();
|
||||
void onExportSellerJsonActionTriggered();
|
||||
void onExportSalesJsonActionTriggered();
|
||||
void setSaleModel();
|
||||
|
||||
Ui::MainWindow ui_;
|
||||
|
|
|
@ -421,15 +421,16 @@ drucken</string>
|
|||
<addaction name="aboutAction"/>
|
||||
<addaction name="aboutQtAction"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuExtras">
|
||||
<widget class="QMenu" name="menuSales">
|
||||
<property name="title">
|
||||
<string>&Extras</string>
|
||||
<string>&Umsätze</string>
|
||||
</property>
|
||||
<addaction name="reportAction"/>
|
||||
<addaction name="exportSalesJsonAction"/>
|
||||
</widget>
|
||||
<addaction name="menu_Datei"/>
|
||||
<addaction name="menu_Edit"/>
|
||||
<addaction name="menuExtras"/>
|
||||
<addaction name="menuSales"/>
|
||||
<addaction name="menuHilfe"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
|
@ -482,6 +483,11 @@ drucken</string>
|
|||
<string>Aus JSON-Datei</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="exportSalesJsonAction">
|
||||
<property name="text">
|
||||
<string>Exportieren (JSON)</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue