TYPE=VIEW
query=select `beleza`.`nfentradas`.`numnota` AS `numnota`,`beleza`.`nfentradas`.`cfop` AS `cfop`,ifnull(sum(`beleza`.`nfentradas`.`vltotalnf`),0) AS `total`,ifnull(sum(`beleza`.`nfentradas`.`bsicms`),0) AS `ICMS`,ifnull(sum(`beleza`.`nfentradas`.`vlicms`),0) AS `VlICMS`,ifnull(sum(`beleza`.`nfentradas`.`vloutras`),0) AS `Outras`,`beleza`.`nfentradas`.`dtentrada` AS `Data` from `beleza`.`nfentradas` where (`beleza`.`nfentradas`.`cfop` > 0) group by `beleza`.`nfentradas`.`cfop` union select `beleza`.`nfsaidas`.`numnota` AS `numnota`,`beleza`.`nfsaidas`.`cfop` AS `cfop`,ifnull(sum(`beleza`.`nfsaidas`.`vlnota`),0) AS `total`,ifnull(sum(`beleza`.`nfsaidas`.`baseicms`),0) AS `ICMS`,ifnull(sum(`beleza`.`nfsaidas`.`vlicms`),0) AS `VlICMS`,ifnull(sum(`beleza`.`nfsaidas`.`VlOutras`),0) AS `Outras`,`beleza`.`nfsaidas`.`dtemissao` AS `Data` from `beleza`.`nfsaidas` where (`beleza`.`nfsaidas`.`cfop` > 0) group by `beleza`.`nfsaidas`.`cfop`,`beleza`.`nfsaidas`.`numnota`,`beleza`.`nfsaidas`.`dtemissao` order by `cfop`
md5=1479473e6bfd464a2cffddb3b90934bb
updatable=0
algorithm=0
definer_user=root
definer_host=localhost
suid=2
with_check_option=0
revision=15
timestamp=2014-09-17 12:24:57
create-version=1
source=select numnota,cfop, ifnull(sum(vltotalnf),0) total, ifnull(sum(nfentradas.bsicms),0) ICMS,ifnull(sum(nfentradas.vlicms),0) VlICMS, ifnull(sum(nfentradas.vloutras),0) Outras,dtentrada Data from nfentradas where cfop>0 group by cfop union select numnota, cfop, ifnull(sum(vlnota),0) total,ifnull(sum( nfsaidas.baseicms),0) ICMS,ifnull(sum( nfsaidas.vlicms),0) VlICMS, ifnull(sum(nfsaidas.VlOutras),0) Outras,dtemissao Data from nfsaidas where cfop>0 group by cfop,numnota,data order by cfop
client_cs_name=latin1
connection_cl_name=latin1_swedish_ci
view_body_utf8=select numnota,cfop, ifnull(sum(vltotalnf),0) total, ifnull(sum(nfentradas.bsicms),0) ICMS,ifnull(sum(nfentradas.vlicms),0) VlICMS, ifnull(sum(nfentradas.vloutras),0) Outras,dtentrada Data from nfentradas where cfop>0 group by cfop union select numnota, cfop, ifnull(sum(vlnota),0) total,ifnull(sum( nfsaidas.baseicms),0) ICMS,ifnull(sum( nfsaidas.vlicms),0) VlICMS, ifnull(sum(nfsaidas.VlOutras),0) Outras,dtemissao Data from nfsaidas where cfop>0 group by cfop,numnota,data order by cfop
