Exemplo n.º 1
0
def getAllMaintenanceNotCreated():
    simplelist = []
    maintenancesList = select_all_maintenance()
    for mainte in maintenancesList:
        if mainte.created_at == None:
            simplelist.append(mainte.customers)
    return simplelist
Exemplo n.º 2
0
def getMaintenancePused():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.created_at == None or mainte.cost_of_bill_of_material == None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 3
0
def getMaintenanceAmouted():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.start_date != None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 4
0
def getMaintenanceFinishedAndDelivared():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.close_at != None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 5
0
def getMaintenanceWaitingDelevary():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.done_date != None and mainte.close_at == None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 6
0
def getMaintenanceUnderProccessing():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.start_date != None and mainte.done_date == None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 7
0
def getMaintenanceBTWDate(first, second):
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.start_date != None:
            if mainte.created_at >= first and mainte.created_at <= second:
                simplelist.append(mainte)
    return simplelist
Exemplo n.º 8
0
def getMaintenanceHolded():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.created_at != None \
          and mainte.start_date == None \
          and mainte.cost_of_labor != None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 9
0
def getMaintenanceWaitLaborCost():
    simplelist = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.created_at != None \
          and mainte.cost_of_labor == None \
          and mainte.cost_of_bill_of_material != None:
            simplelist.append(mainte)
    return simplelist
Exemplo n.º 10
0
def getMaintenanceFinishedAndDelivaredCost():
    simplelistbm = []
    simplelistla = []
    simplelistan = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.close_at != None:
            if not mainte.cost_of_bill_of_material == None:
                # 	mainte.cost_of_bill_of_material = 0
                simplelistbm.append(mainte.cost_of_bill_of_material)
            if not mainte.cost_of_labor == None:
                # 	mainte.cost_of_labor = 0
                simplelistla.append(mainte.cost_of_labor)
            if not mainte.cost_of_another == None:
                # 	mainte.cost_of_another = 0
                simplelistan.append(mainte.cost_of_another)
        summ = sum(simplelistbm) + sum(simplelistla) + sum(simplelistan)
        # if summ == 0:
        # 	summ =0
        return summ
Exemplo n.º 11
0
def getMaintenanceUnderProccessingCost():
    simplelistbm = []
    simplelistla = []
    simplelistan = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.start_date != None and mainte.done_date == None:
            if not mainte.cost_of_bill_of_material == None:
                # 	mainte.cost_of_bill_of_material = 0
                simplelistbm.append(mainte.cost_of_bill_of_material)
            if not mainte.cost_of_labor == None:
                # 	mainte.cost_of_labor = 0
                simplelistla.append(mainte.cost_of_labor)
            if not mainte.cost_of_another == None:
                # 	mainte.cost_of_another = 0
                simplelistan.append(mainte.cost_of_another)
        summ = sum(simplelistbm) + sum(simplelistla) + sum(simplelistan)
        # if summ == 0:
        # 	summ =0
        return summ
Exemplo n.º 12
0
def getMaintenanceCalcCost():
    simplelistbm = []
    simplelistla = []
    simplelistan = []
    mainlist = select_all_maintenance()
    for mainte in mainlist:
        if mainte.created_at != None \
          and mainte.start_date == None:
            if not mainte.cost_of_bill_of_material == None:
                # mainte.cost_of_bill_of_material = None
                simplelistbm.append(mainte.cost_of_bill_of_material)
            if not mainte.cost_of_labor == None:
                # mainte.cost_of_labor = None
                simplelistla.append(mainte.cost_of_labor)
            if not mainte.cost_of_another == None:
                # mainte.cost_of_another = None
                simplelistan.append(mainte.cost_of_another)
        summ = sum(simplelistbm) + sum(simplelistla) + sum(simplelistan)
        # if summ == 0:
        # 	summ =0
        return summ