|
|
@ -8,6 +8,9 @@
|
|
|
|
#include "shopservice.h"
|
|
|
|
#include "shopservice.h"
|
|
|
|
#include "eetbatchdialog.h"
|
|
|
|
#include "eetbatchdialog.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <reporting/reportdialog.h>
|
|
|
|
|
|
|
|
#include <reporting/variablefiller.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include "shop-odb.hxx"
|
|
|
|
#include "shop-odb.hxx"
|
|
|
|
|
|
|
|
|
|
|
|
PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
|
|
|
|
PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
|
|
|
@ -140,3 +143,22 @@ void PaydVouchersDialog::on_btnSendEet_clicked()
|
|
|
|
dialog->addLog((msg.isEmpty() && !sent) ? "\n" : ": " + msg);
|
|
|
|
dialog->addLog((msg.isEmpty() && !sent) ? "\n" : ": " + msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void PaydVouchersDialog::on_btnReports_clicked()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QSharedPointer<Voucher> voucher;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ui->tableVouchers->currentIndex().isValid())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
voucher= m_voucherModel->itemFromIndex(ui->tableVouchers->currentIndex());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ReportDialog *dialog = new ReportDialog(!voucher.isNull(), this);
|
|
|
|
|
|
|
|
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
|
|
|
|
VariableFiller varFiller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
varFiller.fillList(Context::instance().plugin("SHOP")->reports(), voucher.isNull() ? 0 : voucher->id());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dialog->setReports(Context::instance().plugin("SHOP")->reports());
|
|
|
|
|
|
|
|
dialog->show();
|
|
|
|
|
|
|
|
}
|
|
|
|