Added pay voucher feature. Added dialog with paied vouchers. Added

support for printing receipts on POS printer.
This commit is contained in:
Rokos Josef
2016-07-01 14:37:33 +02:00
parent a89b0381b1
commit e6dfc8ec21
29 changed files with 1123 additions and 8 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "paydialog.h"
#include "ui_paydialog.h"
PayDialog::PayDialog(QDecDouble total, QWidget *parent) :
QDialog(parent),
ui(new Ui::PayDialog)
{
ui->setupUi(this);
m_total = total;
ui->labelTotal->setText(QString::number(total.toDouble(), 'f', 2));
ui->labelReturn->setText(QString::number(0, 'f', 2));
}
PayDialog::~PayDialog()
{
delete ui;
}
void PayDialog::on_recieved_valueChanged(double value)
{
if (value >= m_total.toDouble())
{
ui->buttonBox->setEnabled(true);
ui->labelReturn->setText(QString::number(value - m_total.toDouble(), 'f', 2));
}
else
{
ui->buttonBox->setEnabled(false);
ui->labelReturn->setText(QString::number(0, 'f', 2));
}
}