export report as csv file implemented

This commit is contained in:
Martin Brodbeck 2018-07-31 10:28:07 +02:00
parent e13339a432
commit 46aab9a836
5 changed files with 75 additions and 2 deletions

View file

@ -41,6 +41,8 @@ class Marketplace
void finishCurrentSale(std::unique_ptr<Sale> sale);
void removeSale(boost::uuids::uuid uuid);
void exportReportToCSV(const std::string& filename, int feeInPercent, int maxFeeInEuro);
private:
SellersVec sellers_;
SalesVec sales_;
@ -50,5 +52,6 @@ class Marketplace
double marketFee(int sumInCent, int percent, int maxFeeInCent);
std::string marketFeeAsString(int sumInCent, int percent, int maxFeeInCent);
std::string paymentAsString(int sumInCent, int percent, int maxFeeInCent);
std::string escapeCsvValue(const std::string& value, const char delimiter);
#endif