diff --git a/core/icons/print_48x48.png b/core/icons/print_48x48.png
new file mode 100644
index 0000000..494b84c
Binary files /dev/null and b/core/icons/print_48x48.png differ
diff --git a/core/rc.qrc b/core/rc.qrc
index 57d1c12..8f8369f 100644
--- a/core/rc.qrc
+++ b/core/rc.qrc
@@ -40,5 +40,6 @@
icons/report_24x24.png
icons/zoomIn_24x24.png
icons/zoomOut_24x24.png
+ icons/print_48x48.png
diff --git a/shop/icons/pos_printer_48x48.png b/shop/icons/pos_printer_48x48.png
new file mode 100644
index 0000000..e0ba303
Binary files /dev/null and b/shop/icons/pos_printer_48x48.png differ
diff --git a/shop/paydvouchersdialog.cpp b/shop/paydvouchersdialog.cpp
index 5819e60..a326c36 100644
--- a/shop/paydvouchersdialog.cpp
+++ b/shop/paydvouchersdialog.cpp
@@ -8,6 +8,9 @@
#include "shopservice.h"
#include "eetbatchdialog.h"
+#include
+#include
+
#include "shop-odb.hxx"
PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
@@ -140,3 +143,22 @@ void PaydVouchersDialog::on_btnSendEet_clicked()
dialog->addLog((msg.isEmpty() && !sent) ? "\n" : ": " + msg);
}
}
+
+void PaydVouchersDialog::on_btnReports_clicked()
+{
+ QSharedPointer 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();
+}
diff --git a/shop/paydvouchersdialog.h b/shop/paydvouchersdialog.h
index 9c8f5bf..b033951 100644
--- a/shop/paydvouchersdialog.h
+++ b/shop/paydvouchersdialog.h
@@ -28,6 +28,8 @@ private slots:
void on_btnSendEet_clicked();
+ void on_btnReports_clicked();
+
private:
Ui::PaydVouchersDialog *ui;
diff --git a/shop/paydvouchersdialog.ui b/shop/paydvouchersdialog.ui
index 44186d9..397137b 100644
--- a/shop/paydvouchersdialog.ui
+++ b/shop/paydvouchersdialog.ui
@@ -31,9 +31,29 @@
+
+
+ :/icons/pos_printer_48x48.png:/icons/pos_printer_48x48.png
+
+
+
+ 32
+ 32
+
+
+
+ true
+
+
+
+ -
+
+
+ ...
+
- :/icons/print.svg:/icons/print.svg
+ :/icons/print_48x48.png:/icons/print_48x48.png
diff --git a/shop/shop.json b/shop/shop.json
index baad1ce..29306c7 100644
--- a/shop/shop.json
+++ b/shop/shop.json
@@ -116,9 +116,5 @@ ALTER TABLE Voucher ADD \"updated\" TEXT NULL;
"saveDateTime" : "Datum uložení",
"insertDate" : "Datum vložení"
}
- },
- "reports" : [
- { "name" : "Zaplacené účtenky", "description" : "Všechny zaplacené účtenky", "listReport" : 1, "file" : "vouchers.lrxml" },
- { "name" : "Nezplacené účtenky", "description" : "Všechny nezaplacené účtenky", "listReport" : 1, "file" : "vouchers_n.lrxml" }
- ]
+ }
}
diff --git a/shop/shoprc.qrc b/shop/shoprc.qrc
index e28635d..ddc3752 100644
--- a/shop/shoprc.qrc
+++ b/shop/shoprc.qrc
@@ -8,5 +8,6 @@
icons/sendEet.svg
icons/pay_24x24.png
icons/shop_64x64.png
+ icons/pos_printer_48x48.png