==== NUEVO DIA: 2026-11-08 ==== [2026-11-08 12:51:57] 2026-11-08 12:51:57.688 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-11-08 12:51:57] [2026-11-08 12:51:57] 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-11-08 12:51:57] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-11-08 12:51:57] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-11-08 12:51:57] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-11-08 12:51:57] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-11-08 12:51:57] [2026-11-08 12:52:47] 2026-11-08 12:52:47.473 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-11-08 12:52:47] [2026-11-08 12:52:47] 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-11-08 12:52:47] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-11-08 12:52:47] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-11-08 12:52:47] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-11-08 12:52:47] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-11-08 12:52:47] [2026-11-08 12:52:47] 2026-11-08 12:52:47.895 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-11-08 12:52:47] [2026-11-08 12:52:47] 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-11-08 12:52:47] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-11-08 12:52:47] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-11-08 12:52:47] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-11-08 12:52:47] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-11-08 12:52:47] [2026-11-08 12:52:48] 2026-11-08 12:52:48.286 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-11-08 12:52:48] [2026-11-08 12:52:48] 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-11-08 12:52:48] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-11-08 12:52:48] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-11-08 12:52:48] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-11-08 12:52:48] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-11-08 12:52:48] [2026-11-08 17:31:12] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:31:12] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 17:31:12] begin; [2026-11-08 17:31:12] 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-11-08 17:31:12] 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-11-08 17:31:12] commit; [2026-11-08 17:31:13] 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-11-08 17:31:13] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:31:13] begin; [2026-11-08 17:31:13] 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-11-08 17:31:13] 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-11-08 17:31:13] 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-11-08 17:31:15] 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 (10240,10242,10243,9731,10244,10245,9733,10246,10247,9742,9743,9746,9750,9752,9755,10273,10276,10277,9770,9777,9780,9781,9782,9783,10298,10303,10304,10305,10306,9799,9806,10323,10332,9820,10333,9823,10339,10341,10344,9832,9833,10347,9837,10351,10352,9855,10380,10381,10382,10383,9874,10414,9903,9909,9911,10428,9916,10429,10431,9934,9935,10457,10459,10467,10468,10470,10471,10472,10473,10477,10487,9980,9981,9983,9985,9987,9988,9990,9991,9992,9993,9994,10507,9995,9996,10509,10005,10006,10007,10522,10018,10022,10023,10537,10538,10040,10050,10563,10051,10053,10566,10054,10055,10056,10057,10570,10058,10571,10059,10580,9556,9557,10582,10070,9558,10583,10071,9559,10584,10072,9573,9574,10088,10089,10604,9583,9584,9591,10616,9592,9593,10107,10109,10111,10113,10114,10115,9603,10116,9604,9617,9618,9619,9620,9622,10135,9623,9624,10137,9628,9631,10144,9632,9633,9649,10162,9650,10163,9651,10164,9652,10165,9653,10172,10174,9670,9671,9672,9673,9674,10189,10190,10191,9679,10194,10197,9685,10203,9691,10204,9693,10206,9694,9700,9701,9702,9703,10216,9704,10217,9705,10218,9706,9707,9708,9709,10227,9720,9721,10237) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:31:15] commit; [2026-11-08 17:31:25] begin; [2026-11-08 17:31: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-11-08 17:31:25] commit; [2026-11-08 17:31:32] begin; [2026-11-08 17:31:32] 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-11-08 17:31:32] commit; [2026-11-08 17:31:47] begin; [2026-11-08 17:31: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=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 17:31:47] 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-11-08 17:31:49] commit; [2026-11-08 17:31:56] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=29 and cliente_descuento_producto_id=2384 [2026-11-08 17:31:56] 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=29 and producto_id=2384 [2026-11-08 17:32:06] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=29 and cliente_descuento_producto_id=2386 [2026-11-08 17:32:06] 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=29 and producto_id=2386 [2026-11-08 17:32:18] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=29 and cliente_descuento_producto_id=2388 [2026-11-08 17:32:18] 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=29 and producto_id=2388 [2026-11-08 17:32: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=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 17:32:29] begin; [2026-11-08 17:32:29] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-11-08 17:32:29] 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 #10618','THE FLORIDA STATE PET SHOP, S.A. � Q400.00','/pedido/10618',10618,'tbl_ven_pedido',1,15) returning notificacion_id [2026-11-08 17:32:29] 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-11-08 17:32:29] commit; [2026-11-08 17:32:29] begin; [2026-11-08 17:32: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=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 17:32: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 pedido_id =10618 order by pedido_registro desc limit 1 [2026-11-08 17:32: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 (10618) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:32:29] commit; [2026-11-08 17:33:09] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 17:33:09] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:33:09] begin; [2026-11-08 17:33:09] 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-11-08 17:33:09] 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-11-08 17:33:09] commit; [2026-11-08 17:33:11] begin; [2026-11-08 17:33:11] 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-11-08 17:33:11] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:33:11] 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-11-08 17:33:11] 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-11-08 17:33:11] 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-11-08 17:33:11] 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 (10240,10242,10243,9731,10244,10245,9733,10246,10247,9742,9743,9746,9750,9752,9755,10273,10276,10277,9770,9777,9780,9781,9782,9783,10298,10303,10304,10305,10306,9799,9806,10323,10332,9820,10333,9823,10339,10341,10344,9832,9833,10347,9837,10351,10352,9855,10380,10381,10382,10383,9874,10414,9903,9909,9911,10428,9916,10429,10431,9934,9935,10457,10459,10467,10468,10470,10471,10472,10473,10477,10487,9980,9981,9983,9985,9987,9988,9990,9991,9992,9993,9994,10507,9995,9996,10509,10005,10006,10007,10522,10018,10022,10023,10537,10538,10040,10050,10563,10051,10053,10566,10054,10055,10056,10057,10570,10058,10571,10059,10580,9557,10582,10070,9558,10583,10071,9559,10584,10072,9573,9574,10088,10089,10604,9583,9584,9591,10616,9592,9593,10618,10107,10109,10111,10113,10114,10115,9603,10116,9604,9617,9618,9619,9620,9622,10135,9623,9624,10137,9628,9631,10144,9632,9633,9649,10162,9650,10163,9651,10164,9652,10165,9653,10172,10174,9670,9671,9672,9673,9674,10189,10190,10191,9679,10194,10197,9685,10203,9691,10204,9693,10206,9694,9700,9701,9702,9703,10216,9704,10217,9705,10218,9706,9707,9708,9709,10227,9720,9721,10237) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:33:11] commit; [2026-11-08 17:33:16] begin; [2026-11-08 17:33:16] 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-11-08 17:33:16] commit; [2026-11-08 17:33:24] begin; [2026-11-08 17:33:24] 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-11-08 17:33:24] commit; [2026-11-08 17:33:36] begin; [2026-11-08 17:33: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=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 17:33:36] 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-11-08 17:33:37] commit; [2026-11-08 17:33:45] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=637 and cliente_descuento_producto_id=1907 [2026-11-08 17:33:45] 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=637 and producto_id=1907 [2026-11-08 17:33:57] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=637 and cliente_descuento_producto_id=1968 [2026-11-08 17:33:57] 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=637 and producto_id=1968 [2026-11-08 17:34:12] 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-11-08 17:34:12] begin; [2026-11-08 17:34:12] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-11-08 17:34:12] 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 #10619','LA SEMILLA, S.A. � Q1,008.00','/pedido/10619',10619,'tbl_ven_pedido',1,15) returning notificacion_id [2026-11-08 17:34:12] 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-11-08 17:34:12] commit; [2026-11-08 17:34:12] begin; [2026-11-08 17:34:12] 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-11-08 17:34:12] 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 =10619 order by pedido_registro desc limit 1 [2026-11-08 17:34:12] 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 (10619) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:34:12] commit; [2026-11-08 17:34:17] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 17:34:17] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:34:17] begin; [2026-11-08 17:34:17] 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-11-08 17:34:17] 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-11-08 17:34:17] commit; [2026-11-08 17:34:48] begin; [2026-11-08 17:34: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=5 and empresa_bloqueada=false limit 1 [2026-11-08 17:34:48] 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-11-08 17:34:49] commit; [2026-11-08 17:34:54] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=637 and cliente_descuento_producto_id=3838 [2026-11-08 17:34:54] 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=637 and producto_id=3838 [2026-11-08 17:35:06] 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=5 and empresa_bloqueada=false limit 1 [2026-11-08 17:35:06] begin; [2026-11-08 17:35:06] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-11-08 17:35:06] 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 #10620','LA SEMILLA, S.A. � Q1,380.00','/pedido/10620',10620,'tbl_ven_pedido',5,15) returning notificacion_id [2026-11-08 17:35:06] 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-11-08 17:35:06] commit; [2026-11-08 17:35:06] begin; [2026-11-08 17:35:06] 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=5 and empresa_bloqueada=false limit 1 [2026-11-08 17:35:06] 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 =10620 order by pedido_registro desc limit 1 [2026-11-08 17:35:06] 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 (10620) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:35:06] commit; [2026-11-08 17:36:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:36: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-11-08 17:36:32] begin; [2026-11-08 17:36: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-11-08 17:36: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-11-08 17:36:32] commit; [2026-11-08 17:36:39] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:36:39] 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=5 and empresa_bloqueada=false limit 1 [2026-11-08 17:36:39] 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=5 and pedido_anulado=false [2026-11-08 17:36:39] begin; [2026-11-08 17:36:39] 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=5 and empresa_bloqueada=false limit 1 [2026-11-08 17:36:39] 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 =15 order by pedido_registro desc limit 200 [2026-11-08 17:36:39] 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 (10112,9984,9986,10052,9989,9800,10379,10508,9868,10255,10384,9745,10585,10331,9819,9821,10274,10536,9768,9769,9771,10350,9778,10486,10166,9910,10488,10106,10171,10620,10302,10110,9982) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:36:39] commit; [2026-11-08 17:36:41] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 17:36:41] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-11-08 17:36:41] begin; [2026-11-08 17:36:41] 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-11-08 17:36:41] 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-11-08 17:36:41] commit; [2026-11-08 17:36:46] begin; [2026-11-08 17:36:46] 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-11-08 17:36:47] commit; [2026-11-08 17:36:54] begin; [2026-11-08 17:36:54] 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-11-08 17:36:54] commit; [2026-11-08 17:37:01] begin; [2026-11-08 17:37:01] 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-11-08 17:37:01] 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-11-08 17:37:01] commit; [2026-11-08 17:37:11] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=463 and cliente_descuento_producto_id=3352 [2026-11-08 17:37:11] 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=463 and producto_id=3352 [2026-11-08 17:37:25] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=463 and cliente_descuento_producto_id=3385 [2026-11-08 17:37:25] 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=463 and producto_id=3385 [2026-11-08 17:37:38] 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-11-08 17:37:38] begin; [2026-11-08 17:37:38] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-11-08 17:37:38] 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 #10621','SUPLIMET,S.A � Q395.00','/pedido/10621',10621,'tbl_ven_pedido',1,15) returning notificacion_id [2026-11-08 17:37:38] 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-11-08 17:37:38] commit; [2026-11-08 17:37:39] begin; [2026-11-08 17:37:39] 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-11-08 17:37:39] 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 =10621 order by pedido_registro desc limit 1 [2026-11-08 17:37:39] 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 (10621) order by pedidod_pedido_id, pedidod_id [2026-11-08 17:37:39] commit; [2026-11-08 18:53:52] begin; [2026-11-08 18:53: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=1 and empresa_bloqueada=false limit 1 [2026-11-08 18:53: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=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-11-08 18:53: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 (9728,9729,9730,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:53:52] commit; [2026-11-08 18:53:52] begin; [2026-11-08 18:53: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=1 and empresa_bloqueada=false limit 1 [2026-11-08 18:53: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=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-11-08 18:53: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 (9728,9729,9730,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:53:52] begin; [2026-11-08 18:53: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=1 and empresa_bloqueada=false limit 1 [2026-11-08 18:53: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=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-11-08 18:53: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 (9728,9729,9730,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:53: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=1 and empresa_bloqueada=false limit 1 [2026-11-08 18:53:52] 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-11-08 18:53:52] commit; [2026-11-08 18:53:52] commit; [2026-11-08 18:53:52] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:53:57] begin; [2026-11-08 18:53: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-11-08 18:53: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-11-08 18:53: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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:53:57] commit; [2026-11-08 18:53:59] begin; [2026-11-08 18:53:59] 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-11-08 18:53:59] 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-11-08 18:53:59] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:53:59] commit; [2026-11-08 18:54:01] 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-11-08 18:54:01] 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-11-08 18:54:01] begin; [2026-11-08 18:54:01] 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-11-08 18:54:01] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:54:01] 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-11-08 18:54:01] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:01] commit; [2026-11-08 18:54:01] begin; [2026-11-08 18:54:01] 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-11-08 18:54:01] 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-11-08 18:54:01] 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-11-08 18:54:01] 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-11-08 18:54:01] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:02] commit; [2026-11-08 18:54:03] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:54:03] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 18:54:06] begin; [2026-11-08 18:54:06] 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-11-08 18:54:06] 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-11-08 18:54:06] 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-11-08 18:54:06] 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-11-08 18:54:06] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:06] commit; [2026-11-08 18:54:07] begin; [2026-11-08 18:54:07] 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-11-08 18:54:07] 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-11-08 18:54:07] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:07] commit; [2026-11-08 18:54:12] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:54:12] begin; [2026-11-08 18:54:12] 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-11-08 18:54:12] 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-11-08 18:54:12] 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-11-08 18:54:12] 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-11-08 18:54:12] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:12] commit; [2026-11-08 18:54:13] begin; [2026-11-08 18:54:13] 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-11-08 18:54:13] 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-11-08 18:54:13] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:13] commit; [2026-11-08 18:54:14] 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-11-08 18:54:14] begin; [2026-11-08 18:54:14] 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-11-08 18:54:14] 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-11-08 18:54:14] 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-11-08 18:54:14] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:54:14] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:14] commit; [2026-11-08 18:54:14] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:54:14] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 18:54:14] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 18:54:14] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 18:54:15] begin; [2026-11-08 18:54:15] 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-11-08 18:54:15] 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-11-08 18:54:15] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 18:54:15] commit; [2026-11-08 19:15:13] begin; [2026-11-08 19:15:13] 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-11-08 19:15:13] 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-11-08 19:15:13] 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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:15:13] commit; [2026-11-08 19:15:15] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 19:15:15] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:15:16] begin; [2026-11-08 19:15: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=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 19:15: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=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 19:15:16] 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-11-08 19:15:16] 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-11-08 19:15:16] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:15:16] commit; [2026-11-08 19:15:16] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:15: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=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 19:15:18] 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-11-08 19:15:18] begin; [2026-11-08 19:15:18] 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-11-08 19:15:18] 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-11-08 19:15:18] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:15:18] commit; [2026-11-08 19:15:19] begin; [2026-11-08 19:15:19] 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-11-08 19:15:19] 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-11-08 19:15:19] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:15:19] commit; [2026-11-08 19:15:35] 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-11-08 19:15:35] 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-11-08 19:15:35] begin; [2026-11-08 19:15:35] 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-11-08 19:15:35] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:15:35] 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-11-08 19:15:35] 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,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:15:35] commit; [2026-11-08 19:25: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-11-08 19:25:22] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:25:25] begin; [2026-11-08 19:25: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-11-08 19:25:25] commit; [2026-11-08 19:25:28] begin; [2026-11-08 19:25: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-11-08 19:25:28] 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 =1375 order by venta_fecha desc [2026-11-08 19:25:29] commit; [2026-11-08 19:28: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-11-08 19:28:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:28: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=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 19:28: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=16 and pedido_empresa_id=1 and pedido_anulado=false [2026-11-08 19:28:32] begin; [2026-11-08 19:28: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=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 19:28: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 =16 order by pedido_registro desc limit 200 [2026-11-08 19:28: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 (9728,9729,9730,10252,10257,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9767,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,10349,9327,9843,9331,9332,9333,9338,9342,10369,9860,9861,9862,9350,10375,9351,9864,10377,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,10424,10426,9918,9920,9921,9922,9924,10438,9926,9415,9929,9417,10443,10445,9933,9426,9427,9428,9949,9440,10466,9443,9959,10476,9965,9453,10478,9454,9969,10483,9464,9978,9979,10497,9474,9475,10500,9476,10502,10503,10506,10008,10011,9500,10013,9501,10014,9502,10527,10015,9504,10529,10017,10019,9508,10533,9510,10024,10541,9517,9518,9519,10032,9522,10037,10043,10556,10044,9532,10557,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,10614,9590,10615,10103,9598,9599,9600,9613,9614,10139,9629,9630,10146,9638,9639,9645,9646,9647,9648,10170,10173,9662,9666,9667,9668,9669,9683,9684,10202,10205,9695,9696,10215,10229,9717,10230,9719,9722,9723,9724,9725,9726,9727) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:28:32] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:28:32] commit; [2026-11-08 19:28:44] begin; [2026-11-08 19:28: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=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 19:28: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 =1599 order by venta_fecha desc [2026-11-08 19:28:44] commit; [2026-11-08 19:31:34] begin; [2026-11-08 19:31:34] 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-11-08 19:31:34] 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 =829 order by venta_fecha desc [2026-11-08 19:31:34] commit; [2026-11-08 19:31:44] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 19:31:44] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:31:45] begin; [2026-11-08 19:31: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=5 and empresa_bloqueada=false limit 1 [2026-11-08 19:31: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=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-11-08 19:31: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=5 and empresa_bloqueada=false limit 1 [2026-11-08 19:31: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=5 and pedido_anulado=false [2026-11-08 19:31: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 (10496,10499,10376,10378,9866,9867,9871,10256,10262,10265,10138,10010,9883,10268,9886,10528,9888,9889,10147,10020,9894,10540,10158,10159,10289,10290,10038,10425,10041,10042,9915,10558,10559,10560,10562,10565,9928,10188,10317,10581,10328,10458,9948,10464,10080,10084,10345,10348,10607,10479,10608,10609,10482,9970,10612,10228,10613,10485,10231,9977,10108,10367) order by pedidod_pedido_id, pedidod_id [2026-11-08 19:31:45] commit; [2026-11-08 19:31:45] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-11-08 19:31:52] begin; [2026-11-08 19:31: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-11-08 19:31:52] 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 =829 order by venta_fecha desc [2026-11-08 19:31:52] commit; [2026-11-08 22:57:13] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 22:57:13] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:57:14] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:57:14] 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-11-08 22:57:14] 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-11-08 22:57:14] begin; [2026-11-08 22:57:14] 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-11-08 22:57:14] 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-11-08 22:57:14] 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 (8715,9744,10259,8213,8214,8215,9754,8730,8732,8733,10271,9759,9762,8740,9253,8229,8232,8235,8237,10288,10291,8756,9269,9270,8759,10300,9789,8253,9278,9279,8768,9794,9795,10318,10320,8272,10321,8278,9815,9817,9307,9309,9315,8299,8300,9839,9328,9841,9337,8313,9339,9340,8316,9858,8836,9353,8847,8336,9877,8341,8342,9891,10406,9383,10408,10411,9902,9391,9393,8882,8885,8886,9912,10427,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,10448,8400,8914,8917,8918,8919,9433,8921,8922,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,9470,9472,9480,8462,8978,9499,10524,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,10550,9526,10552,8504,10553,9529,9018,10555,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10574,10575,10578,10078,10079,9055,9056,8548,10085,9579,10093,10094,10097,8561,10610,10098,9596,8584,8586,9612,10131,9108,9621,8597,8598,9111,8600,10142,10143,8607,9636,9124,9637,9126,9130,9131,10156,9132,10157,8633,8640,9164,9167,9169,8145,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,10219,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:57:14] commit; [2026-11-08 22:57:19] begin; [2026-11-08 22:57:19] 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-11-08 22:57:19] commit; [2026-11-08 22:57:43] begin; [2026-11-08 22:57:43] 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-11-08 22:57:43] 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 =1274 order by venta_fecha desc [2026-11-08 22:57:43] commit; [2026-11-08 22:57: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 22:57:47] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:57:47] 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-11-08 22:57:47] begin; [2026-11-08 22:57: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-11-08 22:57:47] 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-11-08 22:57:47] 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 (8715,9744,10259,8213,8214,8215,9754,8730,8732,8733,10271,9759,9762,8740,9253,8229,8232,8235,8237,10288,10291,8756,9269,9270,8759,10300,9789,8253,9278,9279,8768,9794,9795,10318,10320,8272,10321,8278,9815,9817,9307,9309,9315,8299,8300,9839,9328,9841,9337,8313,9339,9340,8316,9858,8836,9353,8847,8336,9877,8341,8342,9891,10406,9383,10408,10411,9902,9391,9393,8882,8885,8886,9912,10427,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,10448,8400,8914,8917,8918,8919,9433,8921,8922,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,9470,9472,9480,8462,8978,9499,10524,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,10550,9526,10552,8504,10553,9529,9018,10555,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10574,10575,10578,10078,10079,9055,9056,8548,10085,9579,10093,10094,10097,8561,10610,10098,9596,8584,8586,9612,10131,9108,9621,8597,8598,9111,8600,10142,10143,8607,9636,9124,9637,9126,9130,9131,10156,9132,10157,8633,8640,9164,9167,9169,8145,9690,9692,9184,8672,8673,9699,8675,8677,8678,8680,8681,10219,8691,8694,9208) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:57:47] commit; [2026-11-08 22:58:09] begin; [2026-11-08 22:58:09] 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-11-08 22:58:09] 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 =979 order by venta_fecha desc [2026-11-08 22:58:09] commit; [2026-11-08 22:58:14] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 22:58:14] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58:16] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58: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-11-08 22:58:16] begin; [2026-11-08 22:58: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-11-08 22:58:16] 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-11-08 22:58:16] 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-11-08 22:58:16] 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 (10272,10371,9859,10407,9898,10412,10220,10447,10319,10287,9840,10577,10161,9875,9876,10551,9816,10554,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:58:16] commit; [2026-11-08 22:58:26] begin; [2026-11-08 22:58: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=5 and empresa_bloqueada=false limit 1 [2026-11-08 22:58:26] 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 =979 order by venta_fecha desc [2026-11-08 22:58:26] commit; [2026-11-08 22:58:28] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58: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-11-08 22:58:29] begin; [2026-11-08 22:58: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=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-11-08 22:58: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=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-11-08 22:58:29] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58: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=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-11-08 22:58: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=14 and pedido_empresa_id=2 and pedido_anulado=false [2026-11-08 22:58: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 (10576,10449,9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:58:29] commit; [2026-11-08 22:58:37] begin; [2026-11-08 22:58:37] 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-11-08 22:58:37] 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=2 and rsaldo<>0 and venta_anulada=false and cliente_id =979 order by venta_fecha desc [2026-11-08 22:58:37] commit; [2026-11-08 22:58:41] begin; [2026-11-08 22:58:41] 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-11-08 22:58:41] 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-11-08 22:58:41] 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-11-08 22:58:41] 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-11-08 22:58:41] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58:41] 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 (10576,10449,9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:58:41] commit; [2026-11-08 22:58: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=2 and empresa_bloqueada=false limit 1 [2026-11-08 22:58: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=2 and pedido_anulado=false [2026-11-08 22:58:42] begin; [2026-11-08 22:58: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=2 and empresa_bloqueada=false limit 1 [2026-11-08 22:58: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=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-11-08 22:58:42] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58: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 (10576,10449,9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:58:42] commit; [2026-11-08 22:58:42] begin; [2026-11-08 22:58: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=2 and empresa_bloqueada=false limit 1 [2026-11-08 22:58: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=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-11-08 22:58: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=2 and empresa_bloqueada=false limit 1 [2026-11-08 22:58: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=2 and pedido_anulado=false [2026-11-08 22:58:42] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-11-08 22:58: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 (10576,10449,9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-11-08 22:58:42] commit; [2026-11-08 23:34:25] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=13 and notificacion_usuario_leida=false [2026-11-08 23:34:25] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-11-08 23:34:25] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=13 and notificacion_usuario_leida=false [2026-11-08 23:34:25] 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=13 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-11-08 23:34:25] 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=13 and pedido_empresa_id=5 and pedido_anulado=false [2026-11-08 23:34:25] begin; [2026-11-08 23:34:25] 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=13 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-11-08 23:34:25] 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 =13 order by pedido_registro desc limit 200 [2026-11-08 23:34:25] 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 (9856,9863,10120,10249,10122,10127,10000,10387,10388,10392,9881,10396,10397,9885,9887,10400,10145,10530,10402,10531,10403,9892,10149,10279,10280,9896,10153,10410,10284,9900,9773,10286,10543,10415,9775,9904,10545,10417,9906,10547,10167,9786,10433,10177,10434,10178,10307,10308,10309,10181,10310,10182,10312,9801,10315,10060,9808,10065,9810,10451,10452,9940,9941,10588,10461,10592,10209,10210,10211,10083,10596,10601,10475,10091,10605,10225,9844,10357,9845,9846,10359,9847,9848,9849,9850,10491,10363,9851,10364,9852,9853,10238) order by pedidod_pedido_id, pedidod_id [2026-11-08 23:34:25] commit; [2026-11-08 23:34:28] begin; [2026-11-08 23:34: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=13 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-11-08 23:34:28] 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-11-08 23:34:29] commit; [2026-11-08 23:34:29] begin; [2026-11-08 23:34: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=13 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-11-08 23:34:29] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=13 and notificacion_usuario_leida=false [2026-11-08 23:34: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=5 and usuario_id =13 order by pedido_registro desc limit 200 [2026-11-08 23:34: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=13 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-11-08 23:34: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=13 and pedido_empresa_id=5 and pedido_anulado=false [2026-11-08 23:34: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 (9856,9863,10120,10249,10122,10127,10000,10387,10388,10392,9881,10396,10397,9885,9887,10400,10145,10530,10402,10531,10403,9892,10149,10279,10280,9896,10153,10410,10284,9900,9773,10286,10543,10415,9775,9904,10545,10417,9906,10547,10167,9786,10433,10177,10434,10178,10307,10308,10309,10181,10310,10182,10312,9801,10315,10060,9808,10065,9810,10451,10452,9940,9941,10588,10461,10592,10209,10210,10211,10083,10596,10601,10475,10091,10605,10225,9844,10357,9845,9846,10359,9847,9848,9849,9850,10491,10363,9851,10364,9852,9853,10238) order by pedidod_pedido_id, pedidod_id [2026-11-08 23:34:29] commit; [2026-11-08 23:34:30] begin; [2026-11-08 23:34:30] 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-11-08 23:34:30] commit; [2026-11-08 23:34:37] begin; [2026-11-08 23:34:37] 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=13 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-11-08 23:34:37] 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 =2076 order by venta_fecha desc [2026-11-08 23:34:37] commit;