Example #1
0
def insert_unit_info(dbconfig, material, material_description, unit):
    db = MySQL(dbconfig)

    sql = "INSERT INTO tasly_warehouse.unit_info (material, material_description, unit) " \
          "VALUES ('{material}','{material_description}','{unit}');".\
        format(material=material, material_description=material_description, unit=unit)
    print(sql)
    db.insert(sql)
    db.close()
Example #2
0
def insert_batch_order_relation(dbconfig, material, material_description, movement_type, batch, order_num, posting_date, quantity, unit):
    db = MySQL(dbconfig)

    sql = "INSERT INTO tasly_warehouse.batch_order_relation (material, material_description, movement_type, batch, order_num, posting_date, quantity, unit) " \
          "VALUES ('{material}','{material_description}','{movement_type}','{batch}','{order_num}',{posting_date},{quantity},'{unit}');".\
        format(material=material, material_description=material_description, movement_type=movement_type, batch=batch, order_num=order_num, posting_date=posting_date, quantity=quantity, unit=unit)
    print(sql)
    db.insert(sql)
    db.close()
def insert_tasly_warehouse_storage_info(dbconfig, material, storage_bin, batch,
                                        material_desc, avail_stock, unit,
                                        last_goods_rec, date_of_manuf,
                                        sled_bbd, next_inspection, status):
    db = MySQL(dbconfig)

    sql = "INSERT INTO tasly_warehouse.tasly_warehouse_storage_info (material,storage_bin, batch, material_desc, avail_stock, unit, last_goods_rec, date_of_manuf, sled_bbd, next_inspection, status) " \
          "VALUES ('{material}','{storage_bin}','{batch}','{material_desc}',{avail_stock},'{unit}',{last_goods_rec},{date_of_manuf},{sled_bbd},{next_inspection},'{status}');".\
        format(material=material, storage_bin=storage_bin, batch=batch, material_desc=material_desc, avail_stock=avail_stock,unit=unit, last_goods_rec=last_goods_rec, date_of_manuf=date_of_manuf, sled_bbd=sled_bbd, next_inspection=next_inspection, status=status)
    #print (sql)
    db.insert(sql)
    db.close()
Example #4
0
def insert_batch_order_relation(
        dbconfig, supply_type, material, material_description, unit, supplier,
        sante_material_requirements_mon, sante_material_requirements,
        supplier_inventory, supplier_production_quantity,
        estimate_completion_time):
    db = MySQL(dbconfig)

    sql = "INSERT INTO tasly_warehouse.supplier_stock_management (supply_type,material,material_description,unit,supplier,sante_material_requirements_mon,sante_material_requirements,supplier_inventory,supplier_production_quantity,estimate_completion_time) " \
          "VALUES ('{supply_type}','{material}','{material_description}','{unit}','{supplier}','{sante_material_requirements_mon}','{sante_material_requirements}','{supplier_inventory}','{supplier_production_quantity}',{estimate_completion_time});".\
        format(supply_type=supply_type, material=material, material_description=material_description, unit=unit, supplier=supplier, sante_material_requirements_mon=sante_material_requirements_mon,sante_material_requirements=sante_material_requirements, supplier_inventory=supplier_inventory,
               supplier_production_quantity=supplier_production_quantity, estimate_completion_time=estimate_completion_time)
    print(sql)
    db.insert(sql)
    db.close()
Example #5
0
def flush_batch_order_relation_pid(dbconfig):
    db = MySQL(dbconfig)
    sql = "update tasly_warehouse.batch_order_relation set pid = '';"
    db.insert(sql)
    db.close()
Example #6
0
def flush_batch_order_relation(dbconfig):
    db = MySQL(dbconfig)
    sql = "truncate table tasly_warehouse.supplier_stock_management"
    db.insert(sql)
    db.close()
Example #7
0
def flush_batch_order_relation(dbconfig):
    db = MySQL(dbconfig)
    sql = "truncate table tasly_warehouse.batch_order_relation"
    db.insert(sql)
    db.close()
Example #8
0
def flush_unit_info(dbconfig):
    db = MySQL(dbconfig)
    sql = "truncate table tasly_warehouse.unit_info"
    db.insert(sql)
    db.close()
def flush_component_list_batches(dbconfig):
    db = MySQL(dbconfig)
    sql = "update tasly_warehouse.component_list set batches = '';"
    db.insert(sql)
    db.close()
def flush_tasly_warehouse_storage_info(dbconfig):
    db = MySQL(dbconfig)
    sql = "truncate table tasly_warehouse.tasly_warehouse_storage_info"
    db.insert(sql)
    db.close()