20240820@110619.9558 02ftfegeb5tnfaf110d54d3aum INICIO DE FICHEIRO DE LOG :: /var/www/webservices/logs/website.sql.log
20240820@110619.9557 02ftfegeb5tnfaf110d54d3aum Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '327.8460.00.2'
20240820@110619.9724 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240820@110619.9746 02ftfegeb5tnfaf110d54d3aum Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240820@110619.9765 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240820@110619.9794 02ftfegeb5tnfaf110d54d3aum Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240820@110619.9807 02ftfegeb5tnfaf110d54d3aum Query : select sestamp valor from se where ref ='327.8460.00.2' and lote = 'r2400400100a'
20240820@110619.9876 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240820@110619.9895 02ftfegeb5tnfaf110d54d3aum Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240820@110619.9906 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240820@110619.9926 02ftfegeb5tnfaf110d54d3aum Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240820@110619.9941 02ftfegeb5tnfaf110d54d3aum Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c463003366c46a9bf1',?,?,'20240820',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240820@110620.1360 02ftfegeb5tnfaf110d54d3aum Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240820@110620.1790 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240820@110620.1970 02ftfegeb5tnfaf110d54d3aum Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240820@110620.2130 02ftfegeb5tnfaf110d54d3aum Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66c469371666c46a9c04','aut66c461040766c46a9bb9',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 = 'aut66c461040766c46a9bb9'
20240820@110620.4290 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240820@110620.4570 02ftfegeb5tnfaf110d54d3aum Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240820@110620.4810 02ftfegeb5tnfaf110d54d3aum 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 'aut66c469371666c46a9c04',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 48, 48*.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 ,254,254*200.48,254,254*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,254*48,254*48*200.48 ,261.647000,261.647000*200.48 ,261.647000,261.647000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,254,254*200.48,254*48,254*48*200.48,'cps24042431855,500000003 ',254,254*48,254,254*48,?,?,?,4 from bo bo where bo.bostamp = 'aut66c461040766c46a9bb9'
20240820@110620.2323 02ftfegeb5tnfaf110d54d3aum Query : use flama_phc
20240820@110620.2327 02ftfegeb5tnfaf110d54d3aum Query : declare @bostamp varchar(25) = 'aut66c461040766c46a9bb9' ,@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 
20240820@110620.6068 02ftfegeb5tnfaf110d54d3aum Query : use flama_phc
20240820@110620.6072 02ftfegeb5tnfaf110d54d3aum Query : select 1 valor from bo where bo.bostamp = 'aut66c461040766c46a9bb9'
20240820@110620.6186 02ftfegeb5tnfaf110d54d3aum 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) = 'aut66c461040766c46a9bb9' 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 
20240820@110620.8343 02ftfegeb5tnfaf110d54d3aum Query : use flama_phc
20240820@110620.8347 02ftfegeb5tnfaf110d54d3aum Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240820@110620.8417 02ftfegeb5tnfaf110d54d3aum Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1612';
20240820@110620.8447 02ftfegeb5tnfaf110d54d3aum Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1612';

20240821@073030.3649 120ak5tg34amcv7sd3cd53v4qe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1613';
20240821@073030.3716 120ak5tg34amcv7sd3cd53v4qe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1613';
20240821@073030.3746 120ak5tg34amcv7sd3cd53v4qe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1613';
20240821@073030.3797 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.3800 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240821@073030.3907 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.3910 120ak5tg34amcv7sd3cd53v4qe Query : select no, estab,szadrsdesc from szadrs where u_coddest=4804
20240821@073030.3994 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20240821@073030.4168 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240821@073030.4330 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240821@073030.4488 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4960.00.1'
20240821@073030.4521 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.4525 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240821@073030.4731 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.4736 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 1 valor from td where td.ndoc = 39
20240821@073030.4844 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.4848 120ak5tg34amcv7sd3cd53v4qe 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')
20240821@073030.4994 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240821@073030.5177 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.5181 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 ~inactivo valor from cl where no = '101900' and estab = 0 order by inactivo desc
20240821@073030.5334 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.5337 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240821@073030.5459 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.5463 120ak5tg34amcv7sd3cd53v4qe Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240821@073030.5539 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.5543 120ak5tg34amcv7sd3cd53v4qe Query : select szadrsstamp valor from szadrs where szadrsdesc='101900 - pd - alfena n/p'
20240821@073030.5629 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073030.5712 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from td where ndoc = 39
20240821@073030.5995 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240821@073030.6089 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073030.6395 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240821@073030.6482 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073030.6503 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240821@073030.6546 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073030.6565 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240821@073030.6584 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240821@073030.8391 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240821@073030.8532 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073030.8552 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240821@073030.8600 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c586596366c58986a0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240821@073030.8993 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073030.9036 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240821@073030.9076 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240821@073030.9194 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240821@073030.9302 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240821@073030.9398 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240821@073030.9481 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240821@073030.9567 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240821@073030.9666 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c586596366c58986a0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240821@073031.3080 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 fno valor from wsftdata order by fno desc
20240821@073031.4170 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.4370 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240821@073031.4680 120ak5tg34amcv7sd3cd53v4qe Query : select 'normal' from dummy
20240821@073031.5190 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c586596366c58986a0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',419,101900,0,'2024-08-21',39,'euro',0,0,2024 ,?,?)
20240821@073031.1190 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073031.1195 120ak5tg34amcv7sd3cd53v4qe Query : select st.usalote valor from st where st.ref = '304.422.00.07'
20240821@073031.1338 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.422.00.07'
20240821@073031.1512 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.1534 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.1568 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.1586 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.1622 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240821@073031.1811 120ak5tg34amcv7sd3cd53v4qe Query : select sestamp valor from se where ref ='304.422.00.07' and lote = '240647'
20240821@073031.1914 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.1933 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.1951 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c581390266c589872e','aut66c586596366c58986a0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240821@073031.2025 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.2049 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.2086 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c581390266c589872e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut66c586596366c58986a0' ,0,0 ,2,23.00,10000,?,?,?,?)
20240821@073031.2547 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073031.2552 120ak5tg34amcv7sd3cd53v4qe Query : select st.usalote valor from st where st.ref = '304.421.00.04'
20240821@073031.2579 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.421.00.04'
20240821@073031.2755 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.2778 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.2810 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.2828 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.2839 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240821@073031.2854 120ak5tg34amcv7sd3cd53v4qe Query : select sestamp valor from se where ref ='304.421.00.04' and lote = '240896'
20240821@073031.2882 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.2900 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.2916 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c581648566c5898746','aut66c586596366c58986a0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240821@073031.2921 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.2940 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.2974 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c581648566c5898746',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut66c586596366c58986a0' ,0,0 ,2,23.00,20000,?,?,?,?)
20240821@073031.3294 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.3314 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.3350 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.3369 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.3380 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240821@073031.3396 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.3413 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.3427 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c584992466c5898752','aut66c586596366c58986a0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240821@073031.3433 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.3451 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.3485 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c584992466c5898752',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c586596366c58986a0' ,0,0 ,2,23.00,30000,?,?,?)
20240821@073031.3828 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073031.3832 120ak5tg34amcv7sd3cd53v4qe Query : select st.usalote valor from st where st.ref = '324.4960.00.1'
20240821@073031.5215 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.4960.00.1'
20240821@073031.5383 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.5404 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.5433 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.5452 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.5462 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240821@073031.5478 120ak5tg34amcv7sd3cd53v4qe Query : select sestamp valor from se where ref ='324.4960.00.1' and lote = 'r2100754100a'
20240821@073031.5516 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.5533 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.5547 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c581731066c5898786','aut66c586596366c58986a0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240821@073031.5558 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.5576 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.5611 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c581731066c5898786',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut66c586596366c58986a0' ,0,0 ,2,23.00,50000,?,?,?,?)
20240821@073031.6069 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073031.6074 120ak5tg34amcv7sd3cd53v4qe Query : select st.usalote valor from st where st.ref = '324.4960.00.1'
20240821@073031.6099 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.4960.00.1'
20240821@073031.6117 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.6139 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.6168 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.6186 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.6198 120ak5tg34amcv7sd3cd53v4qe Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240821@073031.6212 120ak5tg34amcv7sd3cd53v4qe Query : select sestamp valor from se where ref ='324.4960.00.1' and lote = 'r2100754100a'
20240821@073031.6227 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.6246 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240821@073031.6262 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c585230766c5898798','aut66c586596366c58986a0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240821@073031.6267 120ak5tg34amcv7sd3cd53v4qe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@073031.6289 120ak5tg34amcv7sd3cd53v4qe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240821@073031.6324 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c585230766c5898798',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut66c586596366c58986a0' ,0,0 ,2,23.00,60000,?,?,?,?)
20240821@073031.6629 120ak5tg34amcv7sd3cd53v4qe Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c586596366c58986a0','2405471','wait',39,'adm09112754980.682000002')
20240821@073031.6751 120ak5tg34amcv7sd3cd53v4qe Query : use flama_phc
20240821@073031.6756 120ak5tg34amcv7sd3cd53v4qe Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240821@073031.6788 120ak5tg34amcv7sd3cd53v4qe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1613';
20240821@073031.6829 120ak5tg34amcv7sd3cd53v4qe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1613';
20240821@073031.6880 120ak5tg34amcv7sd3cd53v4qe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1613';
20240821@073031.6907 120ak5tg34amcv7sd3cd53v4qe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1613';

20240821@080030.8675 j66v2k74onciihn6e1dg7e2n0a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1614';
20240821@080030.8730 j66v2k74onciihn6e1dg7e2n0a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1614';
20240821@080030.8783 j66v2k74onciihn6e1dg7e2n0a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1614';
20240821@080030.8823 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080030.8828 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240821@080030.8936 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2335.00.1'
20240821@080030.9112 j66v2k74onciihn6e1dg7e2n0a 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 = 2400467 and bi.ref ='324.2335.00.1' and bi.lordem =15000
20240821@080030.9632 j66v2k74onciihn6e1dg7e2n0a 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 = 'cps24042941558,370000004 ' 
20240821@080031.8300 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080031.8700 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 1 valor from ts where ts.ndos = 61
20240821@080031.2280 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080031.2320 j66v2k74onciihn6e1dg7e2n0a 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')
20240821@080031.2660 j66v2k74onciihn6e1dg7e2n0a 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
20240821@080031.5330 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080031.5370 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 ~inactivo valor from fl where no = '202496' and estab = 00 order by inactivo desc
20240821@080031.8740 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080031.8790 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from ts where ndos = 61
20240821@080031.1043 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.1725 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240821@080031.1768 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.1787 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240821@080031.1798 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.1816 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240821@080031.1828 j66v2k74onciihn6e1dg7e2n0a 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
20240821@080031.2012 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240821@080031.2233 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240821@080031.2257 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080031.2264 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202496' and estab=00
20240821@080031.2394 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.2415 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240821@080031.2432 j66v2k74onciihn6e1dg7e2n0a Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c599470466c5908f37',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240821@080031.2555 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.2577 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240821@080031.2592 j66v2k74onciihn6e1dg7e2n0a Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c599470466c5908f37','--','bo',7.8651685393258426966 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240821@080031.2986 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.3057 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240821@080031.3073 j66v2k74onciihn6e1dg7e2n0a 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 ('aut66c599470466c5908f37','guia r. fornecedor','2024-08-21',61,2402311,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240821@080031.4432 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080031.4436 j66v2k74onciihn6e1dg7e2n0a Query : select st.usalote valor from st where st.ref = '324.2335.00.1'
20240821@080031.4468 j66v2k74onciihn6e1dg7e2n0a 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.2335.00.1'
20240821@080031.4694 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.4716 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240821@080031.4737 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.4756 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240821@080031.4768 j66v2k74onciihn6e1dg7e2n0a Query : select sestamp valor from se where ref ='324.2335.00.1' and lote = 'r2400467150a'
20240821@080031.4830 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.4851 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240821@080031.4864 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.4882 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240821@080031.4899 j66v2k74onciihn6e1dg7e2n0a Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c597278266c5908f76',?,?,'20240821',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240821@080031.5151 j66v2k74onciihn6e1dg7e2n0a Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240821@080031.5167 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.5215 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240821@080031.5232 j66v2k74onciihn6e1dg7e2n0a Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66c590859866c5908f7e','aut66c599470466c5908f37',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 = 'aut66c599470466c5908f37'
20240821@080031.5579 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240821@080031.5634 j66v2k74onciihn6e1dg7e2n0a Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240821@080031.5656 j66v2k74onciihn6e1dg7e2n0a 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 'aut66c590859866c5908f7e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1150, 1150*.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 ,26.7,26.7*200.48,26.7,26.7*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,26.7*1150,26.7*1150*200.48 ,32.196000,32.196000*200.48 ,32.196000,32.196000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,26.7,26.7*200.48,26.7*1150,26.7*1150*200.48,'cps24042941558,370000004 ',210,210*1150,210,210*1150,?,?,?,4 from bo bo where bo.bostamp = 'aut66c599470466c5908f37'
20240821@080032.1195 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080032.1200 j66v2k74onciihn6e1dg7e2n0a Query : declare @bostamp varchar(25) = 'aut66c599470466c5908f37' ,@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 
20240821@080032.3674 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080032.3688 j66v2k74onciihn6e1dg7e2n0a Query : select 1 valor from bo where bo.bostamp = 'aut66c599470466c5908f37'
20240821@080032.4520 j66v2k74onciihn6e1dg7e2n0a 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) = 'aut66c599470466c5908f37' 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 
20240821@080032.9142 j66v2k74onciihn6e1dg7e2n0a Query : use flama_phc
20240821@080032.9147 j66v2k74onciihn6e1dg7e2n0a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240821@080032.9232 j66v2k74onciihn6e1dg7e2n0a Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1614';
20240821@080032.9265 j66v2k74onciihn6e1dg7e2n0a Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1614';

20240822@093744.9022 tudk1cffig927hl8oegf0qvj3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1615';
20240822@093744.9088 tudk1cffig927hl8oegf0qvj3o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1615';
20240822@093744.9117 tudk1cffig927hl8oegf0qvj3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1615';
20240822@093744.9156 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093744.9160 tudk1cffig927hl8oegf0qvj3o Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@093744.9272 tudk1cffig927hl8oegf0qvj3o Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1889.00.1'
20240822@093744.9416 tudk1cffig927hl8oegf0qvj3o 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 = 2400452 and bi.ref ='324.1889.00.1' and bi.lordem =20000
20240822@093744.9765 tudk1cffig927hl8oegf0qvj3o 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 = 'cps24041936105,057000002 ' 
20240822@093745.1550 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.1610 tudk1cffig927hl8oegf0qvj3o Query : select top 1 1 valor from ts where ts.ndos = 61
20240822@093745.2780 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.2820 tudk1cffig927hl8oegf0qvj3o 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')
20240822@093745.3590 tudk1cffig927hl8oegf0qvj3o 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
20240822@093745.5350 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.5380 tudk1cffig927hl8oegf0qvj3o Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20240822@093745.6740 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.6780 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from ts where ndos = 61
20240822@093745.7620 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.1064 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240822@093745.1128 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.1145 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240822@093745.1156 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.1173 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240822@093745.1184 tudk1cffig927hl8oegf0qvj3o 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
20240822@093745.1327 tudk1cffig927hl8oegf0qvj3o Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240822@093745.1452 tudk1cffig927hl8oegf0qvj3o Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240822@093745.1479 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.1488 tudk1cffig927hl8oegf0qvj3o Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20240822@093745.1590 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.1768 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240822@093745.1862 tudk1cffig927hl8oegf0qvj3o Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c6f4445866c6f8d924',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240822@093745.1936 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.1960 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240822@093745.1976 tudk1cffig927hl8oegf0qvj3o Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c6f4445866c6f8d924','--','bo',7.8676957001102535832 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240822@093745.2221 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.2244 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240822@093745.2261 tudk1cffig927hl8oegf0qvj3o 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 ('aut66c6f4445866c6f8d924','guia r. fornecedor','2024-08-22',61,2402312,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240822@093745.2993 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.2996 tudk1cffig927hl8oegf0qvj3o Query : select st.usalote valor from st where st.ref = '324.1889.00.1'
20240822@093745.4192 tudk1cffig927hl8oegf0qvj3o 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.1889.00.1'
20240822@093745.4370 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.4389 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240822@093745.4408 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.4427 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240822@093745.4440 tudk1cffig927hl8oegf0qvj3o Query : select sestamp valor from se where ref ='324.1889.00.1' and lote = 'r2400452200a'
20240822@093745.4547 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.4566 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240822@093745.4579 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.4600 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240822@093745.4615 tudk1cffig927hl8oegf0qvj3o Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c6f8599466c6f8d96f',?,?,'20240822',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240822@093745.4829 tudk1cffig927hl8oegf0qvj3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@093745.4875 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.4894 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240822@093745.4909 tudk1cffig927hl8oegf0qvj3o Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66c6f1865566c6f8d977','aut66c6f4445866c6f8d924',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 = 'aut66c6f4445866c6f8d924'
20240822@093745.5147 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@093745.5168 tudk1cffig927hl8oegf0qvj3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240822@093745.5191 tudk1cffig927hl8oegf0qvj3o 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 'aut66c6f1865566c6f8d977',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 ,27.21,27.21*200.48,27.21,27.21*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,27.21*1336,27.21*1336*200.48 ,29.070000,29.070000*200.48 ,29.070000,29.070000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,27.21,27.21*200.48,27.21*1336,27.21*1336*200.48,'cps24041936105,057000002 ',214.08,214.08*1336,214.08,214.08*1336,?,?,?,4 from bo bo where bo.bostamp = 'aut66c6f4445866c6f8d924'
20240822@093745.6561 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.6565 tudk1cffig927hl8oegf0qvj3o Query : declare @bostamp varchar(25) = 'aut66c6f4445866c6f8d924' ,@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 
20240822@093745.9837 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093745.9841 tudk1cffig927hl8oegf0qvj3o Query : select 1 valor from bo where bo.bostamp = 'aut66c6f4445866c6f8d924'
20240822@093745.9956 tudk1cffig927hl8oegf0qvj3o 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) = 'aut66c6f4445866c6f8d924' 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 
20240822@093746.2180 tudk1cffig927hl8oegf0qvj3o Query : use flama_phc
20240822@093746.2185 tudk1cffig927hl8oegf0qvj3o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@093746.2240 tudk1cffig927hl8oegf0qvj3o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1615';
20240822@093746.2272 tudk1cffig927hl8oegf0qvj3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1615';

20240822@113824.2360 nnjio6iasithqbrj6va8qts591 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1616';
20240822@113824.2458 nnjio6iasithqbrj6va8qts591 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1616';
20240822@113824.2494 nnjio6iasithqbrj6va8qts591 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1616';
20240822@113824.2581 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.2585 nnjio6iasithqbrj6va8qts591 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@113824.2683 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.2686 nnjio6iasithqbrj6va8qts591 Query : select no, estab,szadrsdesc from szadrs where u_coddest=5546
20240822@113824.2784 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.2960 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.2984 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3013 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3043 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3070 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3097 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3121 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3147 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3173 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3200 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3228 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3265 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3290 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3315 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3347 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3376 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3406 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3433 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3460 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3484 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3509 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3539 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3566 nnjio6iasithqbrj6va8qts591 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240822@113824.3592 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.3595 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@113824.3827 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.3830 nnjio6iasithqbrj6va8qts591 Query : select top 1 1 valor from td where td.ndoc = 39
20240822@113824.3950 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.3953 nnjio6iasithqbrj6va8qts591 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')
20240822@113824.3991 nnjio6iasithqbrj6va8qts591 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@113824.4158 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.4162 nnjio6iasithqbrj6va8qts591 Query : select top 1 ~inactivo valor from cl where no = '199506' and estab = 0 order by inactivo desc
20240822@113824.4323 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.4326 nnjio6iasithqbrj6va8qts591 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@113824.4459 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.4463 nnjio6iasithqbrj6va8qts591 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@113824.4647 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.4651 nnjio6iasithqbrj6va8qts591 Query : select szadrsstamp valor from szadrs where szadrsdesc='199506 - itmp alimentar, s.a.'
20240822@113824.4739 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.4742 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from td where ndoc = 39
20240822@113824.4835 nnjio6iasithqbrj6va8qts591 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@113824.4920 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.4940 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@113824.4965 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.4984 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@113824.5061 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.5086 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@113824.5105 nnjio6iasithqbrj6va8qts591 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@113824.5343 nnjio6iasithqbrj6va8qts591 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@113824.5463 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.5482 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@113824.5503 nnjio6iasithqbrj6va8qts591 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@113824.5967 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.5989 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@113824.6033 nnjio6iasithqbrj6va8qts591 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@113824.6156 nnjio6iasithqbrj6va8qts591 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@113824.6231 nnjio6iasithqbrj6va8qts591 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@113824.6310 nnjio6iasithqbrj6va8qts591 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@113824.6436 nnjio6iasithqbrj6va8qts591 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@113824.6545 nnjio6iasithqbrj6va8qts591 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@113824.6630 nnjio6iasithqbrj6va8qts591 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c718533766c715207c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@113824.7183 nnjio6iasithqbrj6va8qts591 Query : select top 1 fno valor from wsftdata order by fno desc
20240822@113824.7282 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.7302 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@113824.7334 nnjio6iasithqbrj6va8qts591 Query : select 'normal' from dummy
20240822@113824.7382 nnjio6iasithqbrj6va8qts591 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c718533766c715207c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',420,199506,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@113824.8051 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113824.8054 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113824.8084 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113824.8259 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.8280 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113824.8313 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.8331 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113824.8342 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113824.8357 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113824.8386 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.8407 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113824.8422 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712337666c71520cc','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113824.8477 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113824.8495 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113824.8532 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712337666c71520cc',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,10000,?,?,?,?)
20240822@113825.1890 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.2090 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.2440 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.2610 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.2720 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.2880 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3070 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.3220 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c713442666c7152107','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.3270 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3470 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.3820 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c713442666c7152107',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,20000,?,?,?)
20240822@113825.1271 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113825.1276 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113825.1301 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113825.1320 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1341 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.1372 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1390 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.1402 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.1416 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113825.1433 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1452 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.1465 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715810566c7152122','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.1471 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1488 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.1522 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c715810566c7152122',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,40000,?,?,?,?)
20240822@113825.1823 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1844 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.1873 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1891 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.1918 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.1933 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1952 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.1967 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c713729066c715212f','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.1973 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.1991 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.2025 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c713729066c715212f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,50000,?,?,?)
20240822@113825.2316 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113825.2320 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113825.2346 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113825.2363 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.2384 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.2442 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.2460 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.2471 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.2489 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113825.2505 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.2522 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.2536 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c713166066c715213d','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.2541 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.2560 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.2616 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c713166066c715213d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,70000,?,?,?,?)
20240822@113825.2976 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3011 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.3045 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3063 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.3075 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.3091 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3109 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.3124 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c718102566c715214b','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.3130 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3149 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.3189 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c718102566c715214b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,80000,?,?,?)
20240822@113825.3526 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113825.3547 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113825.3571 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113825.3589 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3609 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.3641 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3659 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.3670 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.3684 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113825.3700 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3721 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.3738 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710116166c715215a','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.3744 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.3763 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.3798 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710116166c715215a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,100000,?,?,?,?)
20240822@113825.4090 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.4112 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.4145 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.4162 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.4174 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.4213 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.4233 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.4253 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712887766c7152166','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.4263 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.4280 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.4318 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c712887766c7152166',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,110000,?,?,?)
20240822@113825.4625 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113825.4629 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113825.4693 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113825.4818 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.4937 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.6162 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6185 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.6198 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.6213 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113825.6244 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6262 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.6276 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712635066c7152198','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.6281 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6298 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.6336 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712635066c7152198',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,130000,?,?,?,?)
20240822@113825.6637 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6660 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.6693 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6710 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.6722 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.6740 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6759 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.6776 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c718028166c71521a4','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.6781 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.6799 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.6834 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c718028166c71521a4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,140000,?,?,?)
20240822@113825.7142 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113825.7147 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113825.8368 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113825.8387 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.8411 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.8450 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.8471 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.8482 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.8499 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113825.8517 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.8538 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.8555 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c714816766c71521cf','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.8561 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.8581 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.8633 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c714816766c71521cf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,160000,?,?,?,?)
20240822@113825.9069 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9091 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.9126 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9148 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.9162 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.9181 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9202 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.9218 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c713146266c71521e0','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.9224 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9246 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.9284 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c713146266c71521e0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,170000,?,?,?)
20240822@113825.9608 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113825.9613 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113825.9641 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113825.9664 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9686 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.9725 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9747 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.9759 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113825.9776 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113825.9794 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9815 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113825.9831 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715681366c71521ef','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113825.9837 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113825.9858 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113825.9895 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c715681366c71521ef',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,190000,?,?,?,?)
20240822@113826.2170 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2460 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.2850 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3050 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.3160 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.3330 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3520 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.3660 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c717381066c7152208','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.3710 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3970 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.4360 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c717381066c7152208',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,200000,?,?,?)
20240822@113826.7800 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113826.7840 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113826.8090 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113826.8270 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.8480 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.8820 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9010 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.9150 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.9310 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113826.9480 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9660 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.9820 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712758066c7152217','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.9880 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.1008 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.1670 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712758066c7152217',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,220000,?,?,?,?)
20240822@113826.1950 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.1970 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.1999 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2017 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.2027 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.2044 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2061 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.2076 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c719123166c7152231','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.2081 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2098 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.2130 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c719123166c7152231',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,230000,?,?,?)
20240822@113826.2440 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113826.2444 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113826.2470 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113826.2487 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2519 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.2554 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2576 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.2589 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.2605 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113826.2621 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2639 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.2654 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710405566c7152240','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.2660 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.2677 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.2712 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710405566c7152240',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,250000,?,?,?,?)
20240822@113826.3026 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3047 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.3080 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3100 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.3112 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.3130 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3148 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.3163 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c711843366c715224c','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.3168 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3186 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.3221 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c711843366c715224c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,260000,?,?,?)
20240822@113826.3534 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113826.3567 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113826.3592 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113826.3611 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3632 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.3663 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3684 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.3694 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.3709 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113826.3726 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3747 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.3765 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c718209566c715225a','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.3770 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.3804 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.3840 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c718209566c715225a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,280000,?,?,?,?)
20240822@113826.4138 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4158 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.4202 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4223 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.4234 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.4249 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4266 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.4279 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c717502466c7152267','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.4355 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4374 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.4411 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c717502466c7152267',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,290000,?,?,?)
20240822@113826.4721 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113826.4724 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113826.4747 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113826.4763 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4787 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.4896 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4916 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.4927 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.4942 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113826.4960 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.4976 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.4993 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712177366c7152279','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.4999 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.5016 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.5153 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712177366c7152279',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,310000,?,?,?,?)
20240822@113826.6374 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.6806 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.6850 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.6870 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.6880 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.6897 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.6915 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.6930 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c718500966c71522a8','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.6936 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.6954 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.6987 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c718500966c71522a8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,320000,?,?,?)
20240822@113826.7273 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113826.7277 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113826.7302 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113826.7321 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.7340 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.7370 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.7391 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.7402 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.7417 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113826.7433 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.7452 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.7466 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710929866c71522b5','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.7471 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.7492 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.8112 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710929866c71522b5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,340000,?,?,?,?)
20240822@113826.8471 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.8493 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.8528 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.8549 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.8560 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.8576 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.8594 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.8609 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c719602966c71522d1','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.8614 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.8633 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.8668 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c719602966c71522d1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,350000,?,?,?)
20240822@113826.8972 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113826.8977 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113826.9003 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113826.9021 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9041 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.9072 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9091 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.9102 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.9119 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113826.9134 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9173 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.9190 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710349766c71522df','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.9196 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9214 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.9249 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710349766c71522df',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,370000,?,?,?,?)
20240822@113826.9566 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9600 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.9650 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9670 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.9682 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113826.9698 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9715 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113826.9730 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c714198966c71522ec','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113826.9736 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113826.9755 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113826.9798 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c714198966c71522ec',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,380000,?,?,?)
20240822@113827.1050 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.1090 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.1340 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.1530 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.1730 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.2060 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.2360 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.2500 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.2660 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.2820 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.3010 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.3160 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710693266c7152306','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.3220 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.3390 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.3760 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710693266c7152306',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,400000,?,?,?,?)
20240822@113827.8280 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8500 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.8840 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9020 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.9150 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.9300 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9480 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.9630 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710321566c7152316','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.9680 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9860 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.1024 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c710321566c7152316',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,410000,?,?,?)
20240822@113827.1471 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.1475 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.1500 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.1517 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.1538 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.1574 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.1593 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.1603 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.1617 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.1635 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.1654 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.1669 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715623366c7152327','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.1675 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.1694 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.2363 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c715623366c7152327',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,430000,?,?,?,?)
20240822@113827.2655 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.2675 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.2705 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.2722 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.2732 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.2748 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.2764 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.2796 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c711955766c7152343','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.2801 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.2818 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.2851 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c711955766c7152343',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,440000,?,?,?)
20240822@113827.3134 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.3137 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.3159 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.3176 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.3194 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.3227 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.3244 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.3254 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.3269 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.3285 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.3302 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.3317 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712368766c7152350','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.3322 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.3338 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.4520 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712368766c7152350',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,460000,?,?,?,?)
20240822@113827.4806 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.4825 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.4860 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.4876 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.4887 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.4904 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.4921 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.4936 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c714851366c7152377','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.4941 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.4958 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.4993 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c714851366c7152377',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,470000,?,?,?)
20240822@113827.5271 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.5276 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.5299 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.5318 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5339 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.5370 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5388 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.5399 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.5415 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.5447 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5465 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.5482 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c718387466c7152384','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.5486 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5504 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.5543 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c718387466c7152384',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,490000,?,?,?,?)
20240822@113827.5829 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5850 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.5885 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5905 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.5917 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.5933 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5950 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.5965 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c716477566c7152390','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.5969 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.5986 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.6019 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c716477566c7152390',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,500000,?,?,?)
20240822@113827.6326 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.6330 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.6353 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.6370 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6391 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.6420 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6438 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.6451 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.6467 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.6484 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6502 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.6519 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c714603066c715239e','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.6524 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6542 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.6578 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c714603066c715239e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,520000,?,?,?,?)
20240822@113827.6861 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6881 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.6912 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6929 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.6942 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.6956 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.6973 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.6989 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712302766c71523a9','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.6993 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.7011 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.7674 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c712302766c71523a9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,530000,?,?,?)
20240822@113827.7981 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.7985 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.8007 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.8023 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8042 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.8073 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8092 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.8103 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.8118 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.8132 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8148 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.8161 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c719698466c71523c6','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.8166 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8182 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.8214 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c719698466c71523c6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,550000,?,?,?,?)
20240822@113827.8524 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8544 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.8573 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8589 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.8599 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.8613 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8629 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.8643 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715038166c71523d2','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.8647 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.8664 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.8710 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c715038166c71523d2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,560000,?,?,?)
20240822@113827.9022 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113827.9026 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113827.9053 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113827.9070 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9087 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.9115 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9131 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.9142 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.9155 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113827.9182 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9198 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.9210 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c717662166c71523e0','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.9215 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9231 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.9261 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c717662166c71523e0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,580000,?,?,?,?)
20240822@113827.9555 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9576 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.9603 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9618 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.9627 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113827.9640 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9657 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113827.9670 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c714735766c71523eb','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113827.9674 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113827.9689 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113827.9718 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c714735766c71523eb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,590000,?,?,?)
20240822@113828.5750 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113828.5820 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113828.6070 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113828.6230 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.6420 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.6960 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.7140 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.7240 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.7380 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113828.7520 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.7670 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.7800 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715742366c7152412','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.7850 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.7990 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.8270 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c715742366c7152412',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,610000,?,?,?,?)
20240822@113828.1152 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1170 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.1197 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1212 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.1221 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.1234 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1248 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.1261 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712970166c715241e','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.1266 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1281 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.1312 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c712970166c715241e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,620000,?,?,?)
20240822@113828.1594 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113828.1598 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113828.1618 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113828.1633 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1649 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.1676 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1691 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.1700 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.1713 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113828.1727 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1742 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.1754 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715398966c715242a','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.1759 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.1789 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.1819 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c715398966c715242a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,640000,?,?,?,?)
20240822@113828.2118 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2135 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.2168 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2183 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.2192 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.2204 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2220 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.2232 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715472666c7152435','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.2236 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2251 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.2283 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c715472666c7152435',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,650000,?,?,?)
20240822@113828.2546 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113828.2565 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113828.2588 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113828.2603 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2621 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.2652 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2668 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.2678 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.2691 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113828.2706 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2722 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.2736 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c717741966c7152442','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.2741 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.2757 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.2789 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c717741966c7152442',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,670000,?,?,?,?)
20240822@113828.3070 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.3089 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.3122 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.3138 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.3147 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.3161 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.3176 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.3189 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c713342566c715244d','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.3195 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.3210 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.3241 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c713342566c715244d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,680000,?,?,?)
20240822@113828.3995 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113828.4001 nnjio6iasithqbrj6va8qts591 Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20240822@113828.4024 nnjio6iasithqbrj6va8qts591 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.1884.00.1'
20240822@113828.4039 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4057 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.4084 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4098 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.4107 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.4119 nnjio6iasithqbrj6va8qts591 Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2400213100a'
20240822@113828.4133 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4148 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.4159 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c719878966c7152464','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.4164 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4179 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.4209 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c719878966c7152464',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,700000,?,?,?,?)
20240822@113828.4547 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4564 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.4591 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4606 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.4616 nnjio6iasithqbrj6va8qts591 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@113828.4630 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4648 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@113828.4666 nnjio6iasithqbrj6va8qts591 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c715022566c7152471','aut66c718533766c715207c' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@113828.4671 nnjio6iasithqbrj6va8qts591 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@113828.4687 nnjio6iasithqbrj6va8qts591 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@113828.4716 nnjio6iasithqbrj6va8qts591 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66c715022566c7152471',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66c718533766c715207c' ,0,0 ,2,23.00,710000,?,?,?)
20240822@113828.5016 nnjio6iasithqbrj6va8qts591 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c718533766c715207c','2405478','wait',39,'adm09112754980.682000002')
20240822@113828.5119 nnjio6iasithqbrj6va8qts591 Query : use flama_phc
20240822@113828.5122 nnjio6iasithqbrj6va8qts591 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@113828.5163 nnjio6iasithqbrj6va8qts591 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1616';
20240822@113828.5191 nnjio6iasithqbrj6va8qts591 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1616';
20240822@113828.5230 nnjio6iasithqbrj6va8qts591 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1616';
20240822@113828.5253 nnjio6iasithqbrj6va8qts591 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1616';
20240822@115823.9515 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@115823.9528 u0h52l5q76dbmicoki5iqbnrp4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@115824.9600 u0h52l5q76dbmicoki5iqbnrp4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1617';
20240822@115824.1970 u0h52l5q76dbmicoki5iqbnrp4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1617';
20240822@115824.4360 u0h52l5q76dbmicoki5iqbnrp4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1617';
20240822@115824.5510 u0h52l5q76dbmicoki5iqbnrp4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1617';
20240822@115824.6020 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.6070 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@115824.6920 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.6990 u0h52l5q76dbmicoki5iqbnrp4 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@115824.7910 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115824.9610 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115824.9830 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115824.1006 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115824.1030 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115824.1053 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1057 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@115824.1096 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1101 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 1 valor from td where td.ndoc = 39
20240822@115824.1137 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1142 u0h52l5q76dbmicoki5iqbnrp4 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')
20240822@115824.1182 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@115824.1224 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1229 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@115824.1381 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1387 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@115824.1430 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1435 u0h52l5q76dbmicoki5iqbnrp4 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@115824.1481 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1485 u0h52l5q76dbmicoki5iqbnrp4 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@115824.1539 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.1543 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from td where ndoc = 39
20240822@115824.1559 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@115824.1576 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.1597 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115824.1621 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.1640 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115824.1677 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.1698 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115824.1713 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115824.1789 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115824.1808 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.1830 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115824.3617 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c712474866c719d029' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@115824.3836 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.3857 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115824.3896 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@115824.3911 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@115824.3925 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@115824.3941 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@115824.3958 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@115824.3972 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@115824.3987 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c712474866c719d029',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@115824.4276 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 fno valor from wsftdata order by fno desc
20240822@115824.4300 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.4318 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115824.4346 u0h52l5q76dbmicoki5iqbnrp4 Query : select 'normal' from dummy
20240822@115824.4366 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c712474866c719d029',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',421,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@115824.4706 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.4710 u0h52l5q76dbmicoki5iqbnrp4 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115824.4840 u0h52l5q76dbmicoki5iqbnrp4 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'
20240822@115824.5084 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.5105 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.5136 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.5159 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.5168 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115824.5184 u0h52l5q76dbmicoki5iqbnrp4 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115824.5201 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.5219 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.5233 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710782966c719d07e','aut66c712474866c719d029' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115824.5238 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.5257 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.5297 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710782966c719d07e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',28.000 ,'aut66c712474866c719d029' ,0,0 ,2,23.00,10000,?,?,?,?)
20240822@115824.6915 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.6927 u0h52l5q76dbmicoki5iqbnrp4 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115824.6952 u0h52l5q76dbmicoki5iqbnrp4 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'
20240822@115824.6969 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.6991 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.7026 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7045 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.7056 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115824.7072 u0h52l5q76dbmicoki5iqbnrp4 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115824.7087 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7105 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.7120 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c716659966c719d0ad','aut66c712474866c719d029' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115824.7126 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7145 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.7182 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c716659966c719d0ad',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut66c712474866c719d029' ,0,0 ,2,23.00,20000,?,?,?,?)
20240822@115824.7509 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.7512 u0h52l5q76dbmicoki5iqbnrp4 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115824.7538 u0h52l5q76dbmicoki5iqbnrp4 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'
20240822@115824.7556 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7576 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.7608 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7626 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.7638 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115824.7654 u0h52l5q76dbmicoki5iqbnrp4 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115824.7672 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7690 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.7704 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712794566c719d0bb','aut66c712474866c719d029' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115824.7710 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.7728 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.7766 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712794566c719d0bb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c712474866c719d029' ,0,0 ,2,23.00,30000,?,?,?,?)
20240822@115824.8098 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.8102 u0h52l5q76dbmicoki5iqbnrp4 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115824.8131 u0h52l5q76dbmicoki5iqbnrp4 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'
20240822@115824.8152 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.8176 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.8210 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.8229 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.8241 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115824.8256 u0h52l5q76dbmicoki5iqbnrp4 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115824.8273 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.8291 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.8307 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c719388266c719d0c9','aut66c712474866c719d029' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115824.8312 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.8339 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.8378 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c719388266c719d0c9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c712474866c719d029' ,0,0 ,2,23.00,40000,?,?,?,?)
20240822@115824.8823 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.8827 u0h52l5q76dbmicoki5iqbnrp4 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115824.8854 u0h52l5q76dbmicoki5iqbnrp4 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'
20240822@115824.8871 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.8890 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.8921 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.8941 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.8951 u0h52l5q76dbmicoki5iqbnrp4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115824.8970 u0h52l5q76dbmicoki5iqbnrp4 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115824.8990 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.9012 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115824.9030 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c717846066c719d0db','aut66c712474866c719d029' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115824.9037 u0h52l5q76dbmicoki5iqbnrp4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115824.9057 u0h52l5q76dbmicoki5iqbnrp4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115824.9098 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c717846066c719d0db',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c712474866c719d029' ,0,0 ,2,23.00,50000,?,?,?,?)
20240822@115824.9710 u0h52l5q76dbmicoki5iqbnrp4 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c712474866c719d029','2405486','wait',39,'adm09112754980.682000002')
20240822@115824.9801 u0h52l5q76dbmicoki5iqbnrp4 Query : use flama_phc
20240822@115824.9806 u0h52l5q76dbmicoki5iqbnrp4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@115824.9842 u0h52l5q76dbmicoki5iqbnrp4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1617';
20240822@115824.9878 u0h52l5q76dbmicoki5iqbnrp4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1617';
20240822@115824.9919 u0h52l5q76dbmicoki5iqbnrp4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1617';
20240822@115824.9947 u0h52l5q76dbmicoki5iqbnrp4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1617';
20240822@115825.4660 sdcdo12pe8mju6ns5pbka90q83 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@115825.4800 sdcdo12pe8mju6ns5pbka90q83 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@115825.5450 sdcdo12pe8mju6ns5pbka90q83 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1618';
20240822@115825.6050 sdcdo12pe8mju6ns5pbka90q83 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1618';
20240822@115825.6560 sdcdo12pe8mju6ns5pbka90q83 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1618';
20240822@115825.6840 sdcdo12pe8mju6ns5pbka90q83 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1618';
20240822@115825.7360 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.7390 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@115825.8080 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.8110 sdcdo12pe8mju6ns5pbka90q83 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@115825.8550 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.8840 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.9060 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.9270 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.9500 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.9540 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@115825.9920 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.9960 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 1 valor from td where td.ndoc = 39
20240822@115825.1032 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.1036 sdcdo12pe8mju6ns5pbka90q83 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')
20240822@115825.1069 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@115825.1115 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.1118 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@115825.1159 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.1163 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@115825.1200 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.1203 sdcdo12pe8mju6ns5pbka90q83 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@115825.1262 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.1266 sdcdo12pe8mju6ns5pbka90q83 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@115825.1334 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.1337 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from td where ndoc = 39
20240822@115825.1354 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@115825.1372 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.1394 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115825.1419 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.1437 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115825.1470 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.1487 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115825.1503 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115825.1574 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115825.1589 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.1606 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115825.1626 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c710122766c719d124' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@115825.1824 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.1843 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115825.1885 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@115825.1903 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@115825.1917 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@115825.1933 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@115825.1947 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@115825.1963 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@115825.1981 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c710122766c719d124',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@115825.2253 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 fno valor from wsftdata order by fno desc
20240822@115825.2273 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.2297 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115825.3479 sdcdo12pe8mju6ns5pbka90q83 Query : select 'normal' from dummy
20240822@115825.3497 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c710122766c719d124',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',422,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@115825.3831 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.3835 sdcdo12pe8mju6ns5pbka90q83 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115825.3860 sdcdo12pe8mju6ns5pbka90q83 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'
20240822@115825.3876 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.3894 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.3924 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.3943 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.3954 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115825.3969 sdcdo12pe8mju6ns5pbka90q83 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115825.3986 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4007 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.4021 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c712291066c719d161','aut66c710122766c719d124' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115825.4033 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4052 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.4086 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c712291066c719d161',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',34.000 ,'aut66c710122766c719d124' ,0,0 ,2,23.00,10000,?,?,?,?)
20240822@115825.4365 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.4370 sdcdo12pe8mju6ns5pbka90q83 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115825.4394 sdcdo12pe8mju6ns5pbka90q83 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'
20240822@115825.4409 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4430 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.4460 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4478 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.4489 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115825.4504 sdcdo12pe8mju6ns5pbka90q83 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115825.4518 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4535 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.4550 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c716544766c719d16e','aut66c710122766c719d124' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115825.4555 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4572 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.4605 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c716544766c719d16e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c710122766c719d124' ,0,0 ,2,23.00,20000,?,?,?,?)
20240822@115825.4883 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.4887 sdcdo12pe8mju6ns5pbka90q83 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115825.4912 sdcdo12pe8mju6ns5pbka90q83 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'
20240822@115825.4929 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.4948 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.4982 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5000 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.5012 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115825.5029 sdcdo12pe8mju6ns5pbka90q83 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115825.5044 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5063 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.5080 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c714938566c719d17b','aut66c710122766c719d124' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115825.5087 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5132 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.5170 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c714938566c719d17b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c710122766c719d124' ,0,0 ,2,23.00,30000,?,?,?,?)
20240822@115825.5451 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.5455 sdcdo12pe8mju6ns5pbka90q83 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115825.5480 sdcdo12pe8mju6ns5pbka90q83 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'
20240822@115825.5498 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5518 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.5549 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5567 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.5577 sdcdo12pe8mju6ns5pbka90q83 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115825.5592 sdcdo12pe8mju6ns5pbka90q83 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115825.5608 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5626 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.5641 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c710574766c719d188','aut66c710122766c719d124' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115825.5647 sdcdo12pe8mju6ns5pbka90q83 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.5665 sdcdo12pe8mju6ns5pbka90q83 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.5700 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c710574766c719d188',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c710122766c719d124' ,0,0 ,2,23.00,40000,?,?,?,?)
20240822@115825.6035 sdcdo12pe8mju6ns5pbka90q83 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c710122766c719d124','2405485','wait',39,'adm09112754980.682000002')
20240822@115825.6117 sdcdo12pe8mju6ns5pbka90q83 Query : use flama_phc
20240822@115825.6122 sdcdo12pe8mju6ns5pbka90q83 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@115825.6158 sdcdo12pe8mju6ns5pbka90q83 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1618';
20240822@115825.6189 sdcdo12pe8mju6ns5pbka90q83 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1618';
20240822@115825.6231 sdcdo12pe8mju6ns5pbka90q83 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1618';
20240822@115825.6268 sdcdo12pe8mju6ns5pbka90q83 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1618';
20240822@115825.6806 tajqnprg78qqileijo03es2olj Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@115825.6820 tajqnprg78qqileijo03es2olj Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@115825.6875 tajqnprg78qqileijo03es2olj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1619';
20240822@115825.6934 tajqnprg78qqileijo03es2olj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1619';
20240822@115825.6986 tajqnprg78qqileijo03es2olj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1619';
20240822@115825.7016 tajqnprg78qqileijo03es2olj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1619';
20240822@115825.7066 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7070 tajqnprg78qqileijo03es2olj Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@115825.7141 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7145 tajqnprg78qqileijo03es2olj Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@115825.7191 tajqnprg78qqileijo03es2olj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.7214 tajqnprg78qqileijo03es2olj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.7236 tajqnprg78qqileijo03es2olj Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@115825.7259 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7264 tajqnprg78qqileijo03es2olj Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@115825.7301 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7306 tajqnprg78qqileijo03es2olj Query : select top 1 1 valor from td where td.ndoc = 39
20240822@115825.7344 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7348 tajqnprg78qqileijo03es2olj 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')
20240822@115825.7379 tajqnprg78qqileijo03es2olj Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@115825.7417 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7420 tajqnprg78qqileijo03es2olj Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@115825.7453 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7457 tajqnprg78qqileijo03es2olj Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@115825.7488 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7492 tajqnprg78qqileijo03es2olj Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@115825.7536 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7540 tajqnprg78qqileijo03es2olj Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@115825.7590 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.7594 tajqnprg78qqileijo03es2olj Query : select 1 valor from td where ndoc = 39
20240822@115825.7609 tajqnprg78qqileijo03es2olj Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@115825.7625 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.7646 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115825.7669 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.7687 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115825.7722 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.7738 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115825.7754 tajqnprg78qqileijo03es2olj Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115825.7877 tajqnprg78qqileijo03es2olj Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115825.7892 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.7911 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115825.7930 tajqnprg78qqileijo03es2olj Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c719117966c719d1bd' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@115825.8151 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.8176 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115825.8219 tajqnprg78qqileijo03es2olj Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@115825.8237 tajqnprg78qqileijo03es2olj Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@115825.8410 tajqnprg78qqileijo03es2olj Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@115825.8475 tajqnprg78qqileijo03es2olj Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@115825.8489 tajqnprg78qqileijo03es2olj Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@115825.8506 tajqnprg78qqileijo03es2olj Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@115825.8522 tajqnprg78qqileijo03es2olj Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c719117966c719d1bd',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@115825.8844 tajqnprg78qqileijo03es2olj Query : select top 1 fno valor from wsftdata order by fno desc
20240822@115825.8865 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.8889 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115825.8915 tajqnprg78qqileijo03es2olj Query : select 'normal' from dummy
20240822@115825.8933 tajqnprg78qqileijo03es2olj Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c719117966c719d1bd',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',423,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@115825.9259 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115825.9263 tajqnprg78qqileijo03es2olj Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115825.9289 tajqnprg78qqileijo03es2olj 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'
20240822@115825.9306 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.9324 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115825.9353 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115825.9370 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115825.9379 tajqnprg78qqileijo03es2olj Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115825.9393 tajqnprg78qqileijo03es2olj Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115825.9536 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.4200 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.7790 tajqnprg78qqileijo03es2olj Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c718157066c719d1e8','aut66c719117966c719d1bd' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115826.7840 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.8020 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.8320 tajqnprg78qqileijo03es2olj Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c718157066c719d1e8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66c719117966c719d1bd' ,0,0 ,2,23.00,10000,?,?,?,?)
20240822@115826.1115 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115826.1119 tajqnprg78qqileijo03es2olj Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115826.1143 tajqnprg78qqileijo03es2olj 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'
20240822@115826.1157 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1175 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.1201 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1217 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.1228 tajqnprg78qqileijo03es2olj Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115826.1244 tajqnprg78qqileijo03es2olj Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115826.1260 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1277 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.1291 tajqnprg78qqileijo03es2olj Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c711975066c719d21e','aut66c719117966c719d1bd' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115826.1296 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1315 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.1348 tajqnprg78qqileijo03es2olj Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c711975066c719d21e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',36.000 ,'aut66c719117966c719d1bd' ,0,0 ,2,23.00,20000,?,?,?,?)
20240822@115826.1634 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115826.1639 tajqnprg78qqileijo03es2olj Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@115826.1664 tajqnprg78qqileijo03es2olj 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'
20240822@115826.1682 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1702 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.1734 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1751 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.1762 tajqnprg78qqileijo03es2olj Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115826.1776 tajqnprg78qqileijo03es2olj Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@115826.1792 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1810 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.1824 tajqnprg78qqileijo03es2olj Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c711095166c719d22b','aut66c719117966c719d1bd' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115826.1829 tajqnprg78qqileijo03es2olj Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.1846 tajqnprg78qqileijo03es2olj Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.1879 tajqnprg78qqileijo03es2olj Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c711095166c719d22b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c719117966c719d1bd' ,0,0 ,2,23.00,30000,?,?,?,?)
20240822@115826.2145 tajqnprg78qqileijo03es2olj Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c719117966c719d1bd','2405484','wait',39,'adm09112754980.682000002')
20240822@115826.2223 tajqnprg78qqileijo03es2olj Query : use flama_phc
20240822@115826.2227 tajqnprg78qqileijo03es2olj Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@115826.2259 tajqnprg78qqileijo03es2olj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1619';
20240822@115826.2290 tajqnprg78qqileijo03es2olj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1619';
20240822@115826.2329 tajqnprg78qqileijo03es2olj Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1619';
20240822@115826.2354 tajqnprg78qqileijo03es2olj Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1619';
20240822@115826.2937 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@115826.2950 9hrcgmb2a3jcb9c8gjsfog13ld Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@115826.3007 9hrcgmb2a3jcb9c8gjsfog13ld Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1620';
20240822@115826.3064 9hrcgmb2a3jcb9c8gjsfog13ld Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1620';
20240822@115826.3114 9hrcgmb2a3jcb9c8gjsfog13ld Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1620';
20240822@115826.3139 9hrcgmb2a3jcb9c8gjsfog13ld Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1620';
20240822@115826.3188 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3193 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@115826.3263 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3267 9hrcgmb2a3jcb9c8gjsfog13ld Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@115826.3311 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1676.00.1'
20240822@115826.3486 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3490 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@115826.3526 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3531 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 1 valor from td where td.ndoc = 39
20240822@115826.3564 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3568 9hrcgmb2a3jcb9c8gjsfog13ld 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')
20240822@115826.3601 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@115826.3642 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3646 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@115826.3685 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3689 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@115826.3722 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3726 9hrcgmb2a3jcb9c8gjsfog13ld Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@115826.3770 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3774 9hrcgmb2a3jcb9c8gjsfog13ld Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@115826.3828 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.3831 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from td where ndoc = 39
20240822@115826.3847 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@115826.3862 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.3881 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115826.3903 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.3920 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115826.3952 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.3969 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115826.3984 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115826.4056 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@115826.4071 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.4088 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@115826.4107 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c710157566c719d261' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@115826.4290 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.4310 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@115826.4350 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@115826.4367 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@115826.4383 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@115826.4398 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@115826.4414 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@115826.4428 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@115826.4442 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c710157566c719d261',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@115826.4731 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 fno valor from wsftdata order by fno desc
20240822@115826.4751 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.4770 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@115826.4795 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 'normal' from dummy
20240822@115826.4812 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c710157566c719d261',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',424,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@115826.5117 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.5121 9hrcgmb2a3jcb9c8gjsfog13ld Query : select st.usalote valor from st where st.ref = '324.1676.00.1'
20240822@115826.5148 9hrcgmb2a3jcb9c8gjsfog13ld 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.1676.00.1'
20240822@115826.5336 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.5356 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.5387 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.5405 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.5416 9hrcgmb2a3jcb9c8gjsfog13ld Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@115826.5432 9hrcgmb2a3jcb9c8gjsfog13ld Query : select sestamp valor from se where ref ='324.1676.00.1' and lote = 'r2400173900a'
20240822@115826.5456 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.5475 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@115826.5490 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c713200266c719d285','aut66c710157566c719d261' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@115826.5496 9hrcgmb2a3jcb9c8gjsfog13ld Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@115826.5515 9hrcgmb2a3jcb9c8gjsfog13ld Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@115826.5550 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c713200266c719d285',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut66c710157566c719d261' ,0,0 ,2,23.00,10000,?,?,?,?)
20240822@115826.5821 9hrcgmb2a3jcb9c8gjsfog13ld Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c710157566c719d261','q405477','wait',39,'adm09112754980.682000002')
20240822@115826.5904 9hrcgmb2a3jcb9c8gjsfog13ld Query : use flama_phc
20240822@115826.5908 9hrcgmb2a3jcb9c8gjsfog13ld Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@115826.5941 9hrcgmb2a3jcb9c8gjsfog13ld Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1620';
20240822@115826.5970 9hrcgmb2a3jcb9c8gjsfog13ld Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1620';
20240822@115826.6009 9hrcgmb2a3jcb9c8gjsfog13ld Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1620';
20240822@115826.6037 9hrcgmb2a3jcb9c8gjsfog13ld Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1620';

20240822@142825.3240 5huvr5rcrhnimil1n18qnrd1gr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1621';
20240822@142825.3304 5huvr5rcrhnimil1n18qnrd1gr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1621';
20240822@142825.3338 5huvr5rcrhnimil1n18qnrd1gr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1621';
20240822@142825.3398 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3404 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@142825.3477 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3481 5huvr5rcrhnimil1n18qnrd1gr Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@142825.3536 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@142825.3560 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@142825.3586 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@142825.3610 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3614 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@142825.3653 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3658 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 1 valor from td where td.ndoc = 39
20240822@142825.3693 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3698 5huvr5rcrhnimil1n18qnrd1gr 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')
20240822@142825.3730 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@142825.3771 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3774 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@142825.3808 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3813 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@142825.3846 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3849 5huvr5rcrhnimil1n18qnrd1gr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@142825.3893 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3897 5huvr5rcrhnimil1n18qnrd1gr Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@142825.3948 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.3951 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from td where ndoc = 39
20240822@142825.3968 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@142825.3985 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.4006 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@142825.4028 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.4046 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@142825.4083 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.4100 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@142825.4114 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@142825.4192 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@142825.4209 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.4228 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@142825.4246 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c736938866c73cf964' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@142825.4434 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.4456 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@142825.4501 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@142825.4517 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@142825.4533 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@142825.4550 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@142825.4565 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@142825.4580 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@142825.4595 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c736938866c73cf964',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@142825.4857 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 fno valor from wsftdata order by fno desc
20240822@142825.4882 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.4902 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@142825.4933 5huvr5rcrhnimil1n18qnrd1gr Query : select 'normal' from dummy
20240822@142825.4952 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c736938866c73cf964',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',425,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@142825.5282 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.5287 5huvr5rcrhnimil1n18qnrd1gr Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@142825.5314 5huvr5rcrhnimil1n18qnrd1gr 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'
20240822@142825.5336 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.5356 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@142825.5390 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.5408 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@142825.5421 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@142825.5437 5huvr5rcrhnimil1n18qnrd1gr Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@142825.5458 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.5476 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@142825.5489 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c739801866c73cf985','aut66c736938866c73cf964' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@142825.5494 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.5512 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@142825.5554 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c739801866c73cf985',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut66c736938866c73cf964' ,0,0 ,2,23.00,10000,?,?,?,?)
20240822@142825.5835 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.5838 5huvr5rcrhnimil1n18qnrd1gr Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@142825.5864 5huvr5rcrhnimil1n18qnrd1gr 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'
20240822@142825.5883 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.5903 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@142825.5937 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.5954 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@142825.5965 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@142825.5981 5huvr5rcrhnimil1n18qnrd1gr Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@142825.5998 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.6017 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@142825.6031 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c737640166c73cf992','aut66c736938866c73cf964' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@142825.6036 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.6054 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@142825.6088 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c737640166c73cf992',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66c736938866c73cf964' ,0,0 ,2,23.00,20000,?,?,?,?)
20240822@142825.6366 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.6370 5huvr5rcrhnimil1n18qnrd1gr Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@142825.6396 5huvr5rcrhnimil1n18qnrd1gr 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'
20240822@142825.6412 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.6432 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@142825.6465 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.6483 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@142825.6493 5huvr5rcrhnimil1n18qnrd1gr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@142825.6508 5huvr5rcrhnimil1n18qnrd1gr Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@142825.6524 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.6542 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@142825.6557 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c730982966c73cf99f','aut66c736938866c73cf964' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@142825.6561 5huvr5rcrhnimil1n18qnrd1gr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@142825.6582 5huvr5rcrhnimil1n18qnrd1gr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@142825.6617 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66c730982966c73cf99f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c736938866c73cf964' ,0,0 ,2,23.00,30000,?,?,?,?)
20240822@142825.6888 5huvr5rcrhnimil1n18qnrd1gr Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c736938866c73cf964','2405483','wait',39,'adm09112754980.682000002')
20240822@142825.6974 5huvr5rcrhnimil1n18qnrd1gr Query : use flama_phc
20240822@142825.6977 5huvr5rcrhnimil1n18qnrd1gr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@142825.7009 5huvr5rcrhnimil1n18qnrd1gr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1621';
20240822@142825.7040 5huvr5rcrhnimil1n18qnrd1gr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1621';
20240822@142825.7081 5huvr5rcrhnimil1n18qnrd1gr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1621';
20240822@142825.7107 5huvr5rcrhnimil1n18qnrd1gr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1621';

20240822@181549.2278 q4mjinb7k7kirdau82jqdj4tod Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1622';
20240822@181549.2338 q4mjinb7k7kirdau82jqdj4tod Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1622';
20240822@181549.2368 q4mjinb7k7kirdau82jqdj4tod Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1622';
20240822@181549.2410 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.2414 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@181549.2491 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1834.00.1'
20240822@181549.2693 q4mjinb7k7kirdau82jqdj4tod 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 = 2400213 and bi.ref ='324.1834.00.1' and bi.lordem =2
20240822@181549.3093 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.3098 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 1 valor from ts where ts.ndos = 61
20240822@181549.3158 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.3162 q4mjinb7k7kirdau82jqdj4tod 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')
20240822@181549.3198 q4mjinb7k7kirdau82jqdj4tod 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
20240822@181549.3244 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.3250 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 ~inactivo valor from fl where no = '202241' and estab = 00 order by inactivo desc
20240822@181549.3334 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.3339 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from ts where ndos = 61
20240822@181549.3363 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.4220 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240822@181549.4938 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.4963 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240822@181549.4973 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.4992 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240822@181549.5003 q4mjinb7k7kirdau82jqdj4tod 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
20240822@181549.5032 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240822@181549.5139 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240822@181549.5162 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.5170 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202241' and estab=00
20240822@181549.5199 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.5220 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240822@181549.5235 q4mjinb7k7kirdau82jqdj4tod Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c778218166c772457e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240822@181549.5258 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.5279 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240822@181549.5292 q4mjinb7k7kirdau82jqdj4tod Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c778218166c772457e','--','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240822@181549.5565 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.5590 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240822@181549.5607 q4mjinb7k7kirdau82jqdj4tod 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 ('aut66c778218166c772457e','guia r. fornecedor','2024-08-22',61,2402313,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240822@181549.6439 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.6445 q4mjinb7k7kirdau82jqdj4tod Query : select st.usalote valor from st where st.ref = '324.1834.00.1'
20240822@181549.6483 q4mjinb7k7kirdau82jqdj4tod 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.1834.00.1'
20240822@181549.6661 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.6685 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240822@181549.6703 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.6722 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240822@181549.6734 q4mjinb7k7kirdau82jqdj4tod Query : select sestamp valor from se where ref ='324.1834.00.1' and lote = 'r2400213100a'
20240822@181549.6762 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.6780 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240822@181549.6792 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.6813 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240822@181549.6830 q4mjinb7k7kirdau82jqdj4tod Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c774437366c77245a5',?,?,'20240822',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240822@181549.7105 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181549.7129 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.7157 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240822@181549.7175 q4mjinb7k7kirdau82jqdj4tod Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66c778537066c77245ae','aut66c778218166c772457e',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 = 'aut66c778218166c772457e'
20240822@181549.7389 q4mjinb7k7kirdau82jqdj4tod Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181549.7414 q4mjinb7k7kirdau82jqdj4tod Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240822@181549.7437 q4mjinb7k7kirdau82jqdj4tod 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,obistamp ,stipo) select 'aut66c778537066c77245ae',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1470, 1470*.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 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*1470,0*1470*200.48 ,28.770000,28.770000*200.48 ,28.770000,28.770000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*1470,0*1470*200.48,0,0*1470,0,0*1470,?,?,?,4 from bo bo where bo.bostamp = 'aut66c778218166c772457e'
20240822@181549.7994 q4mjinb7k7kirdau82jqdj4tod Query : use flama_phc
20240822@181549.7999 q4mjinb7k7kirdau82jqdj4tod Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -110
20240822@181549.8099 q4mjinb7k7kirdau82jqdj4tod Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1622';
20240822@181549.8131 q4mjinb7k7kirdau82jqdj4tod Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1622';
20240822@181639.5443 1eucknorfs6j5p5prkfl0edjeq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@181639.5456 1eucknorfs6j5p5prkfl0edjeq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@181639.5510 1eucknorfs6j5p5prkfl0edjeq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1623';
20240822@181639.5573 1eucknorfs6j5p5prkfl0edjeq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1623';
20240822@181639.5632 1eucknorfs6j5p5prkfl0edjeq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1623';
20240822@181639.5659 1eucknorfs6j5p5prkfl0edjeq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1623';
20240822@181639.5730 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.5734 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@181639.5803 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.5807 1eucknorfs6j5p5prkfl0edjeq Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@181639.5851 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240822@181639.6071 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405479 and bi.ref ='324.4840.00.1' and bi.lordem =1
20240822@181639.6416 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240822@181639.6441 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405479 and bi.ref ='324.4840.00.1' and bi.lordem =1
20240822@181639.6460 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4840.00.1'
20240822@181639.6482 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405479 and bi.ref ='324.4840.00.1' and bi.lordem =1
20240822@181639.6502 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6506 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@181639.6543 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6548 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 1 valor from td where td.ndoc = 39
20240822@181639.6582 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6585 1eucknorfs6j5p5prkfl0edjeq 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')
20240822@181639.6621 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@181639.6664 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6667 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@181639.6702 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6706 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@181639.6739 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6743 1eucknorfs6j5p5prkfl0edjeq Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@181639.6786 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6790 1eucknorfs6j5p5prkfl0edjeq Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@181639.6838 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.6841 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from td where ndoc = 39
20240822@181639.6854 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@181639.6908 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.6928 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181639.6950 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.6967 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181639.6999 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.7015 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181639.7029 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181639.7102 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181639.7117 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.7136 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181639.7156 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c775228766c77277ab' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@181639.7355 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.7376 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181639.7415 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@181639.7431 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@181639.7447 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@181639.7462 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@181639.7477 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@181639.7490 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@181639.7504 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c775228766c77277ab',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@181639.7782 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 fno valor from wsftdata order by fno desc
20240822@181639.7803 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.7823 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181639.7856 1eucknorfs6j5p5prkfl0edjeq Query : select 'normal' from dummy
20240822@181639.7875 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c775228766c77277ab',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',426,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@181639.8266 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.8270 1eucknorfs6j5p5prkfl0edjeq Query : select st.usalote valor from st where st.ref = '324.4840.00.1'
20240822@181639.8299 1eucknorfs6j5p5prkfl0edjeq 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.4840.00.1'
20240822@181639.8459 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.8479 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181639.8511 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.8528 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181639.8539 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181639.8554 1eucknorfs6j5p5prkfl0edjeq Query : select sestamp valor from se where ref ='324.4840.00.1' and lote = 'r2400064200a'
20240822@181639.8570 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.8588 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181639.8603 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c770832966c77277d1','aut66c775228766c77277ab' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181639.8608 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.8626 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181639.8664 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c770832966c77277d1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c775228766c77277ab' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20240822@181639.8989 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.8993 1eucknorfs6j5p5prkfl0edjeq Query : select st.usalote valor from st where st.ref = '324.4840.00.1'
20240822@181639.9030 1eucknorfs6j5p5prkfl0edjeq 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.4840.00.1'
20240822@181639.9052 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.9073 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181639.9116 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.9137 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181639.9151 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181639.9167 1eucknorfs6j5p5prkfl0edjeq Query : select sestamp valor from se where ref ='324.4840.00.1' and lote = 'r2400064200a'
20240822@181639.9185 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.9217 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181639.9242 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c774029366c77277e0','aut66c775228766c77277ab' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181639.9249 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181639.9271 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181639.9309 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c774029366c77277e0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66c775228766c77277ab' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20240822@181639.9611 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181639.9655 1eucknorfs6j5p5prkfl0edjeq Query : select st.usalote valor from st where st.ref = '324.4840.00.1'
20240822@181640.8420 1eucknorfs6j5p5prkfl0edjeq 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.4840.00.1'
20240822@181640.8600 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.8790 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.9090 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.9480 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.9580 1eucknorfs6j5p5prkfl0edjeq Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181640.9730 1eucknorfs6j5p5prkfl0edjeq Query : select sestamp valor from se where ref ='324.4840.00.1' and lote = 'r2400064200a'
20240822@181640.9880 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.1005 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.1020 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c772804166c7727818','aut66c775228766c77277ab' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181640.1025 1eucknorfs6j5p5prkfl0edjeq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.1044 1eucknorfs6j5p5prkfl0edjeq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.1077 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c772804166c7727818',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',36.000 ,'aut66c775228766c77277ab' ,0,0 ,2,23.00,30000,?,?,?,?,?)
20240822@181640.1348 1eucknorfs6j5p5prkfl0edjeq Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c775228766c77277ab','2405479','wait',39,'adm09112754980.682000002')
20240822@181640.1428 1eucknorfs6j5p5prkfl0edjeq Query : use flama_phc
20240822@181640.1432 1eucknorfs6j5p5prkfl0edjeq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@181640.1466 1eucknorfs6j5p5prkfl0edjeq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1623';
20240822@181640.1497 1eucknorfs6j5p5prkfl0edjeq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1623';
20240822@181640.1537 1eucknorfs6j5p5prkfl0edjeq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1623';
20240822@181640.1565 1eucknorfs6j5p5prkfl0edjeq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1623';
20240822@181640.2089 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@181640.2103 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@181640.2175 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1624';
20240822@181640.2241 nlqrdpdlc8c6fl7p5cu0skhn06 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1624';
20240822@181640.2295 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1624';
20240822@181640.2327 nlqrdpdlc8c6fl7p5cu0skhn06 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1624';
20240822@181640.2379 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.2383 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@181640.2458 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.2462 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@181640.2510 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@181640.2534 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405480 and bi.ref ='324.988.00.01' and bi.lordem =1
20240822@181640.2908 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@181640.2930 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405480 and bi.ref ='324.988.00.01' and bi.lordem =1
20240822@181640.2950 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.988.00.01'
20240822@181640.2973 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405480 and bi.ref ='324.988.00.01' and bi.lordem =1
20240822@181640.2993 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.2997 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@181640.3035 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3039 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 1 valor from td where td.ndoc = 39
20240822@181640.3082 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3087 nlqrdpdlc8c6fl7p5cu0skhn06 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')
20240822@181640.3123 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@181640.3163 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3167 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@181640.3201 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3205 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@181640.3238 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3242 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@181640.3286 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3290 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@181640.3341 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.3345 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from td where ndoc = 39
20240822@181640.3359 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@181640.3376 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.3397 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181640.3421 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.3440 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181640.3474 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.3492 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181640.3513 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181640.3587 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181640.3604 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.3623 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181640.3645 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c772372666c7727855' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@181640.3922 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.3951 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181640.3994 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@181640.4011 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@181640.4028 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@181640.4043 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@181640.4057 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@181640.4072 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@181640.4093 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c772372666c7727855',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@181640.4373 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 fno valor from wsftdata order by fno desc
20240822@181640.4396 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.4416 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181640.4450 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 'normal' from dummy
20240822@181640.4471 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c772372666c7727855',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',427,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@181640.4796 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.4800 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@181640.4826 nlqrdpdlc8c6fl7p5cu0skhn06 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'
20240822@181640.4843 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.4862 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.4893 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.4910 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.4920 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181640.4935 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@181640.4952 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.4969 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.4995 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c771940366c7727878','aut66c772372666c7727855' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181640.5001 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.5020 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.5063 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c771940366c7727878',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut66c772372666c7727855' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20240822@181640.5367 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.5370 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@181640.5392 nlqrdpdlc8c6fl7p5cu0skhn06 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'
20240822@181640.5407 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.5576 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.5605 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.5626 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.6884 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181640.6900 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@181640.6915 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.6934 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.6998 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c770042766c77278a8','aut66c772372666c7727855' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181640.7004 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.7024 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.7075 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c770042766c77278a8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c772372666c7727855' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20240822@181640.7468 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.7473 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select st.usalote valor from st where st.ref = '324.988.00.01'
20240822@181640.7511 nlqrdpdlc8c6fl7p5cu0skhn06 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'
20240822@181640.7531 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.7553 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.7586 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.7608 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.7618 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181640.7636 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select sestamp valor from se where ref ='324.988.00.01' and lote = 'r2400410200a'
20240822@181640.7656 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.7678 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181640.7692 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c779021066c77278ba','aut66c772372666c7727855' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181640.7707 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181640.7726 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181640.7761 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c779021066c77278ba',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',42.000 ,'aut66c772372666c7727855' ,0,0 ,2,23.00,30000,?,?,?,?,?)
20240822@181640.8075 nlqrdpdlc8c6fl7p5cu0skhn06 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c772372666c7727855','2405480','wait',39,'adm09112754980.682000002')
20240822@181640.8160 nlqrdpdlc8c6fl7p5cu0skhn06 Query : use flama_phc
20240822@181640.8164 nlqrdpdlc8c6fl7p5cu0skhn06 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@181640.8203 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1624';
20240822@181640.8237 nlqrdpdlc8c6fl7p5cu0skhn06 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1624';
20240822@181640.8300 nlqrdpdlc8c6fl7p5cu0skhn06 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1624';
20240822@181640.8330 nlqrdpdlc8c6fl7p5cu0skhn06 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1624';
20240822@181640.9230 89m4l40b3k8i6318cdjrh5f9kr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@181640.9243 89m4l40b3k8i6318cdjrh5f9kr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@181640.9304 89m4l40b3k8i6318cdjrh5f9kr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1625';
20240822@181640.9424 89m4l40b3k8i6318cdjrh5f9kr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1625';
20240822@181640.9479 89m4l40b3k8i6318cdjrh5f9kr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1625';
20240822@181640.9508 89m4l40b3k8i6318cdjrh5f9kr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1625';
20240822@181640.9558 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181640.9562 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@181640.9646 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181640.9650 89m4l40b3k8i6318cdjrh5f9kr Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@181640.9694 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240822@181640.9867 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405481 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240822@181641.2300 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240822@181641.2550 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405481 and bi.ref ='324.4980.00.1' and bi.lordem =1
20240822@181641.2740 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.2780 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@181641.3150 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.3190 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 1 valor from td where td.ndoc = 39
20240822@181641.3570 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.3600 89m4l40b3k8i6318cdjrh5f9kr 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')
20240822@181641.3920 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@181641.4310 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.4350 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@181641.4700 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.4730 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@181641.5060 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.5090 89m4l40b3k8i6318cdjrh5f9kr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@181641.5510 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.5550 89m4l40b3k8i6318cdjrh5f9kr Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@181641.6090 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.6140 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from td where ndoc = 39
20240822@181641.6290 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@181641.6470 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.6660 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181641.6890 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.7110 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181641.7500 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.7690 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181641.7870 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181641.8640 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181641.8790 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.8970 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181641.9180 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c774657066c7727913' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@181641.1123 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.1143 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181641.1184 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240822@181641.1200 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240822@181641.1214 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240822@181641.1230 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240822@181641.1246 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240822@181641.1261 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240822@181641.1274 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66c774657066c7727913',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240822@181641.1597 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 fno valor from wsftdata order by fno desc
20240822@181641.1621 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.1761 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181641.1891 89m4l40b3k8i6318cdjrh5f9kr Query : select 'normal' from dummy
20240822@181641.1912 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66c774657066c7727913',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',428,100810,0,'2024-08-22',39,'euro',0,0,2024 ,?,?)
20240822@181641.2250 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.2253 89m4l40b3k8i6318cdjrh5f9kr Query : select st.usalote valor from st where st.ref = '324.4980.00.1'
20240822@181641.2280 89m4l40b3k8i6318cdjrh5f9kr 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.4980.00.1'
20240822@181641.2436 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.2456 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181641.2488 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.2506 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181641.2518 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181641.2535 89m4l40b3k8i6318cdjrh5f9kr Query : select sestamp valor from se where ref ='324.4980.00.1' and lote = 'r2301092100a'
20240822@181641.2560 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.2577 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181641.2591 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c775288066c772793e','aut66c774657066c7727913' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181641.2597 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.2616 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181641.2654 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c775288066c772793e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66c774657066c7727913' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20240822@181641.2937 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.2942 89m4l40b3k8i6318cdjrh5f9kr Query : select st.usalote valor from st where st.ref = '324.4980.00.1'
20240822@181641.2968 89m4l40b3k8i6318cdjrh5f9kr 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.4980.00.1'
20240822@181641.2986 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.3006 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181641.3037 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.3057 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181641.3069 89m4l40b3k8i6318cdjrh5f9kr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240822@181641.3084 89m4l40b3k8i6318cdjrh5f9kr Query : select sestamp valor from se where ref ='324.4980.00.1' and lote = 'r2301092100a'
20240822@181641.3100 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.3117 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240822@181641.3131 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66c776894966c772794b','aut66c774657066c7727913' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240822@181641.3136 89m4l40b3k8i6318cdjrh5f9kr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.3154 89m4l40b3k8i6318cdjrh5f9kr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240822@181641.3191 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66c776894966c772794b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',80.000 ,'aut66c774657066c7727913' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20240822@181641.3490 89m4l40b3k8i6318cdjrh5f9kr Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66c774657066c7727913','2405481','wait',39,'adm09112754980.682000002')
20240822@181641.3568 89m4l40b3k8i6318cdjrh5f9kr Query : use flama_phc
20240822@181641.3573 89m4l40b3k8i6318cdjrh5f9kr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240822@181641.3605 89m4l40b3k8i6318cdjrh5f9kr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1625';
20240822@181641.3636 89m4l40b3k8i6318cdjrh5f9kr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1625';
20240822@181641.3678 89m4l40b3k8i6318cdjrh5f9kr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1625';
20240822@181641.3707 89m4l40b3k8i6318cdjrh5f9kr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1625';
20240822@181641.4258 2e6q0ikd2ohbu9q6r8fotigeph Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240822@181641.4270 2e6q0ikd2ohbu9q6r8fotigeph Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240822@181641.4328 2e6q0ikd2ohbu9q6r8fotigeph Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1626';
20240822@181641.4391 2e6q0ikd2ohbu9q6r8fotigeph Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1626';
20240822@181641.4445 2e6q0ikd2ohbu9q6r8fotigeph Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1626';
20240822@181641.4475 2e6q0ikd2ohbu9q6r8fotigeph Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1626';
20240822@181641.4528 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.4533 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240822@181641.4606 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.4609 2e6q0ikd2ohbu9q6r8fotigeph Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240822@181641.4655 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.948.00.01'
20240822@181641.4835 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405482 and bi.ref ='324.948.00.01' and bi.lordem =1
20240822@181641.5185 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.948.00.01'
20240822@181641.5210 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2054 and bo.obrano = 2405482 and bi.ref ='324.948.00.01' and bi.lordem =1
20240822@181641.5230 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5234 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240822@181641.5274 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5279 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 1 valor from td where td.ndoc = 39
20240822@181641.5311 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5315 2e6q0ikd2ohbu9q6r8fotigeph 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')
20240822@181641.5345 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20240822@181641.5429 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5433 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20240822@181641.5465 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5469 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240822@181641.5501 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5505 2e6q0ikd2ohbu9q6r8fotigeph Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240822@181641.5546 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5550 2e6q0ikd2ohbu9q6r8fotigeph Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20240822@181641.5750 2e6q0ikd2ohbu9q6r8fotigeph Query : use flama_phc
20240822@181641.5754 2e6q0ikd2ohbu9q6r8fotigeph Query : select 1 valor from td where ndoc = 39
20240822@181641.5769 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240822@181641.5787 2e6q0ikd2ohbu9q6r8fotigeph Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.5808 2e6q0ikd2ohbu9q6r8fotigeph Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240822@181641.7148 2e6q0ikd2ohbu9q6r8fotigeph Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.7200 2e6q0ikd2ohbu9q6r8fotigeph Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181641.7237 2e6q0ikd2ohbu9q6r8fotigeph Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.7258 2e6q0ikd2ohbu9q6r8fotigeph Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181641.7274 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181641.7349 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240822@181641.7364 2e6q0ikd2ohbu9q6r8fotigeph Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.7386 2e6q0ikd2ohbu9q6r8fotigeph Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240822@181641.7406 2e6q0ikd2ohbu9q6r8fotigeph Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66c770979866c77279b1' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240822@181641.7618 2e6q0ikd2ohbu9q6r8fotigeph Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240822@181641.7640 2e6q0ikd2ohbu9q6r8fotigeph Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240822@181641.7679 2e6q0ikd2ohbu9q6r8fotigeph Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
