diff --git a/application/style.css b/application/style.css index 05d94e4..b099ec7 100644 --- a/application/style.css +++ b/application/style.css @@ -18,6 +18,6 @@ #navigation QToolButton { color: white; font-weight: bold; - min-width: 80px; - font: 10px; + min-width: 90px; + font: 10pt; } diff --git a/shop/receiptgenerator.cpp b/shop/receiptgenerator.cpp index cd62dfd..8bab43b 100644 --- a/shop/receiptgenerator.cpp +++ b/shop/receiptgenerator.cpp @@ -123,6 +123,12 @@ QByteArray ReceiptGenerator::generate() out.append("\x0a"); out.append(prepareString("IC: " + QString::number(gs->ic()))); out.append("\x0a"); + out.append(prepareString("DIC: " + gs->dic())); + out.append("\x0a"); + out.append(prepareString("ID provozovny: " + shopSettings->eetShopId())); + out.append("\x0a"); + out.append(prepareString("ID pokladny: " + shopSettings->eetRegisterId())); + out.append("\x0a"); out.append("\x1b\x21"); out.append(printMode); @@ -135,12 +141,14 @@ QByteArray ReceiptGenerator::generate() out.append("\x0a"); foreach (QSharedPointer item, m_voucher->items()) { + QString count = QString::number(item->count()); QString name = item->name(); QString price = QString::number(item->price().toDouble(), 'f', 2); int numSpaces = 0; if ((name.length() + price.length()) < shopSettings->lettersPerLine()) { + name = count + "x " + name; numSpaces = shopSettings->lettersPerLine() - (name.length() + price.length()); out.append(prepareString(name)); } @@ -171,7 +179,7 @@ QByteArray ReceiptGenerator::generate() out.append("\x1b\x21"); out.append(printMode); - out.append("Celekem:"); + out.append("Celkem:"); QString totalPrice = QString::number(m_voucher->totalPrice().toDouble(), 'f', 2); int numSpaces = shopSettings->lettersPerLine() - (8 + totalPrice.length()); @@ -184,13 +192,18 @@ QByteArray ReceiptGenerator::generate() out.append("\x1b\x21"); out.append((char)0); out.append("\x0a"); - out.append("BKP:"); - out.append("\x0a"); - out.append(prepareString(m_voucher->eetBkp())); - out.append("\x0a"); - out.append("FIK:"); - out.append("\x0a"); - out.append(prepareString(m_voucher->eetFik())); + if (!m_voucher->eetBkp().isEmpty()) + { + out.append("BKP:"); + out.append("\x0a"); + out.append(prepareString(m_voucher->eetBkp())); + out.append("\x0a"); + out.append("FIK:"); + out.append("\x0a"); + out.append(prepareString(m_voucher->eetFik())); + out.append("\x0a"); + out.append("\x0a"); + } out.append("\x0a"); out.append("\x0a"); out.append("\x0a"); diff --git a/shop/shopform.cpp b/shop/shopform.cpp index 0ce98a4..d3cb461 100644 --- a/shop/shopform.cpp +++ b/shop/shopform.cpp @@ -333,6 +333,8 @@ void ShopForm::on_payButton_clicked() connect(dialog, &QDialog::accepted, [this, dialog](){ ShopService srv; srv.pay(m_voucher); + m_voucher->setEetStatus(dialog->sendToEet() ? Voucher::EET_FOR_SEND : Voucher::EET_NOT_ENTERING); + srv.update(m_voucher); QString eetMsg; if (srv.isEetEnabled() && dialog->sendToEet()) diff --git a/shop/shopform.ui b/shop/shopform.ui index ebe21e6..35de415 100644 --- a/shop/shopform.ui +++ b/shop/shopform.ui @@ -37,12 +37,6 @@ - - - 500 - 16777215 - - @@ -555,7 +549,7 @@ - Show paied + Show paid @@ -600,8 +594,8 @@ - +