|
|
@ -144,7 +144,7 @@ void PosPrinter::printSaleReceipt(Sale* sale)
|
|
|
|
std::stringstream commandStream;
|
|
|
|
std::stringstream commandStream;
|
|
|
|
printHeader();
|
|
|
|
printHeader();
|
|
|
|
commandStream << Command::RESET << Command::ENCODING << Command::RIGHT_ALIGN;
|
|
|
|
commandStream << Command::RESET << Command::ENCODING << Command::RIGHT_ALIGN;
|
|
|
|
commandStream << sale->getTimestamp() << "\n\n";
|
|
|
|
commandStream << sale->getTimestampFormatted() << "\n\n";
|
|
|
|
commandStream << Command::LEFT_ALIGN;
|
|
|
|
commandStream << Command::LEFT_ALIGN;
|
|
|
|
for (const auto& article : sale->getArticles()) {
|
|
|
|
for (const auto& article : sale->getArticles()) {
|
|
|
|
commandStream << "Art. " << article->getCompleteArticleNo() << "........... "
|
|
|
|
commandStream << "Art. " << article->getCompleteArticleNo() << "........... "
|
|
|
@ -166,6 +166,7 @@ void PosPrinter::printSellerReceipt(Seller* seller, int percent, int maxFeeInCen
|
|
|
|
boost::posix_time::to_simple_string(boost::posix_time::second_clock::local_time());
|
|
|
|
boost::posix_time::to_simple_string(boost::posix_time::second_clock::local_time());
|
|
|
|
commandStream << timeStr << "\n\n";
|
|
|
|
commandStream << timeStr << "\n\n";
|
|
|
|
commandStream << Command::LEFT_ALIGN;
|
|
|
|
commandStream << Command::LEFT_ALIGN;
|
|
|
|
|
|
|
|
commandStream << "Name: " << seller->getFirstName() << " " << seller->getLastName() << "\n";
|
|
|
|
commandStream << "Verkäufernummer: " << std::setw(4) << seller->getSellerNo() << "\n\n";
|
|
|
|
commandStream << "Verkäufernummer: " << std::setw(4) << seller->getSellerNo() << "\n\n";
|
|
|
|
commandStream << "Anzahl Artikel geliefert: " << std::setw(4) << seller->numArticlesOffered()
|
|
|
|
commandStream << "Anzahl Artikel geliefert: " << std::setw(4) << seller->numArticlesOffered()
|
|
|
|
<< "\n";
|
|
|
|
<< "\n";
|
|
|
@ -180,10 +181,10 @@ void PosPrinter::printSellerReceipt(Seller* seller, int percent, int maxFeeInCen
|
|
|
|
commandStream << "Art. " << article->getCompleteArticleNo() << "........... "
|
|
|
|
commandStream << "Art. " << article->getCompleteArticleNo() << "........... "
|
|
|
|
<< article->getPriceAsString() << "\n";
|
|
|
|
<< article->getPriceAsString() << "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
commandStream << "\nGesamt................." << seller->sumAsString() << "\n";
|
|
|
|
commandStream << "\nGesamt................. " << seller->sumAsString() << "\n";
|
|
|
|
commandStream << "./. Gebühr............."
|
|
|
|
commandStream << "./. Gebühr............. "
|
|
|
|
<< marketFeeAsString(seller->sumInCents(), percent, maxFeeInCent) << "\n";
|
|
|
|
<< marketFeeAsString(seller->sumInCents(), percent, maxFeeInCent) << "\n";
|
|
|
|
commandStream << "\nAuszahlung............."
|
|
|
|
commandStream << "\nAuszahlung............. "
|
|
|
|
<< paymentAsString(seller->sumInCents(), percent, maxFeeInCent) << "\n";
|
|
|
|
<< paymentAsString(seller->sumInCents(), percent, maxFeeInCent) << "\n";
|
|
|
|
commandStream << Command::FEED;
|
|
|
|
commandStream << Command::FEED;
|
|
|
|
|
|
|
|
|
|
|
|