Example #1
0
def CloseSalesDay():
    DaySales = POSModule.GetAllSalesm()
    SalesAmount = 0
    for item in DaySales:
        SalesAmount += item[3]
    print("ok")
    Last30DaysSales = POSModule.GetLast3DaysSales()
    if len(Last30DaysSales) == 30:
        POSModule.Last30DaysPOP(len(Last30DaysSales) - 1)
    POSModule.Last30DaysInsertAtFirstDay(SalesAmount)
Example #2
0
def PrepareCRM():
    DaySales = POSModule.GetAllSalesm()
    AllCustomers = POSModule.GetAllCustomersm()
    CRMDictionary = {}
    for item in DaySales:
        if item[1] == 0:
            if "Anonymous" in CRMDictionary:
                CRMDictionary[
                    "Anonymous"] = CRMDictionary["Anonymous"] + item[3]
            else:
                CRMDictionary["Anonymous"] = item[3]
        else:
            CustomerName = AllCustomers[item[1]]
            if CustomerName in CRMDictionary:
                CRMDictionary[
                    CustomerName] = CRMDictionary[CustomerName] + item[3]
            else:
                CRMDictionary[CustomerName] = item[3]
    return CRMDictionary
Example #3
0
def PrepareReport():
    DaySales = POSModule.GetAllSalesm()
    CashAmount = 0
    CreditAmount = 0
    for item in DaySales:
        if item[2] == 0:  #cash
            CashAmount += item[3]
        else:  #Credit
            CreditAmount += item[3]
    ReportList = [["Cash", CashAmount], ["Credit", CreditAmount]]
    return ReportList
Example #4
0
def IsCommandValid(CheckCommand):
    if CheckCommand not in POSModule.GetInputCommands():
        return 0  #yes its invalide command
    else:
        return 1  #Command is valid
Example #5
0
def GetAllCustomersc():
    return POSModule.GetAllCustomersm()
Example #6
0
def GetAllSalesc():
    return POSModule.GetAllSalesm()
Example #7
0
def AddCustomerc(CustomerList):
    return POSModule.AddCustomerm(CustomerList)
Example #8
0
def AddSKUc(SKUList):
    return POSModule.AddSKUm(SKUList)
Example #9
0
def AddSalesc(SaleList):
    return POSModule.AddSalesm(SaleList)
Example #10
0
def GetCustomerByIDc(CustomerID):
    return POSModule.GetCustomerByIDm(CustomerID)
Example #11
0
def GetArticleByIDc(ArticleID):
    return POSModule.GetArticleByIDm(ArticleID)
Example #12
0
def GetInputCommand():
    return POSModule.GetInputCommands()
Example #13
0
def GetPaymentTypesc():
    return POSModule.GetPaymentTypesm()