salix/db/routines/bs/views/ventas.sql

13 lines
356 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `bs`.`ventas`
AS SELECT `s`.`saleFk` AS `Id_Movimiento`,
`s`.`amount` AS `importe`,
`s`.`surcharge` AS `recargo`,
`s`.`dated` AS `fecha`,
`s`.`typeFk` AS `tipo_id`,
`s`.`clientFk` AS `Id_Cliente`,
`s`.`companyFk` AS `empresa_id`,
`s`.`margin` AS `margen`
FROM `bs`.`sale` `s`