#include "shopoverview.h" #include "ui_shopoverview.h" #include "shopservice.h" ShopOverview::ShopOverview(QWidget *parent) : QFrame(parent), ui(new Ui::ShopOverview) { ui->setupUi(this); #ifndef EET ui->labelUnsendEET->setVisible(false); ui->label_6->setVisible(false); #endif } ShopOverview::~ShopOverview() { delete ui; } void ShopOverview::refresh() { ShopService srv; VoucherSum unpaid = srv.unpaidSummary(); ui->labelUnapiedCount->setText(QString::number(unpaid.count())); ui->labelUnpaiedAmount->setText(QString::number(unpaid.totalPrice().toDouble())); VoucherSum today = srv.salesSummary(QDate::currentDate()); ui->labelSales->setText(QString::number(today.totalPrice().toDouble())); ui->labelNumSales->setText(QString::number(today.count())); #ifdef EET VoucherSum unsend = srv.unsendEET(); ui->labelUnsendEET->setText(QString::number(unsend.count())); #endif }