diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 4219002..986a038 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -174,6 +174,38 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHashcurrentSelectedTicketType = 1; + } + else + if ( (paymentType == "CARD") && (productName == "ShortTimeParking") ) { + this->currentSelectedTicketType = 2; + } + else + if ( (paymentType == "CASH") && (productName == "DayTicket") ) { + this->currentSelectedTicketType = 3; + } + else + if ( (paymentType == "CARD") && (productName == "DayTicket") ) { + this->currentSelectedTicketType = 4; + } + else { + qCritical() << "ERROR: requestPrintTicket(): invalid payment data:"; + qCritical() << " paymentType = " << paymentType << endl + << " productName = " << productName << endl; + this->onPrintFinishedERR(); + return; + } + QTimer::singleShot(1000, this, SLOT(onPrinterDataPrepared())); }