UI changes for HDPI.

Voucher could be marked as EET not entering.
print
Pepa Rokos 8 years ago
parent e028116ab8
commit 94e4edc6e6

@ -18,6 +18,6 @@
#navigation QToolButton {
color: white;
font-weight: bold;
min-width: 80px;
font: 10px;
min-width: 90px;
font: 10pt;
}

@ -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<VoucherItem> 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");

@ -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())

@ -37,12 +37,6 @@
</property>
<item>
<widget class="QWidget" name="widgetComodity" native="true">
<property name="maximumSize">
<size>
<width>500</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="commodity">
@ -555,7 +549,7 @@
</font>
</property>
<property name="text">
<string>Show paied</string>
<string>Show paid</string>
</property>
<property name="icon">
<iconset resource="shoprc.qrc">
@ -600,8 +594,8 @@
</layout>
</widget>
<resources>
<include location="shoprc.qrc"/>
<include location="../core/rc.qrc"/>
<include location="shoprc.qrc"/>
</resources>
<connections/>
</ui>

Loading…
Cancel
Save