cashInputFinished: return coins/notes/change
This commit is contained in:
		@@ -986,18 +986,32 @@ void ATBDeviceControllerPlugin::onCashPayStopedSuccess()
 | 
			
		||||
    // DEBUG
 | 
			
		||||
    qCritical() << "ATBDeviceControllerPlugin::onCashPayStopedSuccess()";
 | 
			
		||||
 | 
			
		||||
    // inserted amount
 | 
			
		||||
    uint32_t amountInt = this->hw->getInsertedAmount();
 | 
			
		||||
 | 
			
		||||
    QString amountString = QString::number(amountInt);
 | 
			
		||||
 | 
			
		||||
    // inserted coins
 | 
			
		||||
    uint32_t amountCoinsInt = CashUtils::getAmountOfInsertedCoins(this->hw);
 | 
			
		||||
    QString amountCoinsString = QString::number(amountCoinsInt);
 | 
			
		||||
 | 
			
		||||
    // inserted notes
 | 
			
		||||
    uint32_t amountNotesInt = CashUtils::getAmountOfInsertedNotes(this->hw);
 | 
			
		||||
    QString amountNotesString = QString::number(amountNotesInt);
 | 
			
		||||
 | 
			
		||||
    // amount due to change
 | 
			
		||||
    uint32_t amountDueToChangeInt = this->cashStartAmountInt - amountInt;
 | 
			
		||||
    QString amountDueToChangeString = QString::number(amountDueToChangeInt);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    // DEBUG
 | 
			
		||||
    qCritical() << "      insertedAmount (int) = " << amountInt;
 | 
			
		||||
    qCritical() << "            insertedAmount = " << amountString;
 | 
			
		||||
 | 
			
		||||
    emit this->cashInputFinished(nsDeviceControllerInterface::RESULT_STATE::SUCCESS,
 | 
			
		||||
                              amountString,
 | 
			
		||||
                              "",            // coins
 | 
			
		||||
                              "",            // notes
 | 
			
		||||
                              "",            // change
 | 
			
		||||
                              amountCoinsString,        // coins
 | 
			
		||||
                              amountNotesString,        // notes
 | 
			
		||||
                              amountDueToChangeString,  // proposed change
 | 
			
		||||
                              "",
 | 
			
		||||
                              "");
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user