Пример #1
0
def getSalesReports():
    numbers = Sale.getSalesReports()
    valueOfSales = numbers[0]
    numberOfSales = numbers[1]
    todaySales = numbers[2]
    weeklySales = numbers[3]
    return(numbers)
Пример #2
0
def generateCustomerReport():
    listOfSales = Sale.getCustomerSales()
    customerList = []
    salesList = []
    for sale in listOfSales:
        customerList.append(sale[0])
        salesList.append(sale[1])
    return(customerList , salesList)
Пример #3
0
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)
Пример #4
0
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 ]