Print tickets for products DAY_TICKET_ADULT, DAY_TICKET_TEEN

This commit is contained in:
Siegfried Siegert 2024-02-28 14:05:18 +01:00
parent 3eaf98fb09
commit d0ee6d175e
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -810,23 +810,36 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHash<QString, QVariant
// 2 - Card / ShortTimeParking // 2 - Card / ShortTimeParking
// 3 - Cash / DayTicket // 3 - Cash / DayTicket
// 4 - Card / DayTicket // 4 - Card / DayTicket
// 00744 - NeuhauserVT/NAZ:
// 1 - Erwachsene
// 2 - Jugendliche
// 00741 - NeuhauserVT/Linsinger Maschinenbau
// t.b.d.
QString paymentType = printingData["paymentType"].toString(); // must be "CASH" | "CARD" QString paymentType = printingData["paymentType"].toString(); // must be "CASH" | "CARD"
QString productName = printingData["product"].toString(); // must be "ShortTimeParking" | "DayTicket" QString productName = printingData["product"].toString(); // must be "ShortTimeParking" | "DayTicket"
if ( (paymentType == "CASH") && (productName == "SHORT_TERM_PARKING") ) { if ( (paymentType == "CASH") && (productName == "SHORT_TERM_PARKING") ) {
this->currentSelectedTicketType = 1; this->currentSelectedTicketType = 1; // "Kombiticket #1"
} }
else else
if ( (paymentType == "CARD") && (productName == "SHORT_TERM_PARKING") ) { if ( (paymentType == "CARD") && (productName == "SHORT_TERM_PARKING") ) {
this->currentSelectedTicketType = 2; this->currentSelectedTicketType = 2; // "Kombiticket #2"
} }
else else
if ( (paymentType == "CASH") && (productName == "DAY_TICKET") ) { if ( (paymentType == "CASH") && (productName == "DAY_TICKET") ) {
this->currentSelectedTicketType = 3; this->currentSelectedTicketType = 3; // "Kombiticket #3"
} }
else else
if ( (paymentType == "CARD") && (productName == "DAY_TICKET") ) { if ( (paymentType == "CARD") && (productName == "DAY_TICKET") ) {
this->currentSelectedTicketType = 4; this->currentSelectedTicketType = 4; // "Kombiticket #4"
}
else
if ( productName == "DAY_TICKET_ADULT") {
this->currentSelectedTicketType = 1;
}
else
if ( productName == "DAY_TICKET_TEEN") {
this->currentSelectedTicketType = 2;
} }
else { else {
qCritical() << "ERROR: requestPrintTicket(): invalid payment data:"; qCritical() << "ERROR: requestPrintTicket(): invalid payment data:";