def get_total_orders_for_customer(cust_num): total_orders = 0 orders = db_access_web.get_all_orders_for_customer(cust_num) if orders is not None: for row in orders: total_orders += get_total_amount_for_order(row['orderNumber']) else: return 0 return total_orders
def all_orders(): cust_num = 103 orders = get_all_orders_for_customer(cust_num) max = 0 for ord in orders: # print(ord) if max < ord["orderNumber"]: max = ord["orderNumber"] if len(orders) == 3: print("orders passed") else: print("orders failed****************") if max == 10345: print("orders passed") else: print("orders failed****************")