20241011@181016.6673 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.6690 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.6708 j14sama77qtpnrs5kunpd7ecm5 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 'aut670952556267095bf89f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 10.000, 10.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,80000 ,89.99,89.99*200.48,89.99,89.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,89.99*10.000,89.99*10.000*200.48 ,24.530000,24.530000*200.48 ,24.530000,24.530000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,89.99,89.99*200.48,89.99*10.000,89.99*10.000*200.48,'pll24101139245,449000002 ',89.99,89.99*10.000,89.99,89.99*10.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181016.6943 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.6947 j14sama77qtpnrs5kunpd7ecm5 Query : select st.usalote valor from st where st.ref = '324.658.00.01'
20241011@181016.6962 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.6965 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.658.00.01'
20241011@181016.6983 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.6986 j14sama77qtpnrs5kunpd7ecm5 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.658.00.01' and sa.armazem = 133 
20241011@181016.7051 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.7055 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.658.00.01'
20241011@181016.7076 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.658.00.01'
20241011@181016.7184 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7201 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.7216 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7233 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.7243 j14sama77qtpnrs5kunpd7ecm5 Query : select sestamp valor from se where ref ='324.658.00.01' and lote = 'r2300819200a'
20241011@181016.7258 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241011@181016.7273 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7289 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.7303 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670957846067095bf8b1','aut670950529967095bf758',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 = 'aut670950529967095bf758'
20241011@181016.7438 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7456 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.7474 j14sama77qtpnrs5kunpd7ecm5 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 'aut670957846067095bf8b1',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 ,99.99,99.99*200.48,99.99,99.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,99.99*6.000,99.99*6.000*200.48 ,19.303000,19.303000*200.48 ,19.303000,19.303000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,99.99,99.99*200.48,99.99*6.000,99.99*6.000*200.48,'pll24101139637,793000003 ',99.99,99.99*6.000,99.99,99.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181016.7713 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.7717 j14sama77qtpnrs5kunpd7ecm5 Query : select st.usalote valor from st where st.ref = '324.946.00.01'
20241011@181016.7733 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.7736 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.946.00.01'
20241011@181016.7755 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.7758 j14sama77qtpnrs5kunpd7ecm5 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.946.00.01' and sa.armazem = 133 
20241011@181016.7824 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.7828 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.946.00.01'
20241011@181016.7848 j14sama77qtpnrs5kunpd7ecm5 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.946.00.01'
20241011@181016.7863 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7880 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.7894 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7909 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.7919 j14sama77qtpnrs5kunpd7ecm5 Query : select sestamp valor from se where ref ='324.946.00.01' and lote = 'r2300941200a'
20241011@181016.7933 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241011@181016.7946 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.7964 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.7976 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670950005067095bf8c2','aut670950529967095bf758',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 = 'aut670950529967095bf758'
20241011@181016.8116 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.8134 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.8150 j14sama77qtpnrs5kunpd7ecm5 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 'aut670950005067095bf8c2',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,100000 ,26.99,26.99*200.48,26.99,26.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,26.99*4.000,26.99*4.000*200.48 ,6.081000,6.081000*200.48 ,6.081000,6.081000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,26.99,26.99*200.48,26.99*4.000,26.99*4.000*200.48,'pll24101139662,900000004 ',26.99,26.99*4.000,26.99,26.99*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181016.8382 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.8386 j14sama77qtpnrs5kunpd7ecm5 Query : select st.usalote valor from st where st.ref = '324.958.00.01'
20241011@181016.8400 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.8403 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.958.00.01'
20241011@181016.8420 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.8422 j14sama77qtpnrs5kunpd7ecm5 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 
20241011@181016.8487 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.8490 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.958.00.01'
20241011@181016.8509 j14sama77qtpnrs5kunpd7ecm5 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'
20241011@181016.8524 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.8540 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.8553 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.8569 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.8578 j14sama77qtpnrs5kunpd7ecm5 Query : select sestamp valor from se where ref ='324.958.00.01' and lote = 'r2400240200a'
20241011@181016.8592 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241011@181016.8605 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.8622 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.8634 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670958872667095bf8d2','aut670950529967095bf758',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 = 'aut670950529967095bf758'
20241011@181016.8766 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.8783 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.8816 j14sama77qtpnrs5kunpd7ecm5 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 'aut670958872667095bf8d2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 12.000, 12.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,110000 ,29.99,29.99*200.48,29.99,29.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,29.99*12.000,29.99*12.000*200.48 ,8.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,29.99,29.99*200.48,29.99*12.000,29.99*12.000*200.48,'pll24101139738,512000005 ',29.99,29.99*12.000,29.99,29.99*12.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181016.9057 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9061 j14sama77qtpnrs5kunpd7ecm5 Query : select st.usalote valor from st where st.ref = '324.5540.00.1'
20241011@181016.9077 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9080 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20241011@181016.9096 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9099 j14sama77qtpnrs5kunpd7ecm5 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.5540.00.1' and sa.armazem = 133 
20241011@181016.9163 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9166 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20241011@181016.9187 j14sama77qtpnrs5kunpd7ecm5 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.5540.00.1'
20241011@181016.9293 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.9312 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.9326 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.9341 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.9350 j14sama77qtpnrs5kunpd7ecm5 Query : select sestamp valor from se where ref ='324.5540.00.1' and lote = 'r2300830100a'
20241011@181016.9365 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241011@181016.9378 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.9393 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181016.9405 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670955590667095bf8e4','aut670950529967095bf758',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 = 'aut670950529967095bf758'
20241011@181016.9534 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.9562 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.9579 j14sama77qtpnrs5kunpd7ecm5 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 'aut670955590667095bf8e4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,120000 ,159.99,159.99*200.48,159.99,159.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,159.99*6.000,159.99*6.000*200.48 ,36.952000,36.952000*200.48 ,36.952000,36.952000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,159.99,159.99*200.48,159.99*6.000,159.99*6.000*200.48,'pll24101139752,791000006 ',159.99,159.99*6.000,159.99,159.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181016.9822 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9826 j14sama77qtpnrs5kunpd7ecm5 Query : select st.usalote valor from st where st.ref = '324.1803.00.1'
20241011@181016.9840 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9843 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.1803.00.1'
20241011@181016.9860 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9863 j14sama77qtpnrs5kunpd7ecm5 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.1803.00.1' and sa.armazem = 133 
20241011@181016.9928 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181016.9931 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.1803.00.1'
20241011@181016.9950 j14sama77qtpnrs5kunpd7ecm5 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.1803.00.1'
20241011@181016.9967 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181016.9984 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181016.9997 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.1200 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181017.2100 j14sama77qtpnrs5kunpd7ecm5 Query : select sestamp valor from se where ref ='324.1803.00.1' and lote = 'r2301274200a'
20241011@181017.3400 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241011@181017.4700 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.6200 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181017.7400 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670952690867095bf901','aut670950529967095bf758',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 = 'aut670950529967095bf758'
20241011@181017.2080 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.2250 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181017.2420 j14sama77qtpnrs5kunpd7ecm5 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 'aut670952690867095bf901',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 5.000, 5.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 ,94.99,94.99*200.48,94.99,94.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,94.99*5.000,94.99*5.000*200.48 ,32.658000,32.658000*200.48 ,32.658000,32.658000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,94.99,94.99*200.48,94.99*5.000,94.99*5.000*200.48,'pll24101139771,371000007 ',94.99,94.99*5.000,94.99,94.99*5.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181017.4760 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181017.4800 j14sama77qtpnrs5kunpd7ecm5 Query : select st.usalote valor from st where st.ref = '324.1803.00.1'
20241011@181017.4930 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181017.4960 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.1803.00.1'
20241011@181017.5120 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181017.5150 j14sama77qtpnrs5kunpd7ecm5 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.1803.00.1' and sa.armazem = 133 
20241011@181017.5390 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181017.5420 j14sama77qtpnrs5kunpd7ecm5 Query : select st.stns valor from st where st.ref = '324.1803.00.1'
20241011@181017.5610 j14sama77qtpnrs5kunpd7ecm5 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.1803.00.1'
20241011@181017.5760 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.5930 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181017.6060 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.6220 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181017.6310 j14sama77qtpnrs5kunpd7ecm5 Query : select sestamp valor from se where ref ='324.1803.00.1' and lote = 'r2301274200a'
20241011@181017.6440 j14sama77qtpnrs5kunpd7ecm5 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241011@181017.6740 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.6890 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241011@181017.7020 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670957066667095bf910','aut670950529967095bf758',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 = 'aut670950529967095bf758'
20241011@181017.8330 j14sama77qtpnrs5kunpd7ecm5 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241011@181017.8510 j14sama77qtpnrs5kunpd7ecm5 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241011@181017.8680 j14sama77qtpnrs5kunpd7ecm5 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 'aut670957066667095bf910',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1.000, 1.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,140000 ,94.99,94.99*200.48,94.99,94.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,94.99*1.000,94.99*1.000*200.48 ,32.658000,32.658000*200.48 ,32.658000,32.658000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,94.99,94.99*200.48,94.99*1.000,94.99*1.000*200.48,'pll24101139771,371000007 ',94.99,94.99*1.000,94.99,94.99*1.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut670950529967095bf758'
20241011@181017.1113 j14sama77qtpnrs5kunpd7ecm5 Query : insert into wsbocreationlog (initialstamp,externalid,creationstatus,documenttypeid,idustamp,transactionid) values ('aut670950529967095bf758','','wait',5,'adm12071144683,938000003','')
20241011@181017.1215 j14sama77qtpnrs5kunpd7ecm5 Query : use flama_phc
20241011@181017.1219 j14sama77qtpnrs5kunpd7ecm5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@181017.1272 j14sama77qtpnrs5kunpd7ecm5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2606';
20241011@181017.1306 j14sama77qtpnrs5kunpd7ecm5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2606';
20241011@181916.2738 hvnrc0i3q2nagaqdl4kgunabtr Query : use flama_phc
20241011@181916.2742 hvnrc0i3q2nagaqdl4kgunabtr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@181916.3016 hvnrc0i3q2nagaqdl4kgunabtr Query : use flama_phc
20241011@181916.3019 hvnrc0i3q2nagaqdl4kgunabtr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@183616.5297 qfsj5hsqjrjafka547648nn3cs Query : use flama_phc
20241011@183616.5302 qfsj5hsqjrjafka547648nn3cs Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@183616.5387 qfsj5hsqjrjafka547648nn3cs Query : use flama_phc
20241011@183616.5393 qfsj5hsqjrjafka547648nn3cs Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@191914.1964 vnsh3as714ffpsmbq1v28qsa7i Query : use flama_phc
20241011@191914.1969 vnsh3as714ffpsmbq1v28qsa7i Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@191914.2061 vnsh3as714ffpsmbq1v28qsa7i Query : use flama_phc
20241011@191914.2064 vnsh3as714ffpsmbq1v28qsa7i Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@193614.3870 jh30ju7s2eu3lv47j9sje2orn0 Query : use flama_phc
20241011@193614.3874 jh30ju7s2eu3lv47j9sje2orn0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@193614.3961 jh30ju7s2eu3lv47j9sje2orn0 Query : use flama_phc
20241011@193614.3964 jh30ju7s2eu3lv47j9sje2orn0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@201917.4193 dpkj2t4uk156rlc5suvb06sofs Query : use flama_phc
20241011@201917.4197 dpkj2t4uk156rlc5suvb06sofs Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@201917.4312 dpkj2t4uk156rlc5suvb06sofs Query : use flama_phc
20241011@201917.4316 dpkj2t4uk156rlc5suvb06sofs Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@203617.6051 4d17ajuva8tcrfcije4dg35trt Query : use flama_phc
20241011@203617.6057 4d17ajuva8tcrfcije4dg35trt Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@203617.6656 4d17ajuva8tcrfcije4dg35trt Query : use flama_phc
20241011@203617.6660 4d17ajuva8tcrfcije4dg35trt Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@211912.6986 omork0e40k1matsonen74m69ff Query : use flama_phc
20241011@211912.6989 omork0e40k1matsonen74m69ff Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@211912.7168 omork0e40k1matsonen74m69ff Query : use flama_phc
20241011@211912.7172 omork0e40k1matsonen74m69ff Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@213612.4838 kfq3u4p8n2e2gr8bma3tqkbdv5 Query : use flama_phc
20241011@213612.4842 kfq3u4p8n2e2gr8bma3tqkbdv5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@213612.4976 kfq3u4p8n2e2gr8bma3tqkbdv5 Query : use flama_phc
20241011@213612.4981 kfq3u4p8n2e2gr8bma3tqkbdv5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@221912.3382 3cuqsb16611u4k0hldrvijvnok Query : use flama_phc
20241011@221912.3387 3cuqsb16611u4k0hldrvijvnok Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@221912.3475 3cuqsb16611u4k0hldrvijvnok Query : use flama_phc
20241011@221912.3479 3cuqsb16611u4k0hldrvijvnok Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@223612.3855 67kdgjerk8atp90sddd7th0ek7 Query : use flama_phc
20241011@223612.3859 67kdgjerk8atp90sddd7th0ek7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@223612.4033 67kdgjerk8atp90sddd7th0ek7 Query : use flama_phc
20241011@223612.4035 67kdgjerk8atp90sddd7th0ek7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@231912.7629 n3pciup6mp765qv9gjskf0sjbi Query : use flama_phc
20241011@231912.7634 n3pciup6mp765qv9gjskf0sjbi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@231912.7745 n3pciup6mp765qv9gjskf0sjbi Query : use flama_phc
20241011@231912.7748 n3pciup6mp765qv9gjskf0sjbi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241011@233612.8701 tdsmj2744eqqbj5k40qe8rcg2s Query : use flama_phc
20241011@233612.8705 tdsmj2744eqqbj5k40qe8rcg2s Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241011@233612.8821 tdsmj2744eqqbj5k40qe8rcg2s Query : use flama_phc
20241011@233612.8824 tdsmj2744eqqbj5k40qe8rcg2s Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@071913.2118 r7gd3cslrjvmnqmqng8tvejb5q Query : use flama_phc
20241012@071913.2122 r7gd3cslrjvmnqmqng8tvejb5q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@071913.2280 r7gd3cslrjvmnqmqng8tvejb5q Query : use flama_phc
20241012@071913.2284 r7gd3cslrjvmnqmqng8tvejb5q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@073643.9008 fpepgdv7fki376jn0dhf70ngji Query : use flama_phc
20241012@073643.9013 fpepgdv7fki376jn0dhf70ngji Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@073643.9202 fpepgdv7fki376jn0dhf70ngji Query : use flama_phc
20241012@073643.9206 fpepgdv7fki376jn0dhf70ngji Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@081911.6076 p2v457taq34qf3to361ed7fgm1 Query : use flama_phc
20241012@081911.6080 p2v457taq34qf3to361ed7fgm1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@081911.6311 p2v457taq34qf3to361ed7fgm1 Query : use flama_phc
20241012@081911.6330 p2v457taq34qf3to361ed7fgm1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@083611.7992 sums91ocnbd3ahfv7ivhe07rlj Query : use flama_phc
20241012@083611.7997 sums91ocnbd3ahfv7ivhe07rlj Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@083611.8098 sums91ocnbd3ahfv7ivhe07rlj Query : use flama_phc
20241012@083611.8101 sums91ocnbd3ahfv7ivhe07rlj Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@091911.9663 v3djtfafvgk58r1b9frlsclrse Query : use flama_phc
20241012@091911.9705 v3djtfafvgk58r1b9frlsclrse Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@091912.5200 v3djtfafvgk58r1b9frlsclrse Query : use flama_phc
20241012@091912.1340 v3djtfafvgk58r1b9frlsclrse Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@093612.3303 etdgqgfaulhm2hh7l60hr4c76l Query : use flama_phc
20241012@093612.3324 etdgqgfaulhm2hh7l60hr4c76l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@093612.3711 etdgqgfaulhm2hh7l60hr4c76l Query : use flama_phc
20241012@093612.3714 etdgqgfaulhm2hh7l60hr4c76l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@101911.2185 ijutir7dbgcgumpo1ugtb7bag2 Query : use flama_phc
20241012@101911.2227 ijutir7dbgcgumpo1ugtb7bag2 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@101911.2971 ijutir7dbgcgumpo1ugtb7bag2 Query : use flama_phc
20241012@101911.3013 ijutir7dbgcgumpo1ugtb7bag2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@103611.5596 6rbfh1fvgp4jro2asq9r2jgjk5 Query : use flama_phc
20241012@103611.5600 6rbfh1fvgp4jro2asq9r2jgjk5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@103611.5991 6rbfh1fvgp4jro2asq9r2jgjk5 Query : use flama_phc
20241012@103611.5995 6rbfh1fvgp4jro2asq9r2jgjk5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@111911.4418 87k9g1vvplumd6e249a5nlt8na Query : use flama_phc
20241012@111911.4421 87k9g1vvplumd6e249a5nlt8na Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@111911.4516 87k9g1vvplumd6e249a5nlt8na Query : use flama_phc
20241012@111911.4519 87k9g1vvplumd6e249a5nlt8na Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@113611.4062 o6kugdcoql45kau4hu18uu0fos Query : use flama_phc
20241012@113611.4066 o6kugdcoql45kau4hu18uu0fos Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@113611.4148 o6kugdcoql45kau4hu18uu0fos Query : use flama_phc
20241012@113611.4151 o6kugdcoql45kau4hu18uu0fos Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@121915.2277 5dcgct2mba1mr6p1kic98eddoc Query : use flama_phc
20241012@121915.2282 5dcgct2mba1mr6p1kic98eddoc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@121915.2371 5dcgct2mba1mr6p1kic98eddoc Query : use flama_phc
20241012@121915.2374 5dcgct2mba1mr6p1kic98eddoc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@123615.2190 anp3co1me1pq2o6fstac57vb1v Query : use flama_phc
20241012@123615.2194 anp3co1me1pq2o6fstac57vb1v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@123615.2284 anp3co1me1pq2o6fstac57vb1v Query : use flama_phc
20241012@123615.2287 anp3co1me1pq2o6fstac57vb1v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@131910.6157 nrmlaj4pbvv9mgerd8o5dga2q6 Query : use flama_phc
20241012@131910.6160 nrmlaj4pbvv9mgerd8o5dga2q6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@131910.6267 nrmlaj4pbvv9mgerd8o5dga2q6 Query : use flama_phc
20241012@131910.6270 nrmlaj4pbvv9mgerd8o5dga2q6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@133610.7273 5r6gb0s6nq4296oo9el8kpcqpi Query : use flama_phc
20241012@133610.7277 5r6gb0s6nq4296oo9el8kpcqpi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@133610.7363 5r6gb0s6nq4296oo9el8kpcqpi Query : use flama_phc
20241012@133610.7366 5r6gb0s6nq4296oo9el8kpcqpi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@141912.7537 ufjij89a6jp5hprjbpplbest3n Query : use flama_phc
20241012@141912.7541 ufjij89a6jp5hprjbpplbest3n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@141912.7647 ufjij89a6jp5hprjbpplbest3n Query : use flama_phc
20241012@141912.7650 ufjij89a6jp5hprjbpplbest3n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@143612.8874 l6i9t7uvte6k57a70ipksfbuii Query : use flama_phc
20241012@143612.8878 l6i9t7uvte6k57a70ipksfbuii Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@143612.8964 l6i9t7uvte6k57a70ipksfbuii Query : use flama_phc
20241012@143612.8967 l6i9t7uvte6k57a70ipksfbuii Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@151910.9012 452rnk4nmdu9kv05koeap1mb1q Query : use flama_phc
20241012@151910.9016 452rnk4nmdu9kv05koeap1mb1q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@151910.9109 452rnk4nmdu9kv05koeap1mb1q Query : use flama_phc
20241012@151910.9112 452rnk4nmdu9kv05koeap1mb1q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@153610.6516 dram4v3pfv34g18d0rjqodbuvi Query : use flama_phc
20241012@153610.6521 dram4v3pfv34g18d0rjqodbuvi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@153610.6619 dram4v3pfv34g18d0rjqodbuvi Query : use flama_phc
20241012@153610.6622 dram4v3pfv34g18d0rjqodbuvi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@161912.7177 tuj0j4lh9d07kimo91v6mcjhrq Query : use flama_phc
20241012@161912.7180 tuj0j4lh9d07kimo91v6mcjhrq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@161912.7287 tuj0j4lh9d07kimo91v6mcjhrq Query : use flama_phc
20241012@161912.7290 tuj0j4lh9d07kimo91v6mcjhrq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@163613.1236 1r4o8ce1d1v4a3flg21cbiqt0g Query : use flama_phc
20241012@163613.1240 1r4o8ce1d1v4a3flg21cbiqt0g Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@163613.1344 1r4o8ce1d1v4a3flg21cbiqt0g Query : use flama_phc
20241012@163613.1347 1r4o8ce1d1v4a3flg21cbiqt0g Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@171909.8158 duk11qitk1h184o5n7c7o4tjm9 Query : use flama_phc
20241012@171909.8162 duk11qitk1h184o5n7c7o4tjm9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@171909.8250 duk11qitk1h184o5n7c7o4tjm9 Query : use flama_phc
20241012@171909.8253 duk11qitk1h184o5n7c7o4tjm9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@173609.9457 f549bck3t5vvd8s3ung7i2meja Query : use flama_phc
20241012@173609.9462 f549bck3t5vvd8s3ung7i2meja Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@173609.9544 f549bck3t5vvd8s3ung7i2meja Query : use flama_phc
20241012@173609.9547 f549bck3t5vvd8s3ung7i2meja Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@181914.2760 kqioigj5edsgk87u1n599qvqrj Query : use flama_phc
20241012@181914.2810 kqioigj5edsgk87u1n599qvqrj Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@181914.7190 kqioigj5edsgk87u1n599qvqrj Query : use flama_phc
20241012@181914.7230 kqioigj5edsgk87u1n599qvqrj Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@183613.8083 0vifvju0tnc9h9q0pehk317bl2 Query : use flama_phc
20241012@183613.8087 0vifvju0tnc9h9q0pehk317bl2 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@183613.8173 0vifvju0tnc9h9q0pehk317bl2 Query : use flama_phc
20241012@183613.8176 0vifvju0tnc9h9q0pehk317bl2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@191913.5365 3lpciup357a28m874bt3f0fj5o Query : use flama_phc
20241012@191913.5369 3lpciup357a28m874bt3f0fj5o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@191913.5459 3lpciup357a28m874bt3f0fj5o Query : use flama_phc
20241012@191913.5463 3lpciup357a28m874bt3f0fj5o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@193613.3759 tn4om0hk30h4cvh1nvke6pvkr8 Query : use flama_phc
20241012@193613.3764 tn4om0hk30h4cvh1nvke6pvkr8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@193613.3864 tn4om0hk30h4cvh1nvke6pvkr8 Query : use flama_phc
20241012@193613.3867 tn4om0hk30h4cvh1nvke6pvkr8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@201912.1842 m4omr3e3pv4ok67btg8ad8tam7 Query : use flama_phc
20241012@201912.1846 m4omr3e3pv4ok67btg8ad8tam7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@201912.1934 m4omr3e3pv4ok67btg8ad8tam7 Query : use flama_phc
20241012@201912.1938 m4omr3e3pv4ok67btg8ad8tam7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@203611.7399 amgtspqns3cft0k6ul6mhufn11 Query : use flama_phc
20241012@203611.7403 amgtspqns3cft0k6ul6mhufn11 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@203611.7500 amgtspqns3cft0k6ul6mhufn11 Query : use flama_phc
20241012@203611.7505 amgtspqns3cft0k6ul6mhufn11 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@211912.6938 bm33nsajgvlpcnbfujjo2lfeil Query : use flama_phc
20241012@211912.6941 bm33nsajgvlpcnbfujjo2lfeil Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@211912.7027 bm33nsajgvlpcnbfujjo2lfeil Query : use flama_phc
20241012@211912.7030 bm33nsajgvlpcnbfujjo2lfeil Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@213612.4384 1gvue8bhf2vea0fhtbmpvj47kn Query : use flama_phc
20241012@213612.4388 1gvue8bhf2vea0fhtbmpvj47kn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@213612.4479 1gvue8bhf2vea0fhtbmpvj47kn Query : use flama_phc
20241012@213612.4482 1gvue8bhf2vea0fhtbmpvj47kn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@221911.2503 16b2t5e9nu0fq5jc0qk04im64q Query : use flama_phc
20241012@221911.2507 16b2t5e9nu0fq5jc0qk04im64q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@221911.2645 16b2t5e9nu0fq5jc0qk04im64q Query : use flama_phc
20241012@221911.2649 16b2t5e9nu0fq5jc0qk04im64q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@223611.5698 ijvo8cbdb5698sqj5he86e4ld3 Query : use flama_phc
20241012@223611.5702 ijvo8cbdb5698sqj5he86e4ld3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@223611.5792 ijvo8cbdb5698sqj5he86e4ld3 Query : use flama_phc
20241012@223611.5795 ijvo8cbdb5698sqj5he86e4ld3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@231913.3440 098j5c0v9po3mt7v9lacutj2tn Query : use flama_phc
20241012@231913.3445 098j5c0v9po3mt7v9lacutj2tn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@231913.3577 098j5c0v9po3mt7v9lacutj2tn Query : use flama_phc
20241012@231913.3581 098j5c0v9po3mt7v9lacutj2tn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241012@233613.6856 9o4ada9eqmdtjtba1965mctkkn Query : use flama_phc
20241012@233613.6860 9o4ada9eqmdtjtba1965mctkkn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241012@233613.6969 9o4ada9eqmdtjtba1965mctkkn Query : use flama_phc
20241012@233613.6973 9o4ada9eqmdtjtba1965mctkkn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@071914.3514 hbbncade4vkfgkqdn70udddc17 Query : use flama_phc
20241013@071914.3559 hbbncade4vkfgkqdn70udddc17 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@071914.4372 hbbncade4vkfgkqdn70udddc17 Query : use flama_phc
20241013@071914.4414 hbbncade4vkfgkqdn70udddc17 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@073613.9045 3vnuft9j5m2trtqjej34i5s0li Query : use flama_phc
20241013@073613.9050 3vnuft9j5m2trtqjej34i5s0li Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@073613.9453 3vnuft9j5m2trtqjej34i5s0li Query : use flama_phc
20241013@073613.9456 3vnuft9j5m2trtqjej34i5s0li Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@081913.2708 pqb8enjfj01kiqsoamr729uaus Query : use flama_phc
20241013@081913.2713 pqb8enjfj01kiqsoamr729uaus Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@081913.2842 pqb8enjfj01kiqsoamr729uaus Query : use flama_phc
20241013@081913.2845 pqb8enjfj01kiqsoamr729uaus Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@083614.1125 kr56jcoj8130t0cceo5rp2lbm2 Query : use flama_phc
20241013@083614.1130 kr56jcoj8130t0cceo5rp2lbm2 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@083614.1240 kr56jcoj8130t0cceo5rp2lbm2 Query : use flama_phc
20241013@083614.1243 kr56jcoj8130t0cceo5rp2lbm2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@091911.1258 goetvd9q3ppta2fl064i78qkk1 Query : use flama_phc
20241013@091911.1262 goetvd9q3ppta2fl064i78qkk1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@091911.1376 goetvd9q3ppta2fl064i78qkk1 Query : use flama_phc
20241013@091911.1379 goetvd9q3ppta2fl064i78qkk1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@093610.9267 da109no904ki2ihip7c4mtabh3 Query : use flama_phc
20241013@093610.9271 da109no904ki2ihip7c4mtabh3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@093610.9364 da109no904ki2ihip7c4mtabh3 Query : use flama_phc
20241013@093610.9367 da109no904ki2ihip7c4mtabh3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@101911.2150 4j0dbip18dqcrgcha4s0tbo143 Query : use flama_phc
20241013@101911.2200 4j0dbip18dqcrgcha4s0tbo143 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@101911.3760 4j0dbip18dqcrgcha4s0tbo143 Query : use flama_phc
20241013@101911.3790 4j0dbip18dqcrgcha4s0tbo143 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@103611.1112 g77s4qv9322cgnbd3f8cfnso2l Query : use flama_phc
20241013@103611.1117 g77s4qv9322cgnbd3f8cfnso2l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@103611.1216 g77s4qv9322cgnbd3f8cfnso2l Query : use flama_phc
20241013@103611.1218 g77s4qv9322cgnbd3f8cfnso2l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@111913.6358 gu21rhbptdpq38aara1f7p1sdv Query : use flama_phc
20241013@111913.6362 gu21rhbptdpq38aara1f7p1sdv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@111913.6456 gu21rhbptdpq38aara1f7p1sdv Query : use flama_phc
20241013@111913.6460 gu21rhbptdpq38aara1f7p1sdv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@113613.3832 0ogd4uh5lk61a176q60pojer62 Query : use flama_phc
20241013@113613.3837 0ogd4uh5lk61a176q60pojer62 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@113613.3925 0ogd4uh5lk61a176q60pojer62 Query : use flama_phc
20241013@113613.3929 0ogd4uh5lk61a176q60pojer62 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@121915.1541 nontue8up7clb5k0t2gp8a0mon Query : use flama_phc
20241013@121915.1545 nontue8up7clb5k0t2gp8a0mon Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@121915.1681 nontue8up7clb5k0t2gp8a0mon Query : use flama_phc
20241013@121915.1684 nontue8up7clb5k0t2gp8a0mon Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@123614.6060 g04dm60gsektsob6lnr9nrqn93 Query : use flama_phc
20241013@123614.6065 g04dm60gsektsob6lnr9nrqn93 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@123614.6153 g04dm60gsektsob6lnr9nrqn93 Query : use flama_phc
20241013@123614.6156 g04dm60gsektsob6lnr9nrqn93 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@131916.5017 9dkmhv8i4d10msg1bstfjn8jqi Query : use flama_phc
20241013@131916.5021 9dkmhv8i4d10msg1bstfjn8jqi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@131916.5134 9dkmhv8i4d10msg1bstfjn8jqi Query : use flama_phc
20241013@131916.5137 9dkmhv8i4d10msg1bstfjn8jqi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@133616.4167 8c7emo1asi06qfuvbbi70fnk0a Query : use flama_phc
20241013@133616.4172 8c7emo1asi06qfuvbbi70fnk0a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@133616.4263 8c7emo1asi06qfuvbbi70fnk0a Query : use flama_phc
20241013@133616.4266 8c7emo1asi06qfuvbbi70fnk0a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@141913.4116 970alsk7po280hk7pbh7gssmag Query : use flama_phc
20241013@141913.4121 970alsk7po280hk7pbh7gssmag Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@141913.4214 970alsk7po280hk7pbh7gssmag Query : use flama_phc
20241013@141913.4217 970alsk7po280hk7pbh7gssmag Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@143613.1536 mnujlg8ges2nr0f07rd6ct0f95 Query : use flama_phc
20241013@143613.1540 mnujlg8ges2nr0f07rd6ct0f95 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@143613.1626 mnujlg8ges2nr0f07rd6ct0f95 Query : use flama_phc
20241013@143613.1629 mnujlg8ges2nr0f07rd6ct0f95 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@151910.4900 urck92apdub2d7ahbo2dt8oj6p Query : use flama_phc
20241013@151910.5300 urck92apdub2d7ahbo2dt8oj6p Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@151910.1460 urck92apdub2d7ahbo2dt8oj6p Query : use flama_phc
20241013@151910.1500 urck92apdub2d7ahbo2dt8oj6p Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@153610.4053 ife1s66skmsp7lqs5tibu8a20i Query : use flama_phc
20241013@153610.4058 ife1s66skmsp7lqs5tibu8a20i Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@153610.4154 ife1s66skmsp7lqs5tibu8a20i Query : use flama_phc
20241013@153610.4158 ife1s66skmsp7lqs5tibu8a20i Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@161912.3569 0v65ocvpnbud9aae4qubb9eu0q Query : use flama_phc
20241013@161912.3573 0v65ocvpnbud9aae4qubb9eu0q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@161912.3665 0v65ocvpnbud9aae4qubb9eu0q Query : use flama_phc
20241013@161912.3669 0v65ocvpnbud9aae4qubb9eu0q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@163612.4608 7h1koh3loe48ll362dcs7irt1h Query : use flama_phc
20241013@163612.4613 7h1koh3loe48ll362dcs7irt1h Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@163612.4712 7h1koh3loe48ll362dcs7irt1h Query : use flama_phc
20241013@163612.4716 7h1koh3loe48ll362dcs7irt1h Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@171910.9853 ftss58hnkuv0ioodlhken6ao61 Query : use flama_phc
20241013@171910.9857 ftss58hnkuv0ioodlhken6ao61 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@171910.9999 ftss58hnkuv0ioodlhken6ao61 Query : use flama_phc
20241013@171911.2000 ftss58hnkuv0ioodlhken6ao61 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@173611.3350 c0rg5598603btje7rrnr04jbg2 Query : use flama_phc
20241013@173611.3354 c0rg5598603btje7rrnr04jbg2 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@173611.3443 c0rg5598603btje7rrnr04jbg2 Query : use flama_phc
20241013@173611.3446 c0rg5598603btje7rrnr04jbg2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@181912.2035 12uuufhmp38fdtbj5lq7tk6adm Query : use flama_phc
20241013@181912.2039 12uuufhmp38fdtbj5lq7tk6adm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@181912.2124 12uuufhmp38fdtbj5lq7tk6adm Query : use flama_phc
20241013@181912.2127 12uuufhmp38fdtbj5lq7tk6adm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@183611.9984 p3rfqsdjgtmvc7887omlfg4de4 Query : use flama_phc
20241013@183611.9988 p3rfqsdjgtmvc7887omlfg4de4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@183612.7100 p3rfqsdjgtmvc7887omlfg4de4 Query : use flama_phc
20241013@183612.7400 p3rfqsdjgtmvc7887omlfg4de4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@191912.2095 5q7iep7lr4irqpofv50p256ahg Query : use flama_phc
20241013@191912.2099 5q7iep7lr4irqpofv50p256ahg Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@191912.2185 5q7iep7lr4irqpofv50p256ahg Query : use flama_phc
20241013@191912.2187 5q7iep7lr4irqpofv50p256ahg Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@193612.1142 pu96i65qm8c1fp2u4i0j4ftbdh Query : use flama_phc
20241013@193612.1146 pu96i65qm8c1fp2u4i0j4ftbdh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@193612.1233 pu96i65qm8c1fp2u4i0j4ftbdh Query : use flama_phc
20241013@193612.1248 pu96i65qm8c1fp2u4i0j4ftbdh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@201912.6724 prc4aj5bn514o9mc57hald9jtb Query : use flama_phc
20241013@201912.6728 prc4aj5bn514o9mc57hald9jtb Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@201912.6820 prc4aj5bn514o9mc57hald9jtb Query : use flama_phc
20241013@201912.6823 prc4aj5bn514o9mc57hald9jtb Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@203612.3696 bdcp5hp1cppnmmsifnea2ibcdh Query : use flama_phc
20241013@203612.3701 bdcp5hp1cppnmmsifnea2ibcdh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@203612.3792 bdcp5hp1cppnmmsifnea2ibcdh Query : use flama_phc
20241013@203612.3796 bdcp5hp1cppnmmsifnea2ibcdh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@211912.6987 htsdlmbldhn0a6b0sb0cqdsqn3 Query : use flama_phc
20241013@211912.6991 htsdlmbldhn0a6b0sb0cqdsqn3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@211912.7114 htsdlmbldhn0a6b0sb0cqdsqn3 Query : use flama_phc
20241013@211912.7137 htsdlmbldhn0a6b0sb0cqdsqn3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@213613.1883 k8pa8vje3msvglsmppfv2sklj3 Query : use flama_phc
20241013@213613.1887 k8pa8vje3msvglsmppfv2sklj3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@213613.1996 k8pa8vje3msvglsmppfv2sklj3 Query : use flama_phc
20241013@213613.2000 k8pa8vje3msvglsmppfv2sklj3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@221910.9863 33dedp1b1okss4qr8goj7fsoue Query : use flama_phc
20241013@221910.9867 33dedp1b1okss4qr8goj7fsoue Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@221910.9978 33dedp1b1okss4qr8goj7fsoue Query : use flama_phc
20241013@221910.9981 33dedp1b1okss4qr8goj7fsoue Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@223611.2831 p2oqpbaom0r8st38nhcpt084dl Query : use flama_phc
20241013@223611.2839 p2oqpbaom0r8st38nhcpt084dl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@223611.3042 p2oqpbaom0r8st38nhcpt084dl Query : use flama_phc
20241013@223611.3081 p2oqpbaom0r8st38nhcpt084dl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@231910.6880 j4f6g1244q4lt23b3n1dc73fmf Query : use flama_phc
20241013@231910.6884 j4f6g1244q4lt23b3n1dc73fmf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@231910.6996 j4f6g1244q4lt23b3n1dc73fmf Query : use flama_phc
20241013@231910.6999 j4f6g1244q4lt23b3n1dc73fmf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241013@233610.8901 idsfapqs961h4l9aejgcg8ffsl Query : use flama_phc
20241013@233610.8905 idsfapqs961h4l9aejgcg8ffsl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241013@233610.8998 idsfapqs961h4l9aejgcg8ffsl Query : use flama_phc
20241013@233610.9001 idsfapqs961h4l9aejgcg8ffsl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@071914.6960 f3a6o6ti66l5s7d1mscj5dr2p1 Query : use flama_phc
20241014@071914.7000 f3a6o6ti66l5s7d1mscj5dr2p1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241014@071914.8000 f3a6o6ti66l5s7d1mscj5dr2p1 Query : use flama_phc
20241014@071914.8040 f3a6o6ti66l5s7d1mscj5dr2p1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@073650.2073 qdb421f4d1vlkvjr8351pg3ha4 Query : use flama_phc
20241014@073650.2078 qdb421f4d1vlkvjr8351pg3ha4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241014@073650.2199 qdb421f4d1vlkvjr8351pg3ha4 Query : use flama_phc
20241014@073650.2241 qdb421f4d1vlkvjr8351pg3ha4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@081913.1967 gmbfbac5lq320vs7v2bp09s039 Query : use flama_phc
20241014@081913.1972 gmbfbac5lq320vs7v2bp09s039 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241014@081913.2069 gmbfbac5lq320vs7v2bp09s039 Query : use flama_phc
20241014@081913.2072 gmbfbac5lq320vs7v2bp09s039 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@082444.4305 p9jo7splm9t195ddlqn0astara Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@082444.4333 p9jo7splm9t195ddlqn0astara Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@082444.4554 p9jo7splm9t195ddlqn0astara Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2607';
20241014@082444.4611 p9jo7splm9t195ddlqn0astara Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2607';
20241014@082444.4683 p9jo7splm9t195ddlqn0astara Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2607';
20241014@082444.4733 p9jo7splm9t195ddlqn0astara Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2607';
20241014@082444.4785 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.4789 p9jo7splm9t195ddlqn0astara Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@082444.4890 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.4893 p9jo7splm9t195ddlqn0astara Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20241014@082444.5014 p9jo7splm9t195ddlqn0astara Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20241014@082444.5124 p9jo7splm9t195ddlqn0astara Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20241014@082444.5143 p9jo7splm9t195ddlqn0astara Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20241014@082444.5162 p9jo7splm9t195ddlqn0astara Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20241014@082444.5187 p9jo7splm9t195ddlqn0astara Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20241014@082444.5207 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5210 p9jo7splm9t195ddlqn0astara Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@082444.5394 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5397 p9jo7splm9t195ddlqn0astara Query : select top 1 1 valor from td where td.ndoc = 39
20241014@082444.5462 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5466 p9jo7splm9t195ddlqn0astara 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')
20241014@082444.5558 p9jo7splm9t195ddlqn0astara Query : select top 1 manternumero ,assinadoc issigned ,tiposaft ,assinaimp ,nmdos ,td.assinadoc ,'cl' origin ,lancasl stocks ,case when cmsl<50 and td.lancasl=1 then 1 else 0 end entrada ,case when cmsl>50 and td.lancasl=1 then 1 else 0 end saida ,temserie assets ,~semgre usegridfields from td inner join td2 on td.tdstamp=td2.td2stamp where td.ndoc = 1
20241014@082444.5707 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5711 p9jo7splm9t195ddlqn0astara Query : select top 1 ~inactivo valor from cl where no = '100810' and estab = 0 order by inactivo desc
20241014@082444.5811 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5814 p9jo7splm9t195ddlqn0astara Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241014@082444.5877 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5890 p9jo7splm9t195ddlqn0astara Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@082444.5960 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.5963 p9jo7splm9t195ddlqn0astara Query : select szadrsstamp valor from szadrs where szadrsdesc='100810 - worten-equipamentos para o lar,sa.'
20241014@082444.6056 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.6059 p9jo7splm9t195ddlqn0astara Query : select 1 valor from td where ndoc = 39
20241014@082444.6121 p9jo7splm9t195ddlqn0astara Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241014@082444.6165 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.6498 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@082444.6581 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.6601 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@082444.6634 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.6649 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@082444.6665 p9jo7splm9t195ddlqn0astara Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@082444.6970 p9jo7splm9t195ddlqn0astara Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@082444.7041 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.7057 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@082444.7097 p9jo7splm9t195ddlqn0astara Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670cc26632670cc73ca2' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241014@082444.7395 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.7415 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@082444.7459 p9jo7splm9t195ddlqn0astara Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241014@082444.7552 p9jo7splm9t195ddlqn0astara Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241014@082444.7629 p9jo7splm9t195ddlqn0astara Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241014@082444.7705 p9jo7splm9t195ddlqn0astara Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241014@082444.7764 p9jo7splm9t195ddlqn0astara Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241014@082444.7820 p9jo7splm9t195ddlqn0astara Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241014@082444.7881 p9jo7splm9t195ddlqn0astara Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670cc26632670cc73ca2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241014@082444.8651 p9jo7splm9t195ddlqn0astara Query : select top 1 fno valor from wsftdata order by fno desc
20241014@082444.8722 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.8744 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@082444.8827 p9jo7splm9t195ddlqn0astara Query : select 'normal' from dummy
20241014@082444.8912 p9jo7splm9t195ddlqn0astara Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670cc26632670cc73ca2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1234,100810,0,'2024-10-14',39,'euro',0,0,2024 ,?,?)
20241014@082444.9545 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082444.9548 p9jo7splm9t195ddlqn0astara Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20241014@082444.9634 p9jo7splm9t195ddlqn0astara Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20241014@082444.9766 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.9782 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082444.9807 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.9821 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082444.9834 p9jo7splm9t195ddlqn0astara Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@082444.9876 p9jo7splm9t195ddlqn0astara Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20241014@082444.9949 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082444.9963 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.3400 p9jo7splm9t195ddlqn0astara Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc47486670cc73cf2','aut670cc26632670cc73ca2' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@082445.1190 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1360 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.1650 p9jo7splm9t195ddlqn0astara Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut670cc47486670cc73cf2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',22.000 ,'aut670cc26632670cc73ca2' ,0,0 ,2,23.00,10000,?,?,?,?)
20241014@082445.1122 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082445.1125 p9jo7splm9t195ddlqn0astara Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20241014@082445.1145 p9jo7splm9t195ddlqn0astara Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20241014@082445.1158 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1176 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.1203 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1218 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.1240 p9jo7splm9t195ddlqn0astara Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@082445.1253 p9jo7splm9t195ddlqn0astara Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20241014@082445.1265 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1280 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.1292 p9jo7splm9t195ddlqn0astara Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc21836670cc73d1e','aut670cc26632670cc73ca2' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@082445.1305 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1320 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.1354 p9jo7splm9t195ddlqn0astara Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut670cc21836670cc73d1e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut670cc26632670cc73ca2' ,0,0 ,2,23.00,20000,?,?,?,?)
20241014@082445.1569 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082445.1572 p9jo7splm9t195ddlqn0astara Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20241014@082445.1593 p9jo7splm9t195ddlqn0astara Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20241014@082445.1624 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1640 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.1666 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1680 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.1688 p9jo7splm9t195ddlqn0astara Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@082445.1700 p9jo7splm9t195ddlqn0astara Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20241014@082445.1713 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1729 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.1741 p9jo7splm9t195ddlqn0astara Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc72690670cc73d29','aut670cc26632670cc73ca2' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@082445.1745 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.1760 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.1801 p9jo7splm9t195ddlqn0astara Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut670cc72690670cc73d29',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut670cc26632670cc73ca2' ,0,0 ,2,23.00,30000,?,?,?,?)
20241014@082445.2002 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082445.2006 p9jo7splm9t195ddlqn0astara Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20241014@082445.2027 p9jo7splm9t195ddlqn0astara Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20241014@082445.2043 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2059 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.2085 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2099 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.2107 p9jo7splm9t195ddlqn0astara Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@082445.2119 p9jo7splm9t195ddlqn0astara Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20241014@082445.2131 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2145 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.2156 p9jo7splm9t195ddlqn0astara Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc30939670cc73d34','aut670cc26632670cc73ca2' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@082445.2160 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2174 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.2201 p9jo7splm9t195ddlqn0astara Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut670cc30939670cc73d34',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut670cc26632670cc73ca2' ,0,0 ,2,23.00,40000,?,?,?,?)
20241014@082445.2545 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082445.2548 p9jo7splm9t195ddlqn0astara Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20241014@082445.2567 p9jo7splm9t195ddlqn0astara Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20241014@082445.2580 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2596 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.2622 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2636 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.2647 p9jo7splm9t195ddlqn0astara Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@082445.2660 p9jo7splm9t195ddlqn0astara Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20241014@082445.2673 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2691 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@082445.2702 p9jo7splm9t195ddlqn0astara Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc17532670cc73d41','aut670cc26632670cc73ca2' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@082445.2706 p9jo7splm9t195ddlqn0astara Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@082445.2720 p9jo7splm9t195ddlqn0astara Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@082445.2746 p9jo7splm9t195ddlqn0astara Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut670cc17532670cc73d41',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut670cc26632670cc73ca2' ,0,0 ,2,23.00,50000,?,?,?,?)
20241014@082445.3135 p9jo7splm9t195ddlqn0astara Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut670cc26632670cc73ca2','2406597','wait',39,'adm09112754980.682000002')
20241014@082445.3579 p9jo7splm9t195ddlqn0astara Query : use flama_phc
20241014@082445.3582 p9jo7splm9t195ddlqn0astara Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@082445.3613 p9jo7splm9t195ddlqn0astara Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2607';
20241014@082445.4160 p9jo7splm9t195ddlqn0astara Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2607';
20241014@082445.4836 p9jo7splm9t195ddlqn0astara Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2607';
20241014@082445.4871 p9jo7splm9t195ddlqn0astara Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2607';
20241014@083613.1661 vpot41a6aonrugoqcjl3vvfn0g Query : use flama_phc
20241014@083613.1666 vpot41a6aonrugoqcjl3vvfn0g Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20241014@083613.1754 vpot41a6aonrugoqcjl3vvfn0g Query : use flama_phc
20241014@083613.1757 vpot41a6aonrugoqcjl3vvfn0g Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@085222.9701 aq8mvl15afv2j46lq8kimo3goq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@085222.9713 aq8mvl15afv2j46lq8kimo3goq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@085222.9772 aq8mvl15afv2j46lq8kimo3goq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2608';
20241014@085222.9828 aq8mvl15afv2j46lq8kimo3goq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2608';
20241014@085222.9891 aq8mvl15afv2j46lq8kimo3goq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2608';
20241014@085222.9920 aq8mvl15afv2j46lq8kimo3goq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2608';
20241014@085222.9960 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085222.9963 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@085223.2300 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2301.00.3'
20241014@085223.1140 aq8mvl15afv2j46lq8kimo3goq 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 = 2400474 and bi.ref ='324.2301.00.3' and bi.lordem =20000
20241014@085223.5390 aq8mvl15afv2j46lq8kimo3goq 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 = 'cps24042954269,262000002 ' 
20241014@085223.2299 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085223.2304 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 1 valor from ts where ts.ndos = 61
20241014@085223.2373 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085223.2376 aq8mvl15afv2j46lq8kimo3goq 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')
20241014@085223.2406 aq8mvl15afv2j46lq8kimo3goq 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
20241014@085223.2521 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085223.2524 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 ~inactivo valor from fl where no = '202445' and estab = 00 order by inactivo desc
20241014@085223.2623 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085223.2626 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from ts where ndos = 61
20241014@085223.2676 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085223.2691 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241014@085223.2701 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085223.2715 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241014@085223.2725 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085223.2740 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241014@085223.2750 aq8mvl15afv2j46lq8kimo3goq 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
20241014@085223.2843 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241014@085223.2915 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241014@085223.2935 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085223.2942 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202445' and estab=00
20241014@085223.3010 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085223.3026 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241014@085223.3038 aq8mvl15afv2j46lq8kimo3goq Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc44060670ccdb747',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241014@085223.3098 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085223.3115 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241014@085223.3127 aq8mvl15afv2j46lq8kimo3goq Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc44060670ccdb747','--','bo',1.1150234741784037558 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241014@085223.3280 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085223.3298 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241014@085223.3311 aq8mvl15afv2j46lq8kimo3goq 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 ('aut670cc44060670ccdb747','guia r. fornecedor','2024-10-14',61,2403029,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241014@085226.2054 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085226.2058 aq8mvl15afv2j46lq8kimo3goq Query : select st.usalote valor from st where st.ref = '324.2301.00.3'
20241014@085226.2092 aq8mvl15afv2j46lq8kimo3goq 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'
20241014@085226.2499 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085226.2838 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241014@085226.2853 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085226.2868 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241014@085226.2877 aq8mvl15afv2j46lq8kimo3goq Query : select sestamp valor from se where ref ='324.2301.00.3' and lote = 'r2400474200a'
20241014@085226.2891 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085226.2906 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241014@085226.2915 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085226.2938 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241014@085226.3005 aq8mvl15afv2j46lq8kimo3goq Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670cc52052670ccdba47',?,?,'20241014',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241014@085226.3912 aq8mvl15afv2j46lq8kimo3goq Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@085226.4116 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085226.4177 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241014@085226.4191 aq8mvl15afv2j46lq8kimo3goq Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670cc11850670ccdba64','aut670cc44060670ccdb747',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 = 'aut670cc44060670ccdb747'
20241014@085226.4330 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@085226.4349 aq8mvl15afv2j46lq8kimo3goq Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241014@085226.4365 aq8mvl15afv2j46lq8kimo3goq 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 'aut670cc11850670ccdba64',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 7650, 7650*.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 ,4.26,4.26*200.48,4.26,4.26*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,4.26*7650,4.26*7650*200.48 ,4.983000,4.983000*200.48 ,4.983000,4.983000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,4.26,4.26*200.48,4.26*7650,4.26*7650*200.48,'cps24042954269,262000002 ',4.75,4.75*7650,4.75,4.75*7650,?,?,?,4 from bo bo where bo.bostamp = 'aut670cc44060670ccdb747'
20241014@085243.3242 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085243.3249 aq8mvl15afv2j46lq8kimo3goq Query : declare @bostamp varchar(25) = 'aut670cc44060670ccdb747' ,@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 
20241014@085253.9490 aq8mvl15afv2j46lq8kimo3goq Query : use flama_phc
20241014@085253.9510 aq8mvl15afv2j46lq8kimo3goq Query : select 1 valor from bo where bo.bostamp = 'aut670cc44060670ccdb747'
20241014@085253.9693 aq8mvl15afv2j46lq8kimo3goq 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) = 'aut670cc44060670ccdb747' 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 
