From 725bc8f04b50b7ce6eb5f3ca8917b8e728815cd7 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 8 Oct 2018 09:48:25 +0200 Subject: [PATCH 1/2] [Fix #5] show no of customers in print report --- src/gui/reportdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/reportdialog.cpp b/src/gui/reportdialog.cpp index 53fc9b1..0f84c5c 100644 --- a/src/gui/reportdialog.cpp +++ b/src/gui/reportdialog.cpp @@ -161,9 +161,10 @@ void ReportDialog::onPrintReportButtonClicked() (static_cast(numArticlesSold) / static_cast(numArticlesOffered)) * 100; content += QString("Registrierte Verkäufer: %1\n").arg(sellers.size() - 1, 6); content += QString("Angelieferte Artikel: %1\n").arg(numArticlesOffered, 6); - content += QString("Verkaufte Artikel: %1 (%L2 %)\n\n") + content += QString("Verkaufte Artikel: %1 (%L2 %)\n") .arg(numArticlesSold, 6) .arg(percentArticlesSold, 0, 'f', 2); + content += QString("Anzahl Kunden: %1\n\n").arg(market_->getSales().size(), 6); content += QString("Gesamtumsatz: %1\n").arg(market_->getOverallSumAsString().c_str(), 10); content += QString("Ausgezahlt: %1\n") From 271aac0914da1cfb97a0e76a9b6ea4b3f235f340 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 8 Oct 2018 09:52:41 +0200 Subject: [PATCH 2/2] small code improvement --- src/gui/basketmodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/basketmodel.cpp b/src/gui/basketmodel.cpp index a148b84..5f437ac 100644 --- a/src/gui/basketmodel.cpp +++ b/src/gui/basketmodel.cpp @@ -20,20 +20,19 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const { if (role == Qt::FontRole) { QFont myFont; - myFont.setPointSize(14); QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont); - myFixedFont.setPointSize(14); switch (index.column()) { case 0: [[fallthrough]]; case 1: - myFixedFont.setPointSize(11); return myFixedFont; case 2: + myFixedFont.setPointSize(myFixedFont.pointSize() + 3); return myFixedFont; case 3: + myFixedFont.setPointSize(myFixedFont.pointSize() + 3); return myFixedFont; } }