printing of seller receipt works now

This commit is contained in:
Martin Brodbeck 2018-08-06 21:24:10 +02:00
parent 4a92832e19
commit f45e295c75
5 changed files with 50 additions and 11 deletions

View file

@ -157,7 +157,7 @@ void PosPrinter::printSaleReceipt(Sale* sale)
write(commandStream.str());
}
void PosPrinter::printSellerReceipt(Seller* seller, int percent, int maxFee)
void PosPrinter::printSellerReceipt(Seller* seller, int percent, int maxFeeInCent)
{
std::stringstream commandStream;
printHeader();
@ -182,10 +182,12 @@ void PosPrinter::printSellerReceipt(Seller* seller, int percent, int maxFee)
}
commandStream << "\nGesamt................." << seller->sumAsString() << "\n";
commandStream << "./. Gebühr............."
<< marketFeeAsString(seller->sumInCents(), percent, maxFee * 100) << "\n";
<< marketFeeAsString(seller->sumInCents(), percent, maxFeeInCent) << "\n";
commandStream << "\nAuszahlung............."
<< paymentAsString(seller->sumInCents(), percent, maxFee * 100) << "\n";
<< paymentAsString(seller->sumInCents(), percent, maxFeeInCent) << "\n";
commandStream << Command::FEED;
write(commandStream.str());
}
bool PosPrinter::isValid()

View file

@ -25,7 +25,7 @@ class PosPrinter
void printHeader();
void printTest();
void printSaleReceipt(Sale* sale);
void printSellerReceipt(Seller* seller, int percent, int maxFee);
void printSellerReceipt(Seller* seller, int percent, int maxFeeInCent);
bool isValid();
struct Command {