CREATE OR REPLACE DEFINER=`root`@`localhost`
	SQL SECURITY DEFINER
	VIEW `vn2008`.`item_out`
AS SELECT `t`.`warehouseFk` AS `warehouse_id`,
	`t`.`shipped` AS `dat`,
	`m`.`Id_Article` AS `item_id`,
	- `m`.`Cantidad` AS `amount`,
	`m`.`OK` AS `ok`,
	`m`.`Reservado` AS `Reservado`,
	`t`.`refFk` AS `invoice`,
	`m`.`Id_Movimiento` AS `saleFk`,
	`m`.`Id_Ticket` AS `ticketFk`
FROM (
		`vn2008`.`Movimientos` `m`
		JOIN `vn`.`ticket` `t` ON(`m`.`Id_Ticket` = `t`.`id`)
	)
WHERE `m`.`Cantidad` <> 0
