printing sale receipt
This commit is contained in:
parent
23659078b4
commit
6e6510ebcf
8 changed files with 53 additions and 10 deletions
|
@ -34,6 +34,6 @@ int Sale::sumInCents()
|
|||
|
||||
std::string Sale::sumAsString() { return formatCentAsEuroString(sumInCents()); }
|
||||
|
||||
std::string Sale::getTimestamp() { return timestamp_; }
|
||||
std::string Sale::getTimestamp() const { return timestamp_; }
|
||||
|
||||
void Sale::setTimestamp(const std::string& timestamp) { timestamp_ = timestamp; }
|
|
@ -21,7 +21,7 @@ class Sale : public Entity
|
|||
void setTimestamp(const std::string& timestamp);
|
||||
|
||||
ArticlesVec& getArticles();
|
||||
std::string getTimestamp();
|
||||
std::string getTimestamp() const;
|
||||
int sumInCents();
|
||||
std::string sumAsString();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class Sale : public Entity
|
|||
private:
|
||||
std::string timestamp_{
|
||||
boost::posix_time::to_iso_extended_string(boost::posix_time::second_clock::local_time())};
|
||||
ArticlesVec articles_{};
|
||||
mutable ArticlesVec articles_{};
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue