20250224@080615.4983 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2224.00.1'
20250224@080615.5100 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2025 and bo.obrano = 0000502 and bi.ref ='324.2224.00.1' and bi.lordem =260000
20250224@080615.5432 63ibnobpoh4v3hhghgt8m4ngi2 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 = 'av25022144120,724000028 ' 
20250224@080615.5761 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.5765 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 1 valor from ts where ts.ndos = 5
20250224@080615.5858 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.5862 63ibnobpoh4v3hhghgt8m4ngi2 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')
20250224@080615.5935 63ibnobpoh4v3hhghgt8m4ngi2 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 =5
20250224@080615.6116 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.6121 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 ~inactivo valor from fl where no = '100500' and estab = 0 order by inactivo desc
20250224@080615.6237 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.6240 63ibnobpoh4v3hhghgt8m4ngi2 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@080615.6281 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.6284 63ibnobpoh4v3hhghgt8m4ngi2 Query : select szadrsstamp valor from szadrs where szadrsdesc='n/instalaÇÕes sede'
20250224@080615.6333 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.6336 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from ts where ndos = 5
20250224@080615.6414 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080615.6750 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20250224@080615.6824 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080615.6841 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20250224@080615.6851 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080615.6866 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20250224@080615.6875 63ibnobpoh4v3hhghgt8m4ngi2 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 = 5
20250224@080615.7014 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2025 order by obrano desc
20250224@080615.7167 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2025 order by obrano desc
20250224@080615.7308 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.7315 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20250224@080615.7407 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080615.7423 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20250224@080615.7460 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bc21584067bc2877b2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250224@080615.7594 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080615.7611 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20250224@080615.7624 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut67bc21584067bc2877b2','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20250224','08:36',?,?)
20250224@080615.8109 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080615.8129 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20250224@080615.8149 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbodata (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,maquina ) values ('aut67bc21584067bc2877b2','trf entre armazéns a','2025-02-24',5,73,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',?)
20250224@080615.8968 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.8972 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1646.00.1'
20250224@080615.9265 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.9268 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1646.00.1'
20250224@080615.9482 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.9489 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1646.00.1' and sa.armazem = 133 
20250224@080615.9594 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080615.9597 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1646.00.1'
20250224@080615.9899 63ibnobpoh4v3hhghgt8m4ngi2 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.1646.00.1'
20250224@080616.3990 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.4160 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.4470 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.4800 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.5060 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1646.00.1' and lote = 'r2400725100a'
20250224@080616.6200 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.6740 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.6900 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.7190 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc26942267bc287810','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.1240 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.1277 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.1313 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc26942267bc287810',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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 ,108.8,108.8*200.48,108.8,108.8*200.48 ,0,0,'un ','' ,bo.marcada,1 ,108.8*6.000,108.8*6.000*200.48 ,43.504000,43.504000*200.48 ,43.504000,43.504000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,108.8,108.8*200.48,108.8*6.000,108.8*6.000*200.48,'av25022143796,889000001 ',108.8,108.8*6.000,108.8,108.8*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.2004 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2009 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1684.00.1'
20250224@080616.2026 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2029 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1684.00.1'
20250224@080616.2051 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2054 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1684.00.1' and sa.armazem = 133 
20250224@080616.2146 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2149 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1684.00.1'
20250224@080616.2169 63ibnobpoh4v3hhghgt8m4ngi2 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.1684.00.1'
20250224@080616.2327 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.2344 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.2356 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.2372 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.2382 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1684.00.1' and lote = 'r2400208100a'
20250224@080616.2409 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.2422 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.2437 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.2450 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc24130267bc28783b','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.2587 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.2604 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.2620 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc24130267bc28783b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.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,20000 ,51.2,51.2*200.48,51.2,51.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,51.2*4.000,51.2*4.000*200.48 ,17.955000,17.955000*200.48 ,17.955000,17.955000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,51.2,51.2*200.48,51.2*4.000,51.2*4.000*200.48,'av25022143813,967000002 ',51.2,51.2*4.000,51.2,51.2*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.2866 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2871 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20250224@080616.2888 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2892 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20250224@080616.2909 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2912 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1685.00.1' and sa.armazem = 133 
20250224@080616.2988 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.2991 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20250224@080616.3010 63ibnobpoh4v3hhghgt8m4ngi2 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.1685.00.1'
20250224@080616.3155 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.3172 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.3187 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.3202 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.3210 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2400173100a'
20250224@080616.3470 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.3483 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.3501 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.3514 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20446367bc287855','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.3677 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.3696 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.3714 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20446367bc287855',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 10.000, 10.000*.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,30000 ,62.1,62.1*200.48,62.1,62.1*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,62.1*10.000,62.1*10.000*200.48 ,25.406000,25.406000*200.48 ,25.406000,25.406000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,62.1,62.1*200.48,62.1*10.000,62.1*10.000*200.48,'av25022143819,692000003 ',62.1,62.1*10.000,62.1,62.1*10.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.4023 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4026 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.4521.00.1'
20250224@080616.4042 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4044 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4521.00.1'
20250224@080616.4060 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4063 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.4521.00.1' and sa.armazem = 133 
20250224@080616.4132 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4135 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4521.00.1'
20250224@080616.4160 63ibnobpoh4v3hhghgt8m4ngi2 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.4521.00.1'
20250224@080616.4333 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.4350 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.4363 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.4379 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.4387 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.4521.00.1' and lote = 'r2400955200a'
20250224@080616.4407 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.4419 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.4433 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.4445 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20591467bc28786b','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.4588 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.4625 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.4647 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20591467bc28786b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,40000 ,41.6,41.6*200.48,41.6,41.6*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,41.6*8.000,41.6*8.000*200.48 ,16.519000,16.519000*200.48 ,16.519000,16.519000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,41.6,41.6*200.48,41.6*8.000,41.6*8.000*200.48,'av25022143841,392000004 ',41.6,41.6*8.000,41.6,41.6*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.4917 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4923 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.4970.00.1'
20250224@080616.4937 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4940 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4970.00.1'
20250224@080616.4957 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.4960 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.4970.00.1' and sa.armazem = 133 
20250224@080616.5029 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.5032 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4970.00.1'
20250224@080616.5050 63ibnobpoh4v3hhghgt8m4ngi2 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.4970.00.1'
20250224@080616.5205 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.5221 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.5235 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.5250 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.5258 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.4970.00.1' and lote = 'r2401231200a'
20250224@080616.5279 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.5293 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.5309 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.5322 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20416167bc287881','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.5465 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.5483 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.5500 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20416167bc287881',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.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,50000 ,27.6,27.6*200.48,27.6,27.6*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,27.6*4.000,27.6*4.000*200.48 ,9.182000,9.182000*200.48 ,9.182000,9.182000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,27.6,27.6*200.48,27.6*4.000,27.6*4.000*200.48,'av25022143846,782000005 ',27.6,27.6*4.000,27.6,27.6*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.5742 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.5747 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.958.00.01'
20250224@080616.5763 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.5766 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.958.00.01'
20250224@080616.5783 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.5786 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.958.00.01' and sa.armazem = 133 
20250224@080616.5859 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.5862 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.958.00.01'
20250224@080616.5880 63ibnobpoh4v3hhghgt8m4ngi2 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.958.00.01'
20250224@080616.6036 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.6052 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.6064 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.6079 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.6087 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.958.00.01' and lote = 'r2400704200a'
20250224@080616.6107 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.6120 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.6135 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.6147 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc27441367bc287895','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.6371 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.6510 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.6528 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc27441367bc287895',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,60000 ,19.2,19.2*200.48,19.2,19.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,19.2*8.000,19.2*8.000*200.48 ,8.220000,8.220000*200.48 ,8.220000,8.220000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19.2,19.2*200.48,19.2*8.000,19.2*8.000*200.48,'av25022143859,653000007 ',19.2,19.2*8.000,19.2,19.2*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.6775 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.6779 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.948.00.01'
20250224@080616.6795 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.6797 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.948.00.01'
20250224@080616.6816 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.6818 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.948.00.01' and sa.armazem = 133 
20250224@080616.6920 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.6924 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.948.00.01'
20250224@080616.6948 63ibnobpoh4v3hhghgt8m4ngi2 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.948.00.01'
20250224@080616.7104 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.7121 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.7134 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.7151 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.7160 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.948.00.01' and lote = 'r2400703100a'
20250224@080616.7173 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.7184 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.7199 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.7210 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc23463367bc2878af','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.7346 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.7362 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.7377 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc23463367bc2878af',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 16.000, 16.000*.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,70000 ,30.1,30.1*200.48,30.1,30.1*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,30.1*16.000,30.1*16.000*200.48 ,11.700000,11.700000*200.48 ,11.700000,11.700000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,30.1,30.1*200.48,30.1*16.000,30.1*16.000*200.48,'av25022143864,836000008 ',30.1,30.1*16.000,30.1,30.1*16.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.7651 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.7655 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20250224@080616.7670 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.7673 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.988.00.01'
20250224@080616.7688 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.7691 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.988.00.01' and sa.armazem = 133 
20250224@080616.7759 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.7762 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.988.00.01'
20250224@080616.7781 63ibnobpoh4v3hhghgt8m4ngi2 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.988.00.01'
20250224@080616.8014 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.8033 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.8048 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.8064 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.8074 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2401038200a'
20250224@080616.8097 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.8109 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.8124 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.8256 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc25250167bc2878c5','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.8557 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.8746 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.8763 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc25250167bc2878c5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 16.000, 16.000*.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,80000 ,32,32*200.48,32,32*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,32*16.000,32*16.000*200.48 ,10.652000,10.652000*200.48 ,10.652000,10.652000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,32,32*200.48,32*16.000,32*16.000*200.48,'av25022143871,515000009 ',32,32*16.000,32,32*16.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.9024 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.9028 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.4988.00.1'
20250224@080616.9043 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.9046 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4988.00.1'
20250224@080616.9062 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.9065 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.4988.00.1' and sa.armazem = 133 
20250224@080616.9151 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.9154 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4988.00.1'
20250224@080616.9174 63ibnobpoh4v3hhghgt8m4ngi2 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.4988.00.1'
20250224@080616.9324 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.9404 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.9417 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.9433 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.9480 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.4988.00.1' and lote = 'r2100754100a'
20250224@080616.9512 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080616.9524 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.9539 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080616.9550 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20884667bc2878e8','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.9694 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080616.9712 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080616.9729 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20884667bc2878e8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 12.000, 12.000*.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,90000 ,28.8,28.8*200.48,28.8,28.8*200.48 ,0,0,'un ','' ,bo.marcada,1 ,28.8*12.000,28.8*12.000*200.48 ,8.445000,8.445000*200.48 ,8.445000,8.445000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,28.8,28.8*200.48,28.8*12.000,28.8*12.000*200.48,'av25022143877,747000010 ',28.8,28.8*12.000,28.8,28.8*12.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080616.9980 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080616.9984 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.4988.00.1'
20250224@080616.9998 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.1000 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4988.00.1'
20250224@080617.1800 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.2000 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.4988.00.1' and sa.armazem = 133 
20250224@080617.4600 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.4900 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.4988.00.1'
20250224@080617.6800 63ibnobpoh4v3hhghgt8m4ngi2 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.4988.00.1'
20250224@080617.8400 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1010 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.1150 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1290 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.1380 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.4988.00.1' and lote = 'r2100754100a'
20250224@080617.1520 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.1640 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1790 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.1910 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc24141067bc287904','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.3730 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.3910 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.4070 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc24141067bc287904',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 28.000, 28.000*.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,100000 ,28.8,28.8*200.48,28.8,28.8*200.48 ,0,0,'un ','' ,bo.marcada,1 ,28.8*28.000,28.8*28.000*200.48 ,8.445000,8.445000*200.48 ,8.445000,8.445000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,28.8,28.8*200.48,28.8*28.000,28.8*28.000*200.48,'av25022143877,747000010 ',28.8,28.8*28.000,28.8,28.8*28.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.6600 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6640 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.645.00.01'
20250224@080617.6780 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6810 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.645.00.01'
20250224@080617.6970 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6990 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.645.00.01' and sa.armazem = 133 
20250224@080617.7690 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.7720 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.645.00.01'
20250224@080617.8000 63ibnobpoh4v3hhghgt8m4ngi2 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.645.00.01'
20250224@080617.9550 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.9710 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.9850 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1001 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.1010 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.645.00.01' and lote = 'r2401265200a'
20250224@080617.1024 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.1036 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1053 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.1066 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc21980467bc287919','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.1207 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1224 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.1241 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc21980467bc287919',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,110000 ,44.8,44.8*200.48,44.8,44.8*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,44.8*6.000,44.8*6.000*200.48 ,14.080000,14.080000*200.48 ,14.080000,14.080000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,44.8,44.8*200.48,44.8*6.000,44.8*6.000*200.48,'av25022143883,820000011 ',44.8,44.8*6.000,44.8,44.8*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.1491 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.1495 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.657.00.01'
20250224@080617.1513 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.1516 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.657.00.01'
20250224@080617.1535 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.1537 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.657.00.01' and sa.armazem = 133 
20250224@080617.1610 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.1613 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.657.00.01'
20250224@080617.1631 63ibnobpoh4v3hhghgt8m4ngi2 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.657.00.01'
20250224@080617.1781 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1796 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.1808 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1823 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.1831 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.657.00.01' and lote = 'r2400957400a'
20250224@080617.1845 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.1856 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.1870 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.1882 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20977267bc28792d','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.2014 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.2032 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.2048 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20977267bc28792d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,120000 ,64,64*200.48,64,64*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,64*6.000,64*6.000*200.48 ,16.891000,16.891000*200.48 ,16.891000,16.891000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,64,64*200.48,64*6.000,64*6.000*200.48,'av25022143889,335000012 ',64,64*6.000,64,64*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.2297 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.2302 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.658.00.01'
20250224@080617.2315 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.2318 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.658.00.01'
20250224@080617.2335 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.2338 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.658.00.01' and sa.armazem = 133 
20250224@080617.2411 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.2415 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.658.00.01'
20250224@080617.2437 63ibnobpoh4v3hhghgt8m4ngi2 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.658.00.01'
20250224@080617.2591 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.2608 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.2622 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.2637 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.2646 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.658.00.01' and lote = 'r2400222100a'
20250224@080617.2666 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.2678 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.2692 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.2704 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc24902167bc287941','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.2838 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.2855 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.2870 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc24902167bc287941',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1.000, 1.000*.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,130000 ,64,64*200.48,64,64*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,64*1.000,64*1.000*200.48 ,19.303000,19.303000*200.48 ,19.303000,19.303000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,64,64*200.48,64*1.000,64*1.000*200.48,'av25022143895,411000013 ',64,64*1.000,64,64*1.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.3142 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3146 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.658.00.01'
20250224@080617.3159 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3162 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.658.00.01'
20250224@080617.3178 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3181 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.658.00.01' and sa.armazem = 133 
20250224@080617.3237 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3240 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.658.00.01'
20250224@080617.3258 63ibnobpoh4v3hhghgt8m4ngi2 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.658.00.01'
20250224@080617.3271 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.3288 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.3300 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.3314 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.3322 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.658.00.01' and lote = 'r2400222100a'
20250224@080617.3334 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.3346 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.3360 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.3371 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20963067bc287951','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.3508 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.3525 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.3544 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20963067bc287951',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 9.000, 9.000*.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,140000 ,64,64*200.48,64,64*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,64*9.000,64*9.000*200.48 ,19.303000,19.303000*200.48 ,19.303000,19.303000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,64,64*200.48,64*9.000,64*9.000*200.48,'av25022143895,411000013 ',64,64*9.000,64,64*9.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.3791 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3795 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.681.00.01'
20250224@080617.3813 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3816 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.681.00.01'
20250224@080617.3834 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3837 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.681.00.01' and sa.armazem = 133 
20250224@080617.3920 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.3923 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.681.00.01'
20250224@080617.3944 63ibnobpoh4v3hhghgt8m4ngi2 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.681.00.01'
20250224@080617.4143 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.4158 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.4170 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.4185 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.4193 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.681.00.01' and lote = 'r2400696200a'
20250224@080617.4208 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.4220 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.4234 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.4246 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc22966067bc287967','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.4379 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.4395 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.4410 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc22966067bc287967',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 10.000, 10.000*.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,150000 ,83.2,83.2*200.48,83.2,83.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,83.2*10.000,83.2*10.000*200.48 ,24.423000,24.423000*200.48 ,24.423000,24.423000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,83.2,83.2*200.48,83.2*10.000,83.2*10.000*200.48,'av25022143900,918000014 ',83.2,83.2*10.000,83.2,83.2*10.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.4662 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.4666 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20250224@080617.4680 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.4683 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20250224@080617.4700 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.4702 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.682.00.01' and sa.armazem = 133 
20250224@080617.4775 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.4778 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20250224@080617.4802 63ibnobpoh4v3hhghgt8m4ngi2 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'
20250224@080617.4961 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.4977 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.4988 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5002 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.5011 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400958400a'
20250224@080617.5024 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.5035 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5050 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.5062 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc26931167bc28797a','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.5201 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5222 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.5239 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc26931167bc28797a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,160000 ,83.2,83.2*200.48,83.2,83.2*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,83.2*8.000,83.2*8.000*200.48 ,22.967000,22.967000*200.48 ,22.967000,22.967000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,83.2,83.2*200.48,83.2*8.000,83.2*8.000*200.48,'av25022143916,028000015 ',83.2,83.2*8.000,83.2,83.2*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.5500 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.5506 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20250224@080617.5522 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.5525 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20250224@080617.5546 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.5550 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.682.00.01' and sa.armazem = 133 
20250224@080617.5576 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.5579 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20250224@080617.5603 63ibnobpoh4v3hhghgt8m4ngi2 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'
20250224@080617.5618 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5636 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.5650 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5667 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.5678 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400958400a'
20250224@080617.5697 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.5711 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5734 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.5747 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc21031567bc28798b','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.5884 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.5903 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.5919 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc21031567bc28798b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 2.000, 2.000*.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,170000 ,83.2,83.2*200.48,83.2,83.2*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,83.2*2.000,83.2*2.000*200.48 ,22.967000,22.967000*200.48 ,22.967000,22.967000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,83.2,83.2*200.48,83.2*2.000,83.2*2.000*200.48,'av25022143916,028000015 ',83.2,83.2*2.000,83.2,83.2*2.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.6385 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6389 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.692.00.01'
20250224@080617.6404 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6407 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.692.00.01'
20250224@080617.6423 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6426 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.692.00.01' and sa.armazem = 133 
20250224@080617.6502 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.6505 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.692.00.01'
20250224@080617.6523 63ibnobpoh4v3hhghgt8m4ngi2 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.692.00.01'
20250224@080617.6675 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.6692 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.6707 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.6721 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.6729 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.692.00.01' and lote = 'r2400837300a'
20250224@080617.6748 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.6762 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.6777 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.6789 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc26633667bc2879a5','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.6927 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.6945 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.6961 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc26633667bc2879a5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,180000 ,96,96*200.48,96,96*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,96*6.000,96*6.000*200.48 ,31.488000,31.488000*200.48 ,31.488000,31.488000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,96,96*200.48,96*6.000,96*6.000*200.48,'av25022143923,468000016 ',96,96*6.000,96,96*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.7257 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.7263 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1817.00.1'
20250224@080617.7278 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.7281 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1817.00.1'
20250224@080617.7299 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.7301 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1817.00.1' and sa.armazem = 133 
20250224@080617.7387 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.7390 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1817.00.1'
20250224@080617.7409 63ibnobpoh4v3hhghgt8m4ngi2 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.1817.00.1'
20250224@080617.7565 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.7582 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.7595 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.7609 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.7618 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1817.00.1' and lote = 'r2400484200a'
20250224@080617.7642 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.7653 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.7668 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.7679 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc29451767bc2879ba','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.7816 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.7834 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.7850 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc29451767bc2879ba',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.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,190000 ,52.5,52.5*200.48,52.5,52.5*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,52.5*4.000,52.5*4.000*200.48 ,25.508000,25.508000*200.48 ,25.508000,25.508000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,52.5,52.5*200.48,52.5*4.000,52.5*4.000*200.48,'av25022143930,233000017 ',52.5,52.5*4.000,52.5,52.5*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.8107 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8112 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.5342.00.1'
20250224@080617.8126 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8129 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.5342.00.1'
20250224@080617.8145 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8148 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5342.00.1' and sa.armazem = 133 
20250224@080617.8218 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8221 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.5342.00.1'
20250224@080617.8240 63ibnobpoh4v3hhghgt8m4ngi2 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.5342.00.1'
20250224@080617.8395 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.8411 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.8423 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.8439 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.8447 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.5342.00.1' and lote = 'r2401258200a'
20250224@080617.8462 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.8474 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.8489 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.8500 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc25906567bc2879ce','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.8635 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.8653 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.8668 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc25906567bc2879ce',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,200000 ,18,18*200.48,18,18*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,18*6.000,18*6.000*200.48 ,6.790000,6.790000*200.48 ,6.790000,6.790000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,18,18*200.48,18*6.000,18*6.000*200.48,'av25022144049,979000020 ',18,18*6.000,18,18*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.8920 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8925 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20250224@080617.8940 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8942 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2300.00.1'
20250224@080617.8958 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.8960 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2300.00.1' and sa.armazem = 133 
20250224@080617.9165 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.9168 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2300.00.1'
20250224@080617.9194 63ibnobpoh4v3hhghgt8m4ngi2 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.2300.00.1'
20250224@080617.9351 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.9367 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.9379 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.9393 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.9401 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20250224@080617.9425 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080617.9437 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.9452 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080617.9465 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc29239867bc2879e6','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.9603 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080617.9622 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080617.9638 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc29239867bc2879e6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,210000 ,16,16*200.48,16,16*200.48 ,0,0,'un ','' ,bo.marcada,1 ,16*6.000,16*6.000*200.48 ,6.598000,6.598000*200.48 ,6.598000,6.598000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,16,16*200.48,16*6.000,16*6.000*200.48,'av25022144055,995000021 ',16,16*6.000,16,16*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080617.9896 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.9901 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.2066.00.1'
20250224@080617.9916 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.9919 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2066.00.1'
20250224@080617.9935 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080617.9938 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2066.00.1' and sa.armazem = 133 
20250224@080618.8000 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.1100 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2066.00.1'
20250224@080618.2900 63ibnobpoh4v3hhghgt8m4ngi2 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'
20250224@080618.2120 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.2290 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.2430 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.2610 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.2720 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.2066.00.1' and lote = 'r2400051100a'
20250224@080618.3260 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.3430 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.3590 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.3700 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc24632367bc287a08','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.5510 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.5800 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.5950 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc24632367bc287a08',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 24.000, 24.000*.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,220000 ,32,32*200.48,32,32*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,32*24.000,32*24.000*200.48 ,14.971000,14.971000*200.48 ,14.971000,14.971000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,32,32*200.48,32*24.000,32*24.000*200.48,'av25022144065,368000022 ',32,32*24.000,32,32*24.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.8470 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.8520 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.5501.00.1'
20250224@080618.8660 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.8690 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.5501.00.1'
20250224@080618.8850 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.8870 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5501.00.1' and sa.armazem = 133 
20250224@080618.9580 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.1001 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.5501.00.1'
20250224@080618.1036 63ibnobpoh4v3hhghgt8m4ngi2 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.5501.00.1'
20250224@080618.1193 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.1208 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.1220 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.1235 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.1244 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.5501.00.1' and lote = 'r2300908100a'
20250224@080618.1269 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.1281 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.1296 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.1307 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc29223667bc287a1f','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.1446 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.1464 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.1480 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc29223667bc287a1f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 10.000, 10.000*.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,230000 ,64,64*200.48,64,64*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,64*10.000,64*10.000*200.48 ,18.463000,18.463000*200.48 ,18.463000,18.463000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,64,64*200.48,64*10.000,64*10.000*200.48,'av25022144072,255000023 ',64,64*10.000,64,64*10.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.1729 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.1733 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.2031.00.1'
20250224@080618.1749 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.1752 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2031.00.1'
20250224@080618.1768 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.1771 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2031.00.1' and sa.armazem = 133 
20250224@080618.1852 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.1855 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2031.00.1'
20250224@080618.1874 63ibnobpoh4v3hhghgt8m4ngi2 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'
20250224@080618.2055 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.2073 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.2086 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.2100 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.2108 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.2031.00.1' and lote = 'r2100232100a'
20250224@080618.2133 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.2145 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.2159 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.2170 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc28136567bc287a34','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.2308 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.2612 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.2723 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc28136567bc287a34',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 18.000, 18.000*.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,240000 ,23.7,23.7*200.48,23.7,23.7*200.48 ,0,0,'un ','' ,bo.marcada,1 ,23.7*18.000,23.7*18.000*200.48 ,8.924000,8.924000*200.48 ,8.924000,8.924000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,23.7,23.7*200.48,23.7*18.000,23.7*18.000*200.48,'av25022144085,591000024 ',23.7,23.7*18.000,23.7,23.7*18.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.3015 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3019 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1221.00.1'
20250224@080618.3035 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3038 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1221.00.1'
20250224@080618.3053 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3056 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1221.00.1' and sa.armazem = 133 
20250224@080618.3128 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3130 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1221.00.1'
20250224@080618.3151 63ibnobpoh4v3hhghgt8m4ngi2 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.1221.00.1'
20250224@080618.3310 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.3325 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.3339 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.3354 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.3363 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1221.00.1' and lote = 'r2101229200a'
20250224@080618.3387 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.3400 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.3415 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.3426 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc23037467bc287a53','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.3562 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.3582 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.3598 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc23037467bc287a53',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.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,250000 ,83.2,83.2*200.48,83.2,83.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,83.2*4.000,83.2*4.000*200.48 ,35.966000,35.966000*200.48 ,35.966000,35.966000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,83.2,83.2*200.48,83.2*4.000,83.2*4.000*200.48,'av25022144094,345000025 ',83.2,83.2*4.000,83.2,83.2*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.3856 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3861 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1266.00.1'
20250224@080618.3876 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3880 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1266.00.1'
20250224@080618.3897 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3900 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1266.00.1' and sa.armazem = 133 
20250224@080618.3971 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.3974 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1266.00.1'
20250224@080618.3999 63ibnobpoh4v3hhghgt8m4ngi2 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.1266.00.1'
20250224@080618.4155 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.4172 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.4185 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.4200 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.4211 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1266.00.1' and lote = 'r2101351100a'
20250224@080618.4237 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.4250 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.4266 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.4278 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc23668067bc287a67','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.4415 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.4434 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.4449 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc23668067bc287a67',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,260000 ,115.2,115.2*200.48,115.2,115.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,115.2*8.000,115.2*8.000*200.48 ,49.752000,49.752000*200.48 ,49.752000,49.752000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,115.2,115.2*200.48,115.2*8.000,115.2*8.000*200.48,'av25022144101,603000026 ',115.2,115.2*8.000,115.2,115.2*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.4699 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.4704 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.1256.00.1'
20250224@080618.4719 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.4722 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1256.00.1'
20250224@080618.4740 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.4743 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1256.00.1' and sa.armazem = 133 
20250224@080618.4817 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.4820 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.1256.00.1'
20250224@080618.4839 63ibnobpoh4v3hhghgt8m4ngi2 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.1256.00.1'
20250224@080618.5021 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.5037 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.5050 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.5065 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.5074 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.1256.00.1' and lote = 'r2101351200a'
20250224@080618.5090 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.5103 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.5120 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.5133 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc26301767bc287a7c','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.5326 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.5348 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.5365 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc26301767bc287a7c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,270000 ,115.2,115.2*200.48,115.2,115.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,115.2*8.000,115.2*8.000*200.48 ,46.885000,46.885000*200.48 ,46.885000,46.885000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,115.2,115.2*200.48,115.2*8.000,115.2*8.000*200.48,'av25022144112,593000027 ',115.2,115.2*8.000,115.2,115.2*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.5651 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.5656 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.usalote valor from st where st.ref = '324.2224.00.1'
20250224@080618.5673 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.5676 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2224.00.1'
20250224@080618.5693 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.5695 63ibnobpoh4v3hhghgt8m4ngi2 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2224.00.1' and sa.armazem = 133 
20250224@080618.5765 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.5767 63ibnobpoh4v3hhghgt8m4ngi2 Query : select st.stns valor from st where st.ref = '324.2224.00.1'
20250224@080618.5809 63ibnobpoh4v3hhghgt8m4ngi2 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.2224.00.1'
20250224@080618.6046 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.6062 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.6074 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.6089 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.6097 63ibnobpoh4v3hhghgt8m4ngi2 Query : select sestamp valor from se where ref ='324.2224.00.1' and lote = 'r2301280100a'
20250224@080618.6117 63ibnobpoh4v3hhghgt8m4ngi2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080618.6129 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.6144 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080618.6155 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc22841967bc287a95','aut67bc21584067bc2877b2',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.6291 63ibnobpoh4v3hhghgt8m4ngi2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080618.6309 63ibnobpoh4v3hhghgt8m4ngi2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080618.6325 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc22841967bc287a95',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,280000 ,25.6,25.6*200.48,25.6,25.6*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,25.6*8.000,25.6*8.000*200.48 ,9.896000,9.896000*200.48 ,9.896000,9.896000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,25.6,25.6*200.48,25.6*8.000,25.6*8.000*200.48,'av25022144120,724000028 ',25.6,25.6*8.000,25.6,25.6*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc21584067bc2877b2'
20250224@080618.6581 63ibnobpoh4v3hhghgt8m4ngi2 Query : insert into wsbocreationlog (initialstamp,externalid,creationstatus,documenttypeid,idustamp,transactionid) values ('aut67bc21584067bc2877b2','','wait',5,'adm12071144683,938000003','')
20250224@080618.6698 63ibnobpoh4v3hhghgt8m4ngi2 Query : use flama_phc
20250224@080618.6702 63ibnobpoh4v3hhghgt8m4ngi2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@080618.6774 63ibnobpoh4v3hhghgt8m4ngi2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5488';
20250224@080618.6819 63ibnobpoh4v3hhghgt8m4ngi2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5488';
20250224@080618.7592 iicj2lt1ppmogtvj2a943rii82 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@080618.7675 iicj2lt1ppmogtvj2a943rii82 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@080618.8172 iicj2lt1ppmogtvj2a943rii82 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5489';
20250224@080618.8556 iicj2lt1ppmogtvj2a943rii82 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5489';
20250224@080618.8920 iicj2lt1ppmogtvj2a943rii82 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5489';
20250224@080618.9234 iicj2lt1ppmogtvj2a943rii82 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5489';
20250224@080618.9752 4pc2l28a6emi948tddufde5l70 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@080618.9765 4pc2l28a6emi948tddufde5l70 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@080618.9846 4pc2l28a6emi948tddufde5l70 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5490';
20250224@080618.9917 4pc2l28a6emi948tddufde5l70 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5490';
20250224@080618.9990 4pc2l28a6emi948tddufde5l70 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5490';
20250224@080619.3000 4pc2l28a6emi948tddufde5l70 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5490';
20250224@080619.9500 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.9900 4pc2l28a6emi948tddufde5l70 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@080619.1610 4pc2l28a6emi948tddufde5l70 Query : select no, estab,szadrsdesc from szadrs where u_coddest=23
20250224@080619.2580 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2388.00.1'
20250224@080619.4580 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.2388.00.1' and bi.lordem =10000
20250224@080619.1256 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163340,483000001 ' 
20250224@080619.1570 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5501.00.1'
20250224@080619.1591 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.5501.00.1' and bi.lordem =20000
20250224@080619.1940 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163374,078000002 ' 
20250224@080619.2262 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5501.00.1'
20250224@080619.2282 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.5501.00.1' and bi.lordem =20000
20250224@080619.2303 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163374,078000002 ' 
20250224@080619.2324 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.698.00.01'
20250224@080619.2451 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.698.00.01' and bi.lordem =30000
20250224@080619.2807 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163401,293000003 ' 
20250224@080619.3129 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.938.00.01'
20250224@080619.3269 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.938.00.01' and bi.lordem =40000
20250224@080619.3605 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163425,340000004 ' 
20250224@080619.3930 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1705.00.1'
20250224@080619.4053 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.1705.00.1' and bi.lordem =50000
20250224@080619.4394 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163448,126000005 ' 
20250224@080619.4704 4pc2l28a6emi948tddufde5l70 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.988.00.01'
20250224@080619.4727 4pc2l28a6emi948tddufde5l70 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000010 and bi.ref ='324.988.00.01' and bi.lordem =60000
20250224@080619.5074 4pc2l28a6emi948tddufde5l70 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 = 'pll25022163512,704000006 ' 
20250224@080619.5399 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5403 4pc2l28a6emi948tddufde5l70 Query : select top 1 1 valor from ts where ts.ndos = 5
20250224@080619.5438 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5442 4pc2l28a6emi948tddufde5l70 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')
20250224@080619.5473 4pc2l28a6emi948tddufde5l70 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 =5
20250224@080619.5510 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5513 4pc2l28a6emi948tddufde5l70 Query : select top 1 ~inactivo valor from fl where no = '100999' and estab = 0 order by inactivo desc
20250224@080619.5634 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5637 4pc2l28a6emi948tddufde5l70 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@080619.5677 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5680 4pc2l28a6emi948tddufde5l70 Query : select szadrsstamp valor from szadrs where szadrsdesc='flama-fab.louÇas e electrodomesticos,sa'
20250224@080619.5731 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5735 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from ts where ndos = 5
20250224@080619.5749 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.5768 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20250224@080619.5783 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.5799 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20250224@080619.5808 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.5824 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20250224@080619.5833 4pc2l28a6emi948tddufde5l70 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 = 5
20250224@080619.5850 4pc2l28a6emi948tddufde5l70 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2025 order by obrano desc
20250224@080619.5883 4pc2l28a6emi948tddufde5l70 Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2025 order by obrano desc
20250224@080619.5899 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.5906 4pc2l28a6emi948tddufde5l70 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100999' and estab=0
20250224@080619.6054 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.6073 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20250224@080619.6088 4pc2l28a6emi948tddufde5l70 Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bc25579367bc287b90',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250224@080619.6099 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.6116 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20250224@080619.6130 4pc2l28a6emi948tddufde5l70 Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut67bc25579367bc287b90','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20250224','08:36',?,?)
20250224@080619.6318 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.6339 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20250224@080619.6355 4pc2l28a6emi948tddufde5l70 Query : insert into wsbodata (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,maquina ) values ('aut67bc25579367bc287b90','trf entre armazéns a','2025-02-24',5,74,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',?)
20250224@080619.6707 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.6711 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.2388.00.1'
20250224@080619.6726 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.6729 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.2388.00.1'
20250224@080619.6747 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.6750 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2388.00.1' and sa.armazem = 133 
20250224@080619.6836 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.6839 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.2388.00.1'
20250224@080619.6867 4pc2l28a6emi948tddufde5l70 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.2388.00.1'
20250224@080619.7024 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7041 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080619.7053 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7068 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080619.7076 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.2388.00.1' and lote = 'r2400490100a'
20250224@080619.7090 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080619.7103 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7118 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080619.7129 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20420767bc287bad','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080619.7299 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7318 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080619.7334 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20420767bc287bad',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1.000, 1.000*.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 ,89.99,89.99*200.48,89.99,89.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,89.99*1.000,89.99*1.000*200.48 ,23.847000,23.847000*200.48 ,23.847000,23.847000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,89.99,89.99*200.48,89.99*1.000,89.99*1.000*200.48,'pll25022163340,483000001 ',89.99,89.99*1.000,89.99,89.99*1.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080619.7589 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.7594 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.5501.00.1'
20250224@080619.7608 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.7611 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.5501.00.1'
20250224@080619.7626 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.7628 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5501.00.1' and sa.armazem = 133 
20250224@080619.7650 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.7653 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.5501.00.1'
20250224@080619.7671 4pc2l28a6emi948tddufde5l70 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.5501.00.1'
20250224@080619.7686 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7702 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080619.7715 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7730 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080619.7738 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.5501.00.1' and lote = 'r2300908100a'
20250224@080619.7750 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080619.7805 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7820 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080619.7833 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc21799367bc287bbe','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080619.7974 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.7997 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080619.8018 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc21799367bc287bbe',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 2.000, 2.000*.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,20000 ,89.99,89.99*200.48,89.99,89.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,89.99*2.000,89.99*2.000*200.48 ,18.463000,18.463000*200.48 ,18.463000,18.463000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,89.99,89.99*200.48,89.99*2.000,89.99*2.000*200.48,'pll25022163374,078000002 ',89.99,89.99*2.000,89.99,89.99*2.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080619.8278 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.8289 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.5501.00.1'
20250224@080619.8309 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.8312 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.5501.00.1'
20250224@080619.8332 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.8335 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5501.00.1' and sa.armazem = 133 
20250224@080619.8363 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.8366 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.5501.00.1'
20250224@080619.8395 4pc2l28a6emi948tddufde5l70 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.5501.00.1'
20250224@080619.8419 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.8436 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080619.8449 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.8464 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080619.8473 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.5501.00.1' and lote = 'r2300908100a'
20250224@080619.8486 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080619.8500 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.8514 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080619.8526 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc25993267bc287bcf','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080619.8665 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080619.8687 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080619.8707 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc25993267bc287bcf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.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,30000 ,89.99,89.99*200.48,89.99,89.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,89.99*8.000,89.99*8.000*200.48 ,18.463000,18.463000*200.48 ,18.463000,18.463000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,89.99,89.99*200.48,89.99*8.000,89.99*8.000*200.48,'pll25022163374,078000002 ',89.99,89.99*8.000,89.99,89.99*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080619.9078 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.9174 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.698.00.01'
20250224@080619.9194 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.9197 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.698.00.01'
20250224@080619.9222 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080619.9225 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.698.00.01' and sa.armazem = 133 
20250224@080620.7960 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.8780 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.698.00.01'
20250224@080620.1297 4pc2l28a6emi948tddufde5l70 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.698.00.01'
20250224@080620.1464 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.1484 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.1496 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.1510 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.1518 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.698.00.01' and lote = 'r2400227200a'
20250224@080620.1550 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080620.1562 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.1577 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.1589 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc20656067bc287c26','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.1761 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.1781 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.1796 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc20656067bc287c26',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,40000 ,149.99,149.99*200.48,149.99,149.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,149.99*6.000,149.99*6.000*200.48 ,38.756000,38.756000*200.48 ,38.756000,38.756000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,149.99,149.99*200.48,149.99*6.000,149.99*6.000*200.48,'pll25022163401,293000003 ',149.99,149.99*6.000,149.99,149.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.2050 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.2055 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.938.00.01'
20250224@080620.2069 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.2072 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.938.00.01'
20250224@080620.2090 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.2093 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.938.00.01' and sa.armazem = 133 
20250224@080620.2191 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.2196 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.938.00.01'
20250224@080620.2226 4pc2l28a6emi948tddufde5l70 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'
20250224@080620.2390 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.2409 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.2421 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.2437 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.2446 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.938.00.01' and lote = 'r2400003200a'
20250224@080620.2471 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080620.2493 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.2509 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.2520 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc29658667bc287c3c','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.2680 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.2699 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.2716 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc29658667bc287c3c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 12.000, 12.000*1.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,50000 ,29.99,29.99*200.48,29.99,29.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,29.99*12.000,29.99*12.000*200.48 ,8.255000,8.255000*200.48 ,8.255000,8.255000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,29.99,29.99*200.48,29.99*12.000,29.99*12.000*200.48,'pll25022163425,340000004 ',29.99,29.99*12.000,29.99,29.99*12.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.2987 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.2992 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.1705.00.1'
20250224@080620.3009 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3012 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.1705.00.1'
20250224@080620.3029 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3033 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1705.00.1' and sa.armazem = 133 
20250224@080620.3120 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3123 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.1705.00.1'
20250224@080620.3142 4pc2l28a6emi948tddufde5l70 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.1705.00.1'
20250224@080620.3320 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.3353 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.3368 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.3385 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.3394 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.1705.00.1' and lote = 'r2400926200a'
20250224@080620.3409 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080620.3422 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.3437 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.3449 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc22016167bc287c53','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.3638 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.3659 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.3677 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc22016167bc287c53',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 12.000, 12.000*.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,60000 ,49.99,49.99*200.48,49.99,49.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,49.99*12.000,49.99*12.000*200.48 ,10.120000,10.120000*200.48 ,10.120000,10.120000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,49.99,49.99*200.48,49.99*12.000,49.99*12.000*200.48,'pll25022163448,126000005 ',49.99,49.99*12.000,49.99,49.99*12.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.3928 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3933 4pc2l28a6emi948tddufde5l70 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20250224@080620.3949 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3952 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.988.00.01'
20250224@080620.3969 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3972 4pc2l28a6emi948tddufde5l70 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.988.00.01' and sa.armazem = 133 
20250224@080620.3996 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.3999 4pc2l28a6emi948tddufde5l70 Query : select st.stns valor from st where st.ref = '324.988.00.01'
20250224@080620.4017 4pc2l28a6emi948tddufde5l70 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.988.00.01'
20250224@080620.4032 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.4048 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.4062 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.4079 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.4088 4pc2l28a6emi948tddufde5l70 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2401038200a'
20250224@080620.4101 4pc2l28a6emi948tddufde5l70 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250224@080620.4113 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.4129 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250224@080620.4141 4pc2l28a6emi948tddufde5l70 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bc22125067bc287c64','aut67bc25579367bc287b90',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.4284 4pc2l28a6emi948tddufde5l70 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250224@080620.4302 4pc2l28a6emi948tddufde5l70 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250224@080620.4318 4pc2l28a6emi948tddufde5l70 Query : insert into wsbidata (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,ar2mazem,obistamp ,stipo) select 'aut67bc22125067bc287c64',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.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,70000 ,49.99,49.99*200.48,49.99,49.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,49.99*6.000,49.99*6.000*200.48 ,10.652000,10.652000*200.48 ,10.652000,10.652000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,49.99,49.99*200.48,49.99*6.000,49.99*6.000*200.48,'pll25022163512,704000006 ',49.99,49.99*6.000,49.99,49.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67bc25579367bc287b90'
20250224@080620.4567 4pc2l28a6emi948tddufde5l70 Query : insert into wsbocreationlog (initialstamp,externalid,creationstatus,documenttypeid,idustamp,transactionid) values ('aut67bc25579367bc287b90','','wait',5,'adm12071144683,938000003','')
20250224@080620.4643 4pc2l28a6emi948tddufde5l70 Query : use flama_phc
20250224@080620.4647 4pc2l28a6emi948tddufde5l70 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@080620.4707 4pc2l28a6emi948tddufde5l70 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5490';
20250224@080620.4758 4pc2l28a6emi948tddufde5l70 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5490';
20250224@081926.2306 ti39qctii60uk4i4k1svqcqb65 Query : use flama_phc
20250224@081926.2379 ti39qctii60uk4i4k1svqcqb65 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@081926.3554 ti39qctii60uk4i4k1svqcqb65 Query : use flama_phc
20250224@081926.3690 ti39qctii60uk4i4k1svqcqb65 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@083626.3412 ofi7tltjohkmd3vrj4frnmee1n Query : use flama_phc
20250224@083626.3418 ofi7tltjohkmd3vrj4frnmee1n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@083626.3515 ofi7tltjohkmd3vrj4frnmee1n Query : use flama_phc
20250224@083626.3519 ofi7tltjohkmd3vrj4frnmee1n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@091926.9480 vij845iemqgl3ps34pguamnl4l Query : use flama_phc
20250224@091926.9540 vij845iemqgl3ps34pguamnl4l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@091926.1167 vij845iemqgl3ps34pguamnl4l Query : use flama_phc
20250224@091926.1173 vij845iemqgl3ps34pguamnl4l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@093626.4395 lfi8bpidh0m07lkqp0i53a57v1 Query : use flama_phc
20250224@093626.5811 lfi8bpidh0m07lkqp0i53a57v1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@093627.1096 lfi8bpidh0m07lkqp0i53a57v1 Query : use flama_phc
20250224@093627.1212 lfi8bpidh0m07lkqp0i53a57v1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@101926.2180 o9b93640pbu2at4svqqk7amlhn Query : use flama_phc
20250224@101926.2230 o9b93640pbu2at4svqqk7amlhn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@101926.3640 o9b93640pbu2at4svqqk7amlhn Query : use flama_phc
20250224@101926.3690 o9b93640pbu2at4svqqk7amlhn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@103625.8993 jegu991prqq1nio789fnj26o9o Query : use flama_phc
20250224@103625.8997 jegu991prqq1nio789fnj26o9o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@103625.9134 jegu991prqq1nio789fnj26o9o Query : use flama_phc
20250224@103625.9138 jegu991prqq1nio789fnj26o9o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@111926.4776 cshvgj9oeebe5qr53tafcjm5dv Query : use flama_phc
20250224@111926.4781 cshvgj9oeebe5qr53tafcjm5dv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@111926.4921 cshvgj9oeebe5qr53tafcjm5dv Query : use flama_phc
20250224@111926.4925 cshvgj9oeebe5qr53tafcjm5dv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@113626.1233 6pd5jbl60mrmk0b5vrr08e1i3q Query : use flama_phc
20250224@113626.1277 6pd5jbl60mrmk0b5vrr08e1i3q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@113626.2264 6pd5jbl60mrmk0b5vrr08e1i3q Query : use flama_phc
20250224@113626.2390 6pd5jbl60mrmk0b5vrr08e1i3q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@121926.1788 cqijkqbi00u92to59j6rreva0q Query : use flama_phc
20250224@121926.1793 cqijkqbi00u92to59j6rreva0q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@121926.1893 cqijkqbi00u92to59j6rreva0q Query : use flama_phc
20250224@121926.1897 cqijkqbi00u92to59j6rreva0q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@123626.2180 nnqcovgvfpe1rtbcq7ljfl4ve0 Query : use flama_phc
20250224@123626.2230 nnqcovgvfpe1rtbcq7ljfl4ve0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@123626.3730 nnqcovgvfpe1rtbcq7ljfl4ve0 Query : use flama_phc
20250224@123626.3760 nnqcovgvfpe1rtbcq7ljfl4ve0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@131926.2877 50rghg3vha8271e0tjemv76gie Query : use flama_phc
20250224@131926.2888 50rghg3vha8271e0tjemv76gie Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@131926.2984 50rghg3vha8271e0tjemv76gie Query : use flama_phc
20250224@131926.2993 50rghg3vha8271e0tjemv76gie Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@133626.2851 91j2ir03a1l3tipm5q44od891l Query : use flama_phc
20250224@133626.2857 91j2ir03a1l3tipm5q44od891l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@133626.2944 91j2ir03a1l3tipm5q44od891l Query : use flama_phc
20250224@133626.2948 91j2ir03a1l3tipm5q44od891l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@141926.1089 28oucl0unidufnk5egh3mbdbco Query : use flama_phc
20250224@141926.1132 28oucl0unidufnk5egh3mbdbco Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@141926.5511 28oucl0unidufnk5egh3mbdbco Query : use flama_phc
20250224@141926.5799 28oucl0unidufnk5egh3mbdbco Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@143626.1940 ilcuf34h3vbgc8jol7fd09n751 Query : use flama_phc
20250224@143626.2020 ilcuf34h3vbgc8jol7fd09n751 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@143626.3880 ilcuf34h3vbgc8jol7fd09n751 Query : use flama_phc
20250224@143626.3920 ilcuf34h3vbgc8jol7fd09n751 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@151925.8368 ef5gfessivrmnbkuljr3kl5aeq Query : use flama_phc
20250224@151925.8372 ef5gfessivrmnbkuljr3kl5aeq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@151925.8459 ef5gfessivrmnbkuljr3kl5aeq Query : use flama_phc
20250224@151925.8462 ef5gfessivrmnbkuljr3kl5aeq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@153626.4140 28629mhn8upbqt0kupeirgc5hn Query : use flama_phc
20250224@153626.4190 28629mhn8upbqt0kupeirgc5hn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@153626.5940 28629mhn8upbqt0kupeirgc5hn Query : use flama_phc
20250224@153626.5990 28629mhn8upbqt0kupeirgc5hn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@161926.5240 g3apcaaq8thk6g04diir9bbke8 Query : use flama_phc
20250224@161926.5280 g3apcaaq8thk6g04diir9bbke8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@161926.7860 g3apcaaq8thk6g04diir9bbke8 Query : use flama_phc
20250224@161926.7900 g3apcaaq8thk6g04diir9bbke8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@162609.4773 t5iojj5tjbpletpl2q7h0olbhe Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162609.4799 t5iojj5tjbpletpl2q7h0olbhe Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162609.5155 t5iojj5tjbpletpl2q7h0olbhe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5491';
20250224@162609.5239 t5iojj5tjbpletpl2q7h0olbhe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5491';
20250224@162609.5326 t5iojj5tjbpletpl2q7h0olbhe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5491';
20250224@162609.5389 t5iojj5tjbpletpl2q7h0olbhe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5491';
20250224@162609.5486 t5iojj5tjbpletpl2q7h0olbhe Query : use flama_phc
20250224@162609.5490 t5iojj5tjbpletpl2q7h0olbhe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162609.5594 t5iojj5tjbpletpl2q7h0olbhe Query : use flama_phc
20250224@162609.5597 t5iojj5tjbpletpl2q7h0olbhe Query : select no, estab,szadrsdesc from szadrs where u_coddest=9159
20250224@162609.5698 t5iojj5tjbpletpl2q7h0olbhe Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501366 
20250224@162609.6149 t5iojj5tjbpletpl2q7h0olbhe Query : use flama_phc
20250224@162609.6153 t5iojj5tjbpletpl2q7h0olbhe Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162609.6225 t5iojj5tjbpletpl2q7h0olbhe Query : use flama_phc
20250224@162609.6229 t5iojj5tjbpletpl2q7h0olbhe Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162609.6306 t5iojj5tjbpletpl2q7h0olbhe Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162609.6363 t5iojj5tjbpletpl2q7h0olbhe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5491';
20250224@162609.6417 t5iojj5tjbpletpl2q7h0olbhe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5491';
20250224@162609.7068 h7h3nctvfgmb0tnt64jm1phsif Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162609.7081 h7h3nctvfgmb0tnt64jm1phsif Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162609.7213 h7h3nctvfgmb0tnt64jm1phsif Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5492';
20250224@162609.7484 h7h3nctvfgmb0tnt64jm1phsif Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5492';
20250224@162609.7566 h7h3nctvfgmb0tnt64jm1phsif Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5492';
20250224@162609.7618 h7h3nctvfgmb0tnt64jm1phsif Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5492';
20250224@162609.7689 h7h3nctvfgmb0tnt64jm1phsif Query : use flama_phc
20250224@162609.7692 h7h3nctvfgmb0tnt64jm1phsif Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162609.7768 h7h3nctvfgmb0tnt64jm1phsif Query : use flama_phc
20250224@162609.7771 h7h3nctvfgmb0tnt64jm1phsif Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20250224@162609.7875 h7h3nctvfgmb0tnt64jm1phsif Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501367 
20250224@162609.8332 h7h3nctvfgmb0tnt64jm1phsif Query : use flama_phc
20250224@162609.8336 h7h3nctvfgmb0tnt64jm1phsif Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162609.8369 h7h3nctvfgmb0tnt64jm1phsif Query : use flama_phc
20250224@162609.8372 h7h3nctvfgmb0tnt64jm1phsif Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162609.8390 h7h3nctvfgmb0tnt64jm1phsif Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162609.8420 h7h3nctvfgmb0tnt64jm1phsif Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5492';
20250224@162609.8482 h7h3nctvfgmb0tnt64jm1phsif Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5492';
20250224@162609.9086 002d9jgljhul03sbhk057reb05 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162609.9096 002d9jgljhul03sbhk057reb05 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162609.9185 002d9jgljhul03sbhk057reb05 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5493';
20250224@162609.9273 002d9jgljhul03sbhk057reb05 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5493';
20250224@162609.9359 002d9jgljhul03sbhk057reb05 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5493';
20250224@162609.9421 002d9jgljhul03sbhk057reb05 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5493';
20250224@162609.9538 002d9jgljhul03sbhk057reb05 Query : use flama_phc
20250224@162609.9543 002d9jgljhul03sbhk057reb05 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162609.9633 002d9jgljhul03sbhk057reb05 Query : use flama_phc
20250224@162609.9638 002d9jgljhul03sbhk057reb05 Query : select no, estab,szadrsdesc from szadrs where u_coddest=10025
20250224@162609.9775 002d9jgljhul03sbhk057reb05 Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501369 
20250224@162610.2480 002d9jgljhul03sbhk057reb05 Query : use flama_phc
20250224@162610.2530 002d9jgljhul03sbhk057reb05 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162610.2880 002d9jgljhul03sbhk057reb05 Query : use flama_phc
20250224@162610.2910 002d9jgljhul03sbhk057reb05 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162610.3090 002d9jgljhul03sbhk057reb05 Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162610.3340 002d9jgljhul03sbhk057reb05 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5493';
20250224@162610.3900 002d9jgljhul03sbhk057reb05 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5493';
20250224@162610.9450 6ki60nfihllij6gku3i79r38ns Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162610.9560 6ki60nfihllij6gku3i79r38ns Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162610.1048 6ki60nfihllij6gku3i79r38ns Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5494';
20250224@162610.1141 6ki60nfihllij6gku3i79r38ns Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5494';
20250224@162610.1218 6ki60nfihllij6gku3i79r38ns Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5494';
20250224@162610.1265 6ki60nfihllij6gku3i79r38ns Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5494';
20250224@162610.1333 6ki60nfihllij6gku3i79r38ns Query : use flama_phc
20250224@162610.1337 6ki60nfihllij6gku3i79r38ns Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162610.1403 6ki60nfihllij6gku3i79r38ns Query : use flama_phc
20250224@162610.1406 6ki60nfihllij6gku3i79r38ns Query : select no, estab,szadrsdesc from szadrs where u_coddest=416
20250224@162610.1505 6ki60nfihllij6gku3i79r38ns Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501370 
20250224@162610.1969 6ki60nfihllij6gku3i79r38ns Query : use flama_phc
20250224@162610.1973 6ki60nfihllij6gku3i79r38ns Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162610.2006 6ki60nfihllij6gku3i79r38ns Query : use flama_phc
20250224@162610.2009 6ki60nfihllij6gku3i79r38ns Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162610.2026 6ki60nfihllij6gku3i79r38ns Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162610.2056 6ki60nfihllij6gku3i79r38ns Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5494';
20250224@162610.2117 6ki60nfihllij6gku3i79r38ns Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5494';
20250224@162610.2777 1foplrgd46d282u0ss8i494v6c Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162610.2791 1foplrgd46d282u0ss8i494v6c Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162610.2877 1foplrgd46d282u0ss8i494v6c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5495';
20250224@162610.2951 1foplrgd46d282u0ss8i494v6c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5495';
20250224@162610.3039 1foplrgd46d282u0ss8i494v6c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5495';
20250224@162610.3092 1foplrgd46d282u0ss8i494v6c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5495';
20250224@162610.3180 1foplrgd46d282u0ss8i494v6c Query : use flama_phc
20250224@162610.3184 1foplrgd46d282u0ss8i494v6c Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162610.3454 1foplrgd46d282u0ss8i494v6c Query : use flama_phc
20250224@162610.3458 1foplrgd46d282u0ss8i494v6c Query : select no, estab,szadrsdesc from szadrs where u_coddest=416
20250224@162610.3511 1foplrgd46d282u0ss8i494v6c Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501371 
20250224@162610.4067 1foplrgd46d282u0ss8i494v6c Query : use flama_phc
20250224@162610.4071 1foplrgd46d282u0ss8i494v6c Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162610.4106 1foplrgd46d282u0ss8i494v6c Query : use flama_phc
20250224@162610.4110 1foplrgd46d282u0ss8i494v6c Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162610.4128 1foplrgd46d282u0ss8i494v6c Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162610.4153 1foplrgd46d282u0ss8i494v6c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5495';
20250224@162610.4208 1foplrgd46d282u0ss8i494v6c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5495';
20250224@162610.4995 62eqr1mm749h5r76sl8ns3ehhh Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162610.5007 62eqr1mm749h5r76sl8ns3ehhh Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162610.5094 62eqr1mm749h5r76sl8ns3ehhh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5496';
20250224@162610.5273 62eqr1mm749h5r76sl8ns3ehhh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5496';
20250224@162610.5379 62eqr1mm749h5r76sl8ns3ehhh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5496';
20250224@162610.5501 62eqr1mm749h5r76sl8ns3ehhh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5496';
20250224@162610.5646 62eqr1mm749h5r76sl8ns3ehhh Query : use flama_phc
20250224@162610.5652 62eqr1mm749h5r76sl8ns3ehhh Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162610.5898 62eqr1mm749h5r76sl8ns3ehhh Query : use flama_phc
20250224@162610.5903 62eqr1mm749h5r76sl8ns3ehhh Query : select no, estab,szadrsdesc from szadrs where u_coddest=7737
20250224@162610.6004 62eqr1mm749h5r76sl8ns3ehhh Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501372 
20250224@162610.6462 62eqr1mm749h5r76sl8ns3ehhh Query : use flama_phc
20250224@162610.6465 62eqr1mm749h5r76sl8ns3ehhh Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162610.6496 62eqr1mm749h5r76sl8ns3ehhh Query : use flama_phc
20250224@162610.6499 62eqr1mm749h5r76sl8ns3ehhh Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162610.6516 62eqr1mm749h5r76sl8ns3ehhh Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162610.6537 62eqr1mm749h5r76sl8ns3ehhh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5496';
20250224@162610.6822 62eqr1mm749h5r76sl8ns3ehhh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5496';
20250224@162610.8055 1aigf5stki5eebpdcc7j7b618b Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162610.8069 1aigf5stki5eebpdcc7j7b618b Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162610.8153 1aigf5stki5eebpdcc7j7b618b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5497';
20250224@162610.8232 1aigf5stki5eebpdcc7j7b618b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5497';
20250224@162610.8310 1aigf5stki5eebpdcc7j7b618b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5497';
20250224@162610.8607 1aigf5stki5eebpdcc7j7b618b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5497';
20250224@162610.8690 1aigf5stki5eebpdcc7j7b618b Query : use flama_phc
20250224@162610.8694 1aigf5stki5eebpdcc7j7b618b Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162610.8764 1aigf5stki5eebpdcc7j7b618b Query : use flama_phc
20250224@162610.8767 1aigf5stki5eebpdcc7j7b618b Query : select no, estab,szadrsdesc from szadrs where u_coddest=1161
20250224@162610.8877 1aigf5stki5eebpdcc7j7b618b Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501373 
20250224@162610.9354 1aigf5stki5eebpdcc7j7b618b Query : use flama_phc
20250224@162610.9357 1aigf5stki5eebpdcc7j7b618b Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162610.9405 1aigf5stki5eebpdcc7j7b618b Query : use flama_phc
20250224@162610.9409 1aigf5stki5eebpdcc7j7b618b Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162610.9427 1aigf5stki5eebpdcc7j7b618b Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162610.9448 1aigf5stki5eebpdcc7j7b618b Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5497';
20250224@162610.9501 1aigf5stki5eebpdcc7j7b618b Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5497';
20250224@162611.9400 3l6vkms3qk8qfpeufhlnj7o46o Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162611.1060 3l6vkms3qk8qfpeufhlnj7o46o Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162611.1900 3l6vkms3qk8qfpeufhlnj7o46o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5498';
20250224@162611.6380 3l6vkms3qk8qfpeufhlnj7o46o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5498';
20250224@162611.1154 3l6vkms3qk8qfpeufhlnj7o46o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5498';
20250224@162611.1777 3l6vkms3qk8qfpeufhlnj7o46o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5498';
20250224@162611.1853 3l6vkms3qk8qfpeufhlnj7o46o Query : use flama_phc
20250224@162611.1857 3l6vkms3qk8qfpeufhlnj7o46o Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162611.1917 3l6vkms3qk8qfpeufhlnj7o46o Query : use flama_phc
20250224@162611.1920 3l6vkms3qk8qfpeufhlnj7o46o Query : select no, estab,szadrsdesc from szadrs where u_coddest=1498
20250224@162611.2019 3l6vkms3qk8qfpeufhlnj7o46o Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501374 
20250224@162611.2514 3l6vkms3qk8qfpeufhlnj7o46o Query : use flama_phc
20250224@162611.2517 3l6vkms3qk8qfpeufhlnj7o46o Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162611.2550 3l6vkms3qk8qfpeufhlnj7o46o Query : use flama_phc
20250224@162611.2553 3l6vkms3qk8qfpeufhlnj7o46o Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162611.2570 3l6vkms3qk8qfpeufhlnj7o46o Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162611.2592 3l6vkms3qk8qfpeufhlnj7o46o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5498';
20250224@162611.2643 3l6vkms3qk8qfpeufhlnj7o46o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5498';
20250224@162611.3349 m370inrirvm9c38d1k0onf38rq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162611.3360 m370inrirvm9c38d1k0onf38rq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162611.3444 m370inrirvm9c38d1k0onf38rq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5499';
20250224@162611.3522 m370inrirvm9c38d1k0onf38rq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5499';
20250224@162611.3599 m370inrirvm9c38d1k0onf38rq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5499';
20250224@162611.3649 m370inrirvm9c38d1k0onf38rq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5499';
20250224@162611.3718 m370inrirvm9c38d1k0onf38rq Query : use flama_phc
20250224@162611.3721 m370inrirvm9c38d1k0onf38rq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162611.3786 m370inrirvm9c38d1k0onf38rq Query : use flama_phc
20250224@162611.3789 m370inrirvm9c38d1k0onf38rq Query : select no, estab,szadrsdesc from szadrs where u_coddest=1452
20250224@162611.3924 m370inrirvm9c38d1k0onf38rq Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501375 
20250224@162611.4396 m370inrirvm9c38d1k0onf38rq Query : use flama_phc
20250224@162611.4400 m370inrirvm9c38d1k0onf38rq Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162611.4457 m370inrirvm9c38d1k0onf38rq Query : use flama_phc
20250224@162611.4502 m370inrirvm9c38d1k0onf38rq Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162611.4635 m370inrirvm9c38d1k0onf38rq Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162611.4656 m370inrirvm9c38d1k0onf38rq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5499';
20250224@162611.4751 m370inrirvm9c38d1k0onf38rq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5499';
20250224@162611.5352 2a6balnig9vjlto5249qucg83h Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162611.5362 2a6balnig9vjlto5249qucg83h Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162611.5447 2a6balnig9vjlto5249qucg83h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5500';
20250224@162611.5521 2a6balnig9vjlto5249qucg83h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5500';
20250224@162611.5596 2a6balnig9vjlto5249qucg83h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5500';
20250224@162611.5656 2a6balnig9vjlto5249qucg83h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5500';
20250224@162611.5728 2a6balnig9vjlto5249qucg83h Query : use flama_phc
20250224@162611.5732 2a6balnig9vjlto5249qucg83h Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162611.5796 2a6balnig9vjlto5249qucg83h Query : use flama_phc
20250224@162611.5799 2a6balnig9vjlto5249qucg83h Query : select no, estab,szadrsdesc from szadrs where u_coddest=2014
20250224@162611.5899 2a6balnig9vjlto5249qucg83h Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501376 
20250224@162611.6618 2a6balnig9vjlto5249qucg83h Query : use flama_phc
20250224@162611.6622 2a6balnig9vjlto5249qucg83h Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162611.6654 2a6balnig9vjlto5249qucg83h Query : use flama_phc
20250224@162611.6657 2a6balnig9vjlto5249qucg83h Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162611.6674 2a6balnig9vjlto5249qucg83h Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162611.6695 2a6balnig9vjlto5249qucg83h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5500';
20250224@162611.6747 2a6balnig9vjlto5249qucg83h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5500';
20250224@162611.7437 rni9gdb86ti3regr01lur03amo Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162611.7448 rni9gdb86ti3regr01lur03amo Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162611.7540 rni9gdb86ti3regr01lur03amo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5501';
20250224@162611.7619 rni9gdb86ti3regr01lur03amo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5501';
20250224@162611.7691 rni9gdb86ti3regr01lur03amo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5501';
20250224@162611.7739 rni9gdb86ti3regr01lur03amo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5501';
20250224@162611.7809 rni9gdb86ti3regr01lur03amo Query : use flama_phc
20250224@162611.7813 rni9gdb86ti3regr01lur03amo Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162611.7880 rni9gdb86ti3regr01lur03amo Query : use flama_phc
20250224@162611.7884 rni9gdb86ti3regr01lur03amo Query : select no, estab,szadrsdesc from szadrs where u_coddest=2632
20250224@162611.8004 rni9gdb86ti3regr01lur03amo Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501377 
20250224@162611.8467 rni9gdb86ti3regr01lur03amo Query : use flama_phc
20250224@162611.8470 rni9gdb86ti3regr01lur03amo Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162611.8503 rni9gdb86ti3regr01lur03amo Query : use flama_phc
20250224@162611.8506 rni9gdb86ti3regr01lur03amo Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162611.8523 rni9gdb86ti3regr01lur03amo Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162611.8544 rni9gdb86ti3regr01lur03amo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5501';
20250224@162611.8595 rni9gdb86ti3regr01lur03amo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5501';
20250224@162611.9200 9a8krevvimi2ns0kia4av4fa1r Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162611.9213 9a8krevvimi2ns0kia4av4fa1r Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162611.9297 9a8krevvimi2ns0kia4av4fa1r Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5502';
20250224@162611.9379 9a8krevvimi2ns0kia4av4fa1r Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5502';
20250224@162611.9453 9a8krevvimi2ns0kia4av4fa1r Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5502';
20250224@162611.9501 9a8krevvimi2ns0kia4av4fa1r Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5502';
20250224@162611.9571 9a8krevvimi2ns0kia4av4fa1r Query : use flama_phc
20250224@162611.9575 9a8krevvimi2ns0kia4av4fa1r Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162611.9639 9a8krevvimi2ns0kia4av4fa1r Query : use flama_phc
20250224@162611.9642 9a8krevvimi2ns0kia4av4fa1r Query : select no, estab,szadrsdesc from szadrs where u_coddest=2021
20250224@162611.9742 9a8krevvimi2ns0kia4av4fa1r Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501378 
20250224@162612.3160 9a8krevvimi2ns0kia4av4fa1r Query : use flama_phc
20250224@162612.3200 9a8krevvimi2ns0kia4av4fa1r Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162612.3530 9a8krevvimi2ns0kia4av4fa1r Query : use flama_phc
20250224@162612.3560 9a8krevvimi2ns0kia4av4fa1r Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162612.3730 9a8krevvimi2ns0kia4av4fa1r Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162612.4020 9a8krevvimi2ns0kia4av4fa1r Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5502';
20250224@162612.4560 9a8krevvimi2ns0kia4av4fa1r Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5502';
20250224@162612.1093 jolgiej7u9t6lqvk3pshd3ac8e Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162612.1104 jolgiej7u9t6lqvk3pshd3ac8e Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162612.1198 jolgiej7u9t6lqvk3pshd3ac8e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5503';
20250224@162612.1308 jolgiej7u9t6lqvk3pshd3ac8e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5503';
20250224@162612.1396 jolgiej7u9t6lqvk3pshd3ac8e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5503';
20250224@162612.1454 jolgiej7u9t6lqvk3pshd3ac8e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5503';
20250224@162612.1532 jolgiej7u9t6lqvk3pshd3ac8e Query : use flama_phc
20250224@162612.1536 jolgiej7u9t6lqvk3pshd3ac8e Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162612.1597 jolgiej7u9t6lqvk3pshd3ac8e Query : use flama_phc
20250224@162612.1600 jolgiej7u9t6lqvk3pshd3ac8e Query : select no, estab,szadrsdesc from szadrs where u_coddest=7254
20250224@162612.1702 jolgiej7u9t6lqvk3pshd3ac8e Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501379 
20250224@162612.2174 jolgiej7u9t6lqvk3pshd3ac8e Query : use flama_phc
20250224@162612.2178 jolgiej7u9t6lqvk3pshd3ac8e Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162612.2209 jolgiej7u9t6lqvk3pshd3ac8e Query : use flama_phc
20250224@162612.2213 jolgiej7u9t6lqvk3pshd3ac8e Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162612.2232 jolgiej7u9t6lqvk3pshd3ac8e Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162612.2254 jolgiej7u9t6lqvk3pshd3ac8e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5503';
20250224@162612.2310 jolgiej7u9t6lqvk3pshd3ac8e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5503';
20250224@162612.3010 4c3gi4hemv8ud3fabvchr7fff1 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162612.3021 4c3gi4hemv8ud3fabvchr7fff1 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162612.3135 4c3gi4hemv8ud3fabvchr7fff1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5504';
20250224@162612.3269 4c3gi4hemv8ud3fabvchr7fff1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5504';
20250224@162612.3394 4c3gi4hemv8ud3fabvchr7fff1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5504';
20250224@162612.3455 4c3gi4hemv8ud3fabvchr7fff1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5504';
20250224@162612.3571 4c3gi4hemv8ud3fabvchr7fff1 Query : use flama_phc
20250224@162612.3576 4c3gi4hemv8ud3fabvchr7fff1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162612.3646 4c3gi4hemv8ud3fabvchr7fff1 Query : use flama_phc
20250224@162612.3649 4c3gi4hemv8ud3fabvchr7fff1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=812
20250224@162612.3749 4c3gi4hemv8ud3fabvchr7fff1 Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501380 
20250224@162612.4239 4c3gi4hemv8ud3fabvchr7fff1 Query : use flama_phc
20250224@162612.4244 4c3gi4hemv8ud3fabvchr7fff1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162612.4282 4c3gi4hemv8ud3fabvchr7fff1 Query : use flama_phc
20250224@162612.4529 4c3gi4hemv8ud3fabvchr7fff1 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162612.6691 4c3gi4hemv8ud3fabvchr7fff1 Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162612.6721 4c3gi4hemv8ud3fabvchr7fff1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5504';
20250224@162612.6788 4c3gi4hemv8ud3fabvchr7fff1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5504';
20250224@162612.7394 1bed8ioml8fm2pabtsmksr9l4f Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162612.7408 1bed8ioml8fm2pabtsmksr9l4f Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162612.7509 1bed8ioml8fm2pabtsmksr9l4f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5505';
20250224@162612.7600 1bed8ioml8fm2pabtsmksr9l4f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5505';
20250224@162612.7673 1bed8ioml8fm2pabtsmksr9l4f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5505';
20250224@162612.7723 1bed8ioml8fm2pabtsmksr9l4f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5505';
20250224@162612.7790 1bed8ioml8fm2pabtsmksr9l4f Query : use flama_phc
20250224@162612.7794 1bed8ioml8fm2pabtsmksr9l4f Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162612.7859 1bed8ioml8fm2pabtsmksr9l4f Query : use flama_phc
20250224@162612.7861 1bed8ioml8fm2pabtsmksr9l4f Query : select no, estab,szadrsdesc from szadrs where u_coddest=1453
20250224@162612.7974 1bed8ioml8fm2pabtsmksr9l4f Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501381 
20250224@162612.8431 1bed8ioml8fm2pabtsmksr9l4f Query : use flama_phc
20250224@162612.8435 1bed8ioml8fm2pabtsmksr9l4f Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162612.8470 1bed8ioml8fm2pabtsmksr9l4f Query : use flama_phc
20250224@162612.8473 1bed8ioml8fm2pabtsmksr9l4f Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162612.8490 1bed8ioml8fm2pabtsmksr9l4f Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162612.8515 1bed8ioml8fm2pabtsmksr9l4f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5505';
20250224@162612.8567 1bed8ioml8fm2pabtsmksr9l4f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5505';
20250224@162612.9174 1redh9rovfnnkpp4m14ioqh5mj Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162612.9186 1redh9rovfnnkpp4m14ioqh5mj Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162612.9268 1redh9rovfnnkpp4m14ioqh5mj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5506';
20250224@162612.9345 1redh9rovfnnkpp4m14ioqh5mj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5506';
20250224@162612.9418 1redh9rovfnnkpp4m14ioqh5mj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5506';
20250224@162612.9463 1redh9rovfnnkpp4m14ioqh5mj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5506';
20250224@162612.9535 1redh9rovfnnkpp4m14ioqh5mj Query : use flama_phc
20250224@162612.9539 1redh9rovfnnkpp4m14ioqh5mj Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162612.9611 1redh9rovfnnkpp4m14ioqh5mj Query : use flama_phc
20250224@162612.9614 1redh9rovfnnkpp4m14ioqh5mj Query : select no, estab,szadrsdesc from szadrs where u_coddest=909
20250224@162612.9719 1redh9rovfnnkpp4m14ioqh5mj Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501382 
20250224@162613.1740 1redh9rovfnnkpp4m14ioqh5mj Query : use flama_phc
20250224@162613.1780 1redh9rovfnnkpp4m14ioqh5mj Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162613.2140 1redh9rovfnnkpp4m14ioqh5mj Query : use flama_phc
20250224@162613.2180 1redh9rovfnnkpp4m14ioqh5mj Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162613.2350 1redh9rovfnnkpp4m14ioqh5mj Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162613.2570 1redh9rovfnnkpp4m14ioqh5mj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5506';
20250224@162613.3100 1redh9rovfnnkpp4m14ioqh5mj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5506';
20250224@162613.8890 3sgu2i5vjt1kstui9o5pqpenok Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162613.9010 3sgu2i5vjt1kstui9o5pqpenok Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162613.9980 3sgu2i5vjt1kstui9o5pqpenok Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5507';
20250224@162613.1082 3sgu2i5vjt1kstui9o5pqpenok Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5507';
20250224@162613.1167 3sgu2i5vjt1kstui9o5pqpenok Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5507';
20250224@162613.1224 3sgu2i5vjt1kstui9o5pqpenok Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5507';
20250224@162613.1299 3sgu2i5vjt1kstui9o5pqpenok Query : use flama_phc
20250224@162613.1303 3sgu2i5vjt1kstui9o5pqpenok Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162613.1382 3sgu2i5vjt1kstui9o5pqpenok Query : use flama_phc
20250224@162613.1385 3sgu2i5vjt1kstui9o5pqpenok Query : select no, estab,szadrsdesc from szadrs where u_coddest=8301
20250224@162613.1484 3sgu2i5vjt1kstui9o5pqpenok Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501383 
20250224@162613.1987 3sgu2i5vjt1kstui9o5pqpenok Query : use flama_phc
20250224@162613.1990 3sgu2i5vjt1kstui9o5pqpenok Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162613.2123 3sgu2i5vjt1kstui9o5pqpenok Query : use flama_phc
20250224@162613.2129 3sgu2i5vjt1kstui9o5pqpenok Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162613.2148 3sgu2i5vjt1kstui9o5pqpenok Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162613.2190 3sgu2i5vjt1kstui9o5pqpenok Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5507';
20250224@162613.2245 3sgu2i5vjt1kstui9o5pqpenok Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5507';
20250224@162613.2807 88c1hpdadepfl3651ci0225v2l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162613.2819 88c1hpdadepfl3651ci0225v2l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162613.2901 88c1hpdadepfl3651ci0225v2l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5508';
20250224@162613.2977 88c1hpdadepfl3651ci0225v2l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5508';
20250224@162613.3050 88c1hpdadepfl3651ci0225v2l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5508';
20250224@162613.3094 88c1hpdadepfl3651ci0225v2l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5508';
20250224@162613.3457 88c1hpdadepfl3651ci0225v2l Query : use flama_phc
20250224@162613.3498 88c1hpdadepfl3651ci0225v2l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162613.3575 88c1hpdadepfl3651ci0225v2l Query : use flama_phc
20250224@162613.3579 88c1hpdadepfl3651ci0225v2l Query : select no, estab,szadrsdesc from szadrs where u_coddest=4500
20250224@162613.3684 88c1hpdadepfl3651ci0225v2l Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501384 
20250224@162613.4266 88c1hpdadepfl3651ci0225v2l Query : use flama_phc
20250224@162613.4270 88c1hpdadepfl3651ci0225v2l Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162613.4306 88c1hpdadepfl3651ci0225v2l Query : use flama_phc
20250224@162613.4309 88c1hpdadepfl3651ci0225v2l Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162613.4361 88c1hpdadepfl3651ci0225v2l Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162613.4489 88c1hpdadepfl3651ci0225v2l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5508';
20250224@162613.4566 88c1hpdadepfl3651ci0225v2l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5508';
20250224@162613.5147 s0h0d1c3mtgqttchlr8oveh5ra Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162613.5159 s0h0d1c3mtgqttchlr8oveh5ra Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162613.5243 s0h0d1c3mtgqttchlr8oveh5ra Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5509';
20250224@162613.5325 s0h0d1c3mtgqttchlr8oveh5ra Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5509';
20250224@162613.5398 s0h0d1c3mtgqttchlr8oveh5ra Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5509';
20250224@162613.5475 s0h0d1c3mtgqttchlr8oveh5ra Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5509';
20250224@162613.5643 s0h0d1c3mtgqttchlr8oveh5ra Query : use flama_phc
20250224@162613.5647 s0h0d1c3mtgqttchlr8oveh5ra Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162613.5731 s0h0d1c3mtgqttchlr8oveh5ra Query : use flama_phc
20250224@162613.5737 s0h0d1c3mtgqttchlr8oveh5ra Query : select no, estab,szadrsdesc from szadrs where u_coddest=1328
20250224@162613.5871 s0h0d1c3mtgqttchlr8oveh5ra Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501385 
20250224@162613.6331 s0h0d1c3mtgqttchlr8oveh5ra Query : use flama_phc
20250224@162613.6335 s0h0d1c3mtgqttchlr8oveh5ra Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162613.6371 s0h0d1c3mtgqttchlr8oveh5ra Query : use flama_phc
20250224@162613.6375 s0h0d1c3mtgqttchlr8oveh5ra Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162613.6395 s0h0d1c3mtgqttchlr8oveh5ra Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162613.6425 s0h0d1c3mtgqttchlr8oveh5ra Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5509';
20250224@162613.6480 s0h0d1c3mtgqttchlr8oveh5ra Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5509';
20250224@162613.7351 vedru2192p2t4v009dnc0h69pk Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162613.7367 vedru2192p2t4v009dnc0h69pk Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162613.7626 vedru2192p2t4v009dnc0h69pk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5510';
20250224@162613.8225 vedru2192p2t4v009dnc0h69pk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5510';
20250224@162613.8677 vedru2192p2t4v009dnc0h69pk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5510';
20250224@162613.8923 vedru2192p2t4v009dnc0h69pk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5510';
20250224@162613.9004 vedru2192p2t4v009dnc0h69pk Query : use flama_phc
20250224@162613.9008 vedru2192p2t4v009dnc0h69pk Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162613.9155 vedru2192p2t4v009dnc0h69pk Query : use flama_phc
20250224@162613.9159 vedru2192p2t4v009dnc0h69pk Query : select no, estab,szadrsdesc from szadrs where u_coddest=9128
20250224@162613.9299 vedru2192p2t4v009dnc0h69pk Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501386 
20250224@162613.9773 vedru2192p2t4v009dnc0h69pk Query : use flama_phc
20250224@162613.9776 vedru2192p2t4v009dnc0h69pk Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162613.9807 vedru2192p2t4v009dnc0h69pk Query : use flama_phc
20250224@162613.9811 vedru2192p2t4v009dnc0h69pk Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162613.9827 vedru2192p2t4v009dnc0h69pk Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162613.9849 vedru2192p2t4v009dnc0h69pk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5510';
20250224@162613.9903 vedru2192p2t4v009dnc0h69pk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5510';
20250224@162614.4990 r3goh87mtl449o6hkjfvnb5qrp Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162614.5100 r3goh87mtl449o6hkjfvnb5qrp Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162614.6030 r3goh87mtl449o6hkjfvnb5qrp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5511';
20250224@162614.6810 r3goh87mtl449o6hkjfvnb5qrp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5511';
20250224@162614.7520 r3goh87mtl449o6hkjfvnb5qrp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5511';
20250224@162614.8100 r3goh87mtl449o6hkjfvnb5qrp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5511';
20250224@162614.8880 r3goh87mtl449o6hkjfvnb5qrp Query : use flama_phc
20250224@162614.8920 r3goh87mtl449o6hkjfvnb5qrp Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162614.9670 r3goh87mtl449o6hkjfvnb5qrp Query : use flama_phc
20250224@162614.9700 r3goh87mtl449o6hkjfvnb5qrp Query : select no, estab,szadrsdesc from szadrs where u_coddest=634
20250224@162614.1071 r3goh87mtl449o6hkjfvnb5qrp Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501387 
20250224@162614.1527 r3goh87mtl449o6hkjfvnb5qrp Query : use flama_phc
20250224@162614.1530 r3goh87mtl449o6hkjfvnb5qrp Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162614.1562 r3goh87mtl449o6hkjfvnb5qrp Query : use flama_phc
20250224@162614.1565 r3goh87mtl449o6hkjfvnb5qrp Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162614.1581 r3goh87mtl449o6hkjfvnb5qrp Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162614.1604 r3goh87mtl449o6hkjfvnb5qrp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5511';
20250224@162614.1657 r3goh87mtl449o6hkjfvnb5qrp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5511';
20250224@162614.2397 l50e97877hn3hdn1q04rduvn6p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162614.2452 l50e97877hn3hdn1q04rduvn6p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162614.2627 l50e97877hn3hdn1q04rduvn6p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5512';
20250224@162614.2715 l50e97877hn3hdn1q04rduvn6p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5512';
20250224@162614.2796 l50e97877hn3hdn1q04rduvn6p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5512';
20250224@162614.2852 l50e97877hn3hdn1q04rduvn6p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5512';
20250224@162614.2936 l50e97877hn3hdn1q04rduvn6p Query : use flama_phc
20250224@162614.2939 l50e97877hn3hdn1q04rduvn6p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162614.3004 l50e97877hn3hdn1q04rduvn6p Query : use flama_phc
20250224@162614.3007 l50e97877hn3hdn1q04rduvn6p Query : select no, estab,szadrsdesc from szadrs where u_coddest=3080
20250224@162614.3106 l50e97877hn3hdn1q04rduvn6p Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501388 
20250224@162614.3602 l50e97877hn3hdn1q04rduvn6p Query : use flama_phc
20250224@162614.3645 l50e97877hn3hdn1q04rduvn6p Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162614.4003 l50e97877hn3hdn1q04rduvn6p Query : use flama_phc
20250224@162614.4008 l50e97877hn3hdn1q04rduvn6p Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162614.4026 l50e97877hn3hdn1q04rduvn6p Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162614.4048 l50e97877hn3hdn1q04rduvn6p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5512';
20250224@162614.4101 l50e97877hn3hdn1q04rduvn6p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5512';
20250224@162614.5143 a2ep4k82anqdcq3g773dp746e3 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@162614.5154 a2ep4k82anqdcq3g773dp746e3 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@162614.5244 a2ep4k82anqdcq3g773dp746e3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5513';
20250224@162614.5337 a2ep4k82anqdcq3g773dp746e3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5513';
20250224@162614.5414 a2ep4k82anqdcq3g773dp746e3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5513';
20250224@162614.5680 a2ep4k82anqdcq3g773dp746e3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5513';
20250224@162614.5769 a2ep4k82anqdcq3g773dp746e3 Query : use flama_phc
20250224@162614.5773 a2ep4k82anqdcq3g773dp746e3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@162614.5842 a2ep4k82anqdcq3g773dp746e3 Query : use flama_phc
20250224@162614.5845 a2ep4k82anqdcq3g773dp746e3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=6600
20250224@162614.5940 a2ep4k82anqdcq3g773dp746e3 Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501389 
20250224@162614.6583 a2ep4k82anqdcq3g773dp746e3 Query : use flama_phc
20250224@162614.6589 a2ep4k82anqdcq3g773dp746e3 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@162614.6620 a2ep4k82anqdcq3g773dp746e3 Query : use flama_phc
20250224@162614.6623 a2ep4k82anqdcq3g773dp746e3 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@162614.6661 a2ep4k82anqdcq3g773dp746e3 Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@162614.6686 a2ep4k82anqdcq3g773dp746e3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5513';
20250224@162614.6746 a2ep4k82anqdcq3g773dp746e3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5513';
20250224@163625.9682 07nkh69rffus3c3sb18q8gtp9f Query : use flama_phc
20250224@163625.9688 07nkh69rffus3c3sb18q8gtp9f Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@163625.9976 07nkh69rffus3c3sb18q8gtp9f Query : use flama_phc
20250224@163625.9981 07nkh69rffus3c3sb18q8gtp9f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@171926.3829 cg3b1a3488qfa067fupa23s825 Query : use flama_phc
20250224@171926.3930 cg3b1a3488qfa067fupa23s825 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@171926.4072 cg3b1a3488qfa067fupa23s825 Query : use flama_phc
20250224@171926.4076 cg3b1a3488qfa067fupa23s825 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@173626.1885 vtdhe87712nof9b30j4afejptg Query : use flama_phc
20250224@173626.1890 vtdhe87712nof9b30j4afejptg Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@173626.1993 vtdhe87712nof9b30j4afejptg Query : use flama_phc
20250224@173626.1997 vtdhe87712nof9b30j4afejptg Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@174724.6063 lferjvtgosi376ngd5p671iqdc Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250224@174724.6247 lferjvtgosi376ngd5p671iqdc Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250224@174724.6823 lferjvtgosi376ngd5p671iqdc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5514';
20250224@174724.7267 lferjvtgosi376ngd5p671iqdc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5514';
20250224@174724.7629 lferjvtgosi376ngd5p671iqdc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5514';
20250224@174724.7943 lferjvtgosi376ngd5p671iqdc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5514';
20250224@174724.8309 lferjvtgosi376ngd5p671iqdc Query : use flama_phc
20250224@174724.8351 lferjvtgosi376ngd5p671iqdc Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250224@174725.5430 lferjvtgosi376ngd5p671iqdc Query : use flama_phc
20250224@174725.5830 lferjvtgosi376ngd5p671iqdc Query : select no, estab,szadrsdesc from szadrs where u_coddest=416
20250224@174725.9420 lferjvtgosi376ngd5p671iqdc Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2013 and bo.obrano = 2501390 
20250224@174725.1955 lferjvtgosi376ngd5p671iqdc Query : use flama_phc
20250224@174725.1997 lferjvtgosi376ngd5p671iqdc Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250224@174725.2145 lferjvtgosi376ngd5p671iqdc Query : use flama_phc
20250224@174725.2164 lferjvtgosi376ngd5p671iqdc Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250224@174725.2192 lferjvtgosi376ngd5p671iqdc Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250224@174725.2241 lferjvtgosi376ngd5p671iqdc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5514';
20250224@174725.2301 lferjvtgosi376ngd5p671iqdc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5514';
20250224@181908.9056 2f4r8e87pr36t3i67tijp59jui Query : use flama_phc
20250224@181908.9061 2f4r8e87pr36t3i67tijp59jui Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@181908.9160 2f4r8e87pr36t3i67tijp59jui Query : use flama_phc
20250224@181908.9164 2f4r8e87pr36t3i67tijp59jui Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@183608.8613 i7qg1grat1of2tpn3l47uet41g Query : use flama_phc
20250224@183608.8618 i7qg1grat1of2tpn3l47uet41g Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@183608.8710 i7qg1grat1of2tpn3l47uet41g Query : use flama_phc
20250224@183608.8717 i7qg1grat1of2tpn3l47uet41g Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@191910.7465 5cjrmvdmd94b2s1e2jhjq0ajui Query : use flama_phc
20250224@191910.7470 5cjrmvdmd94b2s1e2jhjq0ajui Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@191910.7874 5cjrmvdmd94b2s1e2jhjq0ajui Query : use flama_phc
20250224@191910.7878 5cjrmvdmd94b2s1e2jhjq0ajui Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@193610.3712 gjqcqleq79rn4pgpm6spslr5vl Query : use flama_phc
20250224@193610.3715 gjqcqleq79rn4pgpm6spslr5vl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@193610.3796 gjqcqleq79rn4pgpm6spslr5vl Query : use flama_phc
20250224@193610.3799 gjqcqleq79rn4pgpm6spslr5vl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@201909.5099 j3i83jvf99mm3323svkgtamfge Query : use flama_phc
20250224@201909.5103 j3i83jvf99mm3323svkgtamfge Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@201909.5333 j3i83jvf99mm3323svkgtamfge Query : use flama_phc
20250224@201909.5352 j3i83jvf99mm3323svkgtamfge Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@203609.3523 nsth3ufm71em200jmjmk1nn1ba Query : use flama_phc
20250224@203609.3527 nsth3ufm71em200jmjmk1nn1ba Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@203609.3718 nsth3ufm71em200jmjmk1nn1ba Query : use flama_phc
20250224@203609.3722 nsth3ufm71em200jmjmk1nn1ba Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@211909.6477 htbhbjmm5inokmi3nnkrkgk8vk Query : use flama_phc
20250224@211909.6481 htbhbjmm5inokmi3nnkrkgk8vk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@211909.6561 htbhbjmm5inokmi3nnkrkgk8vk Query : use flama_phc
20250224@211909.6564 htbhbjmm5inokmi3nnkrkgk8vk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@213609.8503 cpmho8eumrjch2j7pohcll90n3 Query : use flama_phc
20250224@213609.8506 cpmho8eumrjch2j7pohcll90n3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@213609.8636 cpmho8eumrjch2j7pohcll90n3 Query : use flama_phc
20250224@213609.8640 cpmho8eumrjch2j7pohcll90n3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@221909.6460 outmouni3lhoh3tcan8bn3viuf Query : use flama_phc
20250224@221909.6466 outmouni3lhoh3tcan8bn3viuf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@221909.6559 outmouni3lhoh3tcan8bn3viuf Query : use flama_phc
20250224@221909.6563 outmouni3lhoh3tcan8bn3viuf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@223609.9827 2511rjr5tqudou4vcccksp4psq Query : use flama_phc
20250224@223609.9831 2511rjr5tqudou4vcccksp4psq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@223609.9919 2511rjr5tqudou4vcccksp4psq Query : use flama_phc
20250224@223609.9922 2511rjr5tqudou4vcccksp4psq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@231909.3405 82onttpig3400g149al6ahk87e Query : use flama_phc
20250224@231909.3410 82onttpig3400g149al6ahk87e Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@231909.3525 82onttpig3400g149al6ahk87e Query : use flama_phc
20250224@231909.3529 82onttpig3400g149al6ahk87e Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250224@233609.6701 vlddadqf2bltu79glc4bmd7kgt Query : use flama_phc
20250224@233609.6705 vlddadqf2bltu79glc4bmd7kgt Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250224@233609.6791 vlddadqf2bltu79glc4bmd7kgt Query : use flama_phc
20250224@233609.6795 vlddadqf2bltu79glc4bmd7kgt Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@071909.9202 vk8d5jn6qblfln8j1e3c7rsbte Query : use flama_phc
20250225@071909.9207 vk8d5jn6qblfln8j1e3c7rsbte Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@071909.9350 vk8d5jn6qblfln8j1e3c7rsbte Query : use flama_phc
20250225@071909.9354 vk8d5jn6qblfln8j1e3c7rsbte Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@073633.6921 6cipj6ok493pmel5khefcuucqi Query : use flama_phc
20250225@073633.6926 6cipj6ok493pmel5khefcuucqi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@073633.7019 6cipj6ok493pmel5khefcuucqi Query : use flama_phc
20250225@073633.7023 6cipj6ok493pmel5khefcuucqi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@081910.1000 6tcpf112bjpsme19ckvjo7flbe Query : use flama_phc
20250225@081910.1600 6tcpf112bjpsme19ckvjo7flbe Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@081910.1640 6tcpf112bjpsme19ckvjo7flbe Query : use flama_phc
20250225@081910.1680 6tcpf112bjpsme19ckvjo7flbe Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@083609.7990 0e49qf6vf6g2e46lljr9qjrose Query : use flama_phc
20250225@083609.7996 0e49qf6vf6g2e46lljr9qjrose Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@083609.8106 0e49qf6vf6g2e46lljr9qjrose Query : use flama_phc
20250225@083609.8110 0e49qf6vf6g2e46lljr9qjrose Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@091912.1109 mq4t0v9rppo1b6ei8m064rjsnq Query : use flama_phc
20250225@091912.1114 mq4t0v9rppo1b6ei8m064rjsnq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@091912.1293 mq4t0v9rppo1b6ei8m064rjsnq Query : use flama_phc
20250225@091912.1296 mq4t0v9rppo1b6ei8m064rjsnq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@093612.5430 tfenpfci64to1amacljpp1nttk Query : use flama_phc
20250225@093612.5480 tfenpfci64to1amacljpp1nttk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@093612.7080 tfenpfci64to1amacljpp1nttk Query : use flama_phc
20250225@093612.7130 tfenpfci64to1amacljpp1nttk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@101909.5795 fphi31d097hvjad5bssjmja6j5 Query : use flama_phc
20250225@101909.5799 fphi31d097hvjad5bssjmja6j5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@101909.5881 fphi31d097hvjad5bssjmja6j5 Query : use flama_phc
20250225@101909.5883 fphi31d097hvjad5bssjmja6j5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@103610.1635 qpec5uqcmpc1rsufu3ba77f4o8 Query : use flama_phc
20250225@103610.1639 qpec5uqcmpc1rsufu3ba77f4o8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@103610.1728 qpec5uqcmpc1rsufu3ba77f4o8 Query : use flama_phc
20250225@103610.1732 qpec5uqcmpc1rsufu3ba77f4o8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@111909.4260 mqfk713cofic4uk1ua50tt094e Query : use flama_phc
20250225@111909.4271 mqfk713cofic4uk1ua50tt094e Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@111909.5011 mqfk713cofic4uk1ua50tt094e Query : use flama_phc
20250225@111909.5054 mqfk713cofic4uk1ua50tt094e Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@112305.8482 832vvnd6sg540hhgqks11p6ng6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@112305.8514 832vvnd6sg540hhgqks11p6ng6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@112305.9001 832vvnd6sg540hhgqks11p6ng6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5515';
20250225@112305.9087 832vvnd6sg540hhgqks11p6ng6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5515';
20250225@112305.9196 832vvnd6sg540hhgqks11p6ng6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5515';
20250225@112305.9253 832vvnd6sg540hhgqks11p6ng6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5515';
20250225@112305.9319 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112305.9324 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@112305.9843 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2237.00.1'
20250225@112305.9992 832vvnd6sg540hhgqks11p6ng6 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 = 2401385 and bi.ref ='324.2237.00.1' and bi.lordem =20000
20250225@112306.3480 832vvnd6sg540hhgqks11p6ng6 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 = 'cps24111353603,552000002 ' 
20250225@112306.7170 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112306.7210 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@112306.8270 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112306.8300 832vvnd6sg540hhgqks11p6ng6 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')
20250225@112306.9080 832vvnd6sg540hhgqks11p6ng6 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
20250225@112306.1079 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112306.1082 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 ~inactivo valor from fl where no = '202525' and estab = 00 order by inactivo desc
20250225@112306.1222 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112306.1225 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from ts where ndos = 61
20250225@112306.1304 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112306.1760 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@112306.1834 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112306.1850 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@112306.1868 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112306.1886 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@112306.1896 832vvnd6sg540hhgqks11p6ng6 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
20250225@112306.2037 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@112306.2158 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@112306.2181 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112306.2188 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202525' and estab=00
20250225@112306.2279 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112306.2297 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@112306.2340 832vvnd6sg540hhgqks11p6ng6 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bda4714167bda81a35',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@112306.2411 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112306.2429 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@112306.2465 832vvnd6sg540hhgqks11p6ng6 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bda4714167bda81a35','--','bo',1.0873362445414847161 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@112306.2677 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112306.2706 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@112306.2723 832vvnd6sg540hhgqks11p6ng6 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 ('aut67bda4714167bda81a35','guia r. fornecedor','2025-02-25',61,2500741,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@112310.6943 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112310.7005 832vvnd6sg540hhgqks11p6ng6 Query : select st.usalote valor from st where st.ref = '324.2237.00.1'
20250225@112310.7315 832vvnd6sg540hhgqks11p6ng6 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.2237.00.1'
20250225@112310.7469 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112310.7486 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@112310.7501 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112310.7515 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@112310.7525 832vvnd6sg540hhgqks11p6ng6 Query : select sestamp valor from se where ref ='324.2237.00.1' and lote = 'r2401385200a'
20250225@112310.7585 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112310.7600 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250225@112310.7612 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112310.7628 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250225@112310.7644 832vvnd6sg540hhgqks11p6ng6 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bda9239267bda81eb9',?,?,'20250225',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250225@112310.8810 832vvnd6sg540hhgqks11p6ng6 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250225@112310.8866 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112310.8883 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@112310.8898 832vvnd6sg540hhgqks11p6ng6 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bda1531867bda81ed8','aut67bda4714167bda81a35',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 = 'aut67bda4714167bda81a35'
20250225@112310.9304 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@112310.9326 832vvnd6sg540hhgqks11p6ng6 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@112310.9346 832vvnd6sg540hhgqks11p6ng6 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 'aut67bda1531867bda81ed8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1420, 1420*.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 ,11.45,11.45*200.48,11.45,11.45*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,11.45*1420,11.45*1420*200.48 ,.000000,.000000*200.48 ,.000000,.000000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,11.45,11.45*200.48,11.45*1420,11.45*1420*200.48,'cps24111353603,552000002 ',12.45,12.45*1420,12.45,12.45*1420,?,?,?,4 from bo bo where bo.bostamp = 'aut67bda4714167bda81a35'
20250225@112320.4083 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112320.4089 832vvnd6sg540hhgqks11p6ng6 Query : declare @bostamp varchar(25) = 'aut67bda4714167bda81a35' ,@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 
20250225@112333.3479 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112333.3483 832vvnd6sg540hhgqks11p6ng6 Query : select 1 valor from bo where bo.bostamp = 'aut67bda4714167bda81a35'
20250225@112333.3578 832vvnd6sg540hhgqks11p6ng6 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) = 'aut67bda4714167bda81a35' 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 
20250225@112335.4970 832vvnd6sg540hhgqks11p6ng6 Query : use flama_phc
20250225@112335.4974 832vvnd6sg540hhgqks11p6ng6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@112335.5036 832vvnd6sg540hhgqks11p6ng6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5515';
20250225@112335.5094 832vvnd6sg540hhgqks11p6ng6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5515';
20250225@113609.7967 mdkrgfajig24ihomgembgnhcu6 Query : use flama_phc
20250225@113609.7971 mdkrgfajig24ihomgembgnhcu6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@113609.8063 mdkrgfajig24ihomgembgnhcu6 Query : use flama_phc
20250225@113609.8066 mdkrgfajig24ihomgembgnhcu6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@115559.2840 5bea4ol67bt3k19okjivdjso5j Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@115559.2882 5bea4ol67bt3k19okjivdjso5j Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@115559.3065 5bea4ol67bt3k19okjivdjso5j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5516';
20250225@115559.3175 5bea4ol67bt3k19okjivdjso5j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5516';
20250225@115559.3279 5bea4ol67bt3k19okjivdjso5j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5516';
20250225@115559.3347 5bea4ol67bt3k19okjivdjso5j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5516';
20250225@115559.3409 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115559.3412 5bea4ol67bt3k19okjivdjso5j Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@115559.3545 5bea4ol67bt3k19okjivdjso5j Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1847.00.1'
20250225@115559.3687 5bea4ol67bt3k19okjivdjso5j 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 = 2401188 and bi.ref ='324.1847.00.1' and bi.lordem =20000
20250225@115559.4095 5bea4ol67bt3k19okjivdjso5j 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 = 'cps24101846251,668000002 ' 
20250225@115559.4470 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115559.4473 5bea4ol67bt3k19okjivdjso5j Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@115559.4602 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115559.4605 5bea4ol67bt3k19okjivdjso5j 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')
20250225@115559.4671 5bea4ol67bt3k19okjivdjso5j 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
20250225@115559.4884 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115559.4887 5bea4ol67bt3k19okjivdjso5j Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20250225@115559.5032 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115559.5035 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from ts where ndos = 61
20250225@115559.5148 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115559.5499 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@115559.5541 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115559.5557 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@115559.5567 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115559.5582 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@115559.5591 5bea4ol67bt3k19okjivdjso5j 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
20250225@115559.5760 5bea4ol67bt3k19okjivdjso5j Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@115559.5870 5bea4ol67bt3k19okjivdjso5j Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@115559.5890 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115559.5897 5bea4ol67bt3k19okjivdjso5j Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20250225@115559.6008 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115559.6027 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@115559.6067 5bea4ol67bt3k19okjivdjso5j Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bda3307267bdafcf8f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@115559.6133 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115559.6171 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@115559.6187 5bea4ol67bt3k19okjivdjso5j Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bda3307267bdafcf8f','--','bo',7.8614173228346456692 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@115559.6419 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115559.6447 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@115559.6468 5bea4ol67bt3k19okjivdjso5j 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 ('aut67bda3307267bdafcf8f','guia r. fornecedor','2025-02-25',61,2500743,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@115604.1904 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@115604.1908 5bea4ol67bt3k19okjivdjso5j Query : select st.usalote valor from st where st.ref = '324.1847.00.1'
20250225@115604.2083 5bea4ol67bt3k19okjivdjso5j 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'
20250225@115604.2289 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115604.2324 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@115604.2352 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115604.2380 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@115604.2399 5bea4ol67bt3k19okjivdjso5j Query : select sestamp valor from se where ref ='324.1847.00.1' and lote = 'r2401188200a'
20250225@115604.2493 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115604.2520 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250225@115604.2534 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115604.2574 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250225@115604.2602 5bea4ol67bt3k19okjivdjso5j Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bda1930267bdafd43d',?,?,'20250225',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250225@115604.3284 5bea4ol67bt3k19okjivdjso5j Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250225@115604.3343 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115604.3364 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@115604.3378 5bea4ol67bt3k19okjivdjso5j Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bda8402367bdafd451','aut67bda3307267bdafcf8f',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 = 'aut67bda3307267bdafcf8f'
20250225@115604.3559 5bea4ol67bt3k19okjivdjso5j Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115604.3579 5bea4ol67bt3k19okjivdjso5j Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@115604.3614 5bea4ol67bt3k19okjivdjso5j 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 'aut67bda8402367bdafd451',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.4,25.4*200.48,25.4,25.4*200.48 ,0,0,'un ','' ,bo.marcada,1 ,25.4*1336,25.4*1336*200.48 ,27.170000,27.170000*200.48 ,27.170000,27.170000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,25.4,25.4*200.48,25.4*1336,25.4*1336*200.48,'cps24101846251,668000002 ',199.68,199.68*1336,199.68,199.68*1336,?,?,?,4 from bo bo where bo.bostamp = 'aut67bda3307267bdafcf8f'
20250225@115809.3628 ktncdfafl6pc87qe6hrgkq2fm7 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@115809.3714 ktncdfafl6pc87qe6hrgkq2fm7 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@115809.3834 ktncdfafl6pc87qe6hrgkq2fm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5517';
20250225@115809.4020 ktncdfafl6pc87qe6hrgkq2fm7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5517';
20250225@115809.4100 ktncdfafl6pc87qe6hrgkq2fm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5517';
20250225@115809.4144 ktncdfafl6pc87qe6hrgkq2fm7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5517';
20250225@115809.4201 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@115809.4205 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@115809.4269 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1847.00.1'
20250225@115809.4289 ktncdfafl6pc87qe6hrgkq2fm7 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 = 2401188 and bi.ref ='324.1847.00.1' and bi.lordem =20000
20250225@115809.4312 ktncdfafl6pc87qe6hrgkq2fm7 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 = 'cps24101846251,668000002 ' 
20250225@115809.4345 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@115809.4349 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@115809.4386 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@115809.4389 ktncdfafl6pc87qe6hrgkq2fm7 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')
20250225@115809.4417 ktncdfafl6pc87qe6hrgkq2fm7 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
20250225@115809.4452 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@115809.4455 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20250225@115809.4505 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@115809.4508 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from ts where ndos = 61
20250225@115809.4539 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115809.4558 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@115809.4570 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115809.4586 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@115809.4596 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115809.4613 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@115809.4623 ktncdfafl6pc87qe6hrgkq2fm7 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
20250225@115809.4642 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@115809.4664 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@115809.4687 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@115809.4694 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20250225@115809.4715 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115809.4732 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@115809.4746 ktncdfafl6pc87qe6hrgkq2fm7 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdb6187767bdb05172',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@115809.4751 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115809.4768 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@115809.4780 ktncdfafl6pc87qe6hrgkq2fm7 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdb6187767bdb05172','--','bo',7.8614173228346456692 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@115809.4785 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@115809.4800 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@115809.4811 ktncdfafl6pc87qe6hrgkq2fm7 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 ('aut67bdb6187767bdb05172','guia r. fornecedor','2025-02-25',61,2500743,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@121909.4955 tm84kkjre02dc66ui0f072pl11 Query : use flama_phc
20250225@121909.4959 tm84kkjre02dc66ui0f072pl11 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@121909.5054 tm84kkjre02dc66ui0f072pl11 Query : use flama_phc
20250225@121909.5058 tm84kkjre02dc66ui0f072pl11 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@122028.3212 vtvfv5kgoesflvolovu5j7uun5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@122028.3227 vtvfv5kgoesflvolovu5j7uun5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@122028.3361 vtvfv5kgoesflvolovu5j7uun5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5518';
20250225@122028.3460 vtvfv5kgoesflvolovu5j7uun5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5518';
20250225@122028.3547 vtvfv5kgoesflvolovu5j7uun5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5518';
20250225@122028.3666 vtvfv5kgoesflvolovu5j7uun5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5518';
20250225@122028.3743 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@122028.3747 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@122028.3856 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@122028.3860 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@122028.3894 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@122028.3898 vtvfv5kgoesflvolovu5j7uun5 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')
20250225@122028.3932 vtvfv5kgoesflvolovu5j7uun5 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
20250225@122028.3973 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@122028.3976 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20250225@122028.4053 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@122028.4057 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from ts where ndos = 61
20250225@122028.4073 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122028.4094 vtvfv5kgoesflvolovu5j7uun5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@122028.4105 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122028.4125 vtvfv5kgoesflvolovu5j7uun5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@122028.4137 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122028.4155 vtvfv5kgoesflvolovu5j7uun5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@122028.4167 vtvfv5kgoesflvolovu5j7uun5 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
20250225@122028.4237 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@122028.4260 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@122028.4282 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@122028.4290 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20250225@122028.4310 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122028.4331 vtvfv5kgoesflvolovu5j7uun5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@122028.4346 vtvfv5kgoesflvolovu5j7uun5 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdb8678667bdb58c68',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@122028.4352 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122028.4375 vtvfv5kgoesflvolovu5j7uun5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@122028.4410 vtvfv5kgoesflvolovu5j7uun5 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdb8678667bdb58c68','--','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@122028.4650 vtvfv5kgoesflvolovu5j7uun5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122028.4674 vtvfv5kgoesflvolovu5j7uun5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@122028.4725 vtvfv5kgoesflvolovu5j7uun5 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 ('aut67bdb8678667bdb58c68','guia r. fornecedor','2025-02-25',61,2500743,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@122238.3533 1jjqgvkmtc00vetgi655uajq8d Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@122238.3550 1jjqgvkmtc00vetgi655uajq8d Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@122238.3647 1jjqgvkmtc00vetgi655uajq8d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5519';
20250225@122238.3747 1jjqgvkmtc00vetgi655uajq8d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5519';
20250225@122238.3830 1jjqgvkmtc00vetgi655uajq8d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5519';
20250225@122238.3887 1jjqgvkmtc00vetgi655uajq8d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5519';
20250225@122238.3951 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@122238.3956 1jjqgvkmtc00vetgi655uajq8d Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@122238.4039 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@122238.4043 1jjqgvkmtc00vetgi655uajq8d Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@122238.4077 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@122238.4081 1jjqgvkmtc00vetgi655uajq8d 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')
20250225@122238.4114 1jjqgvkmtc00vetgi655uajq8d 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
20250225@122238.4155 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@122238.4159 1jjqgvkmtc00vetgi655uajq8d Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20250225@122238.4219 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@122238.4223 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from ts where ndos = 61
20250225@122238.4239 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122238.4260 1jjqgvkmtc00vetgi655uajq8d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@122238.4271 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122238.4289 1jjqgvkmtc00vetgi655uajq8d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@122238.4301 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122238.4319 1jjqgvkmtc00vetgi655uajq8d Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@122238.4329 1jjqgvkmtc00vetgi655uajq8d 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
20250225@122238.4347 1jjqgvkmtc00vetgi655uajq8d Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@122238.4369 1jjqgvkmtc00vetgi655uajq8d Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@122238.4391 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@122238.4398 1jjqgvkmtc00vetgi655uajq8d Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20250225@122238.4416 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122238.4433 1jjqgvkmtc00vetgi655uajq8d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@122238.4447 1jjqgvkmtc00vetgi655uajq8d Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdb8036567bdb60e6b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@122238.4453 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122238.4470 1jjqgvkmtc00vetgi655uajq8d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@122238.4482 1jjqgvkmtc00vetgi655uajq8d Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdb8036567bdb60e6b','--','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@122238.4488 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@122238.4506 1jjqgvkmtc00vetgi655uajq8d Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@122238.4519 1jjqgvkmtc00vetgi655uajq8d 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 ('aut67bdb8036567bdb60e6b','guia r. fornecedor','2025-02-25',61,2500743,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@123609.5670 l7ljh50ps1bv8ecc548hbgpho3 Query : use flama_phc
20250225@123609.5675 l7ljh50ps1bv8ecc548hbgpho3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@123609.5783 l7ljh50ps1bv8ecc548hbgpho3 Query : use flama_phc
20250225@123609.5786 l7ljh50ps1bv8ecc548hbgpho3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@131006.2373 jclha2a6rng23l3fgmo4uplo9e Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@131006.2401 jclha2a6rng23l3fgmo4uplo9e Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@131006.2533 jclha2a6rng23l3fgmo4uplo9e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5520';
20250225@131006.2633 jclha2a6rng23l3fgmo4uplo9e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5520';
20250225@131006.2735 jclha2a6rng23l3fgmo4uplo9e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5520';
20250225@131006.2793 jclha2a6rng23l3fgmo4uplo9e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5520';
20250225@131006.2857 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131006.2861 jclha2a6rng23l3fgmo4uplo9e Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@131006.2987 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131006.2991 jclha2a6rng23l3fgmo4uplo9e Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@131006.3095 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131006.3099 jclha2a6rng23l3fgmo4uplo9e 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')
20250225@131006.3166 jclha2a6rng23l3fgmo4uplo9e 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
20250225@131006.3402 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131006.3410 jclha2a6rng23l3fgmo4uplo9e Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20250225@131006.3547 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131006.3551 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from ts where ndos = 61
20250225@131006.3660 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131006.4081 jclha2a6rng23l3fgmo4uplo9e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@131006.4128 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131006.4155 jclha2a6rng23l3fgmo4uplo9e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@131006.4168 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131006.4191 jclha2a6rng23l3fgmo4uplo9e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@131006.4204 jclha2a6rng23l3fgmo4uplo9e 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
20250225@131006.4350 jclha2a6rng23l3fgmo4uplo9e Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@131006.4487 jclha2a6rng23l3fgmo4uplo9e Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@131006.4519 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131006.4527 jclha2a6rng23l3fgmo4uplo9e Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20250225@131006.4970 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131006.4990 jclha2a6rng23l3fgmo4uplo9e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@131006.5278 jclha2a6rng23l3fgmo4uplo9e Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdc9316267bdc12e6e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@131006.5407 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131006.5500 jclha2a6rng23l3fgmo4uplo9e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@131006.5514 jclha2a6rng23l3fgmo4uplo9e Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdc9316267bdc12e6e','--','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@131006.5523 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131006.5611 jclha2a6rng23l3fgmo4uplo9e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@131006.5735 jclha2a6rng23l3fgmo4uplo9e 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 ('aut67bdc9316267bdc12e6e','guia r. fornecedor','2025-02-25',61,2500745,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@131010.8595 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131010.8599 jclha2a6rng23l3fgmo4uplo9e Query : declare @bostamp varchar(25) = 'aut67bdc9316267bdc12e6e' ,@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 
20250225@131017.4580 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131017.4584 jclha2a6rng23l3fgmo4uplo9e Query : select 1 valor from bo where bo.bostamp = 'aut67bdc9316267bdc12e6e'
20250225@131017.4683 jclha2a6rng23l3fgmo4uplo9e 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) = 'aut67bdc9316267bdc12e6e' 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 
20250225@131019.8014 jclha2a6rng23l3fgmo4uplo9e Query : use flama_phc
20250225@131019.8018 jclha2a6rng23l3fgmo4uplo9e Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@131019.8085 jclha2a6rng23l3fgmo4uplo9e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5520';
20250225@131019.8134 jclha2a6rng23l3fgmo4uplo9e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5520';
20250225@131243.5472 5bea4ol67bt3k19okjivdjso5j Query : use flama_phc
20250225@131243.5476 5bea4ol67bt3k19okjivdjso5j Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -110
20250225@131243.5483 5bea4ol67bt3k19okjivdjso5j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5516';
20250225@131246.2489 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@131246.2493 ktncdfafl6pc87qe6hrgkq2fm7 Query : select st.usalote valor from st where st.ref = '324.1847.00.1'
20250225@131246.2634 ktncdfafl6pc87qe6hrgkq2fm7 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'
20250225@131246.2781 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131246.2800 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@131246.2816 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131246.2831 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@131246.2843 ktncdfafl6pc87qe6hrgkq2fm7 Query : select sestamp valor from se where ref ='324.1847.00.1' and lote = 'r2401188200a'
20250225@131246.2898 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131246.2914 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250225@131246.2924 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131246.2939 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250225@131246.2952 ktncdfafl6pc87qe6hrgkq2fm7 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bdc5222567bdc1ce47',?,?,'20250225',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250225@131246.3933 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250225@131246.3978 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131246.3995 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@131246.4009 ktncdfafl6pc87qe6hrgkq2fm7 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bdc1592367bdc1ce61','aut67bdb6187767bdb05172',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 = 'aut67bdb6187767bdb05172'
20250225@131246.4188 ktncdfafl6pc87qe6hrgkq2fm7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@131246.4208 ktncdfafl6pc87qe6hrgkq2fm7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@131246.4235 ktncdfafl6pc87qe6hrgkq2fm7 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 'aut67bdc1592367bdc1ce61',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.4,25.4*200.48,25.4,25.4*200.48 ,0,0,'un ','' ,bo.marcada,1 ,25.4*1336,25.4*1336*200.48 ,27.170000,27.170000*200.48 ,27.170000,27.170000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,25.4,25.4*200.48,25.4*1336,25.4*1336*200.48,'cps24101846251,668000002 ',199.68,199.68*1336,199.68,199.68*1336,?,?,?,4 from bo bo where bo.bostamp = 'aut67bdb6187767bdb05172'
20250225@131250.8614 vtvfv5kgoesflvolovu5j7uun5 Query : use flama_phc
20250225@131250.8618 vtvfv5kgoesflvolovu5j7uun5 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -105
20250225@131250.8624 vtvfv5kgoesflvolovu5j7uun5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5518';
20250225@131350.5231 ktncdfafl6pc87qe6hrgkq2fm7 Query : use flama_phc
20250225@131350.5235 ktncdfafl6pc87qe6hrgkq2fm7 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -110
20250225@131350.5241 ktncdfafl6pc87qe6hrgkq2fm7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5517';
20250225@131350.5973 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@131350.6013 1jjqgvkmtc00vetgi655uajq8d Query : declare @bostamp varchar(25) = 'aut67bdb8036567bdb60e6b' ,@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 
20250225@131351.7260 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@131351.7670 1jjqgvkmtc00vetgi655uajq8d Query : select 1 valor from bo where bo.bostamp = 'aut67bdb8036567bdb60e6b'
20250225@131351.1023 1jjqgvkmtc00vetgi655uajq8d 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) = 'aut67bdb8036567bdb60e6b' 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 
20250225@131351.6995 1jjqgvkmtc00vetgi655uajq8d Query : use flama_phc
20250225@131351.7037 1jjqgvkmtc00vetgi655uajq8d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@131351.7453 1jjqgvkmtc00vetgi655uajq8d Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5519';
20250225@131351.8437 1jjqgvkmtc00vetgi655uajq8d Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5519';
20250225@131910.8220 9no9sip264mr31c7hs6htejbod Query : use flama_phc
20250225@131910.8260 9no9sip264mr31c7hs6htejbod Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@131910.9190 9no9sip264mr31c7hs6htejbod Query : use flama_phc
20250225@131910.9220 9no9sip264mr31c7hs6htejbod Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@133610.1121 d300fjdn4gpgvbt8q0a35q274b Query : use flama_phc
20250225@133610.1125 d300fjdn4gpgvbt8q0a35q274b Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@133610.1213 d300fjdn4gpgvbt8q0a35q274b Query : use flama_phc
20250225@133610.1216 d300fjdn4gpgvbt8q0a35q274b Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@141911.7890 ksdi8li2f1bshkq6rhv5co5pc1 Query : use flama_phc
20250225@141911.7950 ksdi8li2f1bshkq6rhv5co5pc1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@141911.9210 ksdi8li2f1bshkq6rhv5co5pc1 Query : use flama_phc
20250225@141911.9250 ksdi8li2f1bshkq6rhv5co5pc1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@143611.9200 i85p0b687nh6d7da5l3v54881d Query : use flama_phc
20250225@143611.9250 i85p0b687nh6d7da5l3v54881d Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@143611.1047 i85p0b687nh6d7da5l3v54881d Query : use flama_phc
20250225@143611.1050 i85p0b687nh6d7da5l3v54881d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@145629.2281 jokml89083agd86fvj9r3p8d6l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@145629.2303 jokml89083agd86fvj9r3p8d6l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@145629.2637 jokml89083agd86fvj9r3p8d6l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5521';
20250225@145629.2733 jokml89083agd86fvj9r3p8d6l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5521';
20250225@145629.2818 jokml89083agd86fvj9r3p8d6l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5521';
20250225@145629.2876 jokml89083agd86fvj9r3p8d6l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5521';
20250225@145629.2996 jokml89083agd86fvj9r3p8d6l Query : use flama_phc
20250225@145629.3000 jokml89083agd86fvj9r3p8d6l Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@145629.3078 jokml89083agd86fvj9r3p8d6l Query : use flama_phc
20250225@145629.3081 jokml89083agd86fvj9r3p8d6l Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20250225@145629.3188 jokml89083agd86fvj9r3p8d6l Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2014 and bo.obrano = 2501404 
20250225@145629.3691 jokml89083agd86fvj9r3p8d6l Query : use flama_phc
20250225@145629.3695 jokml89083agd86fvj9r3p8d6l Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250225@145629.3798 jokml89083agd86fvj9r3p8d6l Query : use flama_phc
20250225@145629.3802 jokml89083agd86fvj9r3p8d6l Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250225@145629.3889 jokml89083agd86fvj9r3p8d6l Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250225@145629.3937 jokml89083agd86fvj9r3p8d6l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5521';
20250225@145629.3992 jokml89083agd86fvj9r3p8d6l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5521';
20250225@145629.4606 7br5hjd58nvtqkukbejs2b6r7j Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@145629.4621 7br5hjd58nvtqkukbejs2b6r7j Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@145629.4842 7br5hjd58nvtqkukbejs2b6r7j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5522';
20250225@145629.5240 7br5hjd58nvtqkukbejs2b6r7j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5522';
20250225@145629.5338 7br5hjd58nvtqkukbejs2b6r7j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5522';
20250225@145629.5394 7br5hjd58nvtqkukbejs2b6r7j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5522';
20250225@145629.5475 7br5hjd58nvtqkukbejs2b6r7j Query : use flama_phc
20250225@145629.5478 7br5hjd58nvtqkukbejs2b6r7j Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@145629.5549 7br5hjd58nvtqkukbejs2b6r7j Query : use flama_phc
20250225@145629.5552 7br5hjd58nvtqkukbejs2b6r7j Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20250225@145629.5605 7br5hjd58nvtqkukbejs2b6r7j Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2014 and bo.obrano = 2501405 
20250225@145629.6597 7br5hjd58nvtqkukbejs2b6r7j Query : use flama_phc
20250225@145629.6601 7br5hjd58nvtqkukbejs2b6r7j Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250225@145629.6830 7br5hjd58nvtqkukbejs2b6r7j Query : use flama_phc
20250225@145629.6834 7br5hjd58nvtqkukbejs2b6r7j Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250225@145629.6850 7br5hjd58nvtqkukbejs2b6r7j Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250225@145629.6888 7br5hjd58nvtqkukbejs2b6r7j Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5522';
20250225@145629.6939 7br5hjd58nvtqkukbejs2b6r7j Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5522';
20250225@151909.2776 f1jhbdpldd93o3ft9q5flhdn8b Query : use flama_phc
20250225@151909.2781 f1jhbdpldd93o3ft9q5flhdn8b Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@151909.2923 f1jhbdpldd93o3ft9q5flhdn8b Query : use flama_phc
20250225@151909.2928 f1jhbdpldd93o3ft9q5flhdn8b Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@153609.5181 bl7o95qtscbujiv20i4rq4psch Query : use flama_phc
20250225@153609.5186 bl7o95qtscbujiv20i4rq4psch Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250225@153609.5283 bl7o95qtscbujiv20i4rq4psch Query : use flama_phc
20250225@153609.5287 bl7o95qtscbujiv20i4rq4psch Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250225@154449.8784 7fat50idq1f0if9lvbl7g4a62e Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250225@154449.8803 7fat50idq1f0if9lvbl7g4a62e Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250225@154449.9110 7fat50idq1f0if9lvbl7g4a62e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5523';
20250225@154449.9213 7fat50idq1f0if9lvbl7g4a62e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5523';
20250225@154449.9302 7fat50idq1f0if9lvbl7g4a62e Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5523';
20250225@154449.9348 7fat50idq1f0if9lvbl7g4a62e Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5523';
20250225@154449.9409 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154449.9413 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250225@154449.9498 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1406.00.1'
20250225@154449.9646 7fat50idq1f0if9lvbl7g4a62e 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 = 2401232 and bi.ref ='324.1406.00.1' and bi.lordem =20000
20250225@154450.3700 7fat50idq1f0if9lvbl7g4a62e 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 = 'cps24102932576,911000002 ' 
20250225@154450.4030 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1416.00.1'
20250225@154450.5530 7fat50idq1f0if9lvbl7g4a62e 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 = 2401232 and bi.ref ='324.1416.00.1' and bi.lordem =30000
20250225@154450.1057 7fat50idq1f0if9lvbl7g4a62e 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 = 'cps24102932577,176000003 ' 
20250225@154450.1450 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154450.1454 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 1 valor from ts where ts.ndos = 61
20250225@154450.1497 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154450.1500 7fat50idq1f0if9lvbl7g4a62e 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')
20250225@154450.1553 7fat50idq1f0if9lvbl7g4a62e 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
20250225@154450.1613 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154450.1617 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 ~inactivo valor from fl where no = '202406' and estab = 00 order by inactivo desc
20250225@154450.1753 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154450.1757 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from ts where ndos = 61
20250225@154450.1781 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154450.1835 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@154450.1889 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154450.1912 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@154450.1923 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154450.1943 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@154450.1953 7fat50idq1f0if9lvbl7g4a62e 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
20250225@154450.1983 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@154450.2012 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250225@154450.2036 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154450.2044 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202406' and estab=00
20250225@154450.2167 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154450.2187 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250225@154450.2207 7fat50idq1f0if9lvbl7g4a62e Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bde4552467bde57231',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@154450.2212 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154450.2228 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250225@154450.2241 7fat50idq1f0if9lvbl7g4a62e Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bde4552467bde57231','--','bo',1.0701373825018076644 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@154450.2473 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154450.2515 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250225@154450.2528 7fat50idq1f0if9lvbl7g4a62e 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 ('aut67bde4552467bde57231','guia r. fornecedor','2025-02-25',61,2500756,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250225@154453.5416 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154453.5421 7fat50idq1f0if9lvbl7g4a62e Query : select st.usalote valor from st where st.ref = '324.1406.00.1'
20250225@154453.5467 7fat50idq1f0if9lvbl7g4a62e 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.1406.00.1'
20250225@154453.5644 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154453.5664 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@154453.5679 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154453.5698 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@154453.5711 7fat50idq1f0if9lvbl7g4a62e Query : select sestamp valor from se where ref ='324.1406.00.1' and lote = 'r2401232200a'
20250225@154453.5727 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154453.5747 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250225@154453.5757 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154453.5776 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250225@154453.5790 7fat50idq1f0if9lvbl7g4a62e Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bde7186867bde5758c',?,?,'20250225',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250225@154453.6509 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250225@154453.6534 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154453.6555 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@154453.6570 7fat50idq1f0if9lvbl7g4a62e Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bde4616667bde5759f','aut67bde4552467bde57231',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 = 'aut67bde4552467bde57231'
20250225@154453.6773 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154453.6794 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@154453.6814 7fat50idq1f0if9lvbl7g4a62e 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 'aut67bde4616667bde5759f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1500, 1500*.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 ,9.4380405405405,9.4380405405405*200.48,9.4380405405405,9.4380405405405*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,9.4380405405405*1500,9.4380405405405*1500*200.48 ,10.378000,10.378000*200.48 ,10.378000,10.378000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,9.4380405405405,9.4380405405405*200.48,9.4380405405405*1500,9.4380405405405*1500*200.48,'cps24102932576,911000002 ',10.1,10.1*1500,10.1,10.1*1500,?,?,?,4 from bo bo where bo.bostamp = 'aut67bde4552467bde57231'
20250225@154517.8578 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154517.8584 7fat50idq1f0if9lvbl7g4a62e Query : select st.usalote valor from st where st.ref = '324.1416.00.1'
20250225@154517.8617 7fat50idq1f0if9lvbl7g4a62e 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.1416.00.1'
20250225@154517.8798 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154517.8818 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@154517.8832 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154517.8848 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@154517.8858 7fat50idq1f0if9lvbl7g4a62e Query : select sestamp valor from se where ref ='324.1416.00.1' and lote = 'r2401232300a'
20250225@154517.8873 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154517.8892 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250225@154517.8902 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154517.8920 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250225@154517.8933 7fat50idq1f0if9lvbl7g4a62e Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67bde2523567bde58dd9',?,?,'20250225',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250225@154517.8997 7fat50idq1f0if9lvbl7g4a62e Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250225@154517.9011 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154517.9028 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250225@154517.9040 7fat50idq1f0if9lvbl7g4a62e Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67bde5216867bde58ddc','aut67bde4552467bde57231',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 = 'aut67bde4552467bde57231'
20250225@154517.9220 7fat50idq1f0if9lvbl7g4a62e Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250225@154517.9239 7fat50idq1f0if9lvbl7g4a62e Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250225@154517.9257 7fat50idq1f0if9lvbl7g4a62e 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 'aut67bde5216867bde58ddc',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1000, 1000*.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,20000 ,13.83,13.83*200.48,13.83,13.83*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,13.83*1000,13.83*1000*200.48 ,16.035000,16.035000*200.48 ,16.035000,16.035000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,13.83,13.83*200.48,13.83*1000,13.83*1000*200.48,'cps24102932577,176000003 ',14.8,14.8*1000,14.8,14.8*1000,?,?,?,4 from bo bo where bo.bostamp = 'aut67bde4552467bde57231'
20250225@154518.1527 7fat50idq1f0if9lvbl7g4a62e Query : use flama_phc
20250225@154518.1532 7fat50idq1f0if9lvbl7g4a62e Query : declare @bostamp varchar(25) = 'aut67bde4552467bde57231' ,@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 
