20241205@133506.4367 fagccbavhdc4rvldeno3orli33 INICIO DE FICHEIRO DE LOG :: /var/www/webservices/logs/website.sql.log
20241205@133506.4365 fagccbavhdc4rvldeno3orli33 Query : use flama_phc
20241205@133506.4478 fagccbavhdc4rvldeno3orli33 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@133506.4936 fagccbavhdc4rvldeno3orli33 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3727';
20241205@133506.5376 fagccbavhdc4rvldeno3orli33 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3727';
20241205@133609.6040 3r2gu4goku3ftqpnn98e38k7sd Query : use flama_phc
20241205@133609.6090 3r2gu4goku3ftqpnn98e38k7sd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@133609.6950 3r2gu4goku3ftqpnn98e38k7sd Query : use flama_phc
20241205@133609.6980 3r2gu4goku3ftqpnn98e38k7sd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@141349.2586 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@141349.2598 p5hhl8mf8k61p2vt18uucqc3o4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@141349.2666 p5hhl8mf8k61p2vt18uucqc3o4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3728';
20241205@141349.2737 p5hhl8mf8k61p2vt18uucqc3o4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3728';
20241205@141349.2809 p5hhl8mf8k61p2vt18uucqc3o4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3728';
20241205@141349.2848 p5hhl8mf8k61p2vt18uucqc3o4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3728';
20241205@141349.2948 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.2951 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@141349.3024 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.3027 p5hhl8mf8k61p2vt18uucqc3o4 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241205@141349.3119 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.2'
20241205@141349.3298 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2082 and bo.obrano = 2408229 and bi.ref ='324.1461.00.2' and bi.lordem =1
20241205@141349.3668 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.2'
20241205@141349.3689 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2082 and bo.obrano = 2408229 and bi.ref ='324.1461.00.2' and bi.lordem =1
20241205@141349.3708 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.2'
20241205@141349.3733 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2082 and bo.obrano = 2408229 and bi.ref ='324.1461.00.2' and bi.lordem =1
20241205@141349.3752 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.3755 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@141349.3964 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.3967 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 1 valor from td where td.ndoc = 39
20241205@141349.4065 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.4068 p5hhl8mf8k61p2vt18uucqc3o4 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@141349.4110 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@141349.4260 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.4263 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241205@141349.4394 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.4400 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@141349.4526 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.4530 p5hhl8mf8k61p2vt18uucqc3o4 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@141349.4597 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.4601 p5hhl8mf8k61p2vt18uucqc3o4 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241205@141349.4662 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.4665 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from td where ndoc = 39
20241205@141349.4751 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@141349.4832 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.4866 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@141349.4887 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.4904 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@141349.4968 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.4985 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@141349.5000 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@141349.5189 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@141349.5291 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.5312 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@141349.5331 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751b628806751b51d7a' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@141349.5605 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.5623 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@141349.5660 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@141349.5905 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@141349.6001 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@141349.6093 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@141349.6225 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@141349.6329 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@141349.6418 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751b628806751b51d7a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@141349.6952 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 fno valor from wsftdata order by fno desc
20241205@141349.7029 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.7046 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@141349.7070 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 'normal' from dummy
20241205@141349.7118 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751b628806751b51d7a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2241,100810,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@141349.7636 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.7639 p5hhl8mf8k61p2vt18uucqc3o4 Query : select st.usalote valor from st where st.ref = '324.1461.00.2'
20241205@141349.7662 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.2'
20241205@141349.7821 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.7846 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@141349.7873 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.7888 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@141349.7898 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@141349.7910 p5hhl8mf8k61p2vt18uucqc3o4 Query : select sestamp valor from se where ref ='324.1461.00.2' and lote = 'r2100463200a'
20241205@141349.7932 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.7947 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@141349.7960 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751b075066751b51dc1','aut6751b628806751b51d7a' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@141349.8010 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.8026 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@141349.8053 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6751b075066751b51dc1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut6751b628806751b51d7a' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241205@141349.8385 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.8390 p5hhl8mf8k61p2vt18uucqc3o4 Query : select st.usalote valor from st where st.ref = '324.1461.00.2'
20241205@141349.8410 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.2'
20241205@141349.8425 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.8442 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@141349.8507 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.8526 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@141349.8536 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@141349.8550 p5hhl8mf8k61p2vt18uucqc3o4 Query : select sestamp valor from se where ref ='324.1461.00.2' and lote = 'r2100463200a'
20241205@141349.8580 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.8595 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@141349.8608 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751b019956751b51dd1','aut6751b628806751b51d7a' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@141349.8613 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.8633 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@141349.8668 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6751b019956751b51dd1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut6751b628806751b51d7a' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20241205@141349.8957 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.8960 p5hhl8mf8k61p2vt18uucqc3o4 Query : select st.usalote valor from st where st.ref = '324.1461.00.2'
20241205@141349.9006 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.2'
20241205@141349.9022 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.9040 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@141349.9069 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.9087 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@141349.9102 p5hhl8mf8k61p2vt18uucqc3o4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@141349.9116 p5hhl8mf8k61p2vt18uucqc3o4 Query : select sestamp valor from se where ref ='324.1461.00.2' and lote = 'r2100463200a'
20241205@141349.9130 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.9153 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@141349.9165 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751b687766751b51dde','aut6751b628806751b51d7a' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@141349.9170 p5hhl8mf8k61p2vt18uucqc3o4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@141349.9187 p5hhl8mf8k61p2vt18uucqc3o4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@141349.9218 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6751b687766751b51dde',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut6751b628806751b51d7a' ,0,0 ,2,23.00,30000,?,?,?,?,?)
20241205@141349.9455 p5hhl8mf8k61p2vt18uucqc3o4 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751b628806751b51d7a','2408229','wait',39,'adm09112754980.682000002')
20241205@141349.9550 p5hhl8mf8k61p2vt18uucqc3o4 Query : use flama_phc
20241205@141349.9553 p5hhl8mf8k61p2vt18uucqc3o4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@141349.9584 p5hhl8mf8k61p2vt18uucqc3o4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3728';
20241205@141349.9626 p5hhl8mf8k61p2vt18uucqc3o4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3728';
20241205@141349.9682 p5hhl8mf8k61p2vt18uucqc3o4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3728';
20241205@141349.9715 p5hhl8mf8k61p2vt18uucqc3o4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3728';
20241205@141909.4504 3d2bcr2r5qq46bj2hdkr865dck Query : use flama_phc
20241205@141909.4507 3d2bcr2r5qq46bj2hdkr865dck Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@141909.4593 3d2bcr2r5qq46bj2hdkr865dck Query : use flama_phc
20241205@141909.4596 3d2bcr2r5qq46bj2hdkr865dck Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@143609.6057 ov5m4glhj6v0pciassuv4cka75 Query : use flama_phc
20241205@143609.6061 ov5m4glhj6v0pciassuv4cka75 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@143609.6196 ov5m4glhj6v0pciassuv4cka75 Query : use flama_phc
20241205@143609.6200 ov5m4glhj6v0pciassuv4cka75 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@151912.4778 a8chki49isr8i6gep5t6rqc8b6 Query : use flama_phc
20241205@151912.4784 a8chki49isr8i6gep5t6rqc8b6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@151912.4908 a8chki49isr8i6gep5t6rqc8b6 Query : use flama_phc
20241205@151912.4911 a8chki49isr8i6gep5t6rqc8b6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@152706.7062 bdpuq019ietcuaaof6ismju5a5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@152706.7074 bdpuq019ietcuaaof6ismju5a5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@152706.7141 bdpuq019ietcuaaof6ismju5a5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3729';
20241205@152706.7211 bdpuq019ietcuaaof6ismju5a5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3729';
20241205@152706.7279 bdpuq019ietcuaaof6ismju5a5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3729';
20241205@152706.7329 bdpuq019ietcuaaof6ismju5a5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3729';
20241205@152706.7388 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152706.7392 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@152706.7478 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1847.00.1'
20241205@152706.8372 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400922 and bi.ref ='324.1847.00.1' and bi.lordem =30000
20241205@152706.9265 bdpuq019ietcuaaof6ismju5a5 Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'cps24072353160,733000003 ' 
20241205@152706.9818 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152706.9821 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 1 valor from ts where ts.ndos = 61
20241205@152706.9852 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152706.9855 bdpuq019ietcuaaof6ismju5a5 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@152706.9884 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20241205@152706.9923 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152706.9926 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20241205@152706.9978 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152706.9981 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from ts where ndos = 61
20241205@152706.9994 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152707.1200 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241205@152707.2100 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152707.3500 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241205@152707.4300 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152707.7000 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241205@152707.8000 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 61
20241205@152707.1020 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241205@152707.1210 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241205@152707.1410 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152707.1470 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20241205@152707.1640 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152707.1790 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241205@152707.1930 bdpuq019ietcuaaof6ismju5a5 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c419646751c64b03',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241205@152707.2180 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152707.2510 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241205@152707.2660 bdpuq019ietcuaaof6ismju5a5 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c419646751c64b03','--','bo',7.9175257731958762886 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241205@152707.2710 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152707.2990 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241205@152707.3130 bdpuq019ietcuaaof6ismju5a5 Query : insert into bo (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c419646751c64b03','guia r. fornecedor','2024-12-05',61,2403786,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241205@152711.4631 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152711.4635 bdpuq019ietcuaaof6ismju5a5 Query : select st.usalote valor from st where st.ref = '324.1847.00.1'
20241205@152711.4664 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1847.00.1'
20241205@152711.4851 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152711.4870 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241205@152711.4886 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152711.4901 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241205@152711.4912 bdpuq019ietcuaaof6ismju5a5 Query : select sestamp valor from se where ref ='324.1847.00.1' and lote = 'r2400922300a'
20241205@152711.4927 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152711.4942 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241205@152711.4952 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152711.4968 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241205@152711.4983 bdpuq019ietcuaaof6ismju5a5 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c511046751c64f78',?,?,'20241205',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241205@152711.5553 bdpuq019ietcuaaof6ismju5a5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@152711.5572 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152711.5591 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241205@152711.5603 bdpuq019ietcuaaof6ismju5a5 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6751c768936751c64f88','aut6751c419646751c64b03',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from bo bo where bo.bostamp = 'aut6751c419646751c64b03'
20241205@152711.5795 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@152711.5815 bdpuq019ietcuaaof6ismju5a5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241205@152711.5832 bdpuq019ietcuaaof6ismju5a5 Query : insert into bi (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut6751c768936751c64f88',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1336, 1336*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,25.22,25.22*200.48,25.22,25.22*200.48 ,0,0,'un ','' ,bo.marcada,1 ,25.22*1336,25.22*1336*200.48 ,25.480000,25.480000*200.48 ,25.480000,25.480000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,25.22,25.22*200.48,25.22*1336,25.22*1336*200.48,'cps24072353160,733000003 ',199.68,199.68*1336,199.68,199.68*1336,?,?,?,4 from bo bo where bo.bostamp = 'aut6751c419646751c64b03'
20241205@152729.5085 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152729.5090 bdpuq019ietcuaaof6ismju5a5 Query : declare @bostamp varchar(25) = 'aut6751c419646751c64b03' ,@bistamp varchar(25) = '' update bi set tecoval = qtt * ecoval ,etecoval = qtt * eecoval ,tecoval2 = qtt * ecoval2 ,etecoval2 = qtt * eecoval2 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end -- se tiver classificação e não for normal, não calcula nada update bi set ttdeb = 0 ,ettdeb = 0 ,ttmoeda = 0 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and bi.classifc <> '' and bi.classifc <> 'normal' -- no caso normal com moeda euro if exists ( select 1 from bo cross apply ( select valor moeda from para1 where descricao = 'ge_pteoueuro' ) par where bo.bostamp = @bostamp and bo.moeda = par.moeda ) begin -- sem ecovalores update bi set ettdeb = round(bi.qtt * ((bi.edebito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttdeb = round(bi.qtt * ((bi.debito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 1 -- com ecovalores update bi set ettdeb = round(bi.qtt * ( ( bi.edebito + ( iif(p.st_econotdesc = 1, - bi.eecoval2, bi.eecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.eecoval + bi.eecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttdeb = round(bi.qtt * ( ( bi.debito + ( iif(p.st_econotdesc = 1, - bi.ecoval2, bi.ecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.ecoval + bi.ecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp left join st on bi.ref = st.ref left join taxasiva tiva on bi.tabiva = tiva.codigo cross apply ( select max(valor) st_econotdesc from ( select case when valor = 's' then 1 else 0 end valor from para1 where descricao = 'st_econotdesc' union all select 0 ) a ) p where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 0 --acrescenta os descontos em valor, caso existam: update bi set ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 2) ,ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ttmoeda = 0 from bi where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end else begin update bi set ttmoeda = round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2) ,ettdeb = case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ,edebito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end ,debito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end * 200.482 from bi inner join bo2 on bi.bostamp = bo2.bo2stamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) update bi set ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 0) ,debito = round(bi.debito - (bi.qtt * bi.valdesc), 2) ,edebito = round(bi.edebito - (bi.qtt * bi.evaldesc), 2) where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end 
20241205@152752.1318 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152752.1322 bdpuq019ietcuaaof6ismju5a5 Query : select 1 valor from bo where bo.bostamp = 'aut6751c419646751c64b03'
20241205@152752.1339 bdpuq019ietcuaaof6ismju5a5 Query : declare @errno int ,@errmsg varchar(255) ,@prod bit ,@nrdec numeric(10, 0) ,@totaldeb numeric(18, 5) ,@etotaldeb numeric(19, 6) ,@total numeric(18, 5) ,@etotal numeric(19, 6) ,@custo numeric(18, 5) ,@ecusto numeric(19, 6) ,@bo_1iliq numeric(19, 6) ,@bo_2iliq numeric(19, 6) ,@base1 numeric(19, 6) ,@base2 numeric(19, 6) ,@moetotal numeric(13, 3) ,@smoe1 numeric(13, 3) ,@smoe2 numeric(13, 3) ,@smoe3 numeric(13, 3) ,@smoe4 numeric(13, 3) ,@bo11_bins numeric(18, 5) ,@bo21_bins numeric(18, 5) ,@bo31_bins numeric(18, 5) ,@bo41_bins numeric(18, 5) ,@bo51_bins numeric(18, 5) ,@bo61_bins numeric(18, 5) ,@bo71_bins numeric(18, 5) ,@bo81_bins numeric(18, 5) ,@bo91_bins numeric(18, 5) ,@bo12_bins numeric(18, 5) ,@bo22_bins numeric(18, 5) ,@bo32_bins numeric(18, 5) ,@bo42_bins numeric(18, 5) ,@bo52_bins numeric(18, 5) ,@bo62_bins numeric(18, 5) ,@bo72_bins numeric(18, 5) ,@bo82_bins numeric(18, 5) ,@bo92_bins numeric(18, 5) ,@ebo11_bins numeric(19, 6) ,@ebo21_bins numeric(19, 6) ,@ebo31_bins numeric(19, 6) ,@ebo41_bins numeric(19, 6) ,@ebo51_bins numeric(19, 6) ,@ebo61_bins numeric(19, 6) ,@ebo71_bins numeric(18, 5) ,@ebo81_bins numeric(18, 5) ,@ebo91_bins numeric(18, 5) ,@ebo12_bins numeric(19, 6) ,@ebo22_bins numeric(19, 6) ,@ebo32_bins numeric(19, 6) ,@ebo42_bins numeric(19, 6) ,@ebo52_bins numeric(19, 6) ,@ebo62_bins numeric(19, 6) ,@ebo72_bins numeric(18, 5) ,@ebo82_bins numeric(18, 5) ,@ebo92_bins numeric(18, 5) ,@bo11_iva numeric(18, 5) ,@bo21_iva numeric(18, 5) ,@bo31_iva numeric(18, 5) ,@bo41_iva numeric(18, 5) ,@bo51_iva numeric(18, 5) ,@bo61_iva numeric(18, 5) ,@bo71_iva numeric(18, 5) ,@bo81_iva numeric(18, 5) ,@bo91_iva numeric(18, 5) ,@bo12_iva numeric(18, 5) ,@bo22_iva numeric(18, 5) ,@bo32_iva numeric(18, 5) ,@bo42_iva numeric(18, 5) ,@bo52_iva numeric(18, 5) ,@bo62_iva numeric(18, 5) ,@bo72_iva numeric(18, 5) ,@bo82_iva numeric(18, 5) ,@bo92_iva numeric(18, 5) ,@ebo11_iva numeric(19, 6) ,@ebo21_iva numeric(19, 6) ,@ebo31_iva numeric(19, 6) ,@ebo41_iva numeric(19, 6) ,@ebo51_iva numeric(19, 6) ,@ebo61_iva numeric(19, 6) ,@ebo71_iva numeric(18, 5) ,@ebo81_iva numeric(18, 5) ,@ebo91_iva numeric(18, 5) ,@ebo12_iva numeric(19, 6) ,@ebo22_iva numeric(19, 6) ,@ebo32_iva numeric(19, 6) ,@ebo42_iva numeric(19, 6) ,@ebo52_iva numeric(19, 6) ,@ebo62_iva numeric(19, 6) ,@ebo72_iva numeric(18, 5) ,@ebo82_iva numeric(18, 5) ,@ebo92_iva numeric(18, 5) ,@esdeb1 numeric(19, 6) ,@esdeb2 numeric(19, 6) ,@esdeb3 numeric(19, 6) ,@esdeb4 numeric(19, 6) ,@sdeb1 numeric(18, 5) ,@sdeb2 numeric(18, 5) ,@sdeb3 numeric(18, 5) ,@sdeb4 numeric(18, 5) ,@estot1 numeric(19, 6) ,@estot2 numeric(19, 6) ,@estot3 numeric(19, 6) ,@estot4 numeric(19, 6) ,@stot1 numeric(18, 5) ,@stot2 numeric(18, 5) ,@stot3 numeric(18, 5) ,@stot4 numeric(18, 5) ,@ebo_1tvall numeric(19, 6) ,@ebo_2tvall numeric(19, 6) ,@bo_1tvall numeric(18, 5) ,@bo_2tvall numeric(18, 5) ,@ebo_totp1 numeric(19, 6) ,@ebo_totp2 numeric(19, 6) ,@bo_totp1 numeric(18, 5) ,@bo_totp2 numeric(18, 5) ,@sqtt11 numeric(13, 3) ,@sqtt21 numeric(13, 3) ,@sqtt12 numeric(13, 3) ,@sqtt22 numeric(13, 3) ,@sqtt13 numeric(13, 3) ,@sqtt23 numeric(13, 3) ,@sqtt14 numeric(13, 3) ,@sqtt24 numeric(13, 3) ,@userinis varchar (30) ,@mybostamp char(25) = 'aut6751c419646751c64b03' declare @totaisiva table ( bostamp varchar (25), codigo numeric(1), taxa numeric (5,2), ebaseinc numeric (19,6), baseinc numeric (18,5), evalor numeric (19,6), valor numeric (18,5) ) set @prod = ( select ts.producao from bo(nolock) inner join ts(nolock) on bo.ndos = ts.ndos and bo.bostamp = @mybostamp ) set @nrdec = ( select convert(numeric(10, 0), valor) from para1(nolock) where descricao = 'de_euro' ) --set @prod = 0 --set @nrdec = 2 select @ecusto = sum(bi.epcusto * bi.qtt) ,@custo = sum(bi.pcusto * bi.qtt) ,@bo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo_1iliq = round(sum(bi.qtt * bi.epu), @nrdec) ,@bo_2iliq = round(sum(bi.ettdeb), @nrdec) ,@bo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else bi.ettdeb - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@esdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@sdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@smoe1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@total = @stot1 + @stot2 + @stot3 + @stot4 ,@etotal = @estot1 + @estot2 + @estot3 + @estot4 ,@totaldeb = @sdeb1 + @sdeb2 + @sdeb3 + @sdeb4 ,@etotaldeb = @esdeb1 + @esdeb2 + @esdeb3 + @esdeb4 ,@moetotal = @smoe1 + @smoe2 + @smoe3 + @smoe4 ,@ebo_1tvall = @ebo11_bins + @ebo21_bins + @ebo31_bins + @ebo41_bins + @ebo51_bins + @ebo61_bins + @ebo71_bins + @ebo81_bins + @ebo91_bins ,@ebo_2tvall = @ebo12_bins + @ebo22_bins + @ebo32_bins + @ebo42_bins + @ebo52_bins + @ebo62_bins + @ebo72_bins + @ebo82_bins + @ebo92_bins ,@bo_1tvall = @bo11_bins + @bo21_bins + @bo31_bins + @bo41_bins + @bo51_bins + @bo61_bins + @bo71_bins + @bo81_bins + @bo91_bins ,@bo_2tvall = @bo12_bins + @bo22_bins + @bo32_bins + @bo42_bins + @bo52_bins + @bo62_bins + @bo72_bins + @bo82_bins + @bo92_bins ,@ebo_totp1 = sum(case when bi.ivaincl = 0 then (bi.epu * bi.qtt) else round((bi.epu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@ebo_totp2 = sum(case when bi.ivaincl = 0 then (bi.edebito * bi.qtt) else round((bi.edebito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp1 = sum(case when bi.ivaincl = 0 then (bi.pu * bi.qtt) else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp2 = sum(case when bi.ivaincl = 0 then (bi.debito * bi.qtt) else round((bi.debito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@sqtt11 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt21 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt12 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt22 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt13 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt23 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt14 = sum(case when bi.stipo = 4 then bi.qtt else 0 end) ,@sqtt24 = sum(case when bi.stipo = 5 then bi.qtt else 0 end) from bi(nolock) where bi.bostamp = @mybostamp and bi.producao = case when @prod = 1 then 1 else bi.producao end and bi.composto = 0 and bi.qtt <> 0 update bo set bo.totaldeb = isnull(@totaldeb, 0) ,bo.total = isnull(@total, 0) ,bo.etotaldeb = isnull(@etotaldeb, 0) ,bo.moetotal = isnull(@moetotal, 0) ,bo.etotal = isnull(@etotal, 0) ,bo.ecusto = isnull(@ecusto, 0) ,bo.custo = isnull(@custo, 0) ,bo.bo11_bins = isnull(@bo11_bins, 0) ,bo.bo12_bins = isnull(@bo12_bins, 0) ,bo.bo21_bins = isnull(@bo21_bins, 0) ,bo.bo22_bins = isnull(@bo22_bins, 0) ,bo.bo31_bins = isnull(@bo31_bins, 0) ,bo.bo32_bins = isnull(@bo32_bins, 0) ,bo.bo41_bins = isnull(@bo41_bins, 0) ,bo.bo42_bins = isnull(@bo42_bins, 0) ,bo.bo51_bins = isnull(@bo51_bins, 0) ,bo.bo52_bins = isnull(@bo52_bins, 0) ,bo.bo61_bins = isnull(@bo61_bins, 0) ,bo.bo62_bins = isnull(@bo62_bins, 0) ,bo.ebo11_bins = isnull(@ebo11_bins, 0) ,bo.ebo12_bins = isnull(@ebo12_bins, 0) ,bo.ebo21_bins = isnull(@ebo21_bins, 0) ,bo.ebo22_bins = isnull(@ebo22_bins, 0) ,bo.ebo31_bins = isnull(@ebo31_bins, 0) ,bo.ebo32_bins = isnull(@ebo32_bins, 0) ,bo.ebo41_bins = isnull(@ebo41_bins, 0) ,bo.ebo42_bins = isnull(@ebo42_bins, 0) ,bo.ebo51_bins = isnull(@ebo51_bins, 0) ,bo.ebo52_bins = isnull(@ebo52_bins, 0) ,bo.ebo61_bins = isnull(@ebo61_bins, 0) ,bo.ebo62_bins = isnull(@ebo62_bins, 0) ,bo.bo11_iva = isnull(@bo11_iva, 0) ,bo.bo12_iva = isnull(@bo12_iva, 0) ,bo.bo21_iva = isnull(@bo21_iva, 0) ,bo.bo22_iva = isnull(@bo22_iva, 0) ,bo.bo31_iva = isnull(@bo31_iva, 0) ,bo.bo32_iva = isnull(@bo32_iva, 0) ,bo.bo41_iva = isnull(@bo41_iva, 0) ,bo.bo42_iva = isnull(@bo42_iva, 0) ,bo.bo51_iva = isnull(@bo51_iva, 0) ,bo.bo52_iva = isnull(@bo52_iva, 0) ,bo.bo61_iva = isnull(@bo61_iva, 0) ,bo.bo62_iva = isnull(@bo62_iva, 0) ,bo.ebo11_iva = isnull(@ebo11_iva, 0) ,bo.ebo12_iva = isnull(@ebo12_iva, 0) ,bo.ebo21_iva = isnull(@ebo21_iva, 0) ,bo.ebo22_iva = isnull(@ebo22_iva, 0) ,bo.ebo31_iva = isnull(@ebo31_iva, 0) ,bo.ebo32_iva = isnull(@ebo32_iva, 0) ,bo.ebo41_iva = isnull(@ebo41_iva, 0) ,bo.ebo42_iva = isnull(@ebo42_iva, 0) ,bo.ebo51_iva = isnull(@ebo51_iva, 0) ,bo.ebo52_iva = isnull(@ebo52_iva, 0) ,bo.ebo61_iva = isnull(@ebo61_iva, 0) ,bo.ebo62_iva = isnull(@ebo62_iva, 0) ,bo.esdeb1 = isnull(@esdeb1, 0) ,bo.esdeb2 = isnull(@esdeb2, 0) ,bo.esdeb3 = isnull(@esdeb3, 0) ,bo.esdeb4 = isnull(@esdeb4, 0) ,bo.sdeb1 = isnull(@sdeb1, 0) ,bo.sdeb2 = isnull(@sdeb2, 0) ,bo.sdeb3 = isnull(@sdeb3, 0) ,bo.sdeb4 = isnull(@sdeb4, 0) ,bo.smoe1 = isnull(@smoe1, 0) ,bo.smoe2 = isnull(@smoe2, 0) ,bo.smoe3 = isnull(@smoe3, 0) ,bo.smoe4 = isnull(@smoe4, 0) ,bo.estot1 = isnull(@estot1, 0) ,bo.estot2 = isnull(@estot2, 0) ,bo.estot3 = isnull(@estot3, 0) ,bo.estot4 = isnull(@estot4, 0) ,bo.stot1 = isnull(@stot1, 0) ,bo.stot2 = isnull(@stot2, 0) ,bo.stot3 = isnull(@stot3, 0) ,bo.stot4 = isnull(@stot4, 0) ,bo.ebo_1tvall = isnull(@ebo_1tvall, 0) ,bo.ebo_2tvall = isnull(@ebo_2tvall, 0) ,bo.bo_1tvall = isnull(@bo_1tvall, 0) ,bo.bo_2tvall = isnull(@bo_2tvall, 0) ,bo.ebo_totp1 = isnull(@ebo_totp1, 0) ,bo.ebo_totp2 = isnull(@ebo_totp2, 0) ,bo.bo_totp1 = isnull(@bo_totp1, 0) ,bo.bo_totp2 = isnull(@bo_totp2, 0) ,bo.sqtt11 = isnull(@sqtt11, 0) ,bo.sqtt21 = isnull(@sqtt21, 0) ,bo.sqtt12 = isnull(@sqtt12, 0) ,bo.sqtt22 = isnull(@sqtt22, 0) ,bo.sqtt13 = isnull(@sqtt13, 0) ,bo.sqtt23 = isnull(@sqtt23, 0) ,bo.sqtt14 = isnull(@sqtt14, 0) ,bo.sqtt24 = isnull(@sqtt24, 0) where bostamp = @mybostamp update bo2 set bo2.bo71_bins = isnull(@bo71_bins, 0) ,bo2.bo72_bins = isnull(@bo72_bins, 0) ,bo2.bo81_bins = isnull(@bo81_bins, 0) ,bo2.bo82_bins = isnull(@bo82_bins, 0) ,bo2.bo91_bins = isnull(@bo91_bins, 0) ,bo2.bo92_bins = isnull(@bo92_bins, 0) ,bo2.ebo71_bins = isnull(@ebo71_bins, 0) ,bo2.ebo72_bins = isnull(@ebo72_bins, 0) ,bo2.ebo81_bins = isnull(@ebo81_bins, 0) ,bo2.ebo82_bins = isnull(@ebo82_bins, 0) ,bo2.ebo91_bins = isnull(@ebo91_bins, 0) ,bo2.ebo92_bins = isnull(@ebo92_bins, 0) ,bo2.bo71_iva = isnull(@bo71_iva, 0) ,bo2.bo72_iva = isnull(@bo72_iva, 0) ,bo2.bo81_iva = isnull(@bo81_iva, 0) ,bo2.bo82_iva = isnull(@bo82_iva, 0) ,bo2.bo91_iva = isnull(@bo91_iva, 0) ,bo2.bo92_iva = isnull(@bo92_iva, 0) ,bo2.ebo71_iva = isnull(@ebo71_iva, 0) ,bo2.ebo72_iva = isnull(@ebo72_iva, 0) ,bo2.ebo81_iva = isnull(@ebo81_iva, 0) ,bo2.ebo82_iva = isnull(@ebo82_iva, 0) ,bo2.ebo91_iva = isnull(@ebo91_iva, 0) ,bo2.ebo92_iva = isnull(@ebo92_iva, 0) ,bo2.etotalciva = isnull(@etotaldeb, 0) + isnull(@ebo12_iva, 0) +isnull(@ebo22_iva, 0) +isnull(@ebo32_iva, 0) +isnull(@ebo42_iva, 0) +isnull(@ebo52_iva, 0) +isnull(@ebo62_iva, 0) +isnull(@ebo72_iva, 0) +isnull(@ebo82_iva, 0) +isnull(@ebo92_iva, 0) --,bo2.mtotalciva =isnull(@moetotal, 0) where bo2stamp = @mybostamp -- trata os bot select @userinis = usrinis from bo where bo.bostamp=@mybostamp insert into @totaisiva ( bostamp, codigo, taxa, ebaseinc, baseinc, evalor, valor ) select @mybostamp,codigo,taxa ,case when (@ebo11_bins <>0) then @ebo11_bins else @ebo12_bins end ,case when (@ebo11_bins <>0) then @bo11_bins else @bo12_bins end ,case when (@ebo11_bins <>0) then @ebo11_iva else @ebo12_iva end ,case when (@ebo11_bins <>0) then @bo11_iva else @bo12_iva end from taxasiva where codigo = 1 union all select @mybostamp,codigo,taxa ,case when (@ebo21_bins <>0) then @ebo21_bins else @ebo22_bins end ,case when (@ebo21_bins <>0) then @bo21_bins else @bo22_bins end ,case when (@ebo21_bins <>0) then @ebo21_iva else @ebo22_iva end ,case when (@ebo21_bins <>0) then @bo21_iva else @bo22_iva end from taxasiva where codigo = 2 union all select @mybostamp,codigo,taxa ,case when (@ebo31_bins <>0) then @ebo31_bins else @ebo32_bins end ,case when (@ebo31_bins <>0) then @bo31_bins else @bo32_bins end ,case when (@ebo31_bins <>0) then @ebo31_iva else @ebo32_iva end ,case when (@ebo31_bins <>0) then @bo31_iva else @bo32_iva end from taxasiva where codigo = 3 union all select @mybostamp,codigo,taxa ,case when (@ebo41_bins <>0) then @ebo41_bins else @ebo42_bins end ,case when (@ebo41_bins <>0) then @bo41_bins else @bo42_bins end ,case when (@ebo41_bins <>0) then @ebo41_iva else @ebo42_iva end ,case when (@ebo41_bins <>0) then @bo41_iva else @bo42_iva end from taxasiva where codigo = 4 union all select @mybostamp,codigo,taxa ,case when (@ebo51_bins <>0) then @ebo51_bins else @ebo52_bins end ,case when (@ebo51_bins <>0) then @bo51_bins else @bo52_bins end ,case when (@ebo51_bins <>0) then @ebo51_iva else @ebo52_iva end ,case when (@ebo51_bins <>0) then @bo51_iva else @bo52_iva end from taxasiva where codigo = 5 union all select @mybostamp,codigo,taxa ,case when (@ebo61_bins <>0) then @ebo61_bins else @ebo62_bins end ,case when (@ebo61_bins <>0) then @bo61_bins else @bo62_bins end ,case when (@ebo61_bins <>0) then @ebo61_iva else @ebo62_iva end ,case when (@ebo61_bins <>0) then @bo61_iva else @bo62_iva end from taxasiva where codigo = 6 union all select @mybostamp,codigo,taxa ,case when (@ebo71_bins <>0) then @ebo71_bins else @ebo72_bins end ,case when (@ebo71_bins <>0) then @bo71_bins else @bo72_bins end ,case when (@ebo71_bins <>0) then @ebo71_iva else @ebo72_iva end ,case when (@ebo71_bins <>0) then @bo71_iva else @bo72_iva end from taxasiva where codigo = 7 union all select @mybostamp,codigo,taxa ,case when (@ebo81_bins <>0) then @ebo81_bins else @ebo82_bins end ,case when (@ebo81_bins <>0) then @bo81_bins else @bo82_bins end ,case when (@ebo81_bins <>0) then @ebo81_iva else @ebo82_iva end ,case when (@ebo81_bins <>0) then @bo81_iva else @bo82_iva end from taxasiva where codigo = 8 union all select @mybostamp,codigo,taxa ,case when (@ebo91_bins <>0) then @ebo91_bins else @ebo92_bins end ,case when (@ebo91_bins <>0) then @bo91_bins else @bo92_bins end ,case when (@ebo91_bins <>0) then @ebo91_iva else @ebo92_iva end ,case when (@ebo91_bins <>0) then @bo91_iva else @bo92_iva end from taxasiva where codigo = 9 update bot set ebaseinc = totiva.ebaseinc, baseinc = totiva.baseinc, evalor = totiva.evalor, valor = totiva.valor, usrinis = @userinis, usrdata = convert (date,getdate()), usrhora = convert (time,getdate()) from @totaisiva totiva inner join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo insert into bot ( botstamp ,bostamp ,codigo ,taxa ,ebaseinc ,baseinc ,evalor ,valor ,ousrinis ,ousrdata ,ousrhora ,usrinis ,usrdata ,usrhora ) select ( left(@userinis,3) + 'tt' + left(newid(),5) + right(newid(),5) + left(newid(),5) + right(newid(),5)) stamp ,@mybostamp stampbo ,totiva.codigo ,totiva.taxa ,totiva.ebaseinc ,totiva.baseinc ,totiva.evalor ,totiva.valor ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) from @totaisiva totiva left join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo where bot.botstamp is null -- atualiza os campo bi.series e bi.series2, caso tenha equipamentos update bi set series = s1, series2=s2 from bi inner join ( select distinct bistamp,ser.s1, ser.s2 from boma cross apply (select stuff ( ( select ',' + rtrim(serie) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s1 , stuff ( ( select ',' + rtrim(serie2) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s2 ) ser where boma.bostamp = @mybostamp ) myboma on bi.bistamp = myboma.bistamp where bi.bostamp = @mybostamp 
20241205@152755.1127 bdpuq019ietcuaaof6ismju5a5 Query : use flama_phc
20241205@152755.1130 bdpuq019ietcuaaof6ismju5a5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@152755.1180 bdpuq019ietcuaaof6ismju5a5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3729';
20241205@152755.1223 bdpuq019ietcuaaof6ismju5a5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3729';
20241205@153612.6642 edfchgcgk90dpf7ndvul6q8g56 Query : use flama_phc
20241205@153612.6646 edfchgcgk90dpf7ndvul6q8g56 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@153612.6728 edfchgcgk90dpf7ndvul6q8g56 Query : use flama_phc
20241205@153612.6731 edfchgcgk90dpf7ndvul6q8g56 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@154810.2551 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@154810.2564 rrnl73r2tn31ckc0ve4dihjlhu Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@154810.2634 rrnl73r2tn31ckc0ve4dihjlhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3730';
20241205@154810.2694 rrnl73r2tn31ckc0ve4dihjlhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3730';
20241205@154810.2764 rrnl73r2tn31ckc0ve4dihjlhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3730';
20241205@154810.2796 rrnl73r2tn31ckc0ve4dihjlhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3730';
20241205@154810.2858 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.2864 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@154810.2931 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.2934 rrnl73r2tn31ckc0ve4dihjlhu Query : select no, estab,szadrsdesc from szadrs where u_coddest=2138
20241205@154810.3035 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20241205@154810.3220 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3223 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@154810.3257 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3261 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 1 valor from td where td.ndoc = 39
20241205@154810.3299 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3303 rrnl73r2tn31ckc0ve4dihjlhu Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@154810.3333 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@154810.3373 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3376 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 ~inactivo valor from cl where no = '100404' and estab = 0 order by inactivo desc
20241205@154810.3507 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3511 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@154810.3542 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3545 rrnl73r2tn31ckc0ve4dihjlhu Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@154810.3587 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3590 rrnl73r2tn31ckc0ve4dihjlhu Query : select szadrsstamp valor from szadrs where szadrsdesc='bitranlis, agentes transitára'
20241205@154810.3653 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.3656 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from td where ndoc = 39
20241205@154810.3673 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@154810.3689 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.3708 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@154810.3739 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.3755 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@154810.3789 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.3815 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@154810.3830 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@154810.3888 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@154810.3903 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.3929 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@154810.3947 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751c762016751cb3a5d' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@154810.4123 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.4145 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@154810.4187 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@154810.4201 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@154810.4216 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@154810.4244 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@154810.4260 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@154810.4276 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@154810.4291 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751c762016751cb3a5d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@154810.4514 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 fno valor from wsftdata order by fno desc
20241205@154810.4553 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.4572 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@154810.4598 rrnl73r2tn31ckc0ve4dihjlhu Query : select 'normal' from dummy
20241205@154810.4619 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751c762016751cb3a5d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2242,100404,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@154810.4932 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.4935 rrnl73r2tn31ckc0ve4dihjlhu Query : select st.usalote valor from st where st.ref = '324.1847.00.1'
20241205@154810.4962 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1847.00.1'
20241205@154810.4978 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.4996 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.5026 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5043 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.5065 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@154810.5079 rrnl73r2tn31ckc0ve4dihjlhu Query : select sestamp valor from se where ref ='324.1847.00.1' and lote = 'r2400922300a'
20241205@154810.5093 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5110 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.5124 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c262456751cb3a7c','aut6751c762016751cb3a5d' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@154810.5129 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5146 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.5190 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751c262456751cb3a7c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut6751c762016751cb3a5d' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@154810.5419 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5438 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.5467 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5483 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.5492 rrnl73r2tn31ckc0ve4dihjlhu Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@154810.5507 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5523 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.5536 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c127896751cb3a86','aut6751c762016751cb3a5d' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@154810.5541 rrnl73r2tn31ckc0ve4dihjlhu Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.5559 rrnl73r2tn31ckc0ve4dihjlhu Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.5593 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6751c127896751cb3a86',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6751c762016751cb3a5d' ,0,0 ,2,23.00,20000,?,?,?)
20241205@154810.5905 rrnl73r2tn31ckc0ve4dihjlhu Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751c762016751cb3a5d','2408208a','wait',39,'adm09112754980.682000002')
20241205@154810.5984 rrnl73r2tn31ckc0ve4dihjlhu Query : use flama_phc
20241205@154810.5987 rrnl73r2tn31ckc0ve4dihjlhu Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@154810.6063 rrnl73r2tn31ckc0ve4dihjlhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3730';
20241205@154810.6104 rrnl73r2tn31ckc0ve4dihjlhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3730';
20241205@154810.6163 rrnl73r2tn31ckc0ve4dihjlhu Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3730';
20241205@154810.6197 rrnl73r2tn31ckc0ve4dihjlhu Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3730';
20241205@154810.6740 boerdn24kiu5gsoknccfeu09f9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@154810.6750 boerdn24kiu5gsoknccfeu09f9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@154810.6816 boerdn24kiu5gsoknccfeu09f9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3731';
20241205@154810.6881 boerdn24kiu5gsoknccfeu09f9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3731';
20241205@154810.6940 boerdn24kiu5gsoknccfeu09f9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3731';
20241205@154810.6970 boerdn24kiu5gsoknccfeu09f9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3731';
20241205@154810.7026 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7029 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@154810.7097 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7100 boerdn24kiu5gsoknccfeu09f9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2138
20241205@154810.7147 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20241205@154810.7169 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7172 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@154810.7206 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7210 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 1 valor from td where td.ndoc = 39
20241205@154810.7245 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7247 boerdn24kiu5gsoknccfeu09f9 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@154810.7278 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@154810.7314 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7317 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 ~inactivo valor from cl where no = '100404' and estab = 0 order by inactivo desc
20241205@154810.7345 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7348 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@154810.7376 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7379 boerdn24kiu5gsoknccfeu09f9 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@154810.7421 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7424 boerdn24kiu5gsoknccfeu09f9 Query : select szadrsstamp valor from szadrs where szadrsdesc='bitranlis, agentes transitára'
20241205@154810.7468 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.7470 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from td where ndoc = 39
20241205@154810.7483 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@154810.7499 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.7517 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@154810.7536 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.7551 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@154810.7604 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.7621 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@154810.7634 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@154810.7693 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@154810.7707 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.7734 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@154810.7751 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751c005486751cb3aba' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@154810.7908 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.7926 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@154810.7963 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@154810.7993 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@154810.8006 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@154810.8019 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@154810.8032 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@154810.8045 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@154810.8058 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751c005486751cb3aba',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@154810.8273 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 fno valor from wsftdata order by fno desc
20241205@154810.8311 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.8332 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@154810.8356 boerdn24kiu5gsoknccfeu09f9 Query : select 'normal' from dummy
20241205@154810.8373 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751c005486751cb3aba',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2243,100404,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@154810.8648 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.8651 boerdn24kiu5gsoknccfeu09f9 Query : select st.usalote valor from st where st.ref = '324.1847.00.1'
20241205@154810.8678 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1847.00.1'
20241205@154810.8692 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.8710 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.8738 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.8754 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.8763 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@154810.8776 boerdn24kiu5gsoknccfeu09f9 Query : select sestamp valor from se where ref ='324.1847.00.1' and lote = 'r2400922300a'
20241205@154810.8789 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.8804 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.8817 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c678016751cb3ad6','aut6751c005486751cb3aba' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@154810.8821 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.8836 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.8867 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751c678016751cb3ad6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut6751c005486751cb3aba' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@154810.9112 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.9129 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.9155 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.9171 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.9180 boerdn24kiu5gsoknccfeu09f9 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@154810.9192 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.9207 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@154810.9219 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751c717116751cb3ae0','aut6751c005486751cb3aba' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@154810.9224 boerdn24kiu5gsoknccfeu09f9 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@154810.9240 boerdn24kiu5gsoknccfeu09f9 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@154810.9271 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6751c717116751cb3ae0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6751c005486751cb3aba' ,0,0 ,2,23.00,20000,?,?,?)
20241205@154810.9504 boerdn24kiu5gsoknccfeu09f9 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751c005486751cb3aba','2408211a','wait',39,'adm09112754980.682000002')
20241205@154810.9590 boerdn24kiu5gsoknccfeu09f9 Query : use flama_phc
20241205@154810.9593 boerdn24kiu5gsoknccfeu09f9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@154810.9624 boerdn24kiu5gsoknccfeu09f9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3731';
20241205@154810.9667 boerdn24kiu5gsoknccfeu09f9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3731';
20241205@154810.9717 boerdn24kiu5gsoknccfeu09f9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3731';
20241205@154810.9752 boerdn24kiu5gsoknccfeu09f9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3731';
20241205@161910.1356 790jq4mrgrt9f3bni9541tip12 Query : use flama_phc
20241205@161910.1360 790jq4mrgrt9f3bni9541tip12 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@161910.1490 790jq4mrgrt9f3bni9541tip12 Query : use flama_phc
20241205@161910.1493 790jq4mrgrt9f3bni9541tip12 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@163610.3317 jvmq4vu6urv3k9igh3mstbl49d Query : use flama_phc
20241205@163610.3321 jvmq4vu6urv3k9igh3mstbl49d Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@163610.3404 jvmq4vu6urv3k9igh3mstbl49d Query : use flama_phc
20241205@163610.3408 jvmq4vu6urv3k9igh3mstbl49d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171836.9884 6oplt2v98c0kl6ng13po020l5f Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@171836.9896 6oplt2v98c0kl6ng13po020l5f Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@171836.9962 6oplt2v98c0kl6ng13po020l5f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3732';
20241205@171837.3500 6oplt2v98c0kl6ng13po020l5f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3732';
20241205@171837.9400 6oplt2v98c0kl6ng13po020l5f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3732';
20241205@171837.1260 6oplt2v98c0kl6ng13po020l5f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3732';
20241205@171837.1790 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.1820 6oplt2v98c0kl6ng13po020l5f Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@171837.2440 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.2470 6oplt2v98c0kl6ng13po020l5f Query : select no, estab,szadrsdesc from szadrs where u_coddest=2759
20241205@171837.3370 6oplt2v98c0kl6ng13po020l5f Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.642.00.01'
20241205@171837.5000 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.5040 6oplt2v98c0kl6ng13po020l5f Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@171837.6590 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.6620 6oplt2v98c0kl6ng13po020l5f Query : select top 1 1 valor from td where td.ndoc = 39
20241205@171837.7300 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.7340 6oplt2v98c0kl6ng13po020l5f Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@171837.7620 6oplt2v98c0kl6ng13po020l5f Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@171837.8710 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.8740 6oplt2v98c0kl6ng13po020l5f Query : select top 1 ~inactivo valor from cl where no = '102145' and estab = 0 order by inactivo desc
20241205@171837.9950 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.9980 6oplt2v98c0kl6ng13po020l5f Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@171837.1058 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.1061 6oplt2v98c0kl6ng13po020l5f Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@171837.1108 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.1111 6oplt2v98c0kl6ng13po020l5f Query : select szadrsstamp valor from szadrs where szadrsdesc='paulo jorge almeida gomes unip.,lda.-entrega'
20241205@171837.1156 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.1158 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from td where ndoc = 39
20241205@171837.1204 6oplt2v98c0kl6ng13po020l5f Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@171837.1250 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.1266 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171837.1292 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.1307 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171837.1338 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.1377 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171837.1394 6oplt2v98c0kl6ng13po020l5f Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171837.1611 6oplt2v98c0kl6ng13po020l5f Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171837.1891 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.2001 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171837.2018 6oplt2v98c0kl6ng13po020l5f Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751e680976751e06d22' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@171837.2565 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.2585 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171837.2622 6oplt2v98c0kl6ng13po020l5f Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@171837.2725 6oplt2v98c0kl6ng13po020l5f Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@171837.2816 6oplt2v98c0kl6ng13po020l5f Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@171837.2891 6oplt2v98c0kl6ng13po020l5f Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@171837.2964 6oplt2v98c0kl6ng13po020l5f Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@171837.3041 6oplt2v98c0kl6ng13po020l5f Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@171837.3115 6oplt2v98c0kl6ng13po020l5f Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751e680976751e06d22',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@171837.3674 6oplt2v98c0kl6ng13po020l5f Query : select top 1 fno valor from wsftdata order by fno desc
20241205@171837.3817 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.3834 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171837.3859 6oplt2v98c0kl6ng13po020l5f Query : select 'normal' from dummy
20241205@171837.3906 6oplt2v98c0kl6ng13po020l5f Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751e680976751e06d22',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2244,102145,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@171837.4312 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.4315 6oplt2v98c0kl6ng13po020l5f Query : select st.usalote valor from st where st.ref = '324.642.00.01'
20241205@171837.4338 6oplt2v98c0kl6ng13po020l5f Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.642.00.01'
20241205@171837.4497 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.4514 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171837.4544 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.4560 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171837.4571 6oplt2v98c0kl6ng13po020l5f Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171837.4584 6oplt2v98c0kl6ng13po020l5f Query : select sestamp valor from se where ref ='324.642.00.01' and lote = 'r2100892200a'
20241205@171837.4605 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.4621 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171837.4635 6oplt2v98c0kl6ng13po020l5f Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e473346751e06d70','aut6751e680976751e06d22' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171837.4691 6oplt2v98c0kl6ng13po020l5f Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.4709 6oplt2v98c0kl6ng13po020l5f Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171837.4743 6oplt2v98c0kl6ng13po020l5f Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e473346751e06d70',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut6751e680976751e06d22' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@171837.5071 6oplt2v98c0kl6ng13po020l5f Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751e680976751e06d22','2408292','wait',39,'adm09112754980.682000002')
20241205@171837.5159 6oplt2v98c0kl6ng13po020l5f Query : use flama_phc
20241205@171837.5163 6oplt2v98c0kl6ng13po020l5f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171837.5193 6oplt2v98c0kl6ng13po020l5f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3732';
20241205@171837.5231 6oplt2v98c0kl6ng13po020l5f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3732';
20241205@171837.5279 6oplt2v98c0kl6ng13po020l5f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3732';
20241205@171837.5308 6oplt2v98c0kl6ng13po020l5f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3732';
20241205@171837.7030 69db2g2qjrrbg8hkihege4u4tf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@171837.7041 69db2g2qjrrbg8hkihege4u4tf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@171837.7108 69db2g2qjrrbg8hkihege4u4tf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3733';
20241205@171837.7174 69db2g2qjrrbg8hkihege4u4tf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3733';
20241205@171837.7232 69db2g2qjrrbg8hkihege4u4tf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3733';
20241205@171837.7263 69db2g2qjrrbg8hkihege4u4tf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3733';
20241205@171837.7318 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.7321 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@171837.7382 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.7385 69db2g2qjrrbg8hkihege4u4tf Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241205@171837.7480 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7650 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7669 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7688 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7707 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7726 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7745 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1578.00.1'
20241205@171837.7764 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.7767 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@171837.7800 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.7803 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 1 valor from td where td.ndoc = 39
20241205@171837.7832 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.7835 69db2g2qjrrbg8hkihege4u4tf Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@171837.7863 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@171837.7900 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.7903 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241205@171837.8318 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.8321 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@171837.8353 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.8356 69db2g2qjrrbg8hkihege4u4tf Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@171837.8544 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.8590 69db2g2qjrrbg8hkihege4u4tf Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241205@171837.8713 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171837.8716 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from td where ndoc = 39
20241205@171837.8728 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@171837.8742 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.8758 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171837.8777 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.8791 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171837.8819 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.8833 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171837.8846 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171837.8901 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171837.8914 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.8928 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171837.8944 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@171837.9105 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.9123 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171837.9158 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@171837.9170 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@171837.9182 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@171837.9195 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@171837.9206 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@171837.9218 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@171837.9230 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751e895896751e06dd7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@171837.9449 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 fno valor from wsftdata order by fno desc
20241205@171837.9478 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171837.9496 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171837.9520 69db2g2qjrrbg8hkihege4u4tf Query : select 'normal' from dummy
20241205@171837.9539 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751e895896751e06dd7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2245,100810,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@171838.7700 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.8100 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.1040 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.2640 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2840 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.3130 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.3270 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.3360 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.3480 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.3750 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.3890 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.4010 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e787196751e06e09','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.4050 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.4200 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.4470 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e787196751e06e09',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@171838.6710 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.6740 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.6960 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.7110 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.7280 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.7590 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.7770 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.7870 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.8030 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.8190 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.8360 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.8490 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e187616751e06e14','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.8540 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.8690 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.9010 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e187616751e06e14',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,20000,?,?,?,?)
20241205@171838.1147 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.1150 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.1170 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.1191 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1207 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.1232 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1249 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.1258 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.1271 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.1284 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1299 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.1311 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e363036751e06e1f','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.1315 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1330 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.1359 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e363036751e06e1f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,30000,?,?,?,?)
20241205@171838.1581 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.1584 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.1604 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.1618 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1635 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.1661 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1675 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.1684 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.1696 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.1711 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1727 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.1740 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e404276751e06e29','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.1750 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.1765 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.1795 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e404276751e06e29',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,40000,?,?,?,?)
20241205@171838.2008 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.2011 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.2030 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.2044 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2060 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.2085 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2099 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.2107 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.2119 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.2132 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2151 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.2164 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e925336751e06e34','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.2169 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2185 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.2218 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e925336751e06e34',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,50000,?,?,?,?)
20241205@171838.2518 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.2522 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.2545 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.2562 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2580 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.2610 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2628 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.2643 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.2657 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.2671 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2688 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.2702 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e845806751e06e41','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.2706 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.2722 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.2761 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e845806751e06e41',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,60000,?,?,?,?)
20241205@171838.2993 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.2996 69db2g2qjrrbg8hkihege4u4tf Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20241205@171838.3016 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1578.00.1'
20241205@171838.3031 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.3047 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.3073 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.3088 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.3097 69db2g2qjrrbg8hkihege4u4tf Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.3109 69db2g2qjrrbg8hkihege4u4tf Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2101115200a'
20241205@171838.3125 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.3143 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.3157 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e015346751e06e4c','aut6751e895896751e06dd7' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.3162 69db2g2qjrrbg8hkihege4u4tf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.3177 69db2g2qjrrbg8hkihege4u4tf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.3207 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e015346751e06e4c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e895896751e06dd7' ,0,0 ,2,23.00,70000,?,?,?,?)
20241205@171838.3430 69db2g2qjrrbg8hkihege4u4tf Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751e895896751e06dd7','2408293','wait',39,'adm09112754980.682000002')
20241205@171838.3505 69db2g2qjrrbg8hkihege4u4tf Query : use flama_phc
20241205@171838.3508 69db2g2qjrrbg8hkihege4u4tf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171838.3538 69db2g2qjrrbg8hkihege4u4tf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3733';
20241205@171838.3575 69db2g2qjrrbg8hkihege4u4tf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3733';
20241205@171838.3624 69db2g2qjrrbg8hkihege4u4tf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3733';
20241205@171838.3656 69db2g2qjrrbg8hkihege4u4tf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3733';
20241205@171838.4229 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@171838.4239 gea2mug5u1gi3ujjiqs0uiku4d Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@171838.4304 gea2mug5u1gi3ujjiqs0uiku4d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3734';
20241205@171838.4384 gea2mug5u1gi3ujjiqs0uiku4d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3734';
20241205@171838.4449 gea2mug5u1gi3ujjiqs0uiku4d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3734';
20241205@171838.4482 gea2mug5u1gi3ujjiqs0uiku4d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3734';
20241205@171838.4537 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.4540 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@171838.4603 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.4607 gea2mug5u1gi3ujjiqs0uiku4d Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241205@171838.4657 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2330.00.1'
20241205@171838.4831 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.4834 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@171838.4896 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.4900 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 1 valor from td where td.ndoc = 39
20241205@171838.4930 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.4933 gea2mug5u1gi3ujjiqs0uiku4d Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@171838.4962 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@171838.5001 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.5004 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241205@171838.5034 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.5037 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@171838.5067 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.5070 gea2mug5u1gi3ujjiqs0uiku4d Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@171838.5109 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.5112 gea2mug5u1gi3ujjiqs0uiku4d Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241205@171838.5157 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.5160 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from td where ndoc = 39
20241205@171838.5173 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@171838.5188 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.5206 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171838.5225 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.5242 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171838.5272 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.5287 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171838.5300 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171838.5358 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171838.5372 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.5388 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171838.5405 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751e000746751e06e81' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@171838.5551 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.5569 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171838.5604 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@171838.5617 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@171838.5629 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@171838.5641 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@171838.5654 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@171838.5666 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@171838.5678 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751e000746751e06e81',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@171838.5883 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 fno valor from wsftdata order by fno desc
20241205@171838.5915 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.5932 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171838.5957 gea2mug5u1gi3ujjiqs0uiku4d Query : select 'normal' from dummy
20241205@171838.5974 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751e000746751e06e81',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2246,100810,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@171838.6234 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.6237 gea2mug5u1gi3ujjiqs0uiku4d Query : select st.usalote valor from st where st.ref = '324.2330.00.1'
20241205@171838.6271 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2330.00.1'
20241205@171838.6439 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.6459 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.6488 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.6505 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.6514 gea2mug5u1gi3ujjiqs0uiku4d Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171838.6526 gea2mug5u1gi3ujjiqs0uiku4d Query : select sestamp valor from se where ref ='324.2330.00.1' and lote = 'r2100584800a'
20241205@171838.6546 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.6561 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171838.6573 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e806116751e06e9f','aut6751e000746751e06e81' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171838.6577 gea2mug5u1gi3ujjiqs0uiku4d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.6592 gea2mug5u1gi3ujjiqs0uiku4d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171838.6620 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e806116751e06e9f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',10.000 ,'aut6751e000746751e06e81' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@171838.6833 gea2mug5u1gi3ujjiqs0uiku4d Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751e000746751e06e81','2408294','wait',39,'adm09112754980.682000002')
20241205@171838.6904 gea2mug5u1gi3ujjiqs0uiku4d Query : use flama_phc
20241205@171838.6908 gea2mug5u1gi3ujjiqs0uiku4d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171838.6936 gea2mug5u1gi3ujjiqs0uiku4d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3734';
20241205@171838.6977 gea2mug5u1gi3ujjiqs0uiku4d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3734';
20241205@171838.7025 gea2mug5u1gi3ujjiqs0uiku4d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3734';
20241205@171838.7058 gea2mug5u1gi3ujjiqs0uiku4d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3734';
20241205@171838.7722 3bsgti6t5g4ajmi44brja51u5s Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@171838.7769 3bsgti6t5g4ajmi44brja51u5s Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@171838.7963 3bsgti6t5g4ajmi44brja51u5s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3735';
20241205@171838.8033 3bsgti6t5g4ajmi44brja51u5s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3735';
20241205@171838.8100 3bsgti6t5g4ajmi44brja51u5s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3735';
20241205@171838.8138 3bsgti6t5g4ajmi44brja51u5s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3735';
20241205@171838.8210 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8214 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@171838.8274 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8277 3bsgti6t5g4ajmi44brja51u5s Query : select no, estab,szadrsdesc from szadrs where u_coddest=227
20241205@171838.8376 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1706.00.1'
20241205@171838.8573 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1706.00.1'
20241205@171838.8594 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8598 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@171838.8631 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8634 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 1 valor from td where td.ndoc = 39
20241205@171838.8665 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8668 3bsgti6t5g4ajmi44brja51u5s Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@171838.8699 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@171838.8732 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8736 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 ~inactivo valor from cl where no = '100041' and estab = 0 order by inactivo desc
20241205@171838.8870 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8874 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@171838.8907 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8910 3bsgti6t5g4ajmi44brja51u5s Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@171838.8950 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.8953 3bsgti6t5g4ajmi44brja51u5s Query : select szadrsstamp valor from szadrs where szadrsdesc='radiobela som, lda'
20241205@171838.9001 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171838.9004 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from td where ndoc = 39
20241205@171838.9016 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@171838.9029 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.9047 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171838.9065 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.9079 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171838.9106 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.9119 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171838.9131 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171838.9189 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171838.9203 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.9218 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171838.9234 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751e417746751e06ede' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@171838.9449 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.9466 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171838.9500 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@171838.9513 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@171838.9525 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@171838.9538 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@171838.9550 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@171838.9563 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@171838.9600 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751e417746751e06ede',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@171838.9839 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 fno valor from wsftdata order by fno desc
20241205@171838.9871 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171838.9888 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171838.9912 3bsgti6t5g4ajmi44brja51u5s Query : select 'normal' from dummy
20241205@171838.9930 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751e417746751e06ede',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2247,100041,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@171839.4330 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171839.4370 3bsgti6t5g4ajmi44brja51u5s Query : select st.usalote valor from st where st.ref = '324.1706.00.1'
20241205@171839.4610 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1706.00.1'
20241205@171839.6260 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.6440 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.6720 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.6870 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.6960 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171839.7100 3bsgti6t5g4ajmi44brja51u5s Query : select sestamp valor from se where ref ='324.1706.00.1' and lote = 'r2100123100b'
20241205@171839.7410 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.7580 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.7710 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e941236751e06f12','aut6751e417746751e06ede' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171839.7750 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.7910 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.8220 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e941236751e06f12',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut6751e417746751e06ede' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@171839.1847 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171839.1889 3bsgti6t5g4ajmi44brja51u5s Query : select st.usalote valor from st where st.ref = '324.1706.00.1'
20241205@171839.2135 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1706.00.1'
20241205@171839.2153 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.2169 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.2195 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.2209 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.2218 3bsgti6t5g4ajmi44brja51u5s Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171839.2230 3bsgti6t5g4ajmi44brja51u5s Query : select sestamp valor from se where ref ='324.1706.00.1' and lote = 'r2100123100b'
20241205@171839.2242 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.2257 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.2267 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e676426751e06f36','aut6751e417746751e06ede' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171839.2272 3bsgti6t5g4ajmi44brja51u5s Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.2286 3bsgti6t5g4ajmi44brja51u5s Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.2314 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e676426751e06f36',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut6751e417746751e06ede' ,0,0 ,2,23.00,20000,?,?,?,?)
20241205@171839.2573 3bsgti6t5g4ajmi44brja51u5s Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751e417746751e06ede','2408295','wait',39,'adm09112754980.682000002')
20241205@171839.2652 3bsgti6t5g4ajmi44brja51u5s Query : use flama_phc
20241205@171839.2656 3bsgti6t5g4ajmi44brja51u5s Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171839.2686 3bsgti6t5g4ajmi44brja51u5s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3735';
20241205@171839.2727 3bsgti6t5g4ajmi44brja51u5s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3735';
20241205@171839.2784 3bsgti6t5g4ajmi44brja51u5s Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3735';
20241205@171839.2823 3bsgti6t5g4ajmi44brja51u5s Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3735';
20241205@171839.3455 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@171839.3466 rs5qopojr3kb5tlgsmuk3s5o5l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@171839.3532 rs5qopojr3kb5tlgsmuk3s5o5l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3736';
20241205@171839.3590 rs5qopojr3kb5tlgsmuk3s5o5l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3736';
20241205@171839.3648 rs5qopojr3kb5tlgsmuk3s5o5l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3736';
20241205@171839.3678 rs5qopojr3kb5tlgsmuk3s5o5l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3736';
20241205@171839.3729 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.3732 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@171839.3793 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.3796 rs5qopojr3kb5tlgsmuk3s5o5l Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241205@171839.3840 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.736.00.01'
20241205@171839.4037 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.736.00.01'
20241205@171839.4058 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4060 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@171839.4093 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4096 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 1 valor from td where td.ndoc = 39
20241205@171839.4125 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4128 rs5qopojr3kb5tlgsmuk3s5o5l Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@171839.4156 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@171839.4191 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4194 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241205@171839.4224 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4227 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@171839.4258 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4260 rs5qopojr3kb5tlgsmuk3s5o5l Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@171839.4299 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4302 rs5qopojr3kb5tlgsmuk3s5o5l Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241205@171839.4347 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.4350 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from td where ndoc = 39
20241205@171839.4363 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@171839.4378 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.4395 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171839.4415 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.4429 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171839.4457 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.4471 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171839.4483 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171839.4542 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171839.4555 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.4570 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171839.4586 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751e723906751e06f6d' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@171839.4762 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.4780 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171839.4813 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@171839.4825 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@171839.4837 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@171839.4849 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@171839.4860 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@171839.4872 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@171839.4884 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751e723906751e06f6d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@171839.5108 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 fno valor from wsftdata order by fno desc
20241205@171839.5138 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.5156 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171839.5178 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 'normal' from dummy
20241205@171839.5222 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751e723906751e06f6d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2248,100810,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@171839.5488 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.5492 rs5qopojr3kb5tlgsmuk3s5o5l Query : select st.usalote valor from st where st.ref = '324.736.00.01'
20241205@171839.5569 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.736.00.01'
20241205@171839.5741 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.5758 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.5783 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.5798 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.5807 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171839.5819 rs5qopojr3kb5tlgsmuk3s5o5l Query : select sestamp valor from se where ref ='324.736.00.01' and lote = 'r2400239300a'
20241205@171839.5834 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.5848 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.5860 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e129156751e06f8e','aut6751e723906751e06f6d' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171839.5865 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.5879 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.5911 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e129156751e06f8e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut6751e723906751e06f6d' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@171839.6148 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.6151 rs5qopojr3kb5tlgsmuk3s5o5l Query : select st.usalote valor from st where st.ref = '324.736.00.01'
20241205@171839.6173 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.736.00.01'
20241205@171839.6187 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.6204 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.6228 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.6243 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.6253 rs5qopojr3kb5tlgsmuk3s5o5l Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171839.6265 rs5qopojr3kb5tlgsmuk3s5o5l Query : select sestamp valor from se where ref ='324.736.00.01' and lote = 'r2400239300a'
20241205@171839.6278 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.6292 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171839.6303 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e820126751e06f99','aut6751e723906751e06f6d' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171839.6308 rs5qopojr3kb5tlgsmuk3s5o5l Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.6322 rs5qopojr3kb5tlgsmuk3s5o5l Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171839.6350 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e820126751e06f99',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',96.000 ,'aut6751e723906751e06f6d' ,0,0 ,2,23.00,20000,?,?,?,?)
20241205@171839.6662 rs5qopojr3kb5tlgsmuk3s5o5l Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751e723906751e06f6d','2408296','wait',39,'adm09112754980.682000002')
20241205@171839.6733 rs5qopojr3kb5tlgsmuk3s5o5l Query : use flama_phc
20241205@171839.6736 rs5qopojr3kb5tlgsmuk3s5o5l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171839.6766 rs5qopojr3kb5tlgsmuk3s5o5l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3736';
20241205@171839.6806 rs5qopojr3kb5tlgsmuk3s5o5l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3736';
20241205@171839.6856 rs5qopojr3kb5tlgsmuk3s5o5l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3736';
20241205@171839.6886 rs5qopojr3kb5tlgsmuk3s5o5l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3736';
20241205@171839.7421 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241205@171839.7432 3nk4o9dgut3gmr0qhp6dao47gm Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241205@171839.7501 3nk4o9dgut3gmr0qhp6dao47gm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3737';
20241205@171839.7573 3nk4o9dgut3gmr0qhp6dao47gm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3737';
20241205@171839.7632 3nk4o9dgut3gmr0qhp6dao47gm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3737';
20241205@171839.7663 3nk4o9dgut3gmr0qhp6dao47gm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3737';
20241205@171839.7731 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.7734 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241205@171839.8423 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.8463 3nk4o9dgut3gmr0qhp6dao47gm Query : select no, estab,szadrsdesc from szadrs where u_coddest=1761
20241205@171839.8980 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '323.367.09.00'
20241205@171839.9164 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9168 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241205@171839.9199 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9201 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 1 valor from td where td.ndoc = 39
20241205@171839.9236 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9239 3nk4o9dgut3gmr0qhp6dao47gm Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241205@171839.9266 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241205@171839.9299 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9302 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 ~inactivo valor from cl where no = '101828' and estab = 0 order by inactivo desc
20241205@171839.9431 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9434 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241205@171839.9464 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9467 3nk4o9dgut3gmr0qhp6dao47gm Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241205@171839.9507 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9510 3nk4o9dgut3gmr0qhp6dao47gm Query : select szadrsstamp valor from szadrs where szadrsdesc='electrocortes, lda'
20241205@171839.9557 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171839.9559 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from td where ndoc = 39
20241205@171839.9571 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241205@171839.9584 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.9601 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171839.9619 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.9634 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171839.9664 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.9679 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171839.9690 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171839.9746 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241205@171839.9759 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.9773 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241205@171839.9789 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6751e178536751e06fec' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241205@171839.9940 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171839.9966 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241205@171839.9998 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241205@171840.9000 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241205@171840.2100 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241205@171840.3200 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241205@171840.4500 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241205@171840.5600 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241205@171840.6700 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6751e178536751e06fec',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241205@171840.2860 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 fno valor from wsftdata order by fno desc
20241205@171840.3180 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171840.3350 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241205@171840.3590 3nk4o9dgut3gmr0qhp6dao47gm Query : select 'normal' from dummy
20241205@171840.3760 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6751e178536751e06fec',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2249,101828,0,'2024-12-05',39,'euro',0,0,2024 ,?,?)
20241205@171840.6720 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171840.6750 3nk4o9dgut3gmr0qhp6dao47gm Query : select st.usalote valor from st where st.ref = '323.367.09.00'
20241205@171840.7000 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '323.367.09.00'
20241205@171840.8960 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171840.9130 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171840.9400 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171840.9550 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171840.9640 3nk4o9dgut3gmr0qhp6dao47gm Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241205@171840.9770 3nk4o9dgut3gmr0qhp6dao47gm Query : select sestamp valor from se where ref ='323.367.09.00' and lote = 'r2400053200a'
20241205@171840.9910 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171840.1036 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241205@171840.1050 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6751e496646751e07018','aut6751e178536751e06fec' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241205@171840.1055 3nk4o9dgut3gmr0qhp6dao47gm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241205@171840.1071 3nk4o9dgut3gmr0qhp6dao47gm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241205@171840.1102 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6751e496646751e07018',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut6751e178536751e06fec' ,0,0 ,2,23.00,10000,?,?,?,?)
20241205@171840.1338 3nk4o9dgut3gmr0qhp6dao47gm Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6751e178536751e06fec','2408300','wait',39,'adm09112754980.682000002')
20241205@171840.1408 3nk4o9dgut3gmr0qhp6dao47gm Query : use flama_phc
20241205@171840.1411 3nk4o9dgut3gmr0qhp6dao47gm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@171840.1442 3nk4o9dgut3gmr0qhp6dao47gm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3737';
20241205@171840.1481 3nk4o9dgut3gmr0qhp6dao47gm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3737';
20241205@171840.1530 3nk4o9dgut3gmr0qhp6dao47gm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3737';
20241205@171840.1560 3nk4o9dgut3gmr0qhp6dao47gm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3737';
20241205@171909.1594 nn8pv7t6htd41771qh64galsoi Query : use flama_phc
20241205@171909.1598 nn8pv7t6htd41771qh64galsoi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@171909.1684 nn8pv7t6htd41771qh64galsoi Query : use flama_phc
20241205@171909.1687 nn8pv7t6htd41771qh64galsoi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@173609.3273 c6rv00kbv6km7sqhefiuvufgea Query : use flama_phc
20241205@173609.3277 c6rv00kbv6km7sqhefiuvufgea Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@173609.3393 c6rv00kbv6km7sqhefiuvufgea Query : use flama_phc
20241205@173609.3396 c6rv00kbv6km7sqhefiuvufgea Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@181908.9674 cqcfobpeggk5q8sd0nil3ts9at Query : use flama_phc
20241205@181908.9679 cqcfobpeggk5q8sd0nil3ts9at Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@181908.9798 cqcfobpeggk5q8sd0nil3ts9at Query : use flama_phc
20241205@181908.9801 cqcfobpeggk5q8sd0nil3ts9at Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@183608.5164 g75pfpk774b3rp5jefona432dv Query : use flama_phc
20241205@183608.5168 g75pfpk774b3rp5jefona432dv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@183608.5256 g75pfpk774b3rp5jefona432dv Query : use flama_phc
20241205@183608.5259 g75pfpk774b3rp5jefona432dv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@191908.8562 icdn4hj45oiktitd0g0cn9sq7q Query : use flama_phc
20241205@191908.8571 icdn4hj45oiktitd0g0cn9sq7q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@191908.8768 icdn4hj45oiktitd0g0cn9sq7q Query : use flama_phc
20241205@191908.8772 icdn4hj45oiktitd0g0cn9sq7q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@193608.9294 euk0opsvv0mhvkkv51omoenhg4 Query : use flama_phc
20241205@193608.9298 euk0opsvv0mhvkkv51omoenhg4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@193608.9383 euk0opsvv0mhvkkv51omoenhg4 Query : use flama_phc
20241205@193608.9386 euk0opsvv0mhvkkv51omoenhg4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@201918.7141 51h2mdoolpqpu6bik2v87i4un6 Query : use flama_phc
20241205@201918.7145 51h2mdoolpqpu6bik2v87i4un6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@201918.7236 51h2mdoolpqpu6bik2v87i4un6 Query : use flama_phc
20241205@201918.7239 51h2mdoolpqpu6bik2v87i4un6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@203618.5386 7dfatoj7ctbpcr007pkefj3l39 Query : use flama_phc
20241205@203618.5390 7dfatoj7ctbpcr007pkefj3l39 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@203618.5581 7dfatoj7ctbpcr007pkefj3l39 Query : use flama_phc
20241205@203618.5584 7dfatoj7ctbpcr007pkefj3l39 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@211908.6771 m2ciu8dsj76kn91dhf1llib3ap Query : use flama_phc
20241205@211908.6775 m2ciu8dsj76kn91dhf1llib3ap Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@211908.6862 m2ciu8dsj76kn91dhf1llib3ap Query : use flama_phc
20241205@211908.6865 m2ciu8dsj76kn91dhf1llib3ap Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@213608.8529 aidd0hg9g97s1l0rb6v4epv7i8 Query : use flama_phc
20241205@213608.8573 aidd0hg9g97s1l0rb6v4epv7i8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@213608.8902 aidd0hg9g97s1l0rb6v4epv7i8 Query : use flama_phc
20241205@213608.8906 aidd0hg9g97s1l0rb6v4epv7i8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@221909.9935 epildhpm5o939a5n2iise33cq7 Query : use flama_phc
20241205@221909.9939 epildhpm5o939a5n2iise33cq7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@221910.1196 epildhpm5o939a5n2iise33cq7 Query : use flama_phc
20241205@221910.1201 epildhpm5o939a5n2iise33cq7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@223609.9719 tudtndaifpmah95dqhqm206a64 Query : use flama_phc
20241205@223609.9761 tudtndaifpmah95dqhqm206a64 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@223610.5440 tudtndaifpmah95dqhqm206a64 Query : use flama_phc
20241205@223610.5870 tudtndaifpmah95dqhqm206a64 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@231908.6449 ot6uaq2l6cq8up1scamf712eqm Query : use flama_phc
20241205@231908.6492 ot6uaq2l6cq8up1scamf712eqm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@231908.7085 ot6uaq2l6cq8up1scamf712eqm Query : use flama_phc
20241205@231908.7099 ot6uaq2l6cq8up1scamf712eqm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241205@233608.7724 gt83hnej6bhiogkgo1kh14gr4j Query : use flama_phc
20241205@233608.7729 gt83hnej6bhiogkgo1kh14gr4j Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241205@233608.7820 gt83hnej6bhiogkgo1kh14gr4j Query : use flama_phc
20241205@233608.7823 gt83hnej6bhiogkgo1kh14gr4j Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@071910.8727 76o4jft8agurje87skidsl3is4 Query : use flama_phc
20241206@071910.8732 76o4jft8agurje87skidsl3is4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@071910.8900 76o4jft8agurje87skidsl3is4 Query : use flama_phc
20241206@071910.8904 76o4jft8agurje87skidsl3is4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@073627.8379 glgohftqndta7mdsl2jsuftbjc Query : use flama_phc
20241206@073627.8385 glgohftqndta7mdsl2jsuftbjc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@073627.8522 glgohftqndta7mdsl2jsuftbjc Query : use flama_phc
20241206@073627.8526 glgohftqndta7mdsl2jsuftbjc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@081748.8229 hph86ic2fh9brscmh1gijms0ud Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@081748.8260 hph86ic2fh9brscmh1gijms0ud Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@081748.8584 hph86ic2fh9brscmh1gijms0ud Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3738';
20241206@081748.8650 hph86ic2fh9brscmh1gijms0ud Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3738';
20241206@081748.8723 hph86ic2fh9brscmh1gijms0ud Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3738';
20241206@081748.8767 hph86ic2fh9brscmh1gijms0ud Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3738';
20241206@081748.8833 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081748.8837 hph86ic2fh9brscmh1gijms0ud Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@081748.8938 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081748.8941 hph86ic2fh9brscmh1gijms0ud Query : select no, estab,szadrsdesc from szadrs where u_coddest=2021
20241206@081748.9046 hph86ic2fh9brscmh1gijms0ud Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9902.00.1'
20241206@081748.9216 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408325 and bi.ref ='328.9902.00.1' and bi.lordem =1
20241206@081748.9615 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081748.9619 hph86ic2fh9brscmh1gijms0ud Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@081748.9810 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081748.9813 hph86ic2fh9brscmh1gijms0ud Query : select top 1 1 valor from td where td.ndoc = 39
20241206@081748.9926 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081748.9968 hph86ic2fh9brscmh1gijms0ud Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@081749.1590 hph86ic2fh9brscmh1gijms0ud Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@081749.2790 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.2820 hph86ic2fh9brscmh1gijms0ud Query : select top 1 ~inactivo valor from cl where no = '101621' and estab = 0 order by inactivo desc
20241206@081749.4920 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.4950 hph86ic2fh9brscmh1gijms0ud Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@081749.5620 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.5650 hph86ic2fh9brscmh1gijms0ud Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@081749.6430 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.6460 hph86ic2fh9brscmh1gijms0ud Query : select szadrsstamp valor from szadrs where szadrsdesc='j.o.m corroios'
20241206@081749.6930 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.6950 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from td where ndoc = 39
20241206@081749.7420 hph86ic2fh9brscmh1gijms0ud Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@081749.7860 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.1146 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@081749.1246 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.1261 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@081749.1291 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.1307 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@081749.1321 hph86ic2fh9brscmh1gijms0ud Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@081749.1619 hph86ic2fh9brscmh1gijms0ud Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@081749.1690 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.1705 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@081749.1746 hph86ic2fh9brscmh1gijms0ud Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6752b035246752b32d20' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@081749.2175 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.2193 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@081749.2233 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@081749.2326 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@081749.2399 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@081749.2494 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@081749.2591 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@081749.2773 hph86ic2fh9brscmh1gijms0ud Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@081749.2901 hph86ic2fh9brscmh1gijms0ud Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6752b035246752b32d20',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@081749.3968 hph86ic2fh9brscmh1gijms0ud Query : select top 1 fno valor from wsftdata order by fno desc
20241206@081749.4052 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.4070 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@081749.4096 hph86ic2fh9brscmh1gijms0ud Query : select 'normal' from dummy
20241206@081749.4240 hph86ic2fh9brscmh1gijms0ud Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6752b035246752b32d20',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2250,101621,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@081749.5522 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.5525 hph86ic2fh9brscmh1gijms0ud Query : select st.usalote valor from st where st.ref = '328.9902.00.1'
20241206@081749.5650 hph86ic2fh9brscmh1gijms0ud Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9902.00.1'
20241206@081749.5797 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.5813 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081749.5841 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.5856 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081749.5866 hph86ic2fh9brscmh1gijms0ud Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081749.5907 hph86ic2fh9brscmh1gijms0ud Query : select sestamp valor from se where ref ='328.9902.00.1' and lote = 'r2300777100a'
20241206@081749.5971 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.5988 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081749.6001 hph86ic2fh9brscmh1gijms0ud Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b476476752b32d91','aut6752b035246752b32d20' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081749.6088 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.6104 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081749.6136 hph86ic2fh9brscmh1gijms0ud Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b476476752b32d91',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut6752b035246752b32d20' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@081749.6637 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.6655 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081749.6684 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.6700 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081749.6710 hph86ic2fh9brscmh1gijms0ud Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081749.6723 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.6738 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081749.6749 hph86ic2fh9brscmh1gijms0ud Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b726366752b32da4','aut6752b035246752b32d20' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081749.6754 hph86ic2fh9brscmh1gijms0ud Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081749.6768 hph86ic2fh9brscmh1gijms0ud Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081749.6797 hph86ic2fh9brscmh1gijms0ud Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6752b726366752b32da4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6752b035246752b32d20' ,0,0 ,2,23.00,20000,?,?,?)
20241206@081749.7041 hph86ic2fh9brscmh1gijms0ud Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6752b035246752b32d20','2408325','wait',39,'adm09112754980.682000002')
20241206@081749.7451 hph86ic2fh9brscmh1gijms0ud Query : use flama_phc
20241206@081749.7455 hph86ic2fh9brscmh1gijms0ud Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@081749.7485 hph86ic2fh9brscmh1gijms0ud Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3738';
20241206@081749.7521 hph86ic2fh9brscmh1gijms0ud Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3738';
20241206@081749.7568 hph86ic2fh9brscmh1gijms0ud Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3738';
20241206@081749.7599 hph86ic2fh9brscmh1gijms0ud Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3738';
20241206@081749.8128 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@081749.8139 r2brk5ft02tmkd92ecrjr9nkm7 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@081749.8201 r2brk5ft02tmkd92ecrjr9nkm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3739';
20241206@081749.8457 r2brk5ft02tmkd92ecrjr9nkm7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3739';
20241206@081749.8520 r2brk5ft02tmkd92ecrjr9nkm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3739';
20241206@081749.8554 r2brk5ft02tmkd92ecrjr9nkm7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3739';
20241206@081749.8607 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081749.8611 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@081749.8677 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081749.8681 r2brk5ft02tmkd92ecrjr9nkm7 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2632
20241206@081749.8768 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9902.00.1'
20241206@081749.8796 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408326 and bi.ref ='328.9902.00.1' and bi.lordem =1
20241206@081749.9162 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081749.9165 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@081749.9362 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081749.9579 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 1 valor from td where td.ndoc = 39
20241206@081750.4290 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.4320 r2brk5ft02tmkd92ecrjr9nkm7 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@081750.4680 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@081750.5290 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.5330 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 ~inactivo valor from cl where no = '101621' and estab = 0 order by inactivo desc
20241206@081750.5690 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.5720 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@081750.6110 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.6140 r2brk5ft02tmkd92ecrjr9nkm7 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@081750.6650 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.6680 r2brk5ft02tmkd92ecrjr9nkm7 Query : select szadrsstamp valor from szadrs where szadrsdesc='j.o.m.,lda- braganÇa'
20241206@081750.7430 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.7460 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from td where ndoc = 39
20241206@081750.7590 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@081750.7740 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.7900 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@081750.8100 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.8330 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@081750.8640 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.8790 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@081750.8940 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@081750.9500 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@081750.9630 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.9790 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@081750.1000 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6752b182126752b32e15' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@081750.1145 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.1162 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@081750.1195 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@081750.1207 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@081750.1219 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@081750.1230 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@081750.1242 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@081750.1254 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@081750.1265 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6752b182126752b32e15',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@081750.1469 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 fno valor from wsftdata order by fno desc
20241206@081750.1496 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.1515 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@081750.1539 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 'normal' from dummy
20241206@081750.1563 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6752b182126752b32e15',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2251,101621,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@081750.1812 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.1815 r2brk5ft02tmkd92ecrjr9nkm7 Query : select st.usalote valor from st where st.ref = '328.9902.00.1'
20241206@081750.1837 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9902.00.1'
20241206@081750.1853 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.1965 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.1993 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2009 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081750.2017 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081750.2030 r2brk5ft02tmkd92ecrjr9nkm7 Query : select sestamp valor from se where ref ='328.9902.00.1' and lote = 'r2300777100a'
20241206@081750.2043 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2058 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081750.2069 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b282116752b32e31','aut6752b182126752b32e15' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081750.2073 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2088 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.2118 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b282116752b32e31',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut6752b182126752b32e15' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@081750.2351 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2370 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.2396 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2421 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081750.2430 r2brk5ft02tmkd92ecrjr9nkm7 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081750.2448 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2468 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081750.2482 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b244736752b32e3b','aut6752b182126752b32e15' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081750.2486 r2brk5ft02tmkd92ecrjr9nkm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.2502 r2brk5ft02tmkd92ecrjr9nkm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.2532 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6752b244736752b32e3b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6752b182126752b32e15' ,0,0 ,2,23.00,20000,?,?,?)
20241206@081750.2749 r2brk5ft02tmkd92ecrjr9nkm7 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6752b182126752b32e15','2408326','wait',39,'adm09112754980.682000002')
20241206@081750.2827 r2brk5ft02tmkd92ecrjr9nkm7 Query : use flama_phc
20241206@081750.2830 r2brk5ft02tmkd92ecrjr9nkm7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@081750.2861 r2brk5ft02tmkd92ecrjr9nkm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3739';
20241206@081750.2906 r2brk5ft02tmkd92ecrjr9nkm7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3739';
20241206@081750.2958 r2brk5ft02tmkd92ecrjr9nkm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3739';
20241206@081750.2995 r2brk5ft02tmkd92ecrjr9nkm7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3739';
20241206@081750.3669 a5o316vf1au09bnks2bglpql96 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@081750.3751 a5o316vf1au09bnks2bglpql96 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@081750.3836 a5o316vf1au09bnks2bglpql96 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3740';
20241206@081750.3899 a5o316vf1au09bnks2bglpql96 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3740';
20241206@081750.3965 a5o316vf1au09bnks2bglpql96 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3740';
20241206@081750.3999 a5o316vf1au09bnks2bglpql96 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3740';
20241206@081750.4070 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.4073 a5o316vf1au09bnks2bglpql96 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@081750.4134 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.4137 a5o316vf1au09bnks2bglpql96 Query : select no, estab,szadrsdesc from szadrs where u_coddest=3168
20241206@081750.4227 a5o316vf1au09bnks2bglpql96 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.938.00.01'
20241206@081750.4378 a5o316vf1au09bnks2bglpql96 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408329 and bi.ref ='324.938.00.01' and bi.lordem =1
20241206@081750.4728 a5o316vf1au09bnks2bglpql96 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20241206@081750.4881 a5o316vf1au09bnks2bglpql96 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408329 and bi.ref ='327.8253.00.1' and bi.lordem =2
20241206@081750.5209 a5o316vf1au09bnks2bglpql96 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20241206@081750.5367 a5o316vf1au09bnks2bglpql96 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408329 and bi.ref ='304.4320.00.1' and bi.lordem =3
20241206@081750.5807 a5o316vf1au09bnks2bglpql96 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2066.00.1'
20241206@081750.5974 a5o316vf1au09bnks2bglpql96 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408329 and bi.ref ='324.2066.00.1' and bi.lordem =5
20241206@081750.6332 a5o316vf1au09bnks2bglpql96 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1862.00.1'
20241206@081750.6486 a5o316vf1au09bnks2bglpql96 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408329 and bi.ref ='324.1862.00.1' and bi.lordem =6
20241206@081750.6796 a5o316vf1au09bnks2bglpql96 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.678.00.01'
20241206@081750.6958 a5o316vf1au09bnks2bglpql96 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408329 and bi.ref ='324.678.00.01' and bi.lordem =7
20241206@081750.7305 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7308 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@081750.7340 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7342 a5o316vf1au09bnks2bglpql96 Query : select top 1 1 valor from td where td.ndoc = 39
20241206@081750.7372 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7375 a5o316vf1au09bnks2bglpql96 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@081750.7413 a5o316vf1au09bnks2bglpql96 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@081750.7449 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7452 a5o316vf1au09bnks2bglpql96 Query : select top 1 ~inactivo valor from cl where no = '101045' and estab = 0 order by inactivo desc
20241206@081750.7585 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7588 a5o316vf1au09bnks2bglpql96 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@081750.7627 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7630 a5o316vf1au09bnks2bglpql96 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@081750.7673 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7676 a5o316vf1au09bnks2bglpql96 Query : select szadrsstamp valor from szadrs where szadrsdesc='electro chico - electrodomÉsticos, lda.'
20241206@081750.7730 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.7734 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from td where ndoc = 39
20241206@081750.7749 a5o316vf1au09bnks2bglpql96 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@081750.7764 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.7784 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@081750.7807 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.7824 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@081750.7854 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.7871 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@081750.7885 a5o316vf1au09bnks2bglpql96 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@081750.7975 a5o316vf1au09bnks2bglpql96 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@081750.7988 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.8003 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@081750.8019 a5o316vf1au09bnks2bglpql96 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@081750.8168 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.8184 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@081750.8217 a5o316vf1au09bnks2bglpql96 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@081750.8229 a5o316vf1au09bnks2bglpql96 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@081750.8242 a5o316vf1au09bnks2bglpql96 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@081750.8255 a5o316vf1au09bnks2bglpql96 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@081750.8266 a5o316vf1au09bnks2bglpql96 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@081750.8279 a5o316vf1au09bnks2bglpql96 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@081750.8291 a5o316vf1au09bnks2bglpql96 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6752b598016752b32ec0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@081750.8515 a5o316vf1au09bnks2bglpql96 Query : select top 1 fno valor from wsftdata order by fno desc
20241206@081750.8544 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.8561 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@081750.8594 a5o316vf1au09bnks2bglpql96 Query : select 'normal' from dummy
20241206@081750.8612 a5o316vf1au09bnks2bglpql96 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6752b598016752b32ec0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2252,101045,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@081750.9059 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.9062 a5o316vf1au09bnks2bglpql96 Query : select st.usalote valor from st where st.ref = '324.938.00.01'
20241206@081750.9083 a5o316vf1au09bnks2bglpql96 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.938.00.01'
20241206@081750.9351 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.9379 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.9406 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.9421 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081750.9429 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081750.9451 a5o316vf1au09bnks2bglpql96 Query : select sestamp valor from se where ref ='324.938.00.01' and lote = 'r2301371100a'
20241206@081750.9478 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.9493 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081750.9504 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b442796752b32ee7','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081750.9508 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.9523 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.9551 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b442796752b32ee7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@081750.9774 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081750.9777 a5o316vf1au09bnks2bglpql96 Query : select st.usalote valor from st where st.ref = '327.8253.00.1'
20241206@081750.9799 a5o316vf1au09bnks2bglpql96 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '327.8253.00.1'
20241206@081750.9944 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081750.9961 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081750.9986 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2000 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.1100 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.2300 a5o316vf1au09bnks2bglpql96 Query : select sestamp valor from se where ref ='327.8253.00.1' and lote = 'r2400073100b'
20241206@081751.4200 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.5700 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.6900 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b668106752b32f01','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.7400 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.9100 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.1210 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b668106752b32f01',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20241206@081751.3480 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3640 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.3890 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.4030 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.4110 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.4230 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.4370 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.4490 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b498286752b32f0a','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.4530 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.4670 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.5110 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6752b498286752b32f0a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,30000,?,?,?)
20241206@081751.7140 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081751.7170 a5o316vf1au09bnks2bglpql96 Query : select st.usalote valor from st where st.ref = '304.4320.00.1'
20241206@081751.7370 a5o316vf1au09bnks2bglpql96 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.4320.00.1'
20241206@081751.9190 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.9360 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.9630 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.9790 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.9870 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.1000 a5o316vf1au09bnks2bglpql96 Query : select sestamp valor from se where ref ='304.4320.00.1' and lote = '241005'
20241206@081751.1025 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1041 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.1054 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b499626752b32f19','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.1058 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1083 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.1114 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b499626752b32f19',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20241206@081751.1365 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081751.1368 a5o316vf1au09bnks2bglpql96 Query : select st.usalote valor from st where st.ref = '324.2066.00.1'
20241206@081751.1389 a5o316vf1au09bnks2bglpql96 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2066.00.1'
20241206@081751.1533 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1549 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.1578 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1592 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.1609 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.1622 a5o316vf1au09bnks2bglpql96 Query : select sestamp valor from se where ref ='324.2066.00.1' and lote = 'r2400051100a'
20241206@081751.1645 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1660 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.1672 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b882016752b32f28','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.1682 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1697 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.1732 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b882016752b32f28',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,60000,?,?,?,?,?)
20241206@081751.1949 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.1966 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.1991 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2006 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.2015 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.2027 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2041 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.2053 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b521976752b32f31','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.2057 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2071 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.2100 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6752b521976752b32f31',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,70000,?,?,?)
20241206@081751.2321 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081751.2324 a5o316vf1au09bnks2bglpql96 Query : select st.usalote valor from st where st.ref = '324.1862.00.1'
20241206@081751.2345 a5o316vf1au09bnks2bglpql96 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1862.00.1'
20241206@081751.2493 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2509 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.2535 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2550 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.2564 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.2577 a5o316vf1au09bnks2bglpql96 Query : select sestamp valor from se where ref ='324.1862.00.1' and lote = 'r2400440200a'
20241206@081751.2599 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2616 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.2628 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b014326752b32f3f','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.2632 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.2648 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.2677 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b014326752b32f3f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,90000,?,?,?,?,?)
20241206@081751.2901 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081751.2905 a5o316vf1au09bnks2bglpql96 Query : select st.usalote valor from st where st.ref = '324.678.00.01'
20241206@081751.2941 a5o316vf1au09bnks2bglpql96 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.678.00.01'
20241206@081751.3100 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3116 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.3150 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3169 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.3179 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.3190 a5o316vf1au09bnks2bglpql96 Query : select sestamp valor from se where ref ='324.678.00.01' and lote = 'r2400745200a'
20241206@081751.3204 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3223 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.3237 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b664456752b32f4e','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.3243 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3262 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.3292 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut6752b664456752b32f4e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,100000,?,?,?,?,?)
20241206@081751.3514 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3530 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.3557 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3572 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.3581 a5o316vf1au09bnks2bglpql96 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@081751.3593 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3616 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@081751.3627 a5o316vf1au09bnks2bglpql96 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752b399006752b32f57','aut6752b598016752b32ec0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@081751.3631 a5o316vf1au09bnks2bglpql96 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@081751.3645 a5o316vf1au09bnks2bglpql96 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@081751.3679 a5o316vf1au09bnks2bglpql96 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut6752b399006752b32f57',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut6752b598016752b32ec0' ,0,0 ,2,23.00,110000,?,?,?)
20241206@081751.3892 a5o316vf1au09bnks2bglpql96 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6752b598016752b32ec0','2408329','wait',39,'adm09112754980.682000002')
20241206@081751.3975 a5o316vf1au09bnks2bglpql96 Query : use flama_phc
20241206@081751.3978 a5o316vf1au09bnks2bglpql96 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@081751.4007 a5o316vf1au09bnks2bglpql96 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3740';
20241206@081751.4043 a5o316vf1au09bnks2bglpql96 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3740';
20241206@081751.4106 a5o316vf1au09bnks2bglpql96 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3740';
20241206@081751.4136 a5o316vf1au09bnks2bglpql96 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3740';
20241206@081908.8997 ji2ao5e9m7ege7lbdhss2dblpd Query : use flama_phc
20241206@081908.9001 ji2ao5e9m7ege7lbdhss2dblpd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@081908.9082 ji2ao5e9m7ege7lbdhss2dblpd Query : use flama_phc
20241206@081908.9085 ji2ao5e9m7ege7lbdhss2dblpd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@083608.8969 24ql6jemjb1p22ku3jm54im521 Query : use flama_phc
20241206@083608.8973 24ql6jemjb1p22ku3jm54im521 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@083608.9057 24ql6jemjb1p22ku3jm54im521 Query : use flama_phc
20241206@083608.9060 24ql6jemjb1p22ku3jm54im521 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@090524.4254 cpgimr0u80bbi59l5mqhctnkgn Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@090524.4267 cpgimr0u80bbi59l5mqhctnkgn Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@090524.4335 cpgimr0u80bbi59l5mqhctnkgn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3741';
20241206@090524.4403 cpgimr0u80bbi59l5mqhctnkgn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3741';
20241206@090524.4471 cpgimr0u80bbi59l5mqhctnkgn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3741';
20241206@090524.4509 cpgimr0u80bbi59l5mqhctnkgn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3741';
20241206@090524.4586 cpgimr0u80bbi59l5mqhctnkgn Query : use flama_phc
20241206@090524.4590 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@090524.4658 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1892.00.1'
20241206@090524.4797 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =gt1 and bo.boano =2040 and bo.obrano = gt1406 and bi.ref ='324.1892.00.1' and bi.lordem =1
20241206@090524.4953 cpgimr0u80bbi59l5mqhctnkgn Query : use flama_phc
20241206@090524.4956 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 1 valor from ts where ts.ndos = 61
20241206@090524.5076 cpgimr0u80bbi59l5mqhctnkgn Query : use flama_phc
20241206@090524.5080 cpgimr0u80bbi59l5mqhctnkgn Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@090524.5114 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20241206@090524.5288 cpgimr0u80bbi59l5mqhctnkgn Query : use flama_phc
20241206@090524.5291 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 ~inactivo valor from fl where no = '1626' and estab = 26 order by inactivo desc
20241206@090524.5398 cpgimr0u80bbi59l5mqhctnkgn Query : use flama_phc
20241206@090524.5401 cpgimr0u80bbi59l5mqhctnkgn Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -230
20241206@090524.5496 cpgimr0u80bbi59l5mqhctnkgn Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3741';
20241206@090524.5534 cpgimr0u80bbi59l5mqhctnkgn Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3741';
20241206@091909.5349 q5aqrkcld0oumskcnpohqu68p3 Query : use flama_phc
20241206@091909.5354 q5aqrkcld0oumskcnpohqu68p3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@091909.5443 q5aqrkcld0oumskcnpohqu68p3 Query : use flama_phc
20241206@091909.5446 q5aqrkcld0oumskcnpohqu68p3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@093609.6024 bcno6gvim4qsoqgsljold3lv1v Query : use flama_phc
20241206@093609.6028 bcno6gvim4qsoqgsljold3lv1v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@093609.6125 bcno6gvim4qsoqgsljold3lv1v Query : use flama_phc
20241206@093609.6128 bcno6gvim4qsoqgsljold3lv1v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@095134.6266 roaq35gtg7necdd9ja9urvtoda Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@095134.6294 roaq35gtg7necdd9ja9urvtoda Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@095134.6393 roaq35gtg7necdd9ja9urvtoda Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3742';
20241206@095134.6460 roaq35gtg7necdd9ja9urvtoda Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3742';
20241206@095134.6525 roaq35gtg7necdd9ja9urvtoda Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3742';
20241206@095134.6561 roaq35gtg7necdd9ja9urvtoda Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3742';
20241206@095134.6619 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.6622 roaq35gtg7necdd9ja9urvtoda Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@095134.6744 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.6747 roaq35gtg7necdd9ja9urvtoda Query : select no, estab,szadrsdesc from szadrs where u_coddest=170
20241206@095134.6875 roaq35gtg7necdd9ja9urvtoda Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20241206@095134.7074 roaq35gtg7necdd9ja9urvtoda Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1462.00.1'
20241206@095134.7276 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.7280 roaq35gtg7necdd9ja9urvtoda Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@095134.7465 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.7469 roaq35gtg7necdd9ja9urvtoda Query : select top 1 1 valor from td where td.ndoc = 39
20241206@095134.7553 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.7557 roaq35gtg7necdd9ja9urvtoda Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@095134.7634 roaq35gtg7necdd9ja9urvtoda Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@095134.7751 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.7755 roaq35gtg7necdd9ja9urvtoda Query : select top 1 ~inactivo valor from cl where no = '102068' and estab = 0 order by inactivo desc
20241206@095134.7915 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.7919 roaq35gtg7necdd9ja9urvtoda Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@095134.7992 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.7995 roaq35gtg7necdd9ja9urvtoda Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@095134.8076 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.8079 roaq35gtg7necdd9ja9urvtoda Query : select szadrsstamp valor from szadrs where szadrsdesc='magalhÃes & vinha, lda.'
20241206@095134.8126 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095134.8129 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from td where ndoc = 39
20241206@095134.8193 roaq35gtg7necdd9ja9urvtoda Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@095134.8252 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095134.8601 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@095134.8664 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095134.8682 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@095134.8722 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095134.8741 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@095134.8758 roaq35gtg7necdd9ja9urvtoda Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@095134.9109 roaq35gtg7necdd9ja9urvtoda Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@095134.9224 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095134.9247 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@095134.9321 roaq35gtg7necdd9ja9urvtoda Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut6752c985336752c926d5' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@095134.9556 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095134.9579 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@095134.9619 roaq35gtg7necdd9ja9urvtoda Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@095134.9736 roaq35gtg7necdd9ja9urvtoda Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@095134.9829 roaq35gtg7necdd9ja9urvtoda Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@095135.6000 roaq35gtg7necdd9ja9urvtoda Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@095135.1240 roaq35gtg7necdd9ja9urvtoda Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@095135.2410 roaq35gtg7necdd9ja9urvtoda Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@095135.3330 roaq35gtg7necdd9ja9urvtoda Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut6752c985336752c926d5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@095135.8180 roaq35gtg7necdd9ja9urvtoda Query : select top 1 fno valor from wsftdata order by fno desc
20241206@095135.9030 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.9220 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@095135.9520 roaq35gtg7necdd9ja9urvtoda Query : select 'normal' from dummy
20241206@095135.1040 roaq35gtg7necdd9ja9urvtoda Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut6752c985336752c926d5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2253,102068,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@095135.1639 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095135.1642 roaq35gtg7necdd9ja9urvtoda Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20241206@095135.1782 roaq35gtg7necdd9ja9urvtoda Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20241206@095135.1931 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.1949 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@095135.1982 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.1998 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@095135.2008 roaq35gtg7necdd9ja9urvtoda Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@095135.2054 roaq35gtg7necdd9ja9urvtoda Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100211200a'
20241206@095135.2132 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.2150 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@095135.2163 roaq35gtg7necdd9ja9urvtoda Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752c966686752c92734','aut6752c985336752c926d5' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@095135.2221 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.2237 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@095135.2266 roaq35gtg7necdd9ja9urvtoda Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6752c966686752c92734',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut6752c985336752c926d5' ,0,0 ,2,23.00,10000,?,?,?,?)
20241206@095135.2609 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095135.2613 roaq35gtg7necdd9ja9urvtoda Query : select st.usalote valor from st where st.ref = '324.1462.00.1'
20241206@095135.2636 roaq35gtg7necdd9ja9urvtoda Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1462.00.1'
20241206@095135.2813 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.2831 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@095135.2858 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.2873 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@095135.2883 roaq35gtg7necdd9ja9urvtoda Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@095135.2897 roaq35gtg7necdd9ja9urvtoda Query : select sestamp valor from se where ref ='324.1462.00.1' and lote = 'r2100463100a'
20241206@095135.2913 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.2929 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@095135.2943 roaq35gtg7necdd9ja9urvtoda Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752c106546752c92747','aut6752c985336752c926d5' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@095135.2948 roaq35gtg7necdd9ja9urvtoda Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@095135.2965 roaq35gtg7necdd9ja9urvtoda Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@095135.2999 roaq35gtg7necdd9ja9urvtoda Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut6752c106546752c92747',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut6752c985336752c926d5' ,0,0 ,2,23.00,20000,?,?,?,?)
20241206@095135.3239 roaq35gtg7necdd9ja9urvtoda Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut6752c985336752c926d5','2408332','wait',39,'adm09112754980.682000002')
20241206@095135.3340 roaq35gtg7necdd9ja9urvtoda Query : use flama_phc
20241206@095135.3344 roaq35gtg7necdd9ja9urvtoda Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@095135.3374 roaq35gtg7necdd9ja9urvtoda Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3742';
20241206@095135.3416 roaq35gtg7necdd9ja9urvtoda Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3742';
20241206@095135.3469 roaq35gtg7necdd9ja9urvtoda Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3742';
20241206@095135.3511 roaq35gtg7necdd9ja9urvtoda Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3742';
20241206@101913.2659 9jn80rloed8gl7uithjvrvtjhu Query : use flama_phc
20241206@101913.2663 9jn80rloed8gl7uithjvrvtjhu Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@101913.2751 9jn80rloed8gl7uithjvrvtjhu Query : use flama_phc
20241206@101913.2754 9jn80rloed8gl7uithjvrvtjhu Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@103613.3095 rg1ns2n8up6dpjrak2bh7fqmoc Query : use flama_phc
20241206@103613.3101 rg1ns2n8up6dpjrak2bh7fqmoc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@103613.3842 rg1ns2n8up6dpjrak2bh7fqmoc Query : use flama_phc
20241206@103613.3846 rg1ns2n8up6dpjrak2bh7fqmoc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@103638.5459 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@103638.5472 ci2lpc06i1cn1lmjfa90gr6qve Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@103638.5643 ci2lpc06i1cn1lmjfa90gr6qve Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3743';
20241206@103638.5725 ci2lpc06i1cn1lmjfa90gr6qve Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3743';
20241206@103638.5792 ci2lpc06i1cn1lmjfa90gr6qve Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3743';
20241206@103638.5835 ci2lpc06i1cn1lmjfa90gr6qve Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3743';
20241206@103638.5890 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103638.5893 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@103638.5972 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.682.00.01'
20241206@103638.6115 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400225 and bi.ref ='324.682.00.01' and bi.lordem =10000
20241206@103638.6514 ci2lpc06i1cn1lmjfa90gr6qve Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'cps24022845138,937000003 ' 
20241206@103638.6894 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103638.6898 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 1 valor from ts where ts.ndos = 61
20241206@103638.6937 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103638.6940 ci2lpc06i1cn1lmjfa90gr6qve Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@103638.6984 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20241206@103638.7029 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103638.7034 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20241206@103638.7162 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103638.7166 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from ts where ndos = 61
20241206@103638.7259 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103638.7277 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241206@103638.7315 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103638.7334 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241206@103638.7345 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103638.7360 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241206@103638.7373 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 61
20241206@103638.7524 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241206@103638.7934 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241206@103638.7977 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103638.7983 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20241206@103638.8128 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103638.8192 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241206@103638.8231 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752d383366752d3b6c2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241206@103638.8302 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103638.8327 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241206@103638.8368 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752d383366752d3b6c2','--','bo',7.8031578947368421052 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241206@103638.8629 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103638.8650 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241206@103638.8665 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into bo (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752d383366752d3b6c2','guia r. fornecedor','2024-12-06',61,2403791,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241206@103642.7327 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103642.7333 ci2lpc06i1cn1lmjfa90gr6qve Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20241206@103642.7384 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.682.00.01'
20241206@103642.7809 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103642.7835 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241206@103642.7849 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103642.7863 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241206@103642.7880 ci2lpc06i1cn1lmjfa90gr6qve Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400225100a'
20241206@103642.7894 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103642.7913 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241206@103642.7924 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103642.7940 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241206@103642.7955 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752d974686752d3bac1',?,?,'20241206',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241206@103642.9904 ci2lpc06i1cn1lmjfa90gr6qve Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@103642.9926 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103642.9945 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241206@103642.9961 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6752d622616752d3baf2','aut6752d383366752d3b6c2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from bo bo where bo.bostamp = 'aut6752d383366752d3b6c2'
20241206@103643.1720 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@103643.2230 ci2lpc06i1cn1lmjfa90gr6qve Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241206@103643.2450 ci2lpc06i1cn1lmjfa90gr6qve Query : insert into bi (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut6752d622616752d3baf2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1030, 1030*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,19,19*200.48,19,19*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,19*1030,19*1030*200.48 ,26.568000,26.568000*200.48 ,26.568000,26.568000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19,19*200.48,19*1030,19*1030*200.48,'cps24022845138,937000003 ',148.26,148.26*1030,148.26,148.26*1030,?,?,?,4 from bo bo where bo.bostamp = 'aut6752d383366752d3b6c2'
20241206@103702.8806 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103702.9064 ci2lpc06i1cn1lmjfa90gr6qve Query : declare @bostamp varchar(25) = 'aut6752d383366752d3b6c2' ,@bistamp varchar(25) = '' update bi set tecoval = qtt * ecoval ,etecoval = qtt * eecoval ,tecoval2 = qtt * ecoval2 ,etecoval2 = qtt * eecoval2 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end -- se tiver classificação e não for normal, não calcula nada update bi set ttdeb = 0 ,ettdeb = 0 ,ttmoeda = 0 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and bi.classifc <> '' and bi.classifc <> 'normal' -- no caso normal com moeda euro if exists ( select 1 from bo cross apply ( select valor moeda from para1 where descricao = 'ge_pteoueuro' ) par where bo.bostamp = @bostamp and bo.moeda = par.moeda ) begin -- sem ecovalores update bi set ettdeb = round(bi.qtt * ((bi.edebito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttdeb = round(bi.qtt * ((bi.debito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 1 -- com ecovalores update bi set ettdeb = round(bi.qtt * ( ( bi.edebito + ( iif(p.st_econotdesc = 1, - bi.eecoval2, bi.eecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.eecoval + bi.eecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttdeb = round(bi.qtt * ( ( bi.debito + ( iif(p.st_econotdesc = 1, - bi.ecoval2, bi.ecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.ecoval + bi.ecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp left join st on bi.ref = st.ref left join taxasiva tiva on bi.tabiva = tiva.codigo cross apply ( select max(valor) st_econotdesc from ( select case when valor = 's' then 1 else 0 end valor from para1 where descricao = 'st_econotdesc' union all select 0 ) a ) p where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 0 --acrescenta os descontos em valor, caso existam: update bi set ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 2) ,ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ttmoeda = 0 from bi where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end else begin update bi set ttmoeda = round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2) ,ettdeb = case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ,edebito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end ,debito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end * 200.482 from bi inner join bo2 on bi.bostamp = bo2.bo2stamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) update bi set ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 0) ,debito = round(bi.debito - (bi.qtt * bi.valdesc), 2) ,edebito = round(bi.edebito - (bi.qtt * bi.evaldesc), 2) where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end 
20241206@103720.3094 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103720.3114 ci2lpc06i1cn1lmjfa90gr6qve Query : select 1 valor from bo where bo.bostamp = 'aut6752d383366752d3b6c2'
20241206@103720.3361 ci2lpc06i1cn1lmjfa90gr6qve Query : declare @errno int ,@errmsg varchar(255) ,@prod bit ,@nrdec numeric(10, 0) ,@totaldeb numeric(18, 5) ,@etotaldeb numeric(19, 6) ,@total numeric(18, 5) ,@etotal numeric(19, 6) ,@custo numeric(18, 5) ,@ecusto numeric(19, 6) ,@bo_1iliq numeric(19, 6) ,@bo_2iliq numeric(19, 6) ,@base1 numeric(19, 6) ,@base2 numeric(19, 6) ,@moetotal numeric(13, 3) ,@smoe1 numeric(13, 3) ,@smoe2 numeric(13, 3) ,@smoe3 numeric(13, 3) ,@smoe4 numeric(13, 3) ,@bo11_bins numeric(18, 5) ,@bo21_bins numeric(18, 5) ,@bo31_bins numeric(18, 5) ,@bo41_bins numeric(18, 5) ,@bo51_bins numeric(18, 5) ,@bo61_bins numeric(18, 5) ,@bo71_bins numeric(18, 5) ,@bo81_bins numeric(18, 5) ,@bo91_bins numeric(18, 5) ,@bo12_bins numeric(18, 5) ,@bo22_bins numeric(18, 5) ,@bo32_bins numeric(18, 5) ,@bo42_bins numeric(18, 5) ,@bo52_bins numeric(18, 5) ,@bo62_bins numeric(18, 5) ,@bo72_bins numeric(18, 5) ,@bo82_bins numeric(18, 5) ,@bo92_bins numeric(18, 5) ,@ebo11_bins numeric(19, 6) ,@ebo21_bins numeric(19, 6) ,@ebo31_bins numeric(19, 6) ,@ebo41_bins numeric(19, 6) ,@ebo51_bins numeric(19, 6) ,@ebo61_bins numeric(19, 6) ,@ebo71_bins numeric(18, 5) ,@ebo81_bins numeric(18, 5) ,@ebo91_bins numeric(18, 5) ,@ebo12_bins numeric(19, 6) ,@ebo22_bins numeric(19, 6) ,@ebo32_bins numeric(19, 6) ,@ebo42_bins numeric(19, 6) ,@ebo52_bins numeric(19, 6) ,@ebo62_bins numeric(19, 6) ,@ebo72_bins numeric(18, 5) ,@ebo82_bins numeric(18, 5) ,@ebo92_bins numeric(18, 5) ,@bo11_iva numeric(18, 5) ,@bo21_iva numeric(18, 5) ,@bo31_iva numeric(18, 5) ,@bo41_iva numeric(18, 5) ,@bo51_iva numeric(18, 5) ,@bo61_iva numeric(18, 5) ,@bo71_iva numeric(18, 5) ,@bo81_iva numeric(18, 5) ,@bo91_iva numeric(18, 5) ,@bo12_iva numeric(18, 5) ,@bo22_iva numeric(18, 5) ,@bo32_iva numeric(18, 5) ,@bo42_iva numeric(18, 5) ,@bo52_iva numeric(18, 5) ,@bo62_iva numeric(18, 5) ,@bo72_iva numeric(18, 5) ,@bo82_iva numeric(18, 5) ,@bo92_iva numeric(18, 5) ,@ebo11_iva numeric(19, 6) ,@ebo21_iva numeric(19, 6) ,@ebo31_iva numeric(19, 6) ,@ebo41_iva numeric(19, 6) ,@ebo51_iva numeric(19, 6) ,@ebo61_iva numeric(19, 6) ,@ebo71_iva numeric(18, 5) ,@ebo81_iva numeric(18, 5) ,@ebo91_iva numeric(18, 5) ,@ebo12_iva numeric(19, 6) ,@ebo22_iva numeric(19, 6) ,@ebo32_iva numeric(19, 6) ,@ebo42_iva numeric(19, 6) ,@ebo52_iva numeric(19, 6) ,@ebo62_iva numeric(19, 6) ,@ebo72_iva numeric(18, 5) ,@ebo82_iva numeric(18, 5) ,@ebo92_iva numeric(18, 5) ,@esdeb1 numeric(19, 6) ,@esdeb2 numeric(19, 6) ,@esdeb3 numeric(19, 6) ,@esdeb4 numeric(19, 6) ,@sdeb1 numeric(18, 5) ,@sdeb2 numeric(18, 5) ,@sdeb3 numeric(18, 5) ,@sdeb4 numeric(18, 5) ,@estot1 numeric(19, 6) ,@estot2 numeric(19, 6) ,@estot3 numeric(19, 6) ,@estot4 numeric(19, 6) ,@stot1 numeric(18, 5) ,@stot2 numeric(18, 5) ,@stot3 numeric(18, 5) ,@stot4 numeric(18, 5) ,@ebo_1tvall numeric(19, 6) ,@ebo_2tvall numeric(19, 6) ,@bo_1tvall numeric(18, 5) ,@bo_2tvall numeric(18, 5) ,@ebo_totp1 numeric(19, 6) ,@ebo_totp2 numeric(19, 6) ,@bo_totp1 numeric(18, 5) ,@bo_totp2 numeric(18, 5) ,@sqtt11 numeric(13, 3) ,@sqtt21 numeric(13, 3) ,@sqtt12 numeric(13, 3) ,@sqtt22 numeric(13, 3) ,@sqtt13 numeric(13, 3) ,@sqtt23 numeric(13, 3) ,@sqtt14 numeric(13, 3) ,@sqtt24 numeric(13, 3) ,@userinis varchar (30) ,@mybostamp char(25) = 'aut6752d383366752d3b6c2' declare @totaisiva table ( bostamp varchar (25), codigo numeric(1), taxa numeric (5,2), ebaseinc numeric (19,6), baseinc numeric (18,5), evalor numeric (19,6), valor numeric (18,5) ) set @prod = ( select ts.producao from bo(nolock) inner join ts(nolock) on bo.ndos = ts.ndos and bo.bostamp = @mybostamp ) set @nrdec = ( select convert(numeric(10, 0), valor) from para1(nolock) where descricao = 'de_euro' ) --set @prod = 0 --set @nrdec = 2 select @ecusto = sum(bi.epcusto * bi.qtt) ,@custo = sum(bi.pcusto * bi.qtt) ,@bo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo_1iliq = round(sum(bi.qtt * bi.epu), @nrdec) ,@bo_2iliq = round(sum(bi.ettdeb), @nrdec) ,@bo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else bi.ettdeb - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@esdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@sdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@smoe1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@total = @stot1 + @stot2 + @stot3 + @stot4 ,@etotal = @estot1 + @estot2 + @estot3 + @estot4 ,@totaldeb = @sdeb1 + @sdeb2 + @sdeb3 + @sdeb4 ,@etotaldeb = @esdeb1 + @esdeb2 + @esdeb3 + @esdeb4 ,@moetotal = @smoe1 + @smoe2 + @smoe3 + @smoe4 ,@ebo_1tvall = @ebo11_bins + @ebo21_bins + @ebo31_bins + @ebo41_bins + @ebo51_bins + @ebo61_bins + @ebo71_bins + @ebo81_bins + @ebo91_bins ,@ebo_2tvall = @ebo12_bins + @ebo22_bins + @ebo32_bins + @ebo42_bins + @ebo52_bins + @ebo62_bins + @ebo72_bins + @ebo82_bins + @ebo92_bins ,@bo_1tvall = @bo11_bins + @bo21_bins + @bo31_bins + @bo41_bins + @bo51_bins + @bo61_bins + @bo71_bins + @bo81_bins + @bo91_bins ,@bo_2tvall = @bo12_bins + @bo22_bins + @bo32_bins + @bo42_bins + @bo52_bins + @bo62_bins + @bo72_bins + @bo82_bins + @bo92_bins ,@ebo_totp1 = sum(case when bi.ivaincl = 0 then (bi.epu * bi.qtt) else round((bi.epu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@ebo_totp2 = sum(case when bi.ivaincl = 0 then (bi.edebito * bi.qtt) else round((bi.edebito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp1 = sum(case when bi.ivaincl = 0 then (bi.pu * bi.qtt) else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp2 = sum(case when bi.ivaincl = 0 then (bi.debito * bi.qtt) else round((bi.debito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@sqtt11 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt21 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt12 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt22 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt13 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt23 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt14 = sum(case when bi.stipo = 4 then bi.qtt else 0 end) ,@sqtt24 = sum(case when bi.stipo = 5 then bi.qtt else 0 end) from bi(nolock) where bi.bostamp = @mybostamp and bi.producao = case when @prod = 1 then 1 else bi.producao end and bi.composto = 0 and bi.qtt <> 0 update bo set bo.totaldeb = isnull(@totaldeb, 0) ,bo.total = isnull(@total, 0) ,bo.etotaldeb = isnull(@etotaldeb, 0) ,bo.moetotal = isnull(@moetotal, 0) ,bo.etotal = isnull(@etotal, 0) ,bo.ecusto = isnull(@ecusto, 0) ,bo.custo = isnull(@custo, 0) ,bo.bo11_bins = isnull(@bo11_bins, 0) ,bo.bo12_bins = isnull(@bo12_bins, 0) ,bo.bo21_bins = isnull(@bo21_bins, 0) ,bo.bo22_bins = isnull(@bo22_bins, 0) ,bo.bo31_bins = isnull(@bo31_bins, 0) ,bo.bo32_bins = isnull(@bo32_bins, 0) ,bo.bo41_bins = isnull(@bo41_bins, 0) ,bo.bo42_bins = isnull(@bo42_bins, 0) ,bo.bo51_bins = isnull(@bo51_bins, 0) ,bo.bo52_bins = isnull(@bo52_bins, 0) ,bo.bo61_bins = isnull(@bo61_bins, 0) ,bo.bo62_bins = isnull(@bo62_bins, 0) ,bo.ebo11_bins = isnull(@ebo11_bins, 0) ,bo.ebo12_bins = isnull(@ebo12_bins, 0) ,bo.ebo21_bins = isnull(@ebo21_bins, 0) ,bo.ebo22_bins = isnull(@ebo22_bins, 0) ,bo.ebo31_bins = isnull(@ebo31_bins, 0) ,bo.ebo32_bins = isnull(@ebo32_bins, 0) ,bo.ebo41_bins = isnull(@ebo41_bins, 0) ,bo.ebo42_bins = isnull(@ebo42_bins, 0) ,bo.ebo51_bins = isnull(@ebo51_bins, 0) ,bo.ebo52_bins = isnull(@ebo52_bins, 0) ,bo.ebo61_bins = isnull(@ebo61_bins, 0) ,bo.ebo62_bins = isnull(@ebo62_bins, 0) ,bo.bo11_iva = isnull(@bo11_iva, 0) ,bo.bo12_iva = isnull(@bo12_iva, 0) ,bo.bo21_iva = isnull(@bo21_iva, 0) ,bo.bo22_iva = isnull(@bo22_iva, 0) ,bo.bo31_iva = isnull(@bo31_iva, 0) ,bo.bo32_iva = isnull(@bo32_iva, 0) ,bo.bo41_iva = isnull(@bo41_iva, 0) ,bo.bo42_iva = isnull(@bo42_iva, 0) ,bo.bo51_iva = isnull(@bo51_iva, 0) ,bo.bo52_iva = isnull(@bo52_iva, 0) ,bo.bo61_iva = isnull(@bo61_iva, 0) ,bo.bo62_iva = isnull(@bo62_iva, 0) ,bo.ebo11_iva = isnull(@ebo11_iva, 0) ,bo.ebo12_iva = isnull(@ebo12_iva, 0) ,bo.ebo21_iva = isnull(@ebo21_iva, 0) ,bo.ebo22_iva = isnull(@ebo22_iva, 0) ,bo.ebo31_iva = isnull(@ebo31_iva, 0) ,bo.ebo32_iva = isnull(@ebo32_iva, 0) ,bo.ebo41_iva = isnull(@ebo41_iva, 0) ,bo.ebo42_iva = isnull(@ebo42_iva, 0) ,bo.ebo51_iva = isnull(@ebo51_iva, 0) ,bo.ebo52_iva = isnull(@ebo52_iva, 0) ,bo.ebo61_iva = isnull(@ebo61_iva, 0) ,bo.ebo62_iva = isnull(@ebo62_iva, 0) ,bo.esdeb1 = isnull(@esdeb1, 0) ,bo.esdeb2 = isnull(@esdeb2, 0) ,bo.esdeb3 = isnull(@esdeb3, 0) ,bo.esdeb4 = isnull(@esdeb4, 0) ,bo.sdeb1 = isnull(@sdeb1, 0) ,bo.sdeb2 = isnull(@sdeb2, 0) ,bo.sdeb3 = isnull(@sdeb3, 0) ,bo.sdeb4 = isnull(@sdeb4, 0) ,bo.smoe1 = isnull(@smoe1, 0) ,bo.smoe2 = isnull(@smoe2, 0) ,bo.smoe3 = isnull(@smoe3, 0) ,bo.smoe4 = isnull(@smoe4, 0) ,bo.estot1 = isnull(@estot1, 0) ,bo.estot2 = isnull(@estot2, 0) ,bo.estot3 = isnull(@estot3, 0) ,bo.estot4 = isnull(@estot4, 0) ,bo.stot1 = isnull(@stot1, 0) ,bo.stot2 = isnull(@stot2, 0) ,bo.stot3 = isnull(@stot3, 0) ,bo.stot4 = isnull(@stot4, 0) ,bo.ebo_1tvall = isnull(@ebo_1tvall, 0) ,bo.ebo_2tvall = isnull(@ebo_2tvall, 0) ,bo.bo_1tvall = isnull(@bo_1tvall, 0) ,bo.bo_2tvall = isnull(@bo_2tvall, 0) ,bo.ebo_totp1 = isnull(@ebo_totp1, 0) ,bo.ebo_totp2 = isnull(@ebo_totp2, 0) ,bo.bo_totp1 = isnull(@bo_totp1, 0) ,bo.bo_totp2 = isnull(@bo_totp2, 0) ,bo.sqtt11 = isnull(@sqtt11, 0) ,bo.sqtt21 = isnull(@sqtt21, 0) ,bo.sqtt12 = isnull(@sqtt12, 0) ,bo.sqtt22 = isnull(@sqtt22, 0) ,bo.sqtt13 = isnull(@sqtt13, 0) ,bo.sqtt23 = isnull(@sqtt23, 0) ,bo.sqtt14 = isnull(@sqtt14, 0) ,bo.sqtt24 = isnull(@sqtt24, 0) where bostamp = @mybostamp update bo2 set bo2.bo71_bins = isnull(@bo71_bins, 0) ,bo2.bo72_bins = isnull(@bo72_bins, 0) ,bo2.bo81_bins = isnull(@bo81_bins, 0) ,bo2.bo82_bins = isnull(@bo82_bins, 0) ,bo2.bo91_bins = isnull(@bo91_bins, 0) ,bo2.bo92_bins = isnull(@bo92_bins, 0) ,bo2.ebo71_bins = isnull(@ebo71_bins, 0) ,bo2.ebo72_bins = isnull(@ebo72_bins, 0) ,bo2.ebo81_bins = isnull(@ebo81_bins, 0) ,bo2.ebo82_bins = isnull(@ebo82_bins, 0) ,bo2.ebo91_bins = isnull(@ebo91_bins, 0) ,bo2.ebo92_bins = isnull(@ebo92_bins, 0) ,bo2.bo71_iva = isnull(@bo71_iva, 0) ,bo2.bo72_iva = isnull(@bo72_iva, 0) ,bo2.bo81_iva = isnull(@bo81_iva, 0) ,bo2.bo82_iva = isnull(@bo82_iva, 0) ,bo2.bo91_iva = isnull(@bo91_iva, 0) ,bo2.bo92_iva = isnull(@bo92_iva, 0) ,bo2.ebo71_iva = isnull(@ebo71_iva, 0) ,bo2.ebo72_iva = isnull(@ebo72_iva, 0) ,bo2.ebo81_iva = isnull(@ebo81_iva, 0) ,bo2.ebo82_iva = isnull(@ebo82_iva, 0) ,bo2.ebo91_iva = isnull(@ebo91_iva, 0) ,bo2.ebo92_iva = isnull(@ebo92_iva, 0) ,bo2.etotalciva = isnull(@etotaldeb, 0) + isnull(@ebo12_iva, 0) +isnull(@ebo22_iva, 0) +isnull(@ebo32_iva, 0) +isnull(@ebo42_iva, 0) +isnull(@ebo52_iva, 0) +isnull(@ebo62_iva, 0) +isnull(@ebo72_iva, 0) +isnull(@ebo82_iva, 0) +isnull(@ebo92_iva, 0) --,bo2.mtotalciva =isnull(@moetotal, 0) where bo2stamp = @mybostamp -- trata os bot select @userinis = usrinis from bo where bo.bostamp=@mybostamp insert into @totaisiva ( bostamp, codigo, taxa, ebaseinc, baseinc, evalor, valor ) select @mybostamp,codigo,taxa ,case when (@ebo11_bins <>0) then @ebo11_bins else @ebo12_bins end ,case when (@ebo11_bins <>0) then @bo11_bins else @bo12_bins end ,case when (@ebo11_bins <>0) then @ebo11_iva else @ebo12_iva end ,case when (@ebo11_bins <>0) then @bo11_iva else @bo12_iva end from taxasiva where codigo = 1 union all select @mybostamp,codigo,taxa ,case when (@ebo21_bins <>0) then @ebo21_bins else @ebo22_bins end ,case when (@ebo21_bins <>0) then @bo21_bins else @bo22_bins end ,case when (@ebo21_bins <>0) then @ebo21_iva else @ebo22_iva end ,case when (@ebo21_bins <>0) then @bo21_iva else @bo22_iva end from taxasiva where codigo = 2 union all select @mybostamp,codigo,taxa ,case when (@ebo31_bins <>0) then @ebo31_bins else @ebo32_bins end ,case when (@ebo31_bins <>0) then @bo31_bins else @bo32_bins end ,case when (@ebo31_bins <>0) then @ebo31_iva else @ebo32_iva end ,case when (@ebo31_bins <>0) then @bo31_iva else @bo32_iva end from taxasiva where codigo = 3 union all select @mybostamp,codigo,taxa ,case when (@ebo41_bins <>0) then @ebo41_bins else @ebo42_bins end ,case when (@ebo41_bins <>0) then @bo41_bins else @bo42_bins end ,case when (@ebo41_bins <>0) then @ebo41_iva else @ebo42_iva end ,case when (@ebo41_bins <>0) then @bo41_iva else @bo42_iva end from taxasiva where codigo = 4 union all select @mybostamp,codigo,taxa ,case when (@ebo51_bins <>0) then @ebo51_bins else @ebo52_bins end ,case when (@ebo51_bins <>0) then @bo51_bins else @bo52_bins end ,case when (@ebo51_bins <>0) then @ebo51_iva else @ebo52_iva end ,case when (@ebo51_bins <>0) then @bo51_iva else @bo52_iva end from taxasiva where codigo = 5 union all select @mybostamp,codigo,taxa ,case when (@ebo61_bins <>0) then @ebo61_bins else @ebo62_bins end ,case when (@ebo61_bins <>0) then @bo61_bins else @bo62_bins end ,case when (@ebo61_bins <>0) then @ebo61_iva else @ebo62_iva end ,case when (@ebo61_bins <>0) then @bo61_iva else @bo62_iva end from taxasiva where codigo = 6 union all select @mybostamp,codigo,taxa ,case when (@ebo71_bins <>0) then @ebo71_bins else @ebo72_bins end ,case when (@ebo71_bins <>0) then @bo71_bins else @bo72_bins end ,case when (@ebo71_bins <>0) then @ebo71_iva else @ebo72_iva end ,case when (@ebo71_bins <>0) then @bo71_iva else @bo72_iva end from taxasiva where codigo = 7 union all select @mybostamp,codigo,taxa ,case when (@ebo81_bins <>0) then @ebo81_bins else @ebo82_bins end ,case when (@ebo81_bins <>0) then @bo81_bins else @bo82_bins end ,case when (@ebo81_bins <>0) then @ebo81_iva else @ebo82_iva end ,case when (@ebo81_bins <>0) then @bo81_iva else @bo82_iva end from taxasiva where codigo = 8 union all select @mybostamp,codigo,taxa ,case when (@ebo91_bins <>0) then @ebo91_bins else @ebo92_bins end ,case when (@ebo91_bins <>0) then @bo91_bins else @bo92_bins end ,case when (@ebo91_bins <>0) then @ebo91_iva else @ebo92_iva end ,case when (@ebo91_bins <>0) then @bo91_iva else @bo92_iva end from taxasiva where codigo = 9 update bot set ebaseinc = totiva.ebaseinc, baseinc = totiva.baseinc, evalor = totiva.evalor, valor = totiva.valor, usrinis = @userinis, usrdata = convert (date,getdate()), usrhora = convert (time,getdate()) from @totaisiva totiva inner join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo insert into bot ( botstamp ,bostamp ,codigo ,taxa ,ebaseinc ,baseinc ,evalor ,valor ,ousrinis ,ousrdata ,ousrhora ,usrinis ,usrdata ,usrhora ) select ( left(@userinis,3) + 'tt' + left(newid(),5) + right(newid(),5) + left(newid(),5) + right(newid(),5)) stamp ,@mybostamp stampbo ,totiva.codigo ,totiva.taxa ,totiva.ebaseinc ,totiva.baseinc ,totiva.evalor ,totiva.valor ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) from @totaisiva totiva left join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo where bot.botstamp is null -- atualiza os campo bi.series e bi.series2, caso tenha equipamentos update bi set series = s1, series2=s2 from bi inner join ( select distinct bistamp,ser.s1, ser.s2 from boma cross apply (select stuff ( ( select ',' + rtrim(serie) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s1 , stuff ( ( select ',' + rtrim(serie2) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s2 ) ser where boma.bostamp = @mybostamp ) myboma on bi.bistamp = myboma.bistamp where bi.bostamp = @mybostamp 
20241206@103723.2781 ci2lpc06i1cn1lmjfa90gr6qve Query : use flama_phc
20241206@103723.2785 ci2lpc06i1cn1lmjfa90gr6qve Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@103723.2836 ci2lpc06i1cn1lmjfa90gr6qve Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3743';
20241206@103723.2881 ci2lpc06i1cn1lmjfa90gr6qve Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3743';
20241206@111928.5569 k9cfr5cja2s9obebuik6cvcgnc Query : use flama_phc
20241206@111928.5573 k9cfr5cja2s9obebuik6cvcgnc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@111928.5663 k9cfr5cja2s9obebuik6cvcgnc Query : use flama_phc
20241206@111928.5666 k9cfr5cja2s9obebuik6cvcgnc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@113628.3925 cet12vumlkq64mvv0rp8tduk1j Query : use flama_phc
20241206@113628.3929 cet12vumlkq64mvv0rp8tduk1j Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@113628.4016 cet12vumlkq64mvv0rp8tduk1j Query : use flama_phc
20241206@113628.4019 cet12vumlkq64mvv0rp8tduk1j Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@121908.2992 bpfdnuonmr03otbf2209fpjmhd Query : use flama_phc
20241206@121908.2998 bpfdnuonmr03otbf2209fpjmhd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@121908.3104 bpfdnuonmr03otbf2209fpjmhd Query : use flama_phc
20241206@121908.3109 bpfdnuonmr03otbf2209fpjmhd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@123608.5126 91odk80hav25oobus00g6f2mqf Query : use flama_phc
20241206@123608.5131 91odk80hav25oobus00g6f2mqf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@123608.5223 91odk80hav25oobus00g6f2mqf Query : use flama_phc
20241206@123608.5226 91odk80hav25oobus00g6f2mqf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@123638.7923 eablt857908m0ebgf5tgc51fun Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@123638.7958 eablt857908m0ebgf5tgc51fun Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@123638.8398 eablt857908m0ebgf5tgc51fun Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3744';
20241206@123638.8477 eablt857908m0ebgf5tgc51fun Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3744';
20241206@123638.8565 eablt857908m0ebgf5tgc51fun Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3744';
20241206@123638.8607 eablt857908m0ebgf5tgc51fun Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3744';
20241206@123638.8686 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123638.8691 eablt857908m0ebgf5tgc51fun Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@123638.8833 eablt857908m0ebgf5tgc51fun Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1667.00.1'
20241206@123638.8984 eablt857908m0ebgf5tgc51fun Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =002 and bo.boano =2024 and bo.obrano = 2400923 and bi.ref ='324.1667.00.1' and bi.lordem =10000
20241206@123638.9393 eablt857908m0ebgf5tgc51fun Query : select bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.obranome ,bi.bostamp ,bo.moeda ,bi.vumoeda ,isnull(bi.vumoeda/nullif(bi.edebito,0),1) cambio ,bi.tabiva from bi inner join bo on bi.bostamp = bo.bostamp where bi.bistamp = 'cps24072353929,126000002 ' 
20241206@123638.9833 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123638.9836 eablt857908m0ebgf5tgc51fun Query : select top 1 1 valor from ts where ts.ndos = 61
20241206@123638.9967 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123638.9970 eablt857908m0ebgf5tgc51fun Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@123639.5200 eablt857908m0ebgf5tgc51fun Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =61
20241206@123639.2380 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123639.2410 eablt857908m0ebgf5tgc51fun Query : select top 1 ~inactivo valor from fl where no = '202247' and estab = 00 order by inactivo desc
20241206@123639.3760 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123639.3790 eablt857908m0ebgf5tgc51fun Query : select 1 valor from ts where ndos = 61
20241206@123639.4860 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123639.8110 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241206@123639.8790 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123639.9010 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241206@123639.9530 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123639.1045 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241206@123639.1091 eablt857908m0ebgf5tgc51fun Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 61
20241206@123639.1243 eablt857908m0ebgf5tgc51fun Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241206@123639.1368 eablt857908m0ebgf5tgc51fun Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241206@123639.1416 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123639.1422 eablt857908m0ebgf5tgc51fun Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202247' and estab=00
20241206@123639.1507 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123639.1539 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241206@123639.1580 eablt857908m0ebgf5tgc51fun Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752e346196752efd722',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241206@123639.1669 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123639.1774 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241206@123639.1893 eablt857908m0ebgf5tgc51fun Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752e346196752efd722','--','bo',1.0758537322453913569 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241206@123639.2110 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123639.2130 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241206@123639.2142 eablt857908m0ebgf5tgc51fun Query : insert into bo (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752e346196752efd722','guia r. fornecedor','2024-12-06',61,2403799,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241206@123642.5639 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123642.5643 eablt857908m0ebgf5tgc51fun Query : select st.usalote valor from st where st.ref = '324.1667.00.1'
20241206@123642.5870 eablt857908m0ebgf5tgc51fun Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1667.00.1'
20241206@123642.6066 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123642.6084 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241206@123642.6106 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123642.6122 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241206@123642.6131 eablt857908m0ebgf5tgc51fun Query : select sestamp valor from se where ref ='324.1667.00.1' and lote = 'r2400923100a'
20241206@123642.6199 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123642.6215 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241206@123642.6229 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123642.6246 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241206@123642.6261 eablt857908m0ebgf5tgc51fun Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6752e214506752efda98',?,?,'20241206',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241206@123642.6824 eablt857908m0ebgf5tgc51fun Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@123642.6877 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123642.6894 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241206@123642.6908 eablt857908m0ebgf5tgc51fun Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6752e478816752efdaa7','aut6752e346196752efd722',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from bo bo where bo.bostamp = 'aut6752e346196752efd722'
20241206@123642.7121 eablt857908m0ebgf5tgc51fun Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@123642.7139 eablt857908m0ebgf5tgc51fun Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241206@123642.7163 eablt857908m0ebgf5tgc51fun Query : insert into bi (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut6752e478816752efdaa7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 973, 973*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,33.09,33.09*200.48,33.09,33.09*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,33.09*973,33.09*973*200.48 ,36.603000,36.603000*200.48 ,36.603000,36.603000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,33.09,33.09*200.48,33.09*973,33.09*973*200.48,'cps24072353929,126000002 ',35.6,35.6*973,35.6,35.6*973,?,?,?,4 from bo bo where bo.bostamp = 'aut6752e346196752efd722'
20241206@123656.2431 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123656.2436 eablt857908m0ebgf5tgc51fun Query : declare @bostamp varchar(25) = 'aut6752e346196752efd722' ,@bistamp varchar(25) = '' update bi set tecoval = qtt * ecoval ,etecoval = qtt * eecoval ,tecoval2 = qtt * ecoval2 ,etecoval2 = qtt * eecoval2 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end -- se tiver classificação e não for normal, não calcula nada update bi set ttdeb = 0 ,ettdeb = 0 ,ttmoeda = 0 where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and bi.classifc <> '' and bi.classifc <> 'normal' -- no caso normal com moeda euro if exists ( select 1 from bo cross apply ( select valor moeda from para1 where descricao = 'ge_pteoueuro' ) par where bo.bostamp = @bostamp and bo.moeda = par.moeda ) begin -- sem ecovalores update bi set ettdeb = round(bi.qtt * ((bi.edebito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttdeb = round(bi.qtt * ((bi.debito * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100))), 6) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 1 -- com ecovalores update bi set ettdeb = round(bi.qtt * ( ( bi.edebito + ( iif(p.st_econotdesc = 1, - bi.eecoval2, bi.eecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.eecoval + bi.eecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttdeb = round(bi.qtt * ( ( bi.debito + ( iif(p.st_econotdesc = 1, - bi.ecoval2, bi.ecoval) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ) ) ) * (1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) ), 6) + ( bi.qtt * iif(p.st_econotdesc = 1, (bi.ecoval + bi.ecoval2) * ( 1 + iif(bi.ivaincl = 1 and tiva.taxa <> 0, tiva.taxa / 100, 0) ), 0) ) ,ttmoeda = 0 from bi inner join bo on bi.bostamp = bo.bostamp left join st on bi.ref = st.ref left join taxasiva tiva on bi.tabiva = tiva.codigo cross apply ( select max(valor) st_econotdesc from ( select case when valor = 's' then 1 else 0 end valor from para1 where descricao = 'st_econotdesc' union all select 0 ) a ) p where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.econotcalc = 0 --acrescenta os descontos em valor, caso existam: update bi set ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 2) ,ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ttmoeda = 0 from bi where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end else begin update bi set ttmoeda = round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2) ,ettdeb = case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ,edebito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end ,debito = case when bi.qtt = 0 then 0 else round(abs(( case when bo2.cambio <> 0 then round((round((1 - bi.desconto / 100) * (1 - bi.desc2 / 100) * (1 - bi.desc3 / 100) * (1 - bi.desc4 / 100) * (1 - bi.desc5 / 100) * (1 - bi.desc6 / 100) * bi.qtt * bi.vumoeda, 2)) / bo2.cambio, 2) else 0 end ) / (1 - bi.desconto / 100) / (1 - bi.desc2 / 100) / (1 - bi.desc3 / 100) / (1 - bi.desc4 / 100) / (1 - bi.desc5 / 100) / (1 - bi.desc6 / 100) / bi.qtt), 2) end * 200.482 from bi inner join bo2 on bi.bostamp = bo2.bo2stamp where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) update bi set ttdeb = round(bi.ttdeb - (bi.qtt * bi.valdesc), 2) ,ettdeb = round(bi.ettdeb - (bi.qtt * bi.evaldesc), 0) ,debito = round(bi.debito - (bi.qtt * bi.valdesc), 2) ,edebito = round(bi.edebito - (bi.qtt * bi.evaldesc), 2) where bi.bostamp = @bostamp and bi.bistamp = case when @bistamp <> '' then @bistamp else bi.bistamp end and ( bi.classifc = '' or bi.classifc = 'normal' ) and bi.valdesc <> 0 end 
20241206@123709.7823 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123709.7965 eablt857908m0ebgf5tgc51fun Query : select 1 valor from bo where bo.bostamp = 'aut6752e346196752efd722'
20241206@123709.8091 eablt857908m0ebgf5tgc51fun Query : declare @errno int ,@errmsg varchar(255) ,@prod bit ,@nrdec numeric(10, 0) ,@totaldeb numeric(18, 5) ,@etotaldeb numeric(19, 6) ,@total numeric(18, 5) ,@etotal numeric(19, 6) ,@custo numeric(18, 5) ,@ecusto numeric(19, 6) ,@bo_1iliq numeric(19, 6) ,@bo_2iliq numeric(19, 6) ,@base1 numeric(19, 6) ,@base2 numeric(19, 6) ,@moetotal numeric(13, 3) ,@smoe1 numeric(13, 3) ,@smoe2 numeric(13, 3) ,@smoe3 numeric(13, 3) ,@smoe4 numeric(13, 3) ,@bo11_bins numeric(18, 5) ,@bo21_bins numeric(18, 5) ,@bo31_bins numeric(18, 5) ,@bo41_bins numeric(18, 5) ,@bo51_bins numeric(18, 5) ,@bo61_bins numeric(18, 5) ,@bo71_bins numeric(18, 5) ,@bo81_bins numeric(18, 5) ,@bo91_bins numeric(18, 5) ,@bo12_bins numeric(18, 5) ,@bo22_bins numeric(18, 5) ,@bo32_bins numeric(18, 5) ,@bo42_bins numeric(18, 5) ,@bo52_bins numeric(18, 5) ,@bo62_bins numeric(18, 5) ,@bo72_bins numeric(18, 5) ,@bo82_bins numeric(18, 5) ,@bo92_bins numeric(18, 5) ,@ebo11_bins numeric(19, 6) ,@ebo21_bins numeric(19, 6) ,@ebo31_bins numeric(19, 6) ,@ebo41_bins numeric(19, 6) ,@ebo51_bins numeric(19, 6) ,@ebo61_bins numeric(19, 6) ,@ebo71_bins numeric(18, 5) ,@ebo81_bins numeric(18, 5) ,@ebo91_bins numeric(18, 5) ,@ebo12_bins numeric(19, 6) ,@ebo22_bins numeric(19, 6) ,@ebo32_bins numeric(19, 6) ,@ebo42_bins numeric(19, 6) ,@ebo52_bins numeric(19, 6) ,@ebo62_bins numeric(19, 6) ,@ebo72_bins numeric(18, 5) ,@ebo82_bins numeric(18, 5) ,@ebo92_bins numeric(18, 5) ,@bo11_iva numeric(18, 5) ,@bo21_iva numeric(18, 5) ,@bo31_iva numeric(18, 5) ,@bo41_iva numeric(18, 5) ,@bo51_iva numeric(18, 5) ,@bo61_iva numeric(18, 5) ,@bo71_iva numeric(18, 5) ,@bo81_iva numeric(18, 5) ,@bo91_iva numeric(18, 5) ,@bo12_iva numeric(18, 5) ,@bo22_iva numeric(18, 5) ,@bo32_iva numeric(18, 5) ,@bo42_iva numeric(18, 5) ,@bo52_iva numeric(18, 5) ,@bo62_iva numeric(18, 5) ,@bo72_iva numeric(18, 5) ,@bo82_iva numeric(18, 5) ,@bo92_iva numeric(18, 5) ,@ebo11_iva numeric(19, 6) ,@ebo21_iva numeric(19, 6) ,@ebo31_iva numeric(19, 6) ,@ebo41_iva numeric(19, 6) ,@ebo51_iva numeric(19, 6) ,@ebo61_iva numeric(19, 6) ,@ebo71_iva numeric(18, 5) ,@ebo81_iva numeric(18, 5) ,@ebo91_iva numeric(18, 5) ,@ebo12_iva numeric(19, 6) ,@ebo22_iva numeric(19, 6) ,@ebo32_iva numeric(19, 6) ,@ebo42_iva numeric(19, 6) ,@ebo52_iva numeric(19, 6) ,@ebo62_iva numeric(19, 6) ,@ebo72_iva numeric(18, 5) ,@ebo82_iva numeric(18, 5) ,@ebo92_iva numeric(18, 5) ,@esdeb1 numeric(19, 6) ,@esdeb2 numeric(19, 6) ,@esdeb3 numeric(19, 6) ,@esdeb4 numeric(19, 6) ,@sdeb1 numeric(18, 5) ,@sdeb2 numeric(18, 5) ,@sdeb3 numeric(18, 5) ,@sdeb4 numeric(18, 5) ,@estot1 numeric(19, 6) ,@estot2 numeric(19, 6) ,@estot3 numeric(19, 6) ,@estot4 numeric(19, 6) ,@stot1 numeric(18, 5) ,@stot2 numeric(18, 5) ,@stot3 numeric(18, 5) ,@stot4 numeric(18, 5) ,@ebo_1tvall numeric(19, 6) ,@ebo_2tvall numeric(19, 6) ,@bo_1tvall numeric(18, 5) ,@bo_2tvall numeric(18, 5) ,@ebo_totp1 numeric(19, 6) ,@ebo_totp2 numeric(19, 6) ,@bo_totp1 numeric(18, 5) ,@bo_totp2 numeric(18, 5) ,@sqtt11 numeric(13, 3) ,@sqtt21 numeric(13, 3) ,@sqtt12 numeric(13, 3) ,@sqtt22 numeric(13, 3) ,@sqtt13 numeric(13, 3) ,@sqtt23 numeric(13, 3) ,@sqtt14 numeric(13, 3) ,@sqtt24 numeric(13, 3) ,@userinis varchar (30) ,@mybostamp char(25) = 'aut6752e346196752efd722' declare @totaisiva table ( bostamp varchar (25), codigo numeric(1), taxa numeric (5,2), ebaseinc numeric (19,6), baseinc numeric (18,5), evalor numeric (19,6), valor numeric (18,5) ) set @prod = ( select ts.producao from bo(nolock) inner join ts(nolock) on bo.ndos = ts.ndos and bo.bostamp = @mybostamp ) set @nrdec = ( select convert(numeric(10, 0), valor) from para1(nolock) where descricao = 'de_euro' ) --set @prod = 0 --set @nrdec = 2 select @ecusto = sum(bi.epcusto * bi.qtt) ,@custo = sum(bi.pcusto * bi.qtt) ,@bo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.qtt * bi.pu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo11_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo21_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo31_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo41_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo51_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo61_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo71_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo81_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo91_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo12_bins = sum(case when bi.tabiva = 1 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo22_bins = sum(case when bi.tabiva = 2 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo32_bins = sum(case when bi.tabiva = 3 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo42_bins = sum(case when bi.tabiva = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo52_bins = sum(case when bi.tabiva = 5 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo62_bins = sum(case when bi.tabiva = 6 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo72_bins = sum(case when bi.tabiva = 7 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo82_bins = sum(case when bi.tabiva = 8 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@ebo92_bins = sum(case when bi.tabiva = 9 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@bo_1iliq = round(sum(bi.qtt * bi.epu), @nrdec) ,@bo_2iliq = round(sum(bi.ettdeb), @nrdec) ,@bo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.pu) * (bi.iva / 100) else (bi.qtt * bi.pu) - ((bi.qtt * bi.pu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@bo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ttdeb * (bi.iva / 100) else bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo11_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo12_iva = sum(case when bi.tabiva = 1 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo21_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo22_iva = sum(case when bi.tabiva = 2 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo31_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo32_iva = sum(case when bi.tabiva = 3 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo41_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo42_iva = sum(case when bi.tabiva = 4 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo51_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo52_iva = sum(case when bi.tabiva = 5 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo61_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo62_iva = sum(case when bi.tabiva = 6 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo71_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo72_iva = sum(case when bi.tabiva = 7 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo81_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else (bi.qtt * bi.epu) - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo82_iva = sum(case when bi.tabiva = 8 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo91_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then (bi.qtt * bi.epu) * (bi.iva / 100) else bi.ettdeb - ((bi.qtt * bi.epu) / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@ebo92_iva = sum(case when bi.tabiva = 9 then round(case when bi.ivaincl = 0 then bi.ettdeb * (bi.iva / 100) else bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) end, @nrdec) else 0 end) ,@esdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ettdeb else bi.ettdeb - round(bi.ettdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@esdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ettdeb else round(bi.ettdeb - (bi.ettdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@sdeb1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttdeb else bi.ttdeb - round(bi.ttdeb / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@sdeb4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttdeb else round(bi.ttdeb - (bi.ttdeb / (1 + bi.iva / 100)) * bi.iva / 100, @nrdec) end else 0 end) ,@smoe1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@smoe4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.ttmoeda else round(bi.ttmoeda / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@estot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.epu else round((bi.qtt * bi.epu) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot1 = sum(case when bi.stipo <= 1 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot2 = sum(case when bi.stipo = 2 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot3 = sum(case when bi.stipo = 3 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@stot4 = sum(case when bi.stipo = 4 then case when bi.ivaincl = 0 then bi.qtt * bi.pu else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end else 0 end) ,@total = @stot1 + @stot2 + @stot3 + @stot4 ,@etotal = @estot1 + @estot2 + @estot3 + @estot4 ,@totaldeb = @sdeb1 + @sdeb2 + @sdeb3 + @sdeb4 ,@etotaldeb = @esdeb1 + @esdeb2 + @esdeb3 + @esdeb4 ,@moetotal = @smoe1 + @smoe2 + @smoe3 + @smoe4 ,@ebo_1tvall = @ebo11_bins + @ebo21_bins + @ebo31_bins + @ebo41_bins + @ebo51_bins + @ebo61_bins + @ebo71_bins + @ebo81_bins + @ebo91_bins ,@ebo_2tvall = @ebo12_bins + @ebo22_bins + @ebo32_bins + @ebo42_bins + @ebo52_bins + @ebo62_bins + @ebo72_bins + @ebo82_bins + @ebo92_bins ,@bo_1tvall = @bo11_bins + @bo21_bins + @bo31_bins + @bo41_bins + @bo51_bins + @bo61_bins + @bo71_bins + @bo81_bins + @bo91_bins ,@bo_2tvall = @bo12_bins + @bo22_bins + @bo32_bins + @bo42_bins + @bo52_bins + @bo62_bins + @bo72_bins + @bo82_bins + @bo92_bins ,@ebo_totp1 = sum(case when bi.ivaincl = 0 then (bi.epu * bi.qtt) else round((bi.epu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@ebo_totp2 = sum(case when bi.ivaincl = 0 then (bi.edebito * bi.qtt) else round((bi.edebito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp1 = sum(case when bi.ivaincl = 0 then (bi.pu * bi.qtt) else round((bi.pu * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@bo_totp2 = sum(case when bi.ivaincl = 0 then (bi.debito * bi.qtt) else round((bi.debito * bi.qtt) / (1 + bi.iva / 100), @nrdec) end) ,@sqtt11 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt21 = sum(case when bi.stipo = 1 then bi.qtt else 0 end) ,@sqtt12 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt22 = sum(case when bi.stipo = 2 then bi.qtt else 0 end) ,@sqtt13 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt23 = sum(case when bi.stipo = 3 then bi.qtt else 0 end) ,@sqtt14 = sum(case when bi.stipo = 4 then bi.qtt else 0 end) ,@sqtt24 = sum(case when bi.stipo = 5 then bi.qtt else 0 end) from bi(nolock) where bi.bostamp = @mybostamp and bi.producao = case when @prod = 1 then 1 else bi.producao end and bi.composto = 0 and bi.qtt <> 0 update bo set bo.totaldeb = isnull(@totaldeb, 0) ,bo.total = isnull(@total, 0) ,bo.etotaldeb = isnull(@etotaldeb, 0) ,bo.moetotal = isnull(@moetotal, 0) ,bo.etotal = isnull(@etotal, 0) ,bo.ecusto = isnull(@ecusto, 0) ,bo.custo = isnull(@custo, 0) ,bo.bo11_bins = isnull(@bo11_bins, 0) ,bo.bo12_bins = isnull(@bo12_bins, 0) ,bo.bo21_bins = isnull(@bo21_bins, 0) ,bo.bo22_bins = isnull(@bo22_bins, 0) ,bo.bo31_bins = isnull(@bo31_bins, 0) ,bo.bo32_bins = isnull(@bo32_bins, 0) ,bo.bo41_bins = isnull(@bo41_bins, 0) ,bo.bo42_bins = isnull(@bo42_bins, 0) ,bo.bo51_bins = isnull(@bo51_bins, 0) ,bo.bo52_bins = isnull(@bo52_bins, 0) ,bo.bo61_bins = isnull(@bo61_bins, 0) ,bo.bo62_bins = isnull(@bo62_bins, 0) ,bo.ebo11_bins = isnull(@ebo11_bins, 0) ,bo.ebo12_bins = isnull(@ebo12_bins, 0) ,bo.ebo21_bins = isnull(@ebo21_bins, 0) ,bo.ebo22_bins = isnull(@ebo22_bins, 0) ,bo.ebo31_bins = isnull(@ebo31_bins, 0) ,bo.ebo32_bins = isnull(@ebo32_bins, 0) ,bo.ebo41_bins = isnull(@ebo41_bins, 0) ,bo.ebo42_bins = isnull(@ebo42_bins, 0) ,bo.ebo51_bins = isnull(@ebo51_bins, 0) ,bo.ebo52_bins = isnull(@ebo52_bins, 0) ,bo.ebo61_bins = isnull(@ebo61_bins, 0) ,bo.ebo62_bins = isnull(@ebo62_bins, 0) ,bo.bo11_iva = isnull(@bo11_iva, 0) ,bo.bo12_iva = isnull(@bo12_iva, 0) ,bo.bo21_iva = isnull(@bo21_iva, 0) ,bo.bo22_iva = isnull(@bo22_iva, 0) ,bo.bo31_iva = isnull(@bo31_iva, 0) ,bo.bo32_iva = isnull(@bo32_iva, 0) ,bo.bo41_iva = isnull(@bo41_iva, 0) ,bo.bo42_iva = isnull(@bo42_iva, 0) ,bo.bo51_iva = isnull(@bo51_iva, 0) ,bo.bo52_iva = isnull(@bo52_iva, 0) ,bo.bo61_iva = isnull(@bo61_iva, 0) ,bo.bo62_iva = isnull(@bo62_iva, 0) ,bo.ebo11_iva = isnull(@ebo11_iva, 0) ,bo.ebo12_iva = isnull(@ebo12_iva, 0) ,bo.ebo21_iva = isnull(@ebo21_iva, 0) ,bo.ebo22_iva = isnull(@ebo22_iva, 0) ,bo.ebo31_iva = isnull(@ebo31_iva, 0) ,bo.ebo32_iva = isnull(@ebo32_iva, 0) ,bo.ebo41_iva = isnull(@ebo41_iva, 0) ,bo.ebo42_iva = isnull(@ebo42_iva, 0) ,bo.ebo51_iva = isnull(@ebo51_iva, 0) ,bo.ebo52_iva = isnull(@ebo52_iva, 0) ,bo.ebo61_iva = isnull(@ebo61_iva, 0) ,bo.ebo62_iva = isnull(@ebo62_iva, 0) ,bo.esdeb1 = isnull(@esdeb1, 0) ,bo.esdeb2 = isnull(@esdeb2, 0) ,bo.esdeb3 = isnull(@esdeb3, 0) ,bo.esdeb4 = isnull(@esdeb4, 0) ,bo.sdeb1 = isnull(@sdeb1, 0) ,bo.sdeb2 = isnull(@sdeb2, 0) ,bo.sdeb3 = isnull(@sdeb3, 0) ,bo.sdeb4 = isnull(@sdeb4, 0) ,bo.smoe1 = isnull(@smoe1, 0) ,bo.smoe2 = isnull(@smoe2, 0) ,bo.smoe3 = isnull(@smoe3, 0) ,bo.smoe4 = isnull(@smoe4, 0) ,bo.estot1 = isnull(@estot1, 0) ,bo.estot2 = isnull(@estot2, 0) ,bo.estot3 = isnull(@estot3, 0) ,bo.estot4 = isnull(@estot4, 0) ,bo.stot1 = isnull(@stot1, 0) ,bo.stot2 = isnull(@stot2, 0) ,bo.stot3 = isnull(@stot3, 0) ,bo.stot4 = isnull(@stot4, 0) ,bo.ebo_1tvall = isnull(@ebo_1tvall, 0) ,bo.ebo_2tvall = isnull(@ebo_2tvall, 0) ,bo.bo_1tvall = isnull(@bo_1tvall, 0) ,bo.bo_2tvall = isnull(@bo_2tvall, 0) ,bo.ebo_totp1 = isnull(@ebo_totp1, 0) ,bo.ebo_totp2 = isnull(@ebo_totp2, 0) ,bo.bo_totp1 = isnull(@bo_totp1, 0) ,bo.bo_totp2 = isnull(@bo_totp2, 0) ,bo.sqtt11 = isnull(@sqtt11, 0) ,bo.sqtt21 = isnull(@sqtt21, 0) ,bo.sqtt12 = isnull(@sqtt12, 0) ,bo.sqtt22 = isnull(@sqtt22, 0) ,bo.sqtt13 = isnull(@sqtt13, 0) ,bo.sqtt23 = isnull(@sqtt23, 0) ,bo.sqtt14 = isnull(@sqtt14, 0) ,bo.sqtt24 = isnull(@sqtt24, 0) where bostamp = @mybostamp update bo2 set bo2.bo71_bins = isnull(@bo71_bins, 0) ,bo2.bo72_bins = isnull(@bo72_bins, 0) ,bo2.bo81_bins = isnull(@bo81_bins, 0) ,bo2.bo82_bins = isnull(@bo82_bins, 0) ,bo2.bo91_bins = isnull(@bo91_bins, 0) ,bo2.bo92_bins = isnull(@bo92_bins, 0) ,bo2.ebo71_bins = isnull(@ebo71_bins, 0) ,bo2.ebo72_bins = isnull(@ebo72_bins, 0) ,bo2.ebo81_bins = isnull(@ebo81_bins, 0) ,bo2.ebo82_bins = isnull(@ebo82_bins, 0) ,bo2.ebo91_bins = isnull(@ebo91_bins, 0) ,bo2.ebo92_bins = isnull(@ebo92_bins, 0) ,bo2.bo71_iva = isnull(@bo71_iva, 0) ,bo2.bo72_iva = isnull(@bo72_iva, 0) ,bo2.bo81_iva = isnull(@bo81_iva, 0) ,bo2.bo82_iva = isnull(@bo82_iva, 0) ,bo2.bo91_iva = isnull(@bo91_iva, 0) ,bo2.bo92_iva = isnull(@bo92_iva, 0) ,bo2.ebo71_iva = isnull(@ebo71_iva, 0) ,bo2.ebo72_iva = isnull(@ebo72_iva, 0) ,bo2.ebo81_iva = isnull(@ebo81_iva, 0) ,bo2.ebo82_iva = isnull(@ebo82_iva, 0) ,bo2.ebo91_iva = isnull(@ebo91_iva, 0) ,bo2.ebo92_iva = isnull(@ebo92_iva, 0) ,bo2.etotalciva = isnull(@etotaldeb, 0) + isnull(@ebo12_iva, 0) +isnull(@ebo22_iva, 0) +isnull(@ebo32_iva, 0) +isnull(@ebo42_iva, 0) +isnull(@ebo52_iva, 0) +isnull(@ebo62_iva, 0) +isnull(@ebo72_iva, 0) +isnull(@ebo82_iva, 0) +isnull(@ebo92_iva, 0) --,bo2.mtotalciva =isnull(@moetotal, 0) where bo2stamp = @mybostamp -- trata os bot select @userinis = usrinis from bo where bo.bostamp=@mybostamp insert into @totaisiva ( bostamp, codigo, taxa, ebaseinc, baseinc, evalor, valor ) select @mybostamp,codigo,taxa ,case when (@ebo11_bins <>0) then @ebo11_bins else @ebo12_bins end ,case when (@ebo11_bins <>0) then @bo11_bins else @bo12_bins end ,case when (@ebo11_bins <>0) then @ebo11_iva else @ebo12_iva end ,case when (@ebo11_bins <>0) then @bo11_iva else @bo12_iva end from taxasiva where codigo = 1 union all select @mybostamp,codigo,taxa ,case when (@ebo21_bins <>0) then @ebo21_bins else @ebo22_bins end ,case when (@ebo21_bins <>0) then @bo21_bins else @bo22_bins end ,case when (@ebo21_bins <>0) then @ebo21_iva else @ebo22_iva end ,case when (@ebo21_bins <>0) then @bo21_iva else @bo22_iva end from taxasiva where codigo = 2 union all select @mybostamp,codigo,taxa ,case when (@ebo31_bins <>0) then @ebo31_bins else @ebo32_bins end ,case when (@ebo31_bins <>0) then @bo31_bins else @bo32_bins end ,case when (@ebo31_bins <>0) then @ebo31_iva else @ebo32_iva end ,case when (@ebo31_bins <>0) then @bo31_iva else @bo32_iva end from taxasiva where codigo = 3 union all select @mybostamp,codigo,taxa ,case when (@ebo41_bins <>0) then @ebo41_bins else @ebo42_bins end ,case when (@ebo41_bins <>0) then @bo41_bins else @bo42_bins end ,case when (@ebo41_bins <>0) then @ebo41_iva else @ebo42_iva end ,case when (@ebo41_bins <>0) then @bo41_iva else @bo42_iva end from taxasiva where codigo = 4 union all select @mybostamp,codigo,taxa ,case when (@ebo51_bins <>0) then @ebo51_bins else @ebo52_bins end ,case when (@ebo51_bins <>0) then @bo51_bins else @bo52_bins end ,case when (@ebo51_bins <>0) then @ebo51_iva else @ebo52_iva end ,case when (@ebo51_bins <>0) then @bo51_iva else @bo52_iva end from taxasiva where codigo = 5 union all select @mybostamp,codigo,taxa ,case when (@ebo61_bins <>0) then @ebo61_bins else @ebo62_bins end ,case when (@ebo61_bins <>0) then @bo61_bins else @bo62_bins end ,case when (@ebo61_bins <>0) then @ebo61_iva else @ebo62_iva end ,case when (@ebo61_bins <>0) then @bo61_iva else @bo62_iva end from taxasiva where codigo = 6 union all select @mybostamp,codigo,taxa ,case when (@ebo71_bins <>0) then @ebo71_bins else @ebo72_bins end ,case when (@ebo71_bins <>0) then @bo71_bins else @bo72_bins end ,case when (@ebo71_bins <>0) then @ebo71_iva else @ebo72_iva end ,case when (@ebo71_bins <>0) then @bo71_iva else @bo72_iva end from taxasiva where codigo = 7 union all select @mybostamp,codigo,taxa ,case when (@ebo81_bins <>0) then @ebo81_bins else @ebo82_bins end ,case when (@ebo81_bins <>0) then @bo81_bins else @bo82_bins end ,case when (@ebo81_bins <>0) then @ebo81_iva else @ebo82_iva end ,case when (@ebo81_bins <>0) then @bo81_iva else @bo82_iva end from taxasiva where codigo = 8 union all select @mybostamp,codigo,taxa ,case when (@ebo91_bins <>0) then @ebo91_bins else @ebo92_bins end ,case when (@ebo91_bins <>0) then @bo91_bins else @bo92_bins end ,case when (@ebo91_bins <>0) then @ebo91_iva else @ebo92_iva end ,case when (@ebo91_bins <>0) then @bo91_iva else @bo92_iva end from taxasiva where codigo = 9 update bot set ebaseinc = totiva.ebaseinc, baseinc = totiva.baseinc, evalor = totiva.evalor, valor = totiva.valor, usrinis = @userinis, usrdata = convert (date,getdate()), usrhora = convert (time,getdate()) from @totaisiva totiva inner join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo insert into bot ( botstamp ,bostamp ,codigo ,taxa ,ebaseinc ,baseinc ,evalor ,valor ,ousrinis ,ousrdata ,ousrhora ,usrinis ,usrdata ,usrhora ) select ( left(@userinis,3) + 'tt' + left(newid(),5) + right(newid(),5) + left(newid(),5) + right(newid(),5)) stamp ,@mybostamp stampbo ,totiva.codigo ,totiva.taxa ,totiva.ebaseinc ,totiva.baseinc ,totiva.evalor ,totiva.valor ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) ,@userinis ,convert (date,getdate()) ,convert (time,getdate()) from @totaisiva totiva left join bot on totiva.bostamp = bot.bostamp and totiva.codigo = bot.codigo where bot.botstamp is null -- atualiza os campo bi.series e bi.series2, caso tenha equipamentos update bi set series = s1, series2=s2 from bi inner join ( select distinct bistamp,ser.s1, ser.s2 from boma cross apply (select stuff ( ( select ',' + rtrim(serie) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s1 , stuff ( ( select ',' + rtrim(serie2) from boma myboma where myboma.bistamp = boma.bistamp order by serie for xml path('') ), 1, 1, '' ) s2 ) ser where boma.bostamp = @mybostamp ) myboma on bi.bistamp = myboma.bistamp where bi.bostamp = @mybostamp 
20241206@123712.1720 eablt857908m0ebgf5tgc51fun Query : use flama_phc
20241206@123712.1724 eablt857908m0ebgf5tgc51fun Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@123712.1781 eablt857908m0ebgf5tgc51fun Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3744';
20241206@123712.1825 eablt857908m0ebgf5tgc51fun Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3744';
20241206@131912.2485 2kei44gg27t6av9g1l32gt8q57 Query : use flama_phc
20241206@131912.2489 2kei44gg27t6av9g1l32gt8q57 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@131912.2642 2kei44gg27t6av9g1l32gt8q57 Query : use flama_phc
20241206@131912.2647 2kei44gg27t6av9g1l32gt8q57 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@133612.1205 14uq74kd6ltr3od7i5tgjf8k5d Query : use flama_phc
20241206@133612.1247 14uq74kd6ltr3od7i5tgjf8k5d Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@133612.1746 14uq74kd6ltr3od7i5tgjf8k5d Query : use flama_phc
20241206@133612.1750 14uq74kd6ltr3od7i5tgjf8k5d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@141910.3641 5p05cjhmbuihj9vktp6062en4k Query : use flama_phc
20241206@141910.3645 5p05cjhmbuihj9vktp6062en4k Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@141910.3759 5p05cjhmbuihj9vktp6062en4k Query : use flama_phc
20241206@141910.3763 5p05cjhmbuihj9vktp6062en4k Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@143610.3153 39sneco21iccdd157jnmj5mrva Query : use flama_phc
20241206@143610.3157 39sneco21iccdd157jnmj5mrva Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241206@143610.3262 39sneco21iccdd157jnmj5mrva Query : use flama_phc
20241206@143610.3265 39sneco21iccdd157jnmj5mrva Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@145334.1904 l35hmss8k42nre4seps84p7kdk Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@145334.2874 l35hmss8k42nre4seps84p7kdk Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@145334.7999 l35hmss8k42nre4seps84p7kdk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3745';
20241206@145334.8130 l35hmss8k42nre4seps84p7kdk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3745';
20241206@145334.8396 l35hmss8k42nre4seps84p7kdk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3745';
20241206@145334.8508 l35hmss8k42nre4seps84p7kdk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3745';
20241206@145334.8948 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145334.8953 l35hmss8k42nre4seps84p7kdk Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@145335.2823 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.2829 l35hmss8k42nre4seps84p7kdk Query : select no, estab,szadrsdesc from szadrs where u_coddest=4804
20241206@145335.3023 l35hmss8k42nre4seps84p7kdk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20241206@145335.3307 l35hmss8k42nre4seps84p7kdk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408301 and bi.ref ='304.422.00.07' and bi.lordem =1
20241206@145335.3841 l35hmss8k42nre4seps84p7kdk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20241206@145335.4085 l35hmss8k42nre4seps84p7kdk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408301 and bi.ref ='304.421.00.04' and bi.lordem =2
20241206@145335.4548 l35hmss8k42nre4seps84p7kdk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20241206@145335.4814 l35hmss8k42nre4seps84p7kdk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408301 and bi.ref ='324.4960.00.1' and bi.lordem =3
20241206@145335.5315 l35hmss8k42nre4seps84p7kdk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2031.00.1'
20241206@145335.5574 l35hmss8k42nre4seps84p7kdk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408301 and bi.ref ='324.2031.00.1' and bi.lordem =4
20241206@145335.6036 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.6040 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@145335.6309 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.6313 l35hmss8k42nre4seps84p7kdk Query : select top 1 1 valor from td where td.ndoc = 39
20241206@145335.6489 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.6493 l35hmss8k42nre4seps84p7kdk Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@145335.7478 l35hmss8k42nre4seps84p7kdk Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@145335.7599 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.7602 l35hmss8k42nre4seps84p7kdk Query : select top 1 ~inactivo valor from cl where no = '101900' and estab = 0 order by inactivo desc
20241206@145335.7742 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.7746 l35hmss8k42nre4seps84p7kdk Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@145335.7810 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.7813 l35hmss8k42nre4seps84p7kdk Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@145335.7901 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.7904 l35hmss8k42nre4seps84p7kdk Query : select szadrsstamp valor from szadrs where szadrsdesc='101900 - pd - alfena n/p'
20241206@145335.7951 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145335.7954 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from td where ndoc = 39
20241206@145335.8015 l35hmss8k42nre4seps84p7kdk Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@145335.8062 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145335.8098 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145335.8148 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145335.8163 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145335.8198 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145335.8213 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145335.8228 l35hmss8k42nre4seps84p7kdk Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145335.8400 l35hmss8k42nre4seps84p7kdk Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145335.8505 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145335.8523 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145335.8545 l35hmss8k42nre4seps84p7kdk Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@145335.8906 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145335.8964 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145335.9008 l35hmss8k42nre4seps84p7kdk Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@145335.9126 l35hmss8k42nre4seps84p7kdk Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@145335.9235 l35hmss8k42nre4seps84p7kdk Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@145335.9323 l35hmss8k42nre4seps84p7kdk Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@145335.9411 l35hmss8k42nre4seps84p7kdk Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@145335.9509 l35hmss8k42nre4seps84p7kdk Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@145335.9601 l35hmss8k42nre4seps84p7kdk Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut675301644167530fefc8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@145336.1750 l35hmss8k42nre4seps84p7kdk Query : select top 1 fno valor from wsftdata order by fno desc
20241206@145336.2600 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2800 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145336.3260 l35hmss8k42nre4seps84p7kdk Query : select 'normal' from dummy
20241206@145336.3780 l35hmss8k42nre4seps84p7kdk Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut675301644167530fefc8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2254,101900,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@145336.7950 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145336.7990 l35hmss8k42nre4seps84p7kdk Query : select st.usalote valor from st where st.ref = '304.422.00.07'
20241206@145336.8360 l35hmss8k42nre4seps84p7kdk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.422.00.07'
20241206@145336.1022 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.1039 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.1068 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.1089 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.1099 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145336.1119 l35hmss8k42nre4seps84p7kdk Query : select sestamp valor from se where ref ='304.422.00.07' and lote = '241004'
20241206@145336.1157 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.1173 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.1186 l35hmss8k42nre4seps84p7kdk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675301603167530ff01c','aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145336.1249 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.1269 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.1301 l35hmss8k42nre4seps84p7kdk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675301603167530ff01c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut675301644167530fefc8' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@145336.1811 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145336.1814 l35hmss8k42nre4seps84p7kdk Query : select st.usalote valor from st where st.ref = '304.421.00.04'
20241206@145336.1837 l35hmss8k42nre4seps84p7kdk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.421.00.04'
20241206@145336.2008 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2025 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.2050 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2065 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.2073 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145336.2084 l35hmss8k42nre4seps84p7kdk Query : select sestamp valor from se where ref ='304.421.00.04' and lote = '241670'
20241206@145336.2098 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2112 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.2125 l35hmss8k42nre4seps84p7kdk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675305962067530ff033','aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145336.2129 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2143 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.2172 l35hmss8k42nre4seps84p7kdk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675305962067530ff033',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut675301644167530fefc8' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20241206@145336.2450 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2468 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.2613 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2651 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.2660 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145336.2687 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2702 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.2714 l35hmss8k42nre4seps84p7kdk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675309571767530ff041','aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145336.2719 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.2735 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.2764 l35hmss8k42nre4seps84p7kdk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut675309571767530ff041',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut675301644167530fefc8' ,0,0 ,2,23.00,30000,?,?,?)
20241206@145336.3009 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145336.3013 l35hmss8k42nre4seps84p7kdk Query : select st.usalote valor from st where st.ref = '324.4960.00.1'
20241206@145336.3034 l35hmss8k42nre4seps84p7kdk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.4960.00.1'
20241206@145336.3201 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.3217 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.3258 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.3275 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.3285 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145336.3299 l35hmss8k42nre4seps84p7kdk Query : select sestamp valor from se where ref ='324.4960.00.1' and lote = 'r2100754100a'
20241206@145336.3320 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.3335 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.3352 l35hmss8k42nre4seps84p7kdk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675307664667530ff051','aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145336.3357 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.3373 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.3403 l35hmss8k42nre4seps84p7kdk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675307664667530ff051',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut675301644167530fefc8' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20241206@145336.3647 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145336.3651 l35hmss8k42nre4seps84p7kdk Query : select st.usalote valor from st where st.ref = '324.2031.00.1'
20241206@145336.3672 l35hmss8k42nre4seps84p7kdk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2031.00.1'
20241206@145336.4864 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.5144 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.5169 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.5184 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.5192 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145336.5205 l35hmss8k42nre4seps84p7kdk Query : select sestamp valor from se where ref ='324.2031.00.1' and lote = 'r2100232100a'
20241206@145336.5238 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.5253 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.5266 l35hmss8k42nre4seps84p7kdk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675304353867530ff07f','aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145336.5271 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.5285 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.5312 l35hmss8k42nre4seps84p7kdk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675304353867530ff07f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut675301644167530fefc8' ,0,0 ,2,23.00,60000,?,?,?,?,?)
20241206@145336.6028 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.6046 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.6568 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.6586 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.6595 l35hmss8k42nre4seps84p7kdk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145336.6607 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.6621 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145336.6632 l35hmss8k42nre4seps84p7kdk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675301860567530ff0a1','aut675301644167530fefc8' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145336.6637 l35hmss8k42nre4seps84p7kdk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.6651 l35hmss8k42nre4seps84p7kdk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145336.6678 l35hmss8k42nre4seps84p7kdk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut675301860567530ff0a1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut675301644167530fefc8' ,0,0 ,2,23.00,70000,?,?,?)
20241206@145336.6908 l35hmss8k42nre4seps84p7kdk Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut675301644167530fefc8','2408301','wait',39,'adm09112754980.682000002')
20241206@145336.7011 l35hmss8k42nre4seps84p7kdk Query : use flama_phc
20241206@145336.7014 l35hmss8k42nre4seps84p7kdk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@145336.7047 l35hmss8k42nre4seps84p7kdk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3745';
20241206@145336.7086 l35hmss8k42nre4seps84p7kdk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3745';
20241206@145336.7140 l35hmss8k42nre4seps84p7kdk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3745';
20241206@145336.7174 l35hmss8k42nre4seps84p7kdk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3745';
20241206@145336.7744 j6qkmt2osmmfdg0e4g05aieled Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@145336.7755 j6qkmt2osmmfdg0e4g05aieled Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@145336.7831 j6qkmt2osmmfdg0e4g05aieled Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3746';
20241206@145336.7906 j6qkmt2osmmfdg0e4g05aieled Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3746';
20241206@145336.7969 j6qkmt2osmmfdg0e4g05aieled Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3746';
20241206@145336.8005 j6qkmt2osmmfdg0e4g05aieled Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3746';
20241206@145336.8060 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.8063 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@145336.8138 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.8141 j6qkmt2osmmfdg0e4g05aieled Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241206@145336.8240 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2041.00.1'
20241206@145336.8429 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408302 and bi.ref ='324.2041.00.1' and bi.lordem =1
20241206@145336.8800 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.8803 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@145336.8836 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.8840 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 1 valor from td where td.ndoc = 39
20241206@145336.8870 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.8873 j6qkmt2osmmfdg0e4g05aieled Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@145336.8902 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@145336.8939 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.8942 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241206@145336.9293 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.9335 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@145336.9385 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.9388 j6qkmt2osmmfdg0e4g05aieled Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@145336.9439 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.9443 j6qkmt2osmmfdg0e4g05aieled Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241206@145336.9489 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145336.9492 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from td where ndoc = 39
20241206@145336.9510 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@145336.9527 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.9547 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145336.9583 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.9599 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145336.9627 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.9642 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145336.9655 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145336.9721 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145336.9736 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.9753 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145336.9785 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut675309628567530ff0eb' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@145336.9954 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145336.9980 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145337.1500 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@145337.3300 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@145337.5800 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@145337.7100 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@145337.8200 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@145337.9400 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@145337.1060 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut675309628567530ff0eb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@145337.3290 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 fno valor from wsftdata order by fno desc
20241206@145337.3640 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.3840 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145337.4200 j6qkmt2osmmfdg0e4g05aieled Query : select 'normal' from dummy
20241206@145337.4350 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut675309628567530ff0eb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2255,100810,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@145337.7050 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145337.7090 j6qkmt2osmmfdg0e4g05aieled Query : select st.usalote valor from st where st.ref = '324.2041.00.1'
20241206@145337.7310 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2041.00.1'
20241206@145337.9110 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.9260 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145337.9500 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.9640 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145337.9730 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145337.9900 j6qkmt2osmmfdg0e4g05aieled Query : select sestamp valor from se where ref ='324.2041.00.1' and lote = 'r2100232100a'
20241206@145337.1003 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.1018 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145337.1029 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675300871167530ff118','aut675309628567530ff0eb' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145337.1033 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.1048 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145337.1076 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675300871167530ff118',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',48.000 ,'aut675309628567530ff0eb' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@145337.1361 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.1449 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145337.1480 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.1498 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145337.1507 j6qkmt2osmmfdg0e4g05aieled Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145337.1519 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.1545 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145337.1560 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675305394667530ff125','aut675309628567530ff0eb' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145337.1571 j6qkmt2osmmfdg0e4g05aieled Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.1624 j6qkmt2osmmfdg0e4g05aieled Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145337.1656 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut675305394667530ff125',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut675309628567530ff0eb' ,0,0 ,2,23.00,20000,?,?,?)
20241206@145337.1940 j6qkmt2osmmfdg0e4g05aieled Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut675309628567530ff0eb','2408302','wait',39,'adm09112754980.682000002')
20241206@145337.2017 j6qkmt2osmmfdg0e4g05aieled Query : use flama_phc
20241206@145337.2021 j6qkmt2osmmfdg0e4g05aieled Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@145337.2053 j6qkmt2osmmfdg0e4g05aieled Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3746';
20241206@145337.2094 j6qkmt2osmmfdg0e4g05aieled Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3746';
20241206@145337.2144 j6qkmt2osmmfdg0e4g05aieled Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3746';
20241206@145337.2178 j6qkmt2osmmfdg0e4g05aieled Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3746';
20241206@145337.2713 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@145337.2724 u40s4pceu0ep7t5c8u6upsgl63 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@145337.2792 u40s4pceu0ep7t5c8u6upsgl63 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3747';
20241206@145337.2853 u40s4pceu0ep7t5c8u6upsgl63 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3747';
20241206@145337.2912 u40s4pceu0ep7t5c8u6upsgl63 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3747';
20241206@145337.2943 u40s4pceu0ep7t5c8u6upsgl63 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3747';
20241206@145337.3001 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3004 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@145337.3071 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3074 u40s4pceu0ep7t5c8u6upsgl63 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241206@145337.3120 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20241206@145337.3308 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408303 and bi.ref ='324.2907.00.1' and bi.lordem =1
20241206@145337.3710 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3714 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@145337.3746 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3749 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 1 valor from td where td.ndoc = 39
20241206@145337.3779 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3782 u40s4pceu0ep7t5c8u6upsgl63 Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@145337.3817 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@145337.3851 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3854 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241206@145337.3884 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3894 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@145337.3924 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3927 u40s4pceu0ep7t5c8u6upsgl63 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@145337.3966 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.3968 u40s4pceu0ep7t5c8u6upsgl63 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241206@145337.4013 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.4016 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from td where ndoc = 39
20241206@145337.4035 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@145337.4049 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.4067 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145337.4085 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.4100 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145337.4135 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.4149 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145337.4161 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145337.4220 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145337.4233 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.4247 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145337.4268 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut675302693967530ff165' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@145337.4446 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.4464 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145337.4497 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@145337.4508 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@145337.4520 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@145337.4532 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@145337.4544 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@145337.4556 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@145337.4567 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut675302693967530ff165',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@145337.4789 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 fno valor from wsftdata order by fno desc
20241206@145337.4822 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.4839 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145337.4861 u40s4pceu0ep7t5c8u6upsgl63 Query : select 'normal' from dummy
20241206@145337.4877 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut675302693967530ff165',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2256,100810,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@145337.5147 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.5150 u40s4pceu0ep7t5c8u6upsgl63 Query : select st.usalote valor from st where st.ref = '324.2907.00.1'
20241206@145337.5172 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2907.00.1'
20241206@145337.5343 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.5359 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145337.5389 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.5403 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145337.5411 u40s4pceu0ep7t5c8u6upsgl63 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145337.5425 u40s4pceu0ep7t5c8u6upsgl63 Query : select sestamp valor from se where ref ='324.2907.00.1' and lote = 'r2400091200a'
20241206@145337.5451 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.5469 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145337.5481 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675308356467530ff185','aut675302693967530ff165' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145337.5485 u40s4pceu0ep7t5c8u6upsgl63 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145337.5499 u40s4pceu0ep7t5c8u6upsgl63 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145337.5528 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675308356467530ff185',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',120.000 ,'aut675302693967530ff165' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@145337.5767 u40s4pceu0ep7t5c8u6upsgl63 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut675302693967530ff165','2408303','wait',39,'adm09112754980.682000002')
20241206@145337.5882 u40s4pceu0ep7t5c8u6upsgl63 Query : use flama_phc
20241206@145337.5886 u40s4pceu0ep7t5c8u6upsgl63 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@145337.5916 u40s4pceu0ep7t5c8u6upsgl63 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3747';
20241206@145337.5967 u40s4pceu0ep7t5c8u6upsgl63 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3747';
20241206@145337.6018 u40s4pceu0ep7t5c8u6upsgl63 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3747';
20241206@145337.6051 u40s4pceu0ep7t5c8u6upsgl63 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3747';
20241206@145337.6627 dbni99ds3a4uu0fi6jublft1tm Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@145337.6638 dbni99ds3a4uu0fi6jublft1tm Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@145337.6728 dbni99ds3a4uu0fi6jublft1tm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3748';
20241206@145337.6801 dbni99ds3a4uu0fi6jublft1tm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3748';
20241206@145337.8805 dbni99ds3a4uu0fi6jublft1tm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3748';
20241206@145337.9361 dbni99ds3a4uu0fi6jublft1tm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3748';
20241206@145337.9496 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145337.9500 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@145337.9575 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145337.9579 dbni99ds3a4uu0fi6jublft1tm Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20241206@145337.9673 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9006.00.1'
20241206@145337.9859 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408304 and bi.ref ='328.9006.00.1' and bi.lordem =1
20241206@145338.2330 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.2370 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241206@145338.2700 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.2730 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 1 valor from td where td.ndoc = 39
20241206@145338.3040 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.3070 dbni99ds3a4uu0fi6jublft1tm Query : select lower(descricao) descricao ,case when valor='s' then 1 else 0 end valor from para1 where descricao in ('st_lote','st_usalogifunc', 'st_grelha')
20241206@145338.3390 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241206@145338.3900 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.3930 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241206@145338.4220 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.4260 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241206@145338.4560 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.4630 dbni99ds3a4uu0fi6jublft1tm Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241206@145338.5090 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.5110 dbni99ds3a4uu0fi6jublft1tm Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-plaza large formats rainha'
20241206@145338.5690 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.5720 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from td where ndoc = 39
20241206@145338.5860 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241206@145338.6000 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.6170 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145338.6360 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.6510 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145338.6850 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.6990 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145338.7120 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145338.7690 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241206@145338.7820 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.7970 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241206@145338.8270 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut675300052067530ff211' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241206@145338.9810 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.9990 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241206@145338.1039 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241206@145338.1051 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241206@145338.1063 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241206@145338.1104 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241206@145338.1115 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241206@145338.1133 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241206@145338.1144 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut675300052067530ff211',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241206@145338.1385 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 fno valor from wsftdata order by fno desc
20241206@145338.1414 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.1437 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241206@145338.1462 dbni99ds3a4uu0fi6jublft1tm Query : select 'normal' from dummy
20241206@145338.1478 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut675300052067530ff211',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2257,100810,0,'2024-12-06',39,'euro',0,0,2024 ,?,?)
20241206@145338.1773 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.1777 dbni99ds3a4uu0fi6jublft1tm Query : select st.usalote valor from st where st.ref = '328.9006.00.1'
20241206@145338.1803 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9006.00.1'
20241206@145338.1968 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.1985 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145338.2009 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2023 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145338.2031 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145338.2042 dbni99ds3a4uu0fi6jublft1tm Query : select sestamp valor from se where ref ='328.9006.00.1' and lote = 'r2300691200a'
20241206@145338.2063 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2094 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145338.2106 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675300894867530ff232','aut675300052067530ff211' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145338.2111 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2127 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145338.2154 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut675300894867530ff232',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut675300052067530ff211' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241206@145338.2403 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2418 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145338.2443 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2457 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145338.2464 dbni99ds3a4uu0fi6jublft1tm Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241206@145338.2476 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2495 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241206@145338.2520 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut675302933467530ff23c','aut675300052067530ff211' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241206@145338.2524 dbni99ds3a4uu0fi6jublft1tm Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241206@145338.2538 dbni99ds3a4uu0fi6jublft1tm Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241206@145338.2564 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut675302933467530ff23c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut675300052067530ff211' ,0,0 ,2,23.00,20000,?,?,?)
20241206@145338.2800 dbni99ds3a4uu0fi6jublft1tm Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut675300052067530ff211','2408304','wait',39,'adm09112754980.682000002')
20241206@145338.2872 dbni99ds3a4uu0fi6jublft1tm Query : use flama_phc
20241206@145338.2875 dbni99ds3a4uu0fi6jublft1tm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241206@145338.2906 dbni99ds3a4uu0fi6jublft1tm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3748';
20241206@145338.2960 dbni99ds3a4uu0fi6jublft1tm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3748';
20241206@145338.3034 dbni99ds3a4uu0fi6jublft1tm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3748';
20241206@145338.3072 dbni99ds3a4uu0fi6jublft1tm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3748';
20241206@145338.3695 o9n2h72ojvl79gcb7lgfql7msa Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241206@145338.3707 o9n2h72ojvl79gcb7lgfql7msa Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241206@145338.3805 o9n2h72ojvl79gcb7lgfql7msa Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3749';
20241206@145338.3881 o9n2h72ojvl79gcb7lgfql7msa Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3749';
20241206@145338.3945 o9n2h72ojvl79gcb7lgfql7msa Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3749';
20241206@145338.3984 o9n2h72ojvl79gcb7lgfql7msa Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3749';
20241206@145338.4078 o9n2h72ojvl79gcb7lgfql7msa Query : use flama_phc
20241206@145338.4083 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241206@145338.4264 o9n2h72ojvl79gcb7lgfql7msa Query : use flama_phc
20241206@145338.4268 o9n2h72ojvl79gcb7lgfql7msa Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241206@145338.4317 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.4500 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.4864 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.4887 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.4917 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.4941 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.4959 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.4981 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.4999 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.5023 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.5041 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.5957 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.6405 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.6434 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
20241206@145338.6454 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.679.00.01'
20241206@145338.6478 o9n2h72ojvl79gcb7lgfql7msa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2083 and bo.obrano = 2408305 and bi.ref ='324.679.00.01' and bi.lordem =1
