|
|
|
@ -47,12 +47,20 @@ PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
|
|
|
|
|
ui->tableItems->setColumnHidden(0, true);
|
|
|
|
|
ui->tableItems->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 30px; }");
|
|
|
|
|
|
|
|
|
|
#ifndef EET
|
|
|
|
|
ui->btnEetNotSen->setVisible(false);
|
|
|
|
|
ui->btnSendEet->setVisible(false);
|
|
|
|
|
ui->label_2->setVisible(false);
|
|
|
|
|
ui->lblEetStatus->setVisible(false);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
ShopService srv;
|
|
|
|
|
m_voucherModel->setData(srv.paiedVouchers());
|
|
|
|
|
ui->tableVouchers->sortByColumn(0,Qt::AscendingOrder);
|
|
|
|
|
ui->tableVouchers->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 30px; }");
|
|
|
|
|
|
|
|
|
|
connect(ui->tableVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this, &srv](const QModelIndex ¤t, const QModelIndex &) {
|
|
|
|
|
connect(ui->tableVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, const QModelIndex &) {
|
|
|
|
|
ShopService srv;
|
|
|
|
|
QSharedPointer<Voucher> voucher = m_voucherModel->itemFromIndex(current);
|
|
|
|
|
if (voucher->items().isEmpty()) {
|
|
|
|
|
srv.load(voucher);
|
|
|
|
|