### Consulta para corroborar FactGlobal ~~~ Select sys_pk,referencia,impuesto1,impuesto3,subtotal,Aplicadoa,notas from venta where statusadministrativo=3 and formapago=1 and (documento=6 or documento=3) and aplicadoa is null and (fecha>='2019-10-01'and fecha>='2019-10-06'); select sys_pk,referencia,depositos,cheques,efectivo,fecha,Notas from movcaja where documento=34 and (fecha>='2019-11-11' and fecha<='2019-11-11'); ~~~ #### SQL: ~~~ select sum(impuesto3),sum(subtotal) from venta where referencia like '%ST03T%' and statusadministrativo=3 and aplicadoa=2380 and formapago=1 and (documento=6 or documento=3) and fecha>='01-10-2019' and fecha<='06-10-2019'; Select v.sys_pk,v.referencia,v.impuesto1,v.impuesto3,v.subtotal,v.Aplicadoa,v.notas,dv.cantidad,dv.impuesto3,dv.precio,p.descripcion from venta v INNER JOIN dventa dv ON v.sys_pk=dv.fk_venta_detalle INNER JOIN producto p ON dv.iproducto=p.sys_pk where v.statusadministrativo=3 and v.formapago=1 AND v.aplicadoa=2377 and (v.documento=6 or v.documento=3) and (v.fecha>='2019-10-01'and v.fecha<='2019-10-06') AND v.referencia LIKE '%ST02T%' ORDER BY v.Referencia; Select v.sys_pk,v.referencia,v.impuesto1,v.impuesto3,v.subtotal,v.Aplicadoa,v.notas,dv.cantidad,dv.impuesto3,dv.precio,p.descripcion from venta v INNER JOIN dventa dv ON v.sys_pk=dv.fk_venta_detalle where v.statusadministrativo=3 and v.formapago=1 AND v.aplicadoa=2377 and (v.documento=6 or v.documento=3) and (v.fecha>='2019-10-01'and v.fecha<='2019-10-06') AND v.referencia LIKE '%ST02T%' ORDER BY v.Referencia; ~~~