Ejemplo n.º 1
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
Ejemplo n.º 2
0
def GetAllCustomersc():
    return POSModule.GetAllCustomersm()