You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
940 B
C++
40 lines
940 B
C++
#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
|
|
}
|