#Query para luego volcar la infomación e importar el inventario actual
SELECT id, acta AS acta_id, eir_r AS eir_in, linea AS linea_in_id, buque AS buque_in_id, viaje AS viaje_in_id, contenedor AS contenedor_id, fdb,fdm,frd,patio AS patio_id,
if(`status`=0,'EMPTY','FULL') AS estatus_in, if(condicion IN(1,2,3),'OPR','DMG') AS condicion_in, IF(condicion IN(1,2,3),condicion,NULL) AS clasificacion,
consignatario AS consignatario_id, obs AS observaciones, bl, precinto AS precintos_in,booking AS booking_id, fdespims AS fdesp, pase AS pase_id,
fact AS factura_id, eir_d AS eir_out, precintodesp AS precintos_out, status_d AS estatus_out, linea AS linea_out_id, buqued AS buque_out_id,
viajed AS viaje_out_id, c AS finalizado, `mod` AS created_at
FROM inventario;

#Prueba
/*
INSERT INTO inventarios(`id`, `acta_id`, `eir_in`, `linea_in_id`, `buque_in_id`, `viaje_in_id`, `contenedor_id`, `fdb`, `fdm`, `frd`, `patio_id`, `estatus_in`, `condicion_in`, `clasificacion`, `consignatario_id`, `observaciones`, `bl`, `precintos_in`, `booking_id`, `fdesp`, `pase_id`, `factura_id`, `eir_out`, `precintos_out`, `estatus_out`, `linea_out_id`, `buque_out_id`, `viaje_out_id`, `finalizado`, `created_at`)
SELECT id, acta AS acta_id, eir_r AS eir_in, linea AS linea_in_id, buque AS buque_in_id, viaje AS viaje_in_id, contenedor AS contenedor_id, fdb,fdm,frd,patio AS patio_id,
if(`status`=0,'EMPTY','FULL') AS estatus_in, if(condicion IN(1,2,3),'OPR','DMG') AS condicion_in, IF(condicion IN(1,2,3),condicion,NULL) AS clasificacion,
consignatario AS consignatario_id, obs AS observaciones, bl, precinto AS precintos_in,booking AS booking_id, fdespims AS fdesp, pase AS pase_id,
fact AS factura_id, eir_d AS eir_out, precintodesp AS precintos_out, status_d AS estatus_out, linea AS linea_out_id, buqued AS buque_out_id,
viajed AS viaje_out_id, c AS finalizado, `mod` AS created_at
FROM inventario;
*/
