CREATE OR REPLACE DEFINER=`vn`@`localhost`
	SQL SECURITY DEFINER
	VIEW `vn2008`.`recibida`
AS SELECT `r`.`id` AS `id`,
	`r`.`serialNumber` AS `num_recibida`,
	`r`.`serial` AS `serie`,
	`r`.`supplierFk` AS `proveedor_id`,
	`r`.`issued` AS `fecha`,
	`r`.`supplierRef` AS `sref`,
	`r`.`isBooked` AS `contabilizada`,
	`r`.`currencyFk` AS `moneda_id`,
	`r`.`created` AS `MYSQL_TIME`,
	`r`.`companyFk` AS `empresa_id`,
	`r`.`docFk` AS `gestdoc_id`,
	`r`.`booked` AS `dateBooking`,
	`r`.`operated` AS `dateOperation`,
	`r`.`siiTypeInvoiceInFk` AS `siiTypeInvoiceInFk`,
	`r`.`cplusRectificationTypeFk` AS `cplusRectificationTypeFk`,
	`r`.`cplusSubjectOpFk` AS `cplusSubjectOpFk`,
	`r`.`cplusTaxBreakFk` AS `cplusTaxBreakFk`,
	`r`.`siiTrascendencyInvoiceInFk` AS `siiTrascendencyInvoiceInFk`,
	`r`.`bookEntried` AS `bookEntried`,
	`r`.`isVatDeductible` AS `isVatDeductible`,
	`r`.`withholdingSageFk` AS `withholdingSageFk`,
	`r`.`expenseFkDeductible` AS `expenseFkDeductible`
FROM `vn`.`invoiceIn` `r`
