Compare commits

..

No commits in common. "d1c5d3a6f8e492e0f1cb2a4808694928a6707aab" and "50ec5b3015e594191b2f74df463ac7d0a5b13f18" have entirely different histories.

5 changed files with 6 additions and 48 deletions

View file

@ -37,19 +37,5 @@ void ExcelReader::readSellersFromFile(const std::string& filename, Marketplace*
market->getSellers().push_back(std::move(seller));
rowCount++;
}
// If there was no special seller "Sonderkonto" in import data, then create one
auto specialSeller = market->findSellerWithUuid("11111111-1111-1111-1111-111111111111");
if (!specialSeller) {
auto seller = std::make_unique<Seller>();
seller->setUuidFromString("11111111-1111-1111-1111-111111111111");
seller->setSellerNo(0);
seller->setLastName("Sonderkonto");
seller->setFirstName("Sonderkonto");
seller->setNumArticlesOffered(0);
market->getSellers().push_back(std::move(seller));
}
market->sortSellers();
market->storeToDb();
}

View file

@ -49,21 +49,6 @@ void JsonUtil::importSellers(const std::string& filename, Marketplace* market)
seller->setNumArticlesOffered(val["num_offered_articles"].asInt());
market->getSellers().push_back(std::move(seller));
}
// If there was no special seller "Sonderkonto" in import data, then create one
auto specialSeller = market->findSellerWithUuid("11111111-1111-1111-1111-111111111111");
if (!specialSeller) {
auto seller = std::make_unique<Seller>();
seller->setUuidFromString("11111111-1111-1111-1111-111111111111");
seller->setSellerNo(0);
seller->setLastName("Sonderkonto");
seller->setFirstName("Sonderkonto");
seller->setNumArticlesOffered(0);
market->getSellers().push_back(std::move(seller));
}
market->sortSellers();
market->storeToDb();
}

View file

@ -13,7 +13,6 @@ SellerDialog::SellerDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent,
model_ = std::make_unique<SellerModel>(market_, ui_.tableView);
ui_.tableView->setModel(model_.get());
ui_.tableView->setColumnHidden(0, true); // hide the uuid
ui_.tableView->setRowHidden(0, true); // hide the special "Sonderkonto" user
connect(ui_.newButton, &QPushButton::clicked, this, &SellerDialog::on_newButton_clicked);
connect(ui_.deleteButton, &QPushButton::clicked, this, &SellerDialog::on_deleteButton_clicked);
connect(model_.get(), &SellerModel::duplicateSellerNo, this,

View file

@ -1,7 +1,5 @@
#include "settingsdialog.h"
#include "mainwindow.h"
#include <database.h>
#include <posprinter.h>
@ -20,8 +18,6 @@ SettingsDialog::SettingsDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(par
int feeInPercent = settings.value("global/feeInPercent").toInt();
int maxFeeInEuro = settings.value("global/maxFeeInEuro").toInt();
market_ = dynamic_cast<MainWindow*>(parent)->getMarketplace();
ui_.cashPointNoSpinBox->setValue(cashPointNo);
// ui_.posPrinterDeviceEdit->setText(posPrinterDevice);
ui_.feePercentSpinBox->setValue(feeInPercent);
@ -60,17 +56,12 @@ void SettingsDialog::accept()
settings.setValue("global/maxFeeInEuro", ui_.maxFeeSpinBox->value());
if (oldCashPointNo != newCashPointNo) {
int result{0};
if (market_->getSales().size() > 0) {
result = QMessageBox(QMessageBox::Icon::Question, "Sind Sie sicher?",
"Möchten Sie die Kassen-Nr wirklich ändern? Diese muss über alle "
"Installationen hinweg eindeutig sein.",
QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No,
this)
.exec();
} else {
result = QMessageBox::Yes;
}
int result =
QMessageBox(QMessageBox::Icon::Question, "Sind Sie sicher?",
"Möchten Sie die Kassen-Nr wirklich ändern? Diese muss über alle "
"Installationen hinweg eindeutig sein.",
QMessageBox::StandardButton::Yes | QMessageBox::StandardButton::No, this)
.exec();
if (result == QMessageBox::Yes) {
try {
Database().updateCashPointNo(oldCashPointNo, newCashPointNo);

View file

@ -3,8 +3,6 @@
#include "ui_settingsdialog.h"
#include <marketplace.h>
#include <QDialog>
class SettingsDialog : public QDialog
@ -18,7 +16,6 @@ class SettingsDialog : public QDialog
private:
Ui::SettingsDialog ui_;
Marketplace* market_{};
};
#endif