salix/db/routines/hedera/views/myInvoice.sql

11 lines
300 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `hedera`.`myInvoice`
AS SELECT `i`.`id` AS `id`,
`i`.`ref` AS `ref`,
`i`.`issued` AS `issued`,
`i`.`amount` AS `amount`,
`i`.`hasPdf` AS `hasPdf`
FROM `vn`.`invoiceOut` `i`
WHERE `i`.`clientFk` = `account`.`myUser_getId`()