20250110@135735.2513 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.2529 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20250110@135735.2539 muh0885hs3npk43e31vfpp5loi Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 5
20250110@135735.2715 muh0885hs3npk43e31vfpp5loi Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2025 order by obrano desc
20250110@135735.2872 muh0885hs3npk43e31vfpp5loi Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2025 order by obrano desc
20250110@135735.2964 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.2970 muh0885hs3npk43e31vfpp5loi Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20250110@135735.3055 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.3073 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20250110@135735.3086 muh0885hs3npk43e31vfpp5loi Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67812541066781274f48',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250110@135735.3149 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.3165 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20250110@135735.3179 muh0885hs3npk43e31vfpp5loi Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut67812541066781274f48','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20250110','14:27',?,?)
20250110@135735.3649 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.3714 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20250110@135735.3735 muh0885hs3npk43e31vfpp5loi Query : insert into wsbodata (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,maquina ) values ('aut67812541066781274f48','trf entre armazéns a','2025-01-10',5,10,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',?)
20250110@135735.4325 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.4329 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1643.00.1'
20250110@135735.4343 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.4346 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1643.00.1'
20250110@135735.4441 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.4445 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1643.00.1' and sa.armazem = 133 
20250110@135735.4513 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.4516 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1643.00.1'
20250110@135735.4541 muh0885hs3npk43e31vfpp5loi 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.1643.00.1'
20250110@135735.4741 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.4757 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.4772 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.4788 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.4798 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1643.00.1' and lote = 'r2101218200a'
20250110@135735.4818 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135735.4830 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.4845 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.4858 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812783566781274f75','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.5222 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.5240 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.5257 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812783566781274f75',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 20.000, 20.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,96,96*200.48,96,96*200.48 ,0,0,'un ','' ,bo.marcada,1 ,96*20.000,96*20.000*200.48 ,40.138000,40.138000*200.48 ,40.138000,40.138000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,96,96*200.48,96*20.000,96*20.000*200.48,'av25010859363.531000001 ',96,96*20.000,96,96*20.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.5673 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.5677 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1684.00.1'
20250110@135735.5695 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.5698 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1684.00.1'
20250110@135735.5715 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.5717 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1684.00.1' and sa.armazem = 133 
20250110@135735.5785 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.5789 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1684.00.1'
20250110@135735.5809 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1684.00.1'
20250110@135735.5946 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.5963 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.5978 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.5997 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.6703 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1684.00.1' and lote = 'r2400208100a'
20250110@135735.7173 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135735.7187 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.7203 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.7217 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812165226781274faf','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.7373 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.7390 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.7406 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812165226781274faf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,20000 ,51.2,51.2*200.48,51.2,51.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,51.2*4.000,51.2*4.000*200.48 ,17.955000,17.955000*200.48 ,17.955000,17.955000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,51.2,51.2*200.48,51.2*4.000,51.2*4.000*200.48,'av25010859380.152000002 ',51.2,51.2*4.000,51.2,51.2*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.7727 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.7732 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.4751.00.1'
20250110@135735.7760 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.7764 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.4751.00.1'
20250110@135735.7788 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.7791 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.4751.00.1' and sa.armazem = 133 
20250110@135735.7863 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.7866 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.4751.00.1'
20250110@135735.7886 muh0885hs3npk43e31vfpp5loi 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.4751.00.1'
20250110@135735.7901 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.7917 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.7930 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.7946 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.7955 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.4751.00.1' and lote = 'r2400049200a'
20250110@135735.7970 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135735.7983 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.7997 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.8010 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812616016781274fc2','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.8149 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.8165 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.8181 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812616016781274fc2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,30000 ,44.8,44.8*200.48,44.8,44.8*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,44.8*4.000,44.8*4.000*200.48 ,17.464000,17.464000*200.48 ,17.464000,17.464000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,44.8,44.8*200.48,44.8*4.000,44.8*4.000*200.48,'av25010859387.124000003 ',44.8,44.8*4.000,44.8,44.8*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.8493 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.8498 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.4960.00.1'
20250110@135735.8512 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.8515 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.4960.00.1'
20250110@135735.8532 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.8535 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.4960.00.1' and sa.armazem = 133 
20250110@135735.8604 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.8607 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.4960.00.1'
20250110@135735.8628 muh0885hs3npk43e31vfpp5loi 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'
20250110@135735.8642 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.8658 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.8702 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.8719 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.8728 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.4960.00.1' and lote = 'r2100754100a'
20250110@135735.8741 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135735.8754 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.8769 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.8782 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812418956781274fd5','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.8925 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.8942 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.8958 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812418956781274fd5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,40000 ,19.2,19.2*200.48,19.2,19.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,19.2*6.000,19.2*6.000*200.48 ,6.102000,6.102000*200.48 ,6.102000,6.102000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19.2,19.2*200.48,19.2*6.000,19.2*6.000*200.48,'av25010859394.151000004 ',19.2,19.2*6.000,19.2,19.2*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.9267 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.9271 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.958.00.01'
20250110@135735.9286 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.9289 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.958.00.01'
20250110@135735.9337 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.9340 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.958.00.01' and sa.armazem = 133 
20250110@135735.9427 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135735.9430 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.958.00.01'
20250110@135735.9449 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.958.00.01'
20250110@135735.9589 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.9605 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.9618 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.9635 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.9644 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.958.00.01' and lote = 'r2400704200a'
20250110@135735.9660 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135735.9675 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.9691 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135735.9703 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812317866781274fec','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135735.9840 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135735.9858 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135735.9874 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812317866781274fec',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,50000 ,19.2,19.2*200.48,19.2,19.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,19.2*8.000,19.2*8.000*200.48 ,8.220000,8.220000*200.48 ,8.220000,8.220000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19.2,19.2*200.48,19.2*8.000,19.2*8.000*200.48,'av25010859414.466000007 ',19.2,19.2*8.000,19.2,19.2*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.1860 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1910 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.969.00.01'
20250110@135736.2070 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.2110 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.969.00.01'
20250110@135736.2290 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.2320 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.969.00.01' and sa.armazem = 133 
20250110@135736.3020 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.3050 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.969.00.01'
20250110@135736.3260 muh0885hs3npk43e31vfpp5loi 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.969.00.01'
20250110@135736.5120 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.5310 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.5470 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.5640 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.5760 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.969.00.01' and lote = 'r2100601100a'
20250110@135736.6020 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.6180 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.6330 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.6460 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6781295066678127500f','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.7890 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.8090 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.8260 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut6781295066678127500f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,60000 ,35.2,35.2*200.48,35.2,35.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,35.2*6.000,35.2*6.000*200.48 ,15.817000,15.817000*200.48 ,15.817000,15.817000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,35.2,35.2*200.48,35.2*6.000,35.2*6.000*200.48,'av25010859421.623000008 ',35.2,35.2*6.000,35.2,35.2*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.1121 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1125 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.948.00.01'
20250110@135736.1139 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1142 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.948.00.01'
20250110@135736.1159 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1161 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.948.00.01' and sa.armazem = 133 
20250110@135736.1233 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1236 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.948.00.01'
20250110@135736.1262 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.948.00.01'
20250110@135736.1283 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.1299 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.1316 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.1331 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.1340 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.948.00.01' and lote = 'r2400703100a'
20250110@135736.1354 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.1367 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.1382 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.1393 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812572606781275021','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.1547 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.1566 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.1582 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812572606781275021',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 42.000, 42.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,70000 ,30.1,30.1*200.48,30.1,30.1*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,30.1*42.000,30.1*42.000*200.48 ,11.700000,11.700000*200.48 ,11.700000,11.700000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,30.1,30.1*200.48,30.1*42.000,30.1*42.000*200.48,'av25010859438.149000010 ',30.1,30.1*42.000,30.1,30.1*42.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.1882 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1886 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.681.00.01'
20250110@135736.1902 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1905 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.681.00.01'
20250110@135736.1922 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1925 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.681.00.01' and sa.armazem = 133 
20250110@135736.1995 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.1998 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.681.00.01'
20250110@135736.2016 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.681.00.01'
20250110@135736.2179 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.2197 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.2211 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.2229 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.2238 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.681.00.01' and lote = 'r2400696200a'
20250110@135736.2253 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.2267 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.2282 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.2296 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812843066781275037','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.2433 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.2452 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.2470 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812843066781275037',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,80000 ,83.2,83.2*200.48,83.2,83.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,83.2*6.000,83.2*6.000*200.48 ,24.423000,24.423000*200.48 ,24.423000,24.423000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,83.2,83.2*200.48,83.2*6.000,83.2*6.000*200.48,'av25010859459.322000013 ',83.2,83.2*6.000,83.2,83.2*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.2836 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.2841 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20250110@135736.2859 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.2862 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.682.00.01'
20250110@135736.2881 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.2884 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.682.00.01' and sa.armazem = 133 
20250110@135736.2957 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.2961 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.682.00.01'
20250110@135736.2982 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.682.00.01'
20250110@135736.3121 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.3139 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.3153 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.3169 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.3179 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400958400a'
20250110@135736.3194 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.3208 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.3231 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.3245 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6781214208678127504e','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.3435 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.3497 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.3517 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut6781214208678127504e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,90000 ,83.2,83.2*200.48,83.2,83.2*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,83.2*6.000,83.2*6.000*200.48 ,22.761000,22.761000*200.48 ,22.761000,22.761000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,83.2,83.2*200.48,83.2*6.000,83.2*6.000*200.48,'av25010859465.555000014 ',83.2,83.2*6.000,83.2,83.2*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.3903 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.3907 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1889.00.1'
20250110@135736.3925 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.3928 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1889.00.1'
20250110@135736.3951 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.3954 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1889.00.1' and sa.armazem = 133 
20250110@135736.4038 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.4041 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1889.00.1'
20250110@135736.4063 muh0885hs3npk43e31vfpp5loi 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'
20250110@135736.4207 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.4226 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.4240 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.4257 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.4267 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1889.00.1' and lote = 'r2400452200a'
20250110@135736.4282 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.4296 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.4313 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.4327 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812754556781275068','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.4467 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.4485 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.4503 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812754556781275068',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 3.000, 3.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,100000 ,67.5,67.5*200.48,67.5,67.5*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,67.5*3.000,67.5*3.000*200.48 ,29.078000,29.078000*200.48 ,29.078000,29.078000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,67.5,67.5*200.48,67.5*3.000,67.5*3.000*200.48,'av25010859473.423000015 ',67.5,67.5*3.000,67.5,67.5*3.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.4877 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.4882 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.2366.00.1'
20250110@135736.4900 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.4903 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.2366.00.1'
20250110@135736.5427 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.5512 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2366.00.1' and sa.armazem = 133 
20250110@135736.5650 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.5653 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.2366.00.1'
20250110@135736.5672 muh0885hs3npk43e31vfpp5loi 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.2366.00.1'
20250110@135736.5809 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.5826 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.5840 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.5856 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.5865 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.2366.00.1' and lote = 'r2400498100a'
20250110@135736.5888 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.5901 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.5917 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.5931 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812937626781275090','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.6069 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.6087 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.6105 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812937626781275090',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,110000 ,70.4,70.4*200.48,70.4,70.4*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,70.4*4.000,70.4*4.000*200.48 ,29.441000,29.441000*200.48 ,29.441000,29.441000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,70.4,70.4*200.48,70.4*4.000,70.4*4.000*200.48,'av25010859480.098000016 ',70.4,70.4*4.000,70.4,70.4*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.6416 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.6578 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1824.00.1'
20250110@135736.7175 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.7179 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1824.00.1'
20250110@135736.7197 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.7200 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1824.00.1' and sa.armazem = 133 
20250110@135736.7277 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.7280 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1824.00.1'
20250110@135736.7307 muh0885hs3npk43e31vfpp5loi 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.1824.00.1'
20250110@135736.7449 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.7467 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.7479 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.7495 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.7503 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1824.00.1' and lote = 'r2400217200a'
20250110@135736.7523 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.7535 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.7549 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.7561 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut678126432267812750b7','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.7702 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.7721 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.7736 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut678126432267812750b7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,120000 ,54.8,54.8*200.48,54.8,54.8*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,54.8*4.000,54.8*4.000*200.48 ,27.295000,27.295000*200.48 ,27.295000,27.295000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,54.8,54.8*200.48,54.8*4.000,54.8*4.000*200.48,'av25010859486.832000017 ',54.8,54.8*4.000,54.8,54.8*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.8044 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.8048 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1406.00.1'
20250110@135736.8064 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.8066 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1406.00.1'
20250110@135736.8086 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.8090 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1406.00.1' and sa.armazem = 133 
20250110@135736.8162 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.8165 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1406.00.1'
20250110@135736.8187 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1406.00.1'
20250110@135736.8325 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.8342 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.8356 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.8373 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.8385 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1406.00.1' and lote = 'r2400744200a'
20250110@135736.8400 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.8415 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.8432 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.8445 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut678120523267812750cd','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.8618 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.8638 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.8653 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut678120523267812750cd',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 30.000, 30.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,130000 ,22.4,22.4*200.48,22.4,22.4*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,22.4*30.000,22.4*30.000*200.48 ,10.378000,10.378000*200.48 ,10.378000,10.378000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,22.4,22.4*200.48,22.4*30.000,22.4*30.000*200.48,'av25010859493.381000018 ',22.4,22.4*30.000,22.4,22.4*30.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.8964 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.8968 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.2301.00.3'
20250110@135736.8984 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.8987 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.2301.00.3'
20250110@135736.9004 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.9008 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2301.00.3' and sa.armazem = 133 
20250110@135736.9081 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135736.9084 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.2301.00.3'
20250110@135736.9103 muh0885hs3npk43e31vfpp5loi 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.2301.00.3'
20250110@135736.9251 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.9267 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.9310 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.9328 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.9337 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.2301.00.3' and lote = 'r2400474200a'
20250110@135736.9357 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135736.9376 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.9392 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135736.9405 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut678128129967812750e4','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.9556 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135736.9574 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135736.9590 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut678128129967812750e4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 30.000, 30.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,140000 ,16,16*200.48,16,16*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,16*30.000,16*30.000*200.48 ,5.537000,5.537000*200.48 ,5.537000,5.537000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,16,16*200.48,16*30.000,16*30.000*200.48,'av25010859499.582000019 ',16,16*30.000,16,16*30.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135736.9997 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.1000 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1705.00.1'
20250110@135737.1800 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.2100 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1705.00.1'
20250110@135737.3900 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.4300 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1705.00.1' and sa.armazem = 133 
20250110@135737.1260 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.1280 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1705.00.1'
20250110@135737.1460 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1705.00.1'
20250110@135737.2910 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.3080 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135737.3210 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.3350 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135737.3430 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1705.00.1' and lote = 'r2400926200a'
20250110@135737.3580 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135737.3700 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.3840 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135737.3950 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812975086781275109','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135737.5920 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.6110 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135737.6280 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812975086781275109',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 20.000, 20.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,150000 ,32,32*200.48,32,32*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,32*20.000,32*20.000*200.48 ,10.120000,10.120000*200.48 ,10.120000,10.120000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,32,32*200.48,32*20.000,32*20.000*200.48,'av25010859519.395000021 ',32,32*20.000,32,32*20.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135737.9990 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.1004 muh0885hs3npk43e31vfpp5loi Query : select st.usalote valor from st where st.ref = '324.1266.00.1'
20250110@135737.1019 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.1022 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1266.00.1'
20250110@135737.1039 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.1041 muh0885hs3npk43e31vfpp5loi Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1266.00.1' and sa.armazem = 133 
20250110@135737.1140 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.1143 muh0885hs3npk43e31vfpp5loi Query : select st.stns valor from st where st.ref = '324.1266.00.1'
20250110@135737.1161 muh0885hs3npk43e31vfpp5loi Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1266.00.1'
20250110@135737.1303 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.1320 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135737.1333 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.1348 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135737.1358 muh0885hs3npk43e31vfpp5loi Query : select sestamp valor from se where ref ='324.1266.00.1' and lote = 'r2101351100a'
20250110@135737.1380 muh0885hs3npk43e31vfpp5loi Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@135737.1394 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.1413 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20250110@135737.1426 muh0885hs3npk43e31vfpp5loi Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67812399076781275122','aut67812541066781274f48',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135737.1607 muh0885hs3npk43e31vfpp5loi Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@135737.1627 muh0885hs3npk43e31vfpp5loi Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20250110@135737.1642 muh0885hs3npk43e31vfpp5loi Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut67812399076781275122',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,160000 ,115.2,115.2*200.48,115.2,115.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,115.2*6.000,115.2*6.000*200.48 ,49.752000,49.752000*200.48 ,49.752000,49.752000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,115.2,115.2*200.48,115.2*6.000,115.2*6.000*200.48,'av25010859526.376000022 ',115.2,115.2*6.000,115.2,115.2*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut67812541066781274f48'
20250110@135737.1959 muh0885hs3npk43e31vfpp5loi Query : insert into wsbocreationlog (initialstamp,externalid,creationstatus,documenttypeid,idustamp,transactionid) values ('aut67812541066781274f48','','wait',5,'adm12071144683,938000003','')
20250110@135737.2050 muh0885hs3npk43e31vfpp5loi Query : use flama_phc
20250110@135737.2054 muh0885hs3npk43e31vfpp5loi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@135737.2117 muh0885hs3npk43e31vfpp5loi Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='4492';
20250110@135737.2165 muh0885hs3npk43e31vfpp5loi Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='4492';
20250110@141910.5300 udj2ngfccrvp7sff53348r2h4n Query : use flama_phc
20250110@141910.5700 udj2ngfccrvp7sff53348r2h4n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250110@141910.3620 udj2ngfccrvp7sff53348r2h4n Query : use flama_phc
20250110@141910.3670 udj2ngfccrvp7sff53348r2h4n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@143609.9077 e58k649mfijeudpl1cept890rd Query : use flama_phc
20250110@143609.9082 e58k649mfijeudpl1cept890rd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250110@143609.9166 e58k649mfijeudpl1cept890rd Query : use flama_phc
20250110@143609.9169 e58k649mfijeudpl1cept890rd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@151908.9891 g26gb4j0jgbdri7hdl0dus5s61 Query : use flama_phc
20250110@151908.9895 g26gb4j0jgbdri7hdl0dus5s61 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250110@151908.9995 g26gb4j0jgbdri7hdl0dus5s61 Query : use flama_phc
20250110@151908.9999 g26gb4j0jgbdri7hdl0dus5s61 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@153609.5221 hocj0t7vid0pv6u64308f42gsn Query : use flama_phc
20250110@153609.5225 hocj0t7vid0pv6u64308f42gsn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250110@153609.5333 hocj0t7vid0pv6u64308f42gsn Query : use flama_phc
20250110@153609.5337 hocj0t7vid0pv6u64308f42gsn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@154357.5915 5j3hqsg47gr63e78n3a8b8k6h2 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250110@154357.5932 5j3hqsg47gr63e78n3a8b8k6h2 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250110@154357.6199 5j3hqsg47gr63e78n3a8b8k6h2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='4493';
20250110@154357.6313 5j3hqsg47gr63e78n3a8b8k6h2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='4493';
20250110@154357.6410 5j3hqsg47gr63e78n3a8b8k6h2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='4493';
20250110@154357.6460 5j3hqsg47gr63e78n3a8b8k6h2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='4493';
20250110@154357.6550 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154357.6554 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250110@154357.6658 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5500.00.1'
20250110@154357.6793 5j3hqsg47gr63e78n3a8b8k6h2 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 = 2401058 and bi.ref ='324.5500.00.1' and bi.lordem =20000
20250110@154357.7190 5j3hqsg47gr63e78n3a8b8k6h2 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 = 'cps24090936346,216000002 ' 
20250110@154357.7517 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154357.7521 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 1 valor from ts where ts.ndos = 61
20250110@154357.7561 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154357.7563 5j3hqsg47gr63e78n3a8b8k6h2 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')
20250110@154357.7619 5j3hqsg47gr63e78n3a8b8k6h2 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
20250110@154357.7668 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154357.7673 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 ~inactivo valor from fl where no = '202544' and estab = 00 order by inactivo desc
20250110@154357.7849 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154357.7853 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from ts where ndos = 61
20250110@154357.7874 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154357.7893 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250110@154357.7908 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154357.7927 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250110@154357.7939 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154357.7959 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250110@154357.7973 5j3hqsg47gr63e78n3a8b8k6h2 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
20250110@154357.7998 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250110@154357.8027 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250110@154357.8049 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154357.8056 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202544' and estab=00
20250110@154357.8173 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154357.8198 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250110@154357.8212 5j3hqsg47gr63e78n3a8b8k6h2 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67814188296781403dc4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250110@154357.8218 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154357.8239 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250110@154357.8255 5j3hqsg47gr63e78n3a8b8k6h2 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67814188296781403dc4','--','bo',7.9178217821782178217 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250110@154357.8268 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154357.8287 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250110@154357.8300 5j3hqsg47gr63e78n3a8b8k6h2 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 ('aut67814188296781403dc4','guia r. fornecedor','2025-01-10',61,2500118,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250110@154402.2303 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154402.2308 5j3hqsg47gr63e78n3a8b8k6h2 Query : select st.usalote valor from st where st.ref = '324.5500.00.1'
20250110@154402.2343 5j3hqsg47gr63e78n3a8b8k6h2 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.5500.00.1'
20250110@154402.2563 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154402.2626 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250110@154402.2661 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154402.2724 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250110@154402.2773 5j3hqsg47gr63e78n3a8b8k6h2 Query : select sestamp valor from se where ref ='324.5500.00.1' and lote = 'r2401058200a'
20250110@154402.2791 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154402.2848 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250110@154402.2860 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154402.2881 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250110@154402.2897 5j3hqsg47gr63e78n3a8b8k6h2 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67814722236781404245',?,?,'20250110',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250110@154402.4259 5j3hqsg47gr63e78n3a8b8k6h2 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250110@154402.4286 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154402.4312 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250110@154402.4326 5j3hqsg47gr63e78n3a8b8k6h2 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67814281326781404268','aut67814188296781403dc4',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 = 'aut67814188296781403dc4'
20250110@154402.4643 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250110@154402.4667 5j3hqsg47gr63e78n3a8b8k6h2 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250110@154402.4690 5j3hqsg47gr63e78n3a8b8k6h2 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 'aut67814281326781404268',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1260, 1260*.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 ,20.2,20.2*200.48,20.2,20.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,20.2*1260,20.2*1260*200.48 ,24.876000,24.876000*200.48 ,24.876000,24.876000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,20.2,20.2*200.48,20.2*1260,20.2*1260*200.48,'cps24090936346,216000002 ',159.94,159.94*1260,159.94,159.94*1260,?,?,?,4 from bo bo where bo.bostamp = 'aut67814188296781403dc4'
20250110@154425.6980 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154425.7060 5j3hqsg47gr63e78n3a8b8k6h2 Query : declare @bostamp varchar(25) = 'aut67814188296781403dc4' ,@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 
20250110@154438.3139 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154438.3143 5j3hqsg47gr63e78n3a8b8k6h2 Query : select 1 valor from bo where bo.bostamp = 'aut67814188296781403dc4'
20250110@154438.3170 5j3hqsg47gr63e78n3a8b8k6h2 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) = 'aut67814188296781403dc4' 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 
20250110@154440.8283 5j3hqsg47gr63e78n3a8b8k6h2 Query : use flama_phc
20250110@154440.8287 5j3hqsg47gr63e78n3a8b8k6h2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@154440.8355 5j3hqsg47gr63e78n3a8b8k6h2 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='4493';
20250110@154440.8414 5j3hqsg47gr63e78n3a8b8k6h2 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='4493';
20250110@161909.5251 947tl3vpqbt5ivdlj5ble6cmgr Query : use flama_phc
20250110@161909.5403 947tl3vpqbt5ivdlj5ble6cmgr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250110@161909.5793 947tl3vpqbt5ivdlj5ble6cmgr Query : use flama_phc
20250110@161909.5797 947tl3vpqbt5ivdlj5ble6cmgr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250110@163609.5739 n1m4d0d28lubdgj40uvt3qnu4r Query : use flama_phc
20250110@163609.5743 n1m4d0d28lubdgj40uvt3qnu4r Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250110@163609.5827 n1m4d0d28lubdgj40uvt3qnu4r Query : use flama_phc
20250110@163609.5830 n1m4d0d28lubdgj40uvt3qnu4r Query : update u_wsusers set rqsttoken =? where userid ='userls001'
