def getSalesReports(): numbers = Sale.getSalesReports() valueOfSales = numbers[0] numberOfSales = numbers[1] todaySales = numbers[2] weeklySales = numbers[3] return(numbers)
def generateCustomerReport(): listOfSales = Sale.getCustomerSales() customerList = [] salesList = [] for sale in listOfSales: customerList.append(sale[0]) salesList.append(sale[1]) return(customerList , salesList)
def getLastDaysSales(): last5DaysSales = Sale.getLast5DaysReport() dateList = [] salesList = [] i = 1 for sale in last5DaysSales: dateList.append(i) salesList.append(sale[1]) i+=1 return(dateList , salesList)
def generateCCReport(): listOfSales = Sale.getSaleList() ccSales = 0 cashSales = 0 for sale in listOfSales: if(sale[1] == "Cash"): cashSales += sale[4] else: ccSales += sale[4] return[cashSales ,ccSales ]