Open gbenziv opened 3 years ago
Verify that the order of transaction items from POS and sales are the same.
e.g.
POS receipt:
Usb charger | x2 | 10 | 20
Boneless Chicken | x1 | 100 | 100
Generic Shampoo | x1 | 20 | 20
Must be in the same order when retrieving sales:
Usb charger | x2 | 10 | 20
Boneless Chicken | x1 | 100 | 100
Generic Shampoo | x1 | 20 | 20
Show product sales per timeline:
product | quantity | total sales
Show total sales per category
Total sales: xxxx
Category 1 | sales
Category 2 | sales
Category 3 | sales
provide API for:
struct GraphReport {
std::string key;
std::string value;
};
enum class Period {
YESTERDAY,
TODAY,
THIS_WEEK,
THIS_MONTH,
THIS_YEAR
};
// Controller
std::vector<GraphReport> getCategorySales(); // x = category name, y = category sales this month
std::vector<GraphReport> getTodaySalesReport(); // Hourly interval
std::vector<Sale> getSales(Period period);
std::vector<Sale> getCustomPeriodSales(string startDate, string endDate); // dates are inclusive
std::vector<SalesItem> getSaleDetails(std::string transactionID);
// Data
std::vector<Sale> getSales(string startDate, string endDate); // dates are inclusive
std::vector<SalesItem> getSaleDetails(std::string transactionID);
Refer to Product Requirement doc for more details
APIs:
Tax computation: