==== NUEVO DIA: 2026-10-24 ==== [2026-10-24 08:33:20] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 08:33:20] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 08:33:20] begin; [2026-10-24 08:33:20] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 08:33:20] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 08:33:20] commit; [2026-10-24 08:33:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 08:33:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 08:33:21] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 08:33:21] begin; [2026-10-24 08:33:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 08:33:21] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-24 08:33:21] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (10112,9984,10274,9986,10052,9989,9800,9768,9769,9771,9868,10255,9745,9778,10166,9910,10106,10331,10171,9819,9821,10302,10110,9982) order by pedidod_pedido_id, pedidod_id [2026-10-24 08:33:21] commit; [2026-10-24 08:33:23] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 08:33:23] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 08:33:23] begin; [2026-10-24 08:33:23] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 08:33:23] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 08:33:23] commit; [2026-10-24 08:33:28] begin; [2026-10-24 08:33: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=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 08:33: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=1 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-24 08:33:28] commit; [2026-10-24 08:35:11] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 08:35:11] begin; [2026-10-24 08:35: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-10-24 08:35: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-10-24 08:35: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-10-24 08:35: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-10-24 08:35: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 (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,9837,9855,9874,9382,9385,9903,9909,9911,9402,9403,9916,9416,9418,9934,9935,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9980,9981,9983,9985,9987,9988,9477,9990,9478,9991,9479,9992,9993,9994,9995,9483,9996,9484,10005,10006,10007,10018,10022,10023,10040,9536,9537,10050,9538,10051,9540,10053,10054,10055,10056,10057,10058,10059,9551,9552,9553,9554,9555,9556,9557,10070,9558,10071,9559,10072,9573,9574,10088,10089,9583,9584,9591,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-10-24 08:35:12] commit; [2026-10-24 09:47:34] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 09:47: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=17 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 09:47:34] 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=17 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 09:47:34] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=17 and notificacion_usuario_leida=false [2026-10-24 09:47:34] begin; [2026-10-24 09:47: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=17 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 09:47:34] 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 =17 order by pedido_registro desc limit 200 [2026-10-24 09:47:34] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=17 and notificacion_usuario_leida=false [2026-10-24 09:47:34] 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 (10261,9797,9804) order by pedidod_pedido_id, pedidod_id [2026-10-24 09:47:34] commit; [2026-10-24 09:47:35] begin; [2026-10-24 09:47: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=17 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 09:47: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=5 and usuario_id =17 order by pedido_registro desc limit 200 [2026-10-24 09:47: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 (10261,9797,9804) order by pedidod_pedido_id, pedidod_id [2026-10-24 09:47:35] commit; [2026-10-24 09:47:38] begin; [2026-10-24 09:47:38] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 09:47:38] commit; [2026-10-24 09:47:52] begin; [2026-10-24 09:47:52] select transporte_id,transporte_descripcion,transporte_bloqueado from sh_principal.tbl_ven_transporte where 1=1 and transporte_bloqueado=false order by transporte_descripcion [2026-10-24 09:47:52] commit; [2026-10-24 09:48:26] begin; [2026-10-24 09:48: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=17 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 09:48:26] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=5 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-24 09:48:27] commit; [2026-10-24 09:48:44] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=1833 and cliente_descuento_producto_id=3810 [2026-10-24 09:48:44] 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=1833 and producto_id=3810 [2026-10-24 09:49: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=17 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 09:49:15] begin; [2026-10-24 09:49:15] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-10-24 09:49:15] 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 #10346','ASDRUBAL JOSE HERNANDEZ PALOMO � Q558.00','/pedido/10346',10346,'tbl_ven_pedido',5,17) returning notificacion_id [2026-10-24 09:49:15] select notificacion_suscripcion_usuario_id from sh_principal.tbl_gen_notificacion_suscripcion inner join sh_principal.tbl_gen_usuario on usuario_id=notificacion_suscripcion_usuario_id where notificacion_suscripcion_tipo_id=2 and notificacion_suscripcion_activo=true and usuario_bloqueado=false [2026-10-24 09:49:15] commit; [2026-10-24 09:49:15] begin; [2026-10-24 09:49: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=17 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 09:49: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 pedido_id =10346 order by pedido_registro desc limit 1 [2026-10-24 09:49: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 (10346) order by pedidod_pedido_id, pedidod_id [2026-10-24 09:49:15] commit; [2026-10-24 10:29:41] 2026-10-24 10:29:41.344 WARN 5176 --- [MI TCP Accept-0] sun.rmi.transport.tcp : RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=62461] throws [2026-10-24 10:29:41] [2026-10-24 10:29:41] java.io.IOException: The server sockets created using the LocalRMIServerSocketFactory only accept connections from clients running on the host where the RMI remote objects have been exported. [2026-10-24 10:29:41] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-10-24 10:29:41] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-10-24 10:29:41] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-10-24 10:29:41] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-10-24 10:29:41] [2026-10-24 10:31:00] 2026-10-24 10:31:00.344 WARN 5176 --- [MI TCP Accept-0] sun.rmi.transport.tcp : RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=62461] throws [2026-10-24 10:31:00] [2026-10-24 10:31:00] java.io.IOException: The server sockets created using the LocalRMIServerSocketFactory only accept connections from clients running on the host where the RMI remote objects have been exported. [2026-10-24 10:31:00] at jdk.management.agent/sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:na] [2026-10-24 10:31:00] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:394) ~[na:na] [2026-10-24 10:31:00] at java.rmi/sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:366) ~[na:na] [2026-10-24 10:31:00] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] [2026-10-24 10:31:00] [2026-10-24 10:55:04] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 10:55:04] begin; [2026-10-24 10:55:04] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 10:55:04] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:55:04] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 10:55:04] commit; [2026-10-24 10:55:05] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:55:05] begin; [2026-10-24 10:55:05] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:55:05] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:55:05] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-24 10:55:05] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 10:55:05] 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,9837,9855,9874,9382,9385,9903,9909,9911,9402,9403,9916,9416,9418,9934,9935,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9980,9981,9983,9985,9987,9988,9477,9990,9478,9991,9479,9992,9993,9994,9995,9483,9996,9484,10005,10006,10007,10018,10022,10023,10040,9536,9537,10050,9538,10051,9540,10053,10054,10055,10056,10057,10058,10059,9551,9552,9553,9554,9555,9556,9557,10070,9558,10071,9559,10072,9573,9574,10088,10089,9583,9584,9591,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-10-24 10:55:05] commit; [2026-10-24 10:55:07] begin; [2026-10-24 10:55: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=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:55:07] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=1 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-24 10:55:07] commit; [2026-10-24 10:55: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-10-24 10:55:36] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 10:55:36] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:55:36] begin; [2026-10-24 10:55: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-10-24 10:55:36] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-24 10:55:36] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (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,9837,9855,9874,9382,9385,9903,9909,9911,9402,9403,9916,9416,9418,9934,9935,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9980,9981,9983,9985,9987,9988,9477,9990,9478,9991,9479,9992,9993,9994,9995,9483,9996,9484,10005,10006,10007,10018,10022,10023,10040,9536,9537,10050,9538,10051,9540,10053,10054,10055,10056,10057,10058,10059,9551,9552,9553,9554,9555,9556,9557,10070,9558,10071,9559,10072,9573,9574,10088,10089,9583,9584,9591,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-10-24 10:55:36] commit; [2026-10-24 10:57:11] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:57:11] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 10:57:11] begin; [2026-10-24 10:57:11] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 10:57:11] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 10:57:11] commit; [2026-10-24 10:57:12] begin; [2026-10-24 10:57: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-10-24 10:57: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 usuario_id =15 order by pedido_registro desc limit 200 [2026-10-24 10:57: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-10-24 10:57: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=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 10:57:12] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:57: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 (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,9837,9855,9874,9382,9385,9903,9909,9911,9402,9403,9916,9416,9418,9934,9935,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9980,9981,9983,9985,9987,9988,9477,9990,9478,9991,9479,9992,9993,9994,9995,9483,9996,9484,10005,10006,10007,10018,10022,10023,10040,9536,9537,10050,9538,10051,9540,10053,10054,10055,10056,10057,10058,10059,9551,9552,9553,9554,9555,9556,9557,10070,9558,10071,9559,10072,9573,9574,10088,10089,9583,9584,9591,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-10-24 10:57:12] commit; [2026-10-24 10:57:16] begin; [2026-10-24 10:57: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-10-24 10:57:16] commit; [2026-10-24 10:57:25] begin; [2026-10-24 10:57:25] select transporte_id,transporte_descripcion,transporte_bloqueado from sh_principal.tbl_ven_transporte where 1=1 and transporte_bloqueado=false order by transporte_descripcion [2026-10-24 10:57:25] commit; [2026-10-24 10:57:36] begin; [2026-10-24 10:57: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-10-24 10:57: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-10-24 10:57:37] commit; [2026-10-24 10:58:21] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=637 and cliente_descuento_producto_id=3550 [2026-10-24 10:58:21] 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=3550 [2026-10-24 10:58:32] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:58:32] begin; [2026-10-24 10:58:32] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-10-24 10:58:32] 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 #10347','LA SEMILLA, S.A. � Q576.00','/pedido/10347',10347,'tbl_ven_pedido',1,15) returning notificacion_id [2026-10-24 10:58:32] select notificacion_suscripcion_usuario_id from sh_principal.tbl_gen_notificacion_suscripcion inner join sh_principal.tbl_gen_usuario on usuario_id=notificacion_suscripcion_usuario_id where notificacion_suscripcion_tipo_id=2 and notificacion_suscripcion_activo=true and usuario_bloqueado=false [2026-10-24 10:58:32] commit; [2026-10-24 10:58:33] begin; [2026-10-24 10:58:33] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:58:33] 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 =10347 order by pedido_registro desc limit 1 [2026-10-24 10:58:33] 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 (10347) order by pedidod_pedido_id, pedidod_id [2026-10-24 10:58:33] commit; [2026-10-24 10:58:45] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:58:45] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 10:58:45] begin; [2026-10-24 10:58:45] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 10:58:45] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 10:58:45] commit; [2026-10-24 10:58:46] begin; [2026-10-24 10:58:46] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:58:46] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-24 10:58:46] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=15 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 10:58:46] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=15 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 10:58:46] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:58:46] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (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,9855,9874,9385,9903,9909,9911,9402,9403,9916,9416,9418,9934,9935,9424,9425,9430,9441,9442,9448,9449,9450,9452,9455,9458,9459,9460,9461,9463,9465,9980,9981,9983,9985,9987,9988,9477,9990,9478,9991,9479,9992,9993,9994,9995,9483,9996,9484,10005,10006,10007,10018,10022,10023,10040,9536,9537,10050,9538,10051,9540,10053,10054,10055,10056,10057,10058,10059,9551,9552,9553,9554,9555,9556,9557,10070,9558,10071,9559,10072,9573,9574,10088,10089,9583,9584,9591,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-10-24 10:58:46] commit; [2026-10-24 10:58:59] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:58:59] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 10:58:59] begin; [2026-10-24 10:58:59] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 10:58:59] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 10:58:59] commit; [2026-10-24 10:59:04] 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-10-24 10:59:04] 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-10-24 10:59:04] begin; [2026-10-24 10:59:04] 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-10-24 10:59:04] 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-10-24 10:59:04] 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,10274,9986,10052,9989,9800,9768,9769,9771,9868,10255,9745,9778,10166,9910,10106,10331,10171,9819,9821,10302,10110,9982) order by pedidod_pedido_id, pedidod_id [2026-10-24 10:59:04] commit; [2026-10-24 10:59:11] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=15 and notificacion_usuario_leida=false [2026-10-24 10:59:11] begin; [2026-10-24 10:59:11] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_dispositivo_plataforma='ANDROID', usuario_uid_push_dispositivo_informacion='Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/30.0 Chrome/143.0.0.0 Mobile Safari/537.36 | es-US | 384x774', usuario_uid_push_version_app='0.06', usuario_uid_push_ultima_actualizacion=now(), usuario_uid_push_endpoint='https://fcm.googleapis.com/fcm/send/egAWSL1NDcE:APA91bE05xxCOPwQpdtTlkovLCTfinzITI_NLMLhIv9jKwuEY9ms_olRAzYkCylb7hsqpqCcSNBqZwCXYY6BRAu1g09g0t2F1OnmWukb0gnCvOArpGoSzpje5f9c3-lBMLqNC-OGgM85', usuario_uid_push_p256dh='BBWZBIXG8CqJXtMwPcHOygaA5TKfjp8vfVRxHgnrILQKJRTni6LL3pIdMEl2YvxD9INxMK6O4im_lDLlGmK-vP8', usuario_uid_push_auth='KM9NBYLVxHDJnY-yLnCjLQ' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id=15 [2026-10-24 10:59:11] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 10:59:11] update sh_principal.tbl_gen_usuario_uid_push set usuario_uid_push_endpoint='', usuario_uid_push_p256dh='', usuario_uid_push_auth='' where usuario_uid_push='d8e6737b-0974-463c-b829-deb2c629c29e' and usuario_uid_push_usuario_id<>15 and usuario_uid_push_endpoint<>'' [2026-10-24 10:59:11] commit; [2026-10-24 10:59:15] begin; [2026-10-24 10:59: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=15 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 10:59: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=2 and usuario_id =15 order by pedido_registro desc limit 200 [2026-10-24 10:59: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=15 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 10:59:15] 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=2 and pedido_anulado=false [2026-10-24 10:59: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 (10241,10275,9732) order by pedidod_pedido_id, pedidod_id [2026-10-24 10:59:15] commit; [2026-10-24 11:27:13] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-24 11:27: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-10-24 11:27:13] begin; [2026-10-24 11:27: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-10-24 11:27: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-10-24 11:27: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 (9928,9866,9867,10188,10317,9871,10256,10262,10328,10265,10138,10010,9883,10268,9948,9886,10080,9888,9889,10147,10084,10020,9894,10345,10158,10159,10289,10290,9970,10228,10038,10231,10041,9977,10042,9915,10108) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:27:13] commit; [2026-10-24 11:27:17] begin; [2026-10-24 11:27:17] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 11:27:17] commit; [2026-10-24 11:27:22] begin; [2026-10-24 11:27:22] select transporte_id,transporte_descripcion,transporte_bloqueado from sh_principal.tbl_ven_transporte where 1=1 and transporte_bloqueado=false order by transporte_descripcion [2026-10-24 11:27:22] commit; [2026-10-24 11:27:27] begin; [2026-10-24 11:27:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:27:27] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=5 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-24 11:27:28] commit; [2026-10-24 11:27:37] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=41 and cliente_descuento_producto_id=3834 [2026-10-24 11:27:37] 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=41 and producto_id=3834 [2026-10-24 11:27:57] select cliente_descuento_porcentaje from sh_principal.tbl_ven_cliente_descuento_producto where cliente_descuento_cliente_id=41 and cliente_descuento_producto_id=3838 [2026-10-24 11:27: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=41 and producto_id=3838 [2026-10-24 11:28: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-10-24 11:28:14] begin; [2026-10-24 11:28:14] select notificacion_tipo_id from sh_principal.tbl_gen_notificacion_tipo where upper(trim(notificacion_tipo_codigo))='NUEVO_PEDIDO' limit 1 [2026-10-24 11:28:14] 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 #10348','JADA, SOCIEDAD ANONIMA � Q1,310.00','/pedido/10348',10348,'tbl_ven_pedido',5,16) returning notificacion_id [2026-10-24 11:28:14] select notificacion_suscripcion_usuario_id from sh_principal.tbl_gen_notificacion_suscripcion inner join sh_principal.tbl_gen_usuario on usuario_id=notificacion_suscripcion_usuario_id where notificacion_suscripcion_tipo_id=2 and notificacion_suscripcion_activo=true and usuario_bloqueado=false [2026-10-24 11:28:14] commit; [2026-10-24 11:28:14] begin; [2026-10-24 11:28: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-10-24 11:28: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 pedido_id =10348 order by pedido_registro desc limit 1 [2026-10-24 11:28: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 (10348) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:28:14] commit; [2026-10-24 11:28:23] begin; [2026-10-24 11:28:23] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:28:23] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-24 11:28:23] 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 (9928,9866,9867,10188,10317,9871,10256,10262,10328,10265,10138,10010,9883,10268,9948,9886,10080,9888,9889,10147,10084,10020,9894,10345,10348,10158,10159,10289,10290,9970,10228,10038,10231,10041,9977,10042,9915,10108) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:28:23] commit; [2026-10-24 11:28:23] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-24 11:28:23] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:28:23] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 11:28:24] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:28:24] begin; [2026-10-24 11:28:24] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 11:28:24] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:28:24] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-24 11:28:24] 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 (9928,9866,9867,10188,10317,9871,10256,10262,10328,10265,10138,10010,9883,10268,9948,9886,10080,9888,9889,10147,10084,10020,9894,10345,10348,10158,10159,10289,10290,9970,10228,10038,10231,10041,9977,10042,9915,10108) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:28:24] commit; [2026-10-24 11:28: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=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:28:26] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=16 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 11:28:26] begin; [2026-10-24 11:28: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=16 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 11:28:26] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-24 11:28:26] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9928,9866,9867,10188,10317,9871,10256,10262,10328,10265,10138,10010,9883,10268,9948,9886,10080,9888,9889,10147,10084,10020,9894,10345,10348,10158,10159,10289,10290,9970,10228,10038,10231,10041,9977,10042,9915,10108) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:28:26] commit; [2026-10-24 11:28:28] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 11:28:28] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=16 and notificacion_usuario_leida=false [2026-10-24 11: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-10-24 11: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-10-24 11:28:32] begin; [2026-10-24 11: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-10-24 11: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-10-24 11: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,9228,9229,10257,9235,9236,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9918,9920,9921,9922,9924,9926,9415,9929,9417,9933,9426,9427,9428,9949,9440,9443,9959,9965,9453,9454,9969,9464,9978,9979,9474,9475,9476,10008,10011,9500,10013,9501,10014,9502,10015,9504,10017,10019,9508,9510,10024,9517,9518,9519,10032,9522,10037,10043,10044,9532,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,9590,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,9173,9174,10202,10205,9182,9695,9696,9185,9186,9187,9188,9189,10215,9199,9200,9201,9202,9203,9204,10229,9717,9205,10230,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:28:32] commit; [2026-10-24 11:58:50] begin; [2026-10-24 11:58:50] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 11:58:50] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =16 order by pedido_registro desc limit 200 [2026-10-24 11:58:50] 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,9228,9229,10257,9235,9236,10263,9751,10264,9753,10267,10269,10270,9764,9765,9766,9254,9767,9255,9256,9257,9258,9259,9268,10295,10297,9787,10301,9280,9796,10324,10330,9822,9824,9312,9825,10343,9327,9843,9331,9332,9333,9338,9342,9860,9861,9862,9350,9351,9864,9865,9869,9357,9870,9358,9359,9360,9362,9363,9364,9365,9884,9381,9384,9390,9392,9918,9920,9921,9922,9924,9926,9415,9929,9417,9933,9426,9427,9428,9949,9440,9443,9959,9965,9453,9454,9969,9464,9978,9979,9474,9475,9476,10008,10011,9500,10013,9501,10014,9502,10015,9504,10017,10019,9508,9510,10024,9517,9518,9519,10032,9522,10037,10043,10044,9532,9533,10048,10049,9545,9546,9547,9549,9550,10073,9567,9568,9569,9570,10087,9576,9578,9581,9582,9585,9586,9589,9590,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,9173,9174,10202,10205,9182,9695,9696,9185,9186,9187,9188,9189,10215,9199,9200,9201,9202,9203,9204,10229,9717,9205,10230,9719,9209,9722,9210,9723,9211,9724,9725,9726,9727,9215) order by pedidod_pedido_id, pedidod_id [2026-10-24 11:58:50] commit; [2026-10-24 11:59:02] begin; [2026-10-24 11:59:02] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=16 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 11:59:02] select producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,sum(rcantidad) as existencia,producto_bloqueado,exists(select 1 from sh_multimedia.tbl_inv_producto_multimedia m where m.producto_id=tbl_inv_producto.producto_id and coalesce(m.producto_imagen,'')<>'') as tiene_imagen from sh_principal.tbl_inv_producto inner join sh_principal.tbl_inv_proveedor on proveedor_id=producto_proveedor_id inner join sh_principal.tbl_inv_especie_producto on especie_producto_id=producto_especie_id inner join sh_principal.tbl_inv_especificacion_producto on especificacion_producto_id=producto_especificacion_id inner join sh_principal.fn_inv_saldo_productos_bodega_completo() on rproducto_id=producto_id inner join sh_principal.tbl_gen_empresa on empresa_id=producto_empresa_id inner join sh_principal.tbl_inv_bodega on bodega_id=rbodega_id and bodega_empresa_id=empresa_id where 1=1 and producto_empresa_id=1 and bodega_permitida_venta and producto_bloqueado=false and producto_precio>0 group by producto_id,producto_descripcion,proveedor_nombre,especie_producto_descripcion,especificacion_producto_descripcion,producto_precio,producto_bien,producto_servicio,producto_codigo,producto_codigo_barra,producto_maneja_existencia,producto_precio_editable,producto_bloqueado order by producto_descripcion [2026-10-24 11:59:02] commit; [2026-10-24 13:45:01] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:45:01] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:45:02] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:45:02] begin; [2026-10-24 13:45:02] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:45:02] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:45:02] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:45:02] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 13:45:02] 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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 13:45:02] commit; [2026-10-24 13:45:11] begin; [2026-10-24 13:45:11] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 13:45:11] commit; [2026-10-24 13:45:13] begin; [2026-10-24 13:45: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:45:13] 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 =1537 order by venta_fecha desc [2026-10-24 13:45:13] commit; [2026-10-24 13:45:34] begin; [2026-10-24 13:45: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:45: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 =1266 order by venta_fecha desc [2026-10-24 13:45:34] commit; [2026-10-24 13:45:50] begin; [2026-10-24 13:45:50] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:45:50] 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 =227 order by venta_fecha desc [2026-10-24 13:45:50] commit; [2026-10-24 13:46:04] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:46:04] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:46: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46: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=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 13:46:06] begin; [2026-10-24 13:46: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46: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 =14 order by pedido_registro desc limit 200 [2026-10-24 13:46:06] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:46: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 (10272,9859,9898,10220,10319,10287,9840,10161,9875,9876,9816,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:46:06] commit; [2026-10-24 13:46:14] begin; [2026-10-24 13:46: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=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:14] 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 =227 order by venta_fecha desc [2026-10-24 13:46:14] commit; [2026-10-24 13:46:28] begin; [2026-10-24 13:46: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:28] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:46:28] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:46: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:28] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 13:46:28] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (10272,9859,9898,10220,10319,10287,9840,10161,9875,9876,9816,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:46:28] commit; [2026-10-24 13:46:30] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:46:30] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:30] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 13:46:30] begin; [2026-10-24 13:46:30] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:30] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:46:30] 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,9859,9898,10220,10319,10287,9840,10161,9875,9876,9816,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:46:30] commit; [2026-10-24 13:46:56] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:46:57] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:46:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:57] begin; [2026-10-24 13:46:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:46:57] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 13:46:57] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:46:57] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:46: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 (10272,9859,9898,10220,10319,10287,9840,10161,9875,9876,9816,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:46:57] commit; [2026-10-24 13:46:59] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:46:59] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:47:06] begin; [2026-10-24 13:47:06] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 13:47:06] commit; [2026-10-24 13:47:27] begin; [2026-10-24 13:47:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:47:27] 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 =202 order by venta_fecha desc [2026-10-24 13:47:27] commit; [2026-10-24 13:47:41] begin; [2026-10-24 13:47: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=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:47:41] 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 =202 order by venta_fecha desc [2026-10-24 13:47:41] commit; [2026-10-24 13:47:49] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:47:49] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:47:51] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:47:51] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:47:51] begin; [2026-10-24 13:47:51] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:47:51] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=2 and pedido_anulado=false [2026-10-24 13:47:51] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:47:51] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:47:52] commit; [2026-10-24 13:48:18] begin; [2026-10-24 13:48: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=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:48:18] 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 =202 order by venta_fecha desc [2026-10-24 13:48:18] commit; [2026-10-24 13:48:20] begin; [2026-10-24 13:48:20] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:48:20] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:48:20] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:48:20] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:48:20] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=2 and pedido_anulado=false [2026-10-24 13:48:20] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:48:20] commit; [2026-10-24 13:48:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:48:21] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=2 and pedido_anulado=false [2026-10-24 13:48:21] begin; [2026-10-24 13:48:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:48:21] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:48:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:48:21] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:48:21] commit; [2026-10-24 13:57:56] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:57:56] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:57:57] begin; [2026-10-24 13:57:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:57: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=2 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:57:57] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=2 and empresa_bloqueada=false limit 1 [2026-10-24 13:57:57] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=2 and pedido_anulado=false [2026-10-24 13:57:57] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:57: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 (9890,9842,10086,9814) order by pedidod_pedido_id, pedidod_id [2026-10-24 13:57:57] commit; [2026-10-24 13:57:59] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:57:59] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:58:05] begin; [2026-10-24 13:58:05] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 13:58:05] commit; [2026-10-24 13:58:13] begin; [2026-10-24 13:58: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:13] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=5 and rsaldo<>0 and venta_anulada=false and cliente_id =533 order by venta_fecha desc [2026-10-24 13:58:13] commit; [2026-10-24 13:58: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-10-24 13:58:25] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:58:27] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:58:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:27] begin; [2026-10-24 13:58:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:27] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 13:58:27] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:58:27] 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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 13:58:27] commit; [2026-10-24 13:58:39] begin; [2026-10-24 13:58: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:39] 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 =533 order by venta_fecha desc [2026-10-24 13:58:39] commit; [2026-10-24 13:58:52] begin; [2026-10-24 13:58:52] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:52] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:58:52] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58: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 =14 order by pedido_registro desc limit 200 [2026-10-24 13:58: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=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 13:58: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 (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 13:58:52] commit; [2026-10-24 13:58:54] begin; [2026-10-24 13:58:54] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:54] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:58:54] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:58:54] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:58:54] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 13:58:54] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 13:58:54] commit; [2026-10-24 13:59:21] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 13:59:21] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:59:22] begin; [2026-10-24 13:59:22] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:59:22] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:59:22] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 13:59:22] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 13:59:22] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 13:59:22] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 13:59:22] commit; [2026-10-24 13:59:31] begin; [2026-10-24 13:59:31] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 13:59:31] commit; [2026-10-24 13:59:37] begin; [2026-10-24 13:59: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=1 and empresa_bloqueada=false limit 1 [2026-10-24 13:59: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=1 and rsaldo<>0 and venta_anulada=false and cliente_id =517 order by venta_fecha desc [2026-10-24 13:59:37] commit; [2026-10-24 14:00:47] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:00: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-10-24 14:00: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-10-24 14:00:47] begin; [2026-10-24 14:00: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-10-24 14:00: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-10-24 14:00: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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:00:47] commit; [2026-10-24 14:02:55] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:02:56] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 14:02:56] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:02:56] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 14:02:56] begin; [2026-10-24 14:02:56] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:02:56] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:02:56] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 14:02:56] 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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:02:56] commit; [2026-10-24 14:03:01] begin; [2026-10-24 14:03:01] select cliente_id,cliente_nombre_comercial,cliente_razon_social,cliente_nit,cliente_correo_electronico,cliente_direccion,cliente_bloqueado,cliente_limite_credito,cliente_dias_credito,municipio_geografico_descripcion,departamento_geografico_descripcion,vendedor_descripcion,cliente_telefono from sh_principal.tbl_ven_cliente inner join sh_principal.tbl_gen_municipio_geografico on cliente_municipio_geografico_id=municipio_geografico_id inner join sh_principal.tbl_gen_departamento_geografico on municipio_geografico_departamento_id=departamento_geografico_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=cliente_vendedor_id where 1=1 and cliente_bloqueado=false order by cliente_nombre_comercial [2026-10-24 14:03:01] commit; [2026-10-24 14:03:11] begin; [2026-10-24 14:03: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:03:11] 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 =482 order by venta_fecha desc [2026-10-24 14:03:11] commit; [2026-10-24 14:03: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=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:03:16] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:03: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=1 and pedido_anulado=false [2026-10-24 14:03:16] begin; [2026-10-24 14:03: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=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:03: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 =14 order by pedido_registro desc limit 200 [2026-10-24 14:03: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 (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:03:16] commit; [2026-10-24 14:03:27] begin; [2026-10-24 14:03:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:03:27] 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 =360 order by venta_fecha desc [2026-10-24 14:03:27] commit; [2026-10-24 14:03:47] begin; [2026-10-24 14:03: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-10-24 14:03:47] select venta_id,venta_serie,venta_numero,to_char(venta_fecha,'DD/MM/YYYY') as fecha,venta_total,rsaldo as saldo FROM sh_principal.tbl_ven_venta inner join sh_principal.tbl_ven_cliente on cliente_id=venta_cliente_id inner join sh_principal.fn_ven_saldo_ventas(0,0) on venta_id=rventa_id where 1=1 and venta_empresa_id=1 and rsaldo<>0 and venta_anulada=false and cliente_id =159 order by venta_fecha desc [2026-10-24 14:03:47] commit; [2026-10-24 14:03:56] begin; [2026-10-24 14:03:56] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:03:56] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:03:56] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 14:03:56] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:03:56] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 14:03:56] 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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:03:56] commit; [2026-10-24 14:04:09] begin; [2026-10-24 14:04: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-10-24 14:04: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 =414 order by venta_fecha desc [2026-10-24 14:04:09] commit; [2026-10-24 14:04:45] begin; [2026-10-24 14:04: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:04:45] 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 =1145 order by venta_fecha desc [2026-10-24 14:04:46] commit; [2026-10-24 14:04:55] begin; [2026-10-24 14:04:55] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:04:55] 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 =133 order by venta_fecha desc [2026-10-24 14:04:55] commit; [2026-10-24 14:05:21] begin; [2026-10-24 14:05:21] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:05:21] 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 =1125 order by venta_fecha desc [2026-10-24 14:05:22] commit; [2026-10-24 14:05:52] select empresa_id, coalesce(empresa_imagen,'') as empresa_imagen from sh_principal.tbl_gen_empresa where empresa_bloqueada=false order by empresa_id [2026-10-24 14:05:52] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:05:54] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:05:54] begin; [2026-10-24 14:05:54] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:05:54] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 14:05:54] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 14:05:54] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:05:54] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (10272,9859,9898,10220,10319,10287,9840,10161,9875,9876,9816,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-10-24 14:05:54] commit; [2026-10-24 14:06:04] begin; [2026-10-24 14:06:04] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:06:04] 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 =414 order by venta_fecha desc [2026-10-24 14:06:04] commit; [2026-10-24 14:06:28] begin; [2026-10-24 14:06: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:06: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 =133 order by venta_fecha desc [2026-10-24 14:06:28] commit; [2026-10-24 14:06:35] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:06: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:06: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=14 and pedido_empresa_id=5 and pedido_anulado=false [2026-10-24 14:06:35] begin; [2026-10-24 14:06: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=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:06: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=5 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 14:06: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 (10272,9859,9898,10220,10319,10287,9840,10161,9875,9876,9816,9914,10299,10076,9951) order by pedidod_pedido_id, pedidod_id [2026-10-24 14:06:35] commit; [2026-10-24 14:06:51] begin; [2026-10-24 14:06:51] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=5 and empresa_bloqueada=false limit 1 [2026-10-24 14:06:51] 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 =710 order by venta_fecha desc [2026-10-24 14:06:51] commit; [2026-10-24 14:07: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-10-24 14:07:17] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:07:18] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:07:18] begin; [2026-10-24 14:07: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:07: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:07: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 =14 order by pedido_registro desc limit 200 [2026-10-24 14:07: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=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 14:07: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 (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:07:18] commit; [2026-10-24 14:07:34] begin; [2026-10-24 14:07: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:07: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 =710 order by venta_fecha desc [2026-10-24 14:07:34] commit; [2026-10-24 14:08:27] begin; [2026-10-24 14:08:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:08:27] select 1 from sh_principal.tbl_gen_usuario_empresa inner join sh_principal.tbl_gen_empresa on empresa_id=usuario_empresa_empresa_id where usuario_empresa_usuario_id=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:08:27] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 14:08:27] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 14:08:27] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:08:27] 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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:08:27] commit; [2026-10-24 14:08:28] begin; [2026-10-24 14:08: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:08:28] select pedido_id,to_char(pedido_registro,'DD/MM/YYYY HH24:MI') as registro,to_char(pedido_fecha,'DD/MM/YYYY') as fecha,pedido_comentario,usuario_nombre,pedido_total,pedido_nombre,pedido_nit,case when pedido_anulado then 'ANULADO' when pedido_id in (select venta_pedido_id from sh_principal.tbl_ven_venta) then 'FACTURADO' ELSE 'PENDIENTE DE FACTURAR' END as estado,pedido_direccion,pedido_telefono,pedido_email,vendedor_descripcion,transporte_descripcion from sh_principal.tbl_ven_pedido inner join sh_principal.tbl_ven_transporte on pedido_transporte_id=transporte_id inner join sh_principal.tbl_gen_usuario on pedido_usuario_id=usuario_id inner join sh_principal.tbl_ven_vendedor on vendedor_id=pedido_vendedor_id where 1=1 and pedido_empresa_id=1 and usuario_id =14 order by pedido_registro desc limit 200 [2026-10-24 14:08:28] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:08: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=14 and usuario_empresa_empresa_id=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:08:28] select count(*) filter (where pedido_registro::date = current_date) as pedidos_hoy, coalesce(sum(pedido_total) filter (where pedido_registro::date = current_date),0) as monto_dia, coalesce(sum(pedido_total) filter (where date_trunc('month',pedido_registro)=date_trunc('month',current_date)),0) as monto_mes from sh_principal.tbl_ven_pedido where pedido_usuario_id=14 and pedido_empresa_id=1 and pedido_anulado=false [2026-10-24 14:08:28] select pedidod_pedido_id,producto_id,producto_codigo,producto_descripcion,pedidod_cantidad,pedidod_descuento,pedidod_descuento_monto,pedidod_precio,pedidod_total from sh_principal.tbl_ven_pedidodet inner join sh_principal.tbl_inv_producto on pedidod_producto_id=producto_id where pedidod_pedido_id in (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:08:28] commit; [2026-10-24 14:20: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=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:20: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=1 and pedido_anulado=false [2026-10-24 14:20:16] begin; [2026-10-24 14:20: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=1 and empresa_bloqueada=false limit 1 [2026-10-24 14:20: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 =14 order by pedido_registro desc limit 200 [2026-10-24 14:20:16] select count(*) from sh_principal.tbl_gen_notificacion_usuario where notificacion_usuario_usuario_id=14 and notificacion_usuario_leida=false [2026-10-24 14:20: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 (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,9383,9902,9391,9393,8882,8885,8886,9912,9408,9412,8905,9930,9932,8908,8397,9422,9423,8911,8400,8914,8917,8918,8919,7895,9433,8921,8922,7899,9950,9444,8937,9966,8431,8432,8438,9976,8441,9467,9469,7933,9470,9472,9480,8462,8978,9499,10016,8993,8994,9509,9511,9512,9513,9514,10031,9521,7987,9526,8504,7992,9529,9018,9019,9535,8511,8512,8513,8515,8516,9032,8521,9548,9037,10078,10079,9055,9056,8035,8548,10085,8040,8041,9579,10093,10094,10097,8561,10098,9596,8069,8071,8584,8586,9612,10131,9108,9621,8597,8085,8598,9111,8600,10142,10143,8607,9636,9124,9637,8101,9126,9130,9131,10156,9132,10157,8111,8633,8640,8138,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-10-24 14:20:16] commit;