==== NUEVO DIA: 2026-10-03 ==== [2026-10-03 03:42:01] 2026-10-03 03:42:01.510 WARN 5176 --- [MI TCP Accept-0] sun.rmi.transport.tcp : RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=62461] throws [2026-10-03 03:42:01] [2026-10-03 03:42:01] java.io.IOException: The server sockets created using the LocalRMIServerSocketFactory only accept connections from clients running on the host where the RMI remote objects have been exported. [2026-10-03 03:42:01] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-10-03 03:42:01] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-10-03 03:42:01] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-10-03 03:42:01] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-10-03 03:42:01] [2026-10-03 08:52:45] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 08:52:45] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 08:52:46] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 08:52:46] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 08:52:46] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 08:52:46] begin; [2026-10-03 08:52:46] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 08:52:46] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 08:52:46] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (7683,7684,7685,7686,7689,7690,8715,9744,8213,8214,8215,9754,8730,8732,8733,9759,9762,8740,9253,8229,8232,7721,8235,7723,8237,8756,9269,9270,8759,9789,8253,9278,9279,8768,9794,9795,7759,8272,7760,7765,8278,7766,9815,7767,7768,9817,9307,9309,7773,7777,7778,9315,7781,8299,8300,7790,9839,9328,9841,9337,8313,7801,9339,9340,8316,7806,9858,8836,9353,8847,8336,9877,8341,8342,7831,9891,9383,7854,9391,7855,9393,8882,8885,8886,9408,9412,8905,8908,8397,9422,9423,8911,8400,7888,8914,7890,7891,8917,8918,7894,8919,7895,9433,8921,8922,7899,9444,8937,8431,8432,8438,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,8993,8994,9509,9511,9512,9513,9514,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,9055,9056,8035,8548,8040,8041,9579,8561,9596,8069,8071,8584,8586,9612,9108,9621,8597,8085,8598,9111,8600,8607,9636,9124,9637,8101,9126,9130,9131,9132,8111,8633,8640,7619,8138,9164,9167,9169,8145,7635,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-10-03 08:52:46] commit; [2026-10-03 08:52:48] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 08:52:48] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 08:52:52] begin; [2026-10-03 08:52:52] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 08:52:52] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=5 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 08:52:52] commit; [2026-10-03 09:43:17] begin; [2026-10-03 09:43:17] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 09:43:17] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 09:43:17] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 09:43:17] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 09:43:17] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 09:43:17] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9840,9875,9859,9876,9816) order by pedidod_pedido_id, pedidod_id [2026-10-03 09:43:17] commit; [2026-10-03 10:03:51] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 10:03:51] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 10:03:51] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 10:03:51] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:03:51] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 10:03:52] begin; [2026-10-03 10:03:52] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:03:52] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 10:03:52] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9888,9889,9866,9883,9867,9886,9871) order by pedidod_pedido_id, pedidod_id [2026-10-03 10:03:52] commit; [2026-10-03 10:03:55] begin; [2026-10-03 10:03:55] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-03 10:03:55] commit; [2026-10-03 10:04:48] begin; [2026-10-03 10:04:48] select transporte_id,transporte_descripcion,transporte_bloqueado from sh_principal.tbl_ven_transporte where 1=1 and transporte_bloqueado=false order by transporte_descripcion [2026-10-03 10:04:48] commit; [2026-10-03 10:04:53] begin; [2026-10-03 10:04:53] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:04:53] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=5 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 10:04:54] commit; [2026-10-03 10:04:58] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=824 and cliente_descuento_producto_id=3827 [2026-10-03 10:04:58] select cliente_descuento_porcentaje from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_ven_cliente_descuento_especie_producto on especie_producto_id=cliente_descuento_especie_producto_id where cliente_descuento_cliente_id=824 and producto_id=3827 [2026-10-03 10:05:07] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=824 and cliente_descuento_producto_id=3828 [2026-10-03 10:05:07] select cliente_descuento_porcentaje from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_ven_cliente_descuento_especie_producto on especie_producto_id=cliente_descuento_especie_producto_id where cliente_descuento_cliente_id=824 and producto_id=3828 [2026-10-03 10:05:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:05:21] begin; [2026-10-03 10:05:21] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-10-03 10:05:21] insert into sh_principal.tbl_gen_notificacion_app (notificacion_tipo_id, notificacion_titulo, notificacion_cuerpo, notificacion_ruta, notificacion_referencia_id, notificacion_referencia_tabla, notificacion_empresa_id, notificacion_usuario_creador_id) values (2,'NUEVO PEDIDO #9894','PET R OS, S.A. � Q680.00','/pedido/9894',9894,'tbl_ven_pedido',5,16) returning notificacion_id [2026-10-03 10:05:21] select notificacion_suscripcion_usuario_id from sh_principal.tbl_gen_notificacion_suscripcion inner join sh_principal.tbl_gen_usuario on usuario_id=notificacion_suscripcion_usuario_id where notificacion_suscripcion_tipo_id=2 and notificacion_suscripcion_activo=true and usuario_bloqueado=false [2026-10-03 10:05:21] commit; [2026-10-03 10:05:21] begin; [2026-10-03 10:05:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:05:21] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and pedido_id =9894 order by pedido_registro desc limit 1 [2026-10-03 10:05:21] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9894) order by pedidod_pedido_id, pedidod_id [2026-10-03 10:05:21] commit; [2026-10-03 10:05:28] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:05:28] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 10:05:28] begin; [2026-10-03 10:05:28] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 10:05:28] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 10:05:28] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9888,9889,9894,9866,9883,9867,9886,9871) order by pedidod_pedido_id, pedidod_id [2026-10-03 10:05:28] commit; [2026-10-03 10:05:33] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 10:05:33] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 10:05:36] begin; [2026-10-03 10:05:36] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:05:36] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 10:05:36] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9728,9729,9730,9228,9229,9235,9236,9751,9753,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,9787,9280,9796,9822,9824,9312,9825,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9415,9417,9426,9427,9428,9440,9443,9453,8941,9454,8942,9464,8960,9474,8962,9475,8963,9476,8964,8969,8973,8976,8977,8982,9500,9501,9502,8990,8991,9504,9508,9510,8999,9000,9517,9518,9519,9007,9008,9009,9522,9010,9016,9532,9533,9021,9022,9030,9031,9545,9033,9546,9034,9547,9036,9549,9550,9048,9049,9050,9051,9567,9568,9569,9570,9576,9578,9068,9581,9069,9582,9070,9585,9586,9589,9590,9082,9085,9598,9086,9599,9087,9600,9613,9614,9112,9629,9630,9123,9638,9639,9127,9128,9645,9646,9647,9135,9648,9136,9137,9138,9139,9142,9145,9662,9666,9154,9667,9155,9668,9669,9160,9168,9683,9684,9173,9174,9182,9695,9696,9185,9186,9187,9188,9189,9199,9200,9201,9202,9203,9204,9717,9205,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-03 10:05:36] commit; [2026-10-03 10:05:36] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:05:36] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 10:12:42] begin; [2026-10-03 10:12:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:12:42] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=1 and rsaldo<>0 and venta_anulada=false and cliente_id =1717 order by venta_fecha desc [2026-10-03 10:12:42] commit; [2026-10-03 10:20:10] begin; [2026-10-03 10:20:10] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:20:10] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=1 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 10:20:11] commit; [2026-10-03 10:20:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:20:42] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 10:20:42] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 10:20:42] begin; [2026-10-03 10:20:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:20:42] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 10:20:42] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9728,9729,9730,9228,9229,9235,9236,9751,9753,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,9787,9280,9796,9822,9824,9312,9825,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9415,9417,9426,9427,9428,9440,9443,9453,8941,9454,8942,9464,8960,9474,8962,9475,8963,9476,8964,8969,8973,8976,8977,8982,9500,9501,9502,8990,8991,9504,9508,9510,8999,9000,9517,9518,9519,9007,9008,9009,9522,9010,9016,9532,9533,9021,9022,9030,9031,9545,9033,9546,9034,9547,9036,9549,9550,9048,9049,9050,9051,9567,9568,9569,9570,9576,9578,9068,9581,9069,9582,9070,9585,9586,9589,9590,9082,9085,9598,9086,9599,9087,9600,9613,9614,9112,9629,9630,9123,9638,9639,9127,9128,9645,9646,9647,9135,9648,9136,9137,9138,9139,9142,9145,9662,9666,9154,9667,9155,9668,9669,9160,9168,9683,9684,9173,9174,9182,9695,9696,9185,9186,9187,9188,9189,9199,9200,9201,9202,9203,9204,9717,9205,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-03 10:20:42] commit; [2026-10-03 10:20:45] begin; [2026-10-03 10:20:45] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:20:45] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and pedido_id =9894 order by pedido_registro desc limit 1 [2026-10-03 10:20:45] commit; [2026-10-03 10:20:45] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:20:45] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 10:20:45] begin; [2026-10-03 10:20:45] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 10:20:45] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 10:20:45] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9728,9729,9730,9228,9229,9235,9236,9751,9753,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,9787,9280,9796,9822,9824,9312,9825,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9415,9417,9426,9427,9428,9440,9443,9453,8941,9454,8942,9464,8960,9474,8962,9475,8963,9476,8964,8969,8973,8976,8977,8982,9500,9501,9502,8990,8991,9504,9508,9510,8999,9000,9517,9518,9519,9007,9008,9009,9522,9010,9016,9532,9533,9021,9022,9030,9031,9545,9033,9546,9034,9547,9036,9549,9550,9048,9049,9050,9051,9567,9568,9569,9570,9576,9578,9068,9581,9069,9582,9070,9585,9586,9589,9590,9082,9085,9598,9086,9599,9087,9600,9613,9614,9112,9629,9630,9123,9638,9639,9127,9128,9645,9646,9647,9135,9648,9136,9137,9138,9139,9142,9145,9662,9666,9154,9667,9155,9668,9669,9160,9168,9683,9684,9173,9174,9182,9695,9696,9185,9186,9187,9188,9189,9199,9200,9201,9202,9203,9204,9717,9205,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-03 10:20:45] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 10:20:45] commit; [2026-10-03 15:05:20] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 15:05:20] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:05:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 15:05:21] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 15:05:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:05:21] begin; [2026-10-03 15:05:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 15:05:21] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 15:05:21] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9840,9875,9859,9876,9816) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:05:21] commit; [2026-10-03 15:05:27] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:05:27] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 15:05:31] begin; [2026-10-03 15:05:31] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:05:31] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=1 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 15:05:32] commit; [2026-10-03 15:05:40] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:05:40] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:05:40] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:05:40] begin; [2026-10-03 15:05:40] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:05:40] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 15:05:40] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (7683,7684,7685,7686,7689,7690,8715,9744,8213,8214,8215,9754,8730,8732,8733,9759,9762,8740,9253,8229,8232,7721,8235,7723,8237,8756,9269,9270,8759,9789,8253,9278,9279,8768,9794,9795,7759,8272,7760,7765,8278,7766,9815,7767,7768,9817,9307,9309,7773,7777,7778,9315,7781,8299,8300,7790,9839,9328,9841,9337,8313,7801,9339,9340,8316,7806,9858,8836,9353,8847,8336,9877,8341,8342,7831,9891,9383,7854,9391,7855,9393,8882,8885,8886,9408,9412,8905,8908,8397,9422,9423,8911,8400,7888,8914,7890,7891,8917,8918,7894,8919,7895,9433,8921,8922,7899,9444,8937,8431,8432,8438,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,8993,8994,9509,9511,9512,9513,9514,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,9055,9056,8035,8548,8040,8041,9579,8561,9596,8069,8071,8584,8586,9612,9108,9621,8597,8085,8598,9111,8600,8607,9636,9124,9637,8101,9126,9130,9131,9132,8111,8633,8640,7619,8138,9164,9167,9169,8145,7635,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:05:40] commit; [2026-10-03 15:06:31] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 15:06:31] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:06:31] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:06:31] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:06:31] begin; [2026-10-03 15:06:31] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:06:31] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 15:06:31] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:06:31] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (7683,7684,7685,7686,7689,7690,8715,9744,8213,8214,8215,9754,8730,8732,8733,9759,9762,8740,9253,8229,8232,7721,8235,7723,8237,8756,9269,9270,8759,9789,8253,9278,9279,8768,9794,9795,7759,8272,7760,7765,8278,7766,9815,7767,7768,9817,9307,9309,7773,7777,7778,9315,7781,8299,8300,7790,9839,9328,9841,9337,8313,7801,9339,9340,8316,7806,9858,8836,9353,8847,8336,9877,8341,8342,7831,9891,9383,7854,9391,7855,9393,8882,8885,8886,9408,9412,8905,8908,8397,9422,9423,8911,8400,7888,8914,7890,7891,8917,8918,7894,8919,7895,9433,8921,8922,7899,9444,8937,8431,8432,8438,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,8993,8994,9509,9511,9512,9513,9514,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,9055,9056,8035,8548,8040,8041,9579,8561,9596,8069,8071,8584,8586,9612,9108,9621,8597,8085,8598,9111,8600,8607,9636,9124,9637,8101,9126,9130,9131,9132,8111,8633,8640,7619,8138,9164,9167,9169,8145,7635,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:06:31] commit; [2026-10-03 15:06:33] begin; [2026-10-03 15:06:33] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:06:33] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=1 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 15:06:34] commit; [2026-10-03 15:06:42] begin; [2026-10-03 15:06:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:06:42] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 15:06:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:06:42] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 15:06:42] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:06:42] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (7683,7684,7685,7686,7689,7690,8715,9744,8213,8214,8215,9754,8730,8732,8733,9759,9762,8740,9253,8229,8232,7721,8235,7723,8237,8756,9269,9270,8759,9789,8253,9278,9279,8768,9794,9795,7759,8272,7760,7765,8278,7766,9815,7767,7768,9817,9307,9309,7773,7777,7778,9315,7781,8299,8300,7790,9839,9328,9841,9337,8313,7801,9339,9340,8316,7806,9858,8836,9353,8847,8336,9877,8341,8342,7831,9891,9383,7854,9391,7855,9393,8882,8885,8886,9408,9412,8905,8908,8397,9422,9423,8911,8400,7888,8914,7890,7891,8917,8918,7894,8919,7895,9433,8921,8922,7899,9444,8937,8431,8432,8438,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,8993,8994,9509,9511,9512,9513,9514,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,9055,9056,8035,8548,8040,8041,9579,8561,9596,8069,8071,8584,8586,9612,9108,9621,8597,8085,8598,9111,8600,8607,9636,9124,9637,8101,9126,9130,9131,9132,8111,8633,8640,7619,8138,9164,9167,9169,8145,7635,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:06:42] commit; [2026-10-03 15:22:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-03 15:22:32] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 15:22:32] begin; [2026-10-03 15:22:32] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-03 15:22:32] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-03 15:22:32] commit; [2026-10-03 15:22:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-03 15:22:32] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:22:32] begin; [2026-10-03 15:22:32] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:22:32] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:22:32] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-03 15:22:32] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9216,9217,9218,9731,9219,9220,9733,9742,9743,9746,9237,9750,9238,9239,9752,9755,9770,9264,9777,9265,9266,9267,9780,9781,9782,9783,9271,9272,9282,9283,9284,9285,9799,9288,9289,9806,9294,9295,9296,9297,9298,9820,9823,9313,9314,9316,9832,9833,9837,9334,9335,9336,9855,9347,9348,9349,9874,9366,9367,9368,9369,9382,9385,9402,9403,9416,9418,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9477,9478,9479,9483,9484,9011,9012,9013,9536,9537,9538,9540,9038,9551,9039,9552,9040,9553,9041,9554,9042,9555,9556,9557,9558,9559,9057,9058,9059,9573,9574,9065,9066,9583,9071,9584,9072,9073,9078,9591,9592,9593,9081,9088,9089,9090,9603,9091,9604,9092,9093,9094,9101,9103,9617,9105,9618,9619,9620,9109,9622,9623,9624,9113,9114,9115,9628,9631,9632,9633,9121,9125,9133,9134,9649,9650,9651,9652,9653,9141,9143,9144,9157,9670,9158,9671,9159,9672,9673,9674,9679,9170,9171,9685,9175,9176,9691,9179,9180,9693,9694,9700,9701,9702,9190,9703,9191,9704,9705,9706,9707,9708,9709,9720,9721,9213,9214) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:22:32] commit; [2026-10-03 15:22:37] begin; [2026-10-03 15:22:37] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-03 15:22:37] commit; [2026-10-03 15:22:44] begin; [2026-10-03 15:22:44] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:22:44] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=1 and rsaldo<>0 and venta_anulada=false and cliente_id =1187 order by venta_fecha desc [2026-10-03 15:22:44] commit; [2026-10-03 15:23:32] begin; [2026-10-03 15:23:32] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:23:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-03 15:23:32] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-03 15:23:32] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:23:32] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:23:32] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9216,9217,9218,9731,9219,9220,9733,9742,9743,9746,9237,9750,9238,9239,9752,9755,9770,9264,9777,9265,9266,9267,9780,9781,9782,9783,9271,9272,9282,9283,9284,9285,9799,9288,9289,9806,9294,9295,9296,9297,9298,9820,9823,9313,9314,9316,9832,9833,9837,9334,9335,9336,9855,9347,9348,9349,9874,9366,9367,9368,9369,9382,9385,9402,9403,9416,9418,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9477,9478,9479,9483,9484,9011,9012,9013,9536,9537,9538,9540,9038,9551,9039,9552,9040,9553,9041,9554,9042,9555,9556,9557,9558,9559,9057,9058,9059,9573,9574,9065,9066,9583,9071,9584,9072,9073,9078,9591,9592,9593,9081,9088,9089,9090,9603,9091,9604,9092,9093,9094,9101,9103,9617,9105,9618,9619,9620,9109,9622,9623,9624,9113,9114,9115,9628,9631,9632,9633,9121,9125,9133,9134,9649,9650,9651,9652,9653,9141,9143,9144,9157,9670,9158,9671,9159,9672,9673,9674,9679,9170,9171,9685,9175,9176,9691,9179,9180,9693,9694,9700,9701,9702,9190,9703,9191,9704,9705,9706,9707,9708,9709,9720,9721,9213,9214) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:23:32] commit; [2026-10-03 15:27:21] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 15:27:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-03 15:27:21] begin; [2026-10-03 15:27:21] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-03 15:27:21] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-03 15:27:21] commit; [2026-10-03 15:27:21] begin; [2026-10-03 15:27:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:27:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:27:21] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-03 15:27:21] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:27:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-03 15:27:21] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9216,9217,9218,9731,9219,9220,9733,9742,9743,9746,9237,9750,9238,9239,9752,9755,9770,9264,9777,9265,9266,9267,9780,9781,9782,9783,9271,9272,9282,9283,9284,9285,9799,9288,9289,9806,9294,9295,9296,9297,9298,9820,9823,9313,9314,9316,9832,9833,9837,9334,9335,9336,9855,9347,9348,9349,9874,9366,9367,9368,9369,9382,9385,9402,9403,9416,9418,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9477,9478,9479,9483,9484,9011,9012,9013,9536,9537,9538,9540,9038,9551,9039,9552,9040,9553,9041,9554,9042,9555,9556,9557,9558,9559,9057,9058,9059,9573,9574,9065,9066,9583,9071,9584,9072,9073,9078,9591,9592,9593,9081,9088,9089,9090,9603,9091,9604,9092,9093,9094,9101,9103,9617,9105,9618,9619,9620,9109,9622,9623,9624,9113,9114,9115,9628,9631,9632,9633,9121,9125,9133,9134,9649,9650,9651,9652,9653,9141,9143,9144,9157,9670,9158,9671,9159,9672,9673,9674,9679,9170,9171,9685,9175,9176,9691,9179,9180,9693,9694,9700,9701,9702,9190,9703,9191,9704,9705,9706,9707,9708,9709,9720,9721,9213,9214) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:27:22] commit; [2026-10-03 15:27:25] begin; [2026-10-03 15:27:25] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-03 15:27:25] commit; [2026-10-03 15:27:33] begin; [2026-10-03 15:27:33] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:27:33] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=1 and rsaldo<>0 and venta_anulada=false and cliente_id =830 order by venta_fecha desc [2026-10-03 15:27:33] commit; [2026-10-03 15:28:48] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:28:48] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 15:28:48] begin; [2026-10-03 15:28:48] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 15:28:48] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-03 15:28:48] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-03 15:28:48] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9216,9217,9218,9731,9219,9220,9733,9742,9743,9746,9237,9750,9238,9239,9752,9755,9770,9264,9777,9265,9266,9267,9780,9781,9782,9783,9271,9272,9282,9283,9284,9285,9799,9288,9289,9806,9294,9295,9296,9297,9298,9820,9823,9313,9314,9316,9832,9833,9837,9334,9335,9336,9855,9347,9348,9349,9874,9366,9367,9368,9369,9382,9385,9402,9403,9416,9418,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9477,9478,9479,9483,9484,9011,9012,9013,9536,9537,9538,9540,9038,9551,9039,9552,9040,9553,9041,9554,9042,9555,9556,9557,9558,9559,9057,9058,9059,9573,9574,9065,9066,9583,9071,9584,9072,9073,9078,9591,9592,9593,9081,9088,9089,9090,9603,9091,9604,9092,9093,9094,9101,9103,9617,9105,9618,9619,9620,9109,9622,9623,9624,9113,9114,9115,9628,9631,9632,9633,9121,9125,9133,9134,9649,9650,9651,9652,9653,9141,9143,9144,9157,9670,9158,9671,9159,9672,9673,9674,9679,9170,9171,9685,9175,9176,9691,9179,9180,9693,9694,9700,9701,9702,9190,9703,9191,9704,9705,9706,9707,9708,9709,9720,9721,9213,9214) order by pedidod_pedido_id, pedidod_id [2026-10-03 15:28:48] commit; [2026-10-03 18:13:42] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:13:42] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 18:13:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 18:13:42] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 18:13:42] begin; [2026-10-03 18:13:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 18:13:42] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 18:13:43] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:13:43] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (7683,7684,7685,7686,7689,7690,8715,9744,8213,8214,8215,9754,8730,8732,8733,9759,9762,8740,9253,8229,8232,7721,8235,7723,8237,8756,9269,9270,8759,9789,8253,9278,9279,8768,9794,9795,7759,8272,7760,7765,8278,7766,9815,7767,7768,9817,9307,9309,7773,7777,7778,9315,7781,8299,8300,7790,9839,9328,9841,9337,8313,7801,9339,9340,8316,7806,9858,8836,9353,8847,8336,9877,8341,8342,7831,9891,9383,7854,9391,7855,9393,8882,8885,8886,9408,9412,8905,8908,8397,9422,9423,8911,8400,7888,8914,7890,7891,8917,8918,7894,8919,7895,9433,8921,8922,7899,9444,8937,8431,8432,8438,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,8993,8994,9509,9511,9512,9513,9514,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,9055,9056,8035,8548,8040,8041,9579,8561,9596,8069,8071,8584,8586,9612,9108,9621,8597,8085,8598,9111,8600,8607,9636,9124,9637,8101,9126,9130,9131,9132,8111,8633,8640,7619,8138,9164,9167,9169,8145,7635,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-10-03 18:13:43] commit; [2026-10-03 18:13:49] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 18:13:49] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:13:55] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 18:13:55] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:14:00] begin; [2026-10-03 18:14:00] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-03 18:14:00] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=2 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 18:14:01] commit; [2026-10-03 18:14:26] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-03 18:14:26] begin; [2026-10-03 18:14:26] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-03 18:14:26] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=2 and pedido_anulado=false [2026-10-03 18:14:26] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 18:14:26] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9890,9842,9814) order by pedidod_pedido_id, pedidod_id [2026-10-03 18:14:26] commit; [2026-10-03 18:14:26] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:14:27] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:14:27] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 18:14:33] begin; [2026-10-03 18:14:33] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:14:33] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=5 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-03 18:14:34] commit; [2026-10-03 18:14:57] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:14:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:14:57] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 18:14:57] begin; [2026-10-03 18:14:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:14:57] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 18:14:58] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9840,9875,9859,9876,9816) order by pedidod_pedido_id, pedidod_id [2026-10-03 18:14:58] commit; [2026-10-03 18:15:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:15:21] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 18:15:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:15:21] begin; [2026-10-03 18:15:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:15:21] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 18:15:21] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9840,9875,9859,9876,9816) order by pedidod_pedido_id, pedidod_id [2026-10-03 18:15:21] commit; [2026-10-03 18:15:22] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 18:15:22] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:15:32] begin; [2026-10-03 18:15:32] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-03 18:15:32] commit; [2026-10-03 18:15:39] begin; [2026-10-03 18:15:39] select transporte_id,transporte_descripcion,transporte_bloqueado from sh_principal.tbl_ven_transporte where 1=1 and transporte_bloqueado=false order by transporte_descripcion [2026-10-03 18:15:39] commit; [2026-10-03 18:15:51] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:15:51] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 18:15:51] begin; [2026-10-03 18:15:51] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:15:51] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 18:15:51] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:15:51] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 18:15:51] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9840,9875,9859,9876,9816) order by pedidod_pedido_id, pedidod_id [2026-10-03 18:15:51] commit; [2026-10-03 18:15:51] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:16:05] begin; [2026-10-03 18:16:05] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-03 18:16:05] commit; [2026-10-03 18:16:16] begin; [2026-10-03 18:16:16] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:16:16] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=5 and rsaldo<>0 and venta_anulada=false and cliente_id =533 order by venta_fecha desc [2026-10-03 18:16:16] commit; [2026-10-03 18:16:22] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-03 18:16:22] begin; [2026-10-03 18:16:22] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:16:22] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-03 18:16:22] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 18:16:22] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 18:16:22] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9840,9875,9859,9876,9816) order by pedidod_pedido_id, pedidod_id [2026-10-03 18:16:22] commit; [2026-10-03 20:21:28] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 20:21:28] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 20:21:29] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:21:29] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 20:21:29] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 20:21:29] begin; [2026-10-03 20:21:29] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:21:29] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 20:21:29] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9728,9729,9730,9228,9229,9235,9236,9751,9753,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,9787,9280,9796,9822,9824,9312,9825,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9415,9417,9426,9427,9428,9440,9443,9453,8941,9454,8942,9464,8960,9474,8962,9475,8963,9476,8964,8969,8973,8976,8977,8982,9500,9501,9502,8990,8991,9504,9508,9510,8999,9000,9517,9518,9519,9007,9008,9009,9522,9010,9016,9532,9533,9021,9022,9030,9031,9545,9033,9546,9034,9547,9036,9549,9550,9048,9049,9050,9051,9567,9568,9569,9570,9576,9578,9068,9581,9069,9582,9070,9585,9586,9589,9590,9082,9085,9598,9086,9599,9087,9600,9613,9614,9112,9629,9630,9123,9638,9639,9127,9128,9645,9646,9647,9135,9648,9136,9137,9138,9139,9142,9145,9662,9666,9154,9667,9155,9668,9669,9160,9168,9683,9684,9173,9174,9182,9695,9696,9185,9186,9187,9188,9189,9199,9200,9201,9202,9203,9204,9717,9205,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-03 20:21:29] commit; [2026-10-03 20:21:30] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 20:21:30] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 20:21:35] begin; [2026-10-03 20:21:35] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-03 20:21:35] commit; [2026-10-03 20:21:47] begin; [2026-10-03 20:21:47] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 20:21:47] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=5 and rsaldo<>0 and venta_anulada=false and cliente_id =1390 order by venta_fecha desc [2026-10-03 20:21:47] commit; [2026-10-03 20:23:31] begin; [2026-10-03 20:23:31] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 20:23:31] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 20:23:31] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-03 20:23:31] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 20:23:31] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-03 20:23:31] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9888,9889,9894,9866,9883,9867,9886,9871) order by pedidod_pedido_id, pedidod_id [2026-10-03 20:23:31] commit; [2026-10-03 20:23:32] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-03 20:23:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 20:23:42] begin; [2026-10-03 20:23:42] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:23:42] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=1 and rsaldo<>0 and venta_anulada=false and cliente_id =1717 order by venta_fecha desc [2026-10-03 20:23:42] commit; [2026-10-03 20:28:53] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:28:53] begin; [2026-10-03 20:28:53] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:28:54] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 20:28:54] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 20:28:54] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-03 20:28:54] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9728,9729,9730,9228,9229,9235,9236,9751,9753,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,9787,9280,9796,9822,9824,9312,9825,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9415,9417,9426,9427,9428,9440,9443,9453,8941,9454,8942,9464,8960,9474,8962,9475,8963,9476,8964,8969,8973,8976,8977,8982,9500,9501,9502,8990,8991,9504,9508,9510,8999,9000,9517,9518,9519,9007,9008,9009,9522,9010,9016,9532,9533,9021,9022,9030,9031,9545,9033,9546,9034,9547,9036,9549,9550,9048,9049,9050,9051,9567,9568,9569,9570,9576,9578,9068,9581,9069,9582,9070,9585,9586,9589,9590,9082,9085,9598,9086,9599,9087,9600,9613,9614,9112,9629,9630,9123,9638,9639,9127,9128,9645,9646,9647,9135,9648,9136,9137,9138,9139,9142,9145,9662,9666,9154,9667,9155,9668,9669,9160,9168,9683,9684,9173,9174,9182,9695,9696,9185,9186,9187,9188,9189,9199,9200,9201,9202,9203,9204,9717,9205,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-03 20:28:54] commit; [2026-10-03 20:28:57] begin; [2026-10-03 20:28:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:28:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-03 20:28:57] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-03 20:28:57] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-03 20:28:57] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9728,9729,9730,9228,9229,9235,9236,9751,9753,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,9787,9280,9796,9822,9824,9312,9825,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9415,9417,9426,9427,9428,9440,9443,9453,8941,9454,8942,9464,8960,9474,8962,9475,8963,9476,8964,8969,8973,8976,8977,8982,9500,9501,9502,8990,8991,9504,9508,9510,8999,9000,9517,9518,9519,9007,9008,9009,9522,9010,9016,9532,9533,9021,9022,9030,9031,9545,9033,9546,9034,9547,9036,9549,9550,9048,9049,9050,9051,9567,9568,9569,9570,9576,9578,9068,9581,9069,9582,9070,9585,9586,9589,9590,9082,9085,9598,9086,9599,9087,9600,9613,9614,9112,9629,9630,9123,9638,9639,9127,9128,9645,9646,9647,9135,9648,9136,9137,9138,9139,9142,9145,9662,9666,9154,9667,9155,9668,9669,9160,9168,9683,9684,9173,9174,9182,9695,9696,9185,9186,9187,9188,9189,9199,9200,9201,9202,9203,9204,9717,9205,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-03 20:28:57] commit;