salix/db/routines/vn2008/views/Bancos_poliza.sql

25 lines
852 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`Bancos_poliza`
AS SELECT `bp`.`id` AS `poliza_id`,
`bp`.`ref` AS `referencia`,
`bp`.`amount` AS `importe`,
`bp`.`committedFee` AS `com_dispuesto`,
`bp`.`nonCommittedFee` AS `com_no_dispuesto`,
`bp`.`annualFee` AS `com_anual`,
`bp`.`started` AS `apertura`,
`bp`.`ended` AS `cierre`,
`bp`.`accountingFk` AS `Id_Banco`,
`bp`.`companyFk` AS `empresa_id`,
`bp`.`supplierFk` AS `supplierFk`,
`bp`.`description` AS `description`,
`bp`.`hasGuarantee` AS `hasGuarantee`,
`bp`.`dmsFk` AS `dmsFk`,
`bp`.`notaryFk` AS `notaryFk`,
`bp`.`currencyFk` AS `currencyFk`,
`bp`.`amortizationTypeFk` AS `amortizationTypeFk`,
`bp`.`periodicityTypeFk` AS `periodicityTypeFk`,
`bp`.`insuranceExpired` AS `insuranceExpired`
FROM `vn`.`bankPolicy` `bp`
ORDER BY `bp`.`id` DESC