2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost`
|
2024-01-15 11:31:03 +00:00
|
|
|
SQL SECURITY DEFINER
|
|
|
|
VIEW `vn`.`itemTicketOut`
|
|
|
|
AS SELECT `t`.`warehouseFk` AS `warehouseFk`,
|
|
|
|
`t`.`shipped` AS `shipped`,
|
|
|
|
`s`.`itemFk` AS `itemFk`,
|
|
|
|
- `s`.`quantity` AS `quantity`,
|
|
|
|
`s`.`isPicked` AS `isPicked`,
|
|
|
|
`s`.`reserved` AS `reserved`,
|
|
|
|
`t`.`refFk` AS `refFk`,
|
|
|
|
`s`.`id` AS `saleFk`,
|
|
|
|
`s`.`ticketFk` AS `ticketFk`
|
|
|
|
FROM (
|
|
|
|
`vn`.`sale` `s`
|
|
|
|
JOIN `vn`.`ticket` `t` ON(`s`.`ticketFk` = `t`.`id`)
|
|
|
|
)
|
|
|
|
WHERE `s`.`quantity` <> 0
|