Initial implementation of salemodel

This commit is contained in:
Martin Brodbeck 2018-07-25 16:04:45 +02:00
parent bc67018c1c
commit e24b6c4e5f
11 changed files with 212 additions and 1 deletions

View file

@ -31,6 +31,13 @@ int Sale::sumInCents()
return sum;
}
std::string Sale::sumAsString()
{
std::stringstream sumStream;
sumStream << std::right << std::setw(12) << std::showbase << std::put_money(sumInCents(), false);
return sumStream.str();
}
std::string Sale::getTimestamp() { return timestamp_; }
void Sale::setTimestamp(const std::string& timestamp) { timestamp_ = timestamp; }