20241014@182853.6814 rv9pdv4qih81hju7f85tj8j0rs INICIO DE FICHEIRO DE LOG :: /var/www/webservices/logs/website.sql.log
20241014@182853.6813 rv9pdv4qih81hju7f85tj8j0rs Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@182853.6824 rv9pdv4qih81hju7f85tj8j0rs Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@182853.6882 rv9pdv4qih81hju7f85tj8j0rs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2645';
20241014@182853.6936 rv9pdv4qih81hju7f85tj8j0rs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2645';
20241014@182853.6989 rv9pdv4qih81hju7f85tj8j0rs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2645';
20241014@182853.7016 rv9pdv4qih81hju7f85tj8j0rs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2645';
20241014@182853.7071 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.7074 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@182853.7136 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.7139 rv9pdv4qih81hju7f85tj8j0rs Query : select no, estab,szadrsdesc from szadrs where u_coddest=227
20241014@182853.7212 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20241014@182853.7323 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1832.00.2' and bi.lordem =1
20241014@182853.7606 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20241014@182853.7626 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1832.00.2' and bi.lordem =1
20241014@182853.7645 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20241014@182853.7664 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1832.00.2' and bi.lordem =2
20241014@182853.7935 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20241014@182853.8044 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1833.00.2' and bi.lordem =3
20241014@182853.8317 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20241014@182853.8337 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1833.00.2' and bi.lordem =3
20241014@182853.8353 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20241014@182853.8372 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1833.00.2' and bi.lordem =4
20241014@182853.8653 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20241014@182853.8674 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406722 and bi.ref ='324.1833.00.2' and bi.lordem =4
20241014@182853.8693 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.8696 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@182853.8730 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.8733 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 1 valor from td where td.ndoc = 39
20241014@182853.8769 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.8772 rv9pdv4qih81hju7f85tj8j0rs 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@182853.8799 rv9pdv4qih81hju7f85tj8j0rs 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@182853.8832 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.8835 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 ~inactivo valor from cl where no = '100041' and estab = 0 order by inactivo desc
20241014@182853.8929 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.8932 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241014@182853.8964 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.8967 rv9pdv4qih81hju7f85tj8j0rs Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@182853.9007 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.9012 rv9pdv4qih81hju7f85tj8j0rs Query : select szadrsstamp valor from szadrs where szadrsdesc='radiobela som, lda'
20241014@182853.9059 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182853.9062 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from td where ndoc = 39
20241014@182853.9073 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241014@182853.9086 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182853.9102 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182853.9121 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182853.9135 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182853.9162 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182853.9177 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182853.9189 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182853.9250 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182853.9262 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182853.9277 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182853.9293 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241014@182853.9438 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182853.9454 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182853.9488 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241014@182853.9500 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241014@182853.9512 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241014@182853.9524 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241014@182853.9537 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241014@182853.9550 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241014@182853.9561 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670d583234670d54d5e0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241014@182853.9758 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 fno valor from wsftdata order by fno desc
20241014@182853.9779 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182853.9795 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182853.9817 rv9pdv4qih81hju7f85tj8j0rs Query : select 'normal' from dummy
20241014@182853.9833 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670d583234670d54d5e0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1267,100041,0,'2024-10-14',39,'euro',0,0,2024 ,?,?)
20241014@182854.6400 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.6700 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1832.00.2'
20241014@182854.9700 rv9pdv4qih81hju7f85tj8j0rs 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.1832.00.2'
20241014@182854.2060 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.2230 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.2480 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.2690 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.2780 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.2910 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1832.00.2' and lote = 'r2301257100a'
20241014@182854.3110 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.3250 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.3370 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d513205670d54d607','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.3410 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.3560 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.3850 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d513205670d54d607',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241014@182854.5980 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.6130 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.6390 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.6530 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.6610 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.6730 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.6870 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.6980 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d520628670d54d610','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.7020 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.7170 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.7470 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d520628670d54d610',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,20000,?,?,?)
20241014@182854.9480 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.9510 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1832.00.2'
20241014@182854.9700 rv9pdv4qih81hju7f85tj8j0rs 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.1832.00.2'
20241014@182854.9840 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1000 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.1026 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1040 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.1048 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.1060 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1832.00.2' and lote = 'r2301257100a'
20241014@182854.1072 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1087 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.1098 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d567351670d54d61a','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.1102 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1117 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.1145 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d567351670d54d61a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,40000,?,?,?,?,?)
20241014@182854.1348 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1363 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.1388 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1402 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.1410 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.1423 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1436 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.1447 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d590689670d54d622','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.1451 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1467 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.1493 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d590689670d54d622',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,50000,?,?,?)
20241014@182854.1687 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.1690 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1832.00.2'
20241014@182854.1708 rv9pdv4qih81hju7f85tj8j0rs 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.1832.00.2'
20241014@182854.1721 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1736 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.1761 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1775 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.1784 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.1795 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1832.00.2' and lote = 'r2301257100a'
20241014@182854.1807 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1829 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.1840 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d509997670d54d62c','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.1844 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.1858 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.1887 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d509997670d54d62c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,70000,?,?,?,?,?)
20241014@182854.2097 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.2112 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.2139 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.2154 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.2163 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.2175 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.2190 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.2201 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d537444670d54d635','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.2205 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.2221 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.2249 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d537444670d54d635',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,80000,?,?,?)
20241014@182854.3457 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.3462 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1833.00.2'
20241014@182854.3483 rv9pdv4qih81hju7f85tj8j0rs 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.1833.00.2'
20241014@182854.3604 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.3620 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.3645 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.3660 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.3669 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.3681 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1833.00.2' and lote = 'r2301257100a'
20241014@182854.3694 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.3709 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.3722 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d577517670d54d65a','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.3727 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.3741 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.3768 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d577517670d54d65a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,100000,?,?,?,?,?)
20241014@182854.3974 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.3977 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1833.00.2'
20241014@182854.3996 rv9pdv4qih81hju7f85tj8j0rs 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.1833.00.2'
20241014@182854.4009 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4025 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.4050 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4064 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.4073 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.4085 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1833.00.2' and lote = 'r2301257100a'
20241014@182854.4098 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4112 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.4123 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d572524670d54d664','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.4127 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4141 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.4168 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d572524670d54d664',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,110000,?,?,?,?,?)
20241014@182854.4372 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.4375 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1833.00.2'
20241014@182854.4394 rv9pdv4qih81hju7f85tj8j0rs 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.1833.00.2'
20241014@182854.4407 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4423 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.4449 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4464 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.4472 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.4486 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1833.00.2' and lote = 'r2301257100a'
20241014@182854.4499 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4513 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.4524 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d540454670d54d66d','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.4528 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4543 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.4572 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d540454670d54d66d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,120000,?,?,?,?,?)
20241014@182854.4875 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.4878 rv9pdv4qih81hju7f85tj8j0rs Query : select st.usalote valor from st where st.ref = '324.1833.00.2'
20241014@182854.4898 rv9pdv4qih81hju7f85tj8j0rs 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.1833.00.2'
20241014@182854.4913 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4928 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.4954 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.4969 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.4978 rv9pdv4qih81hju7f85tj8j0rs Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182854.4990 rv9pdv4qih81hju7f85tj8j0rs Query : select sestamp valor from se where ref ='324.1833.00.2' and lote = 'r2301257100a'
20241014@182854.5002 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.5017 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182854.5028 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d525209670d54d67a','aut670d583234670d54d5e0' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182854.5032 rv9pdv4qih81hju7f85tj8j0rs Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182854.5047 rv9pdv4qih81hju7f85tj8j0rs Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182854.5073 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d525209670d54d67a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d583234670d54d5e0' ,0,0 ,2,23.00,130000,?,?,?,?,?)
20241014@182854.5274 rv9pdv4qih81hju7f85tj8j0rs Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut670d583234670d54d5e0','2406722','wait',39,'adm09112754980.682000002')
20241014@182854.5347 rv9pdv4qih81hju7f85tj8j0rs Query : use flama_phc
20241014@182854.5351 rv9pdv4qih81hju7f85tj8j0rs Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@182854.5381 rv9pdv4qih81hju7f85tj8j0rs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2645';
20241014@182854.5412 rv9pdv4qih81hju7f85tj8j0rs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2645';
20241014@182854.5457 rv9pdv4qih81hju7f85tj8j0rs Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2645';
20241014@182854.5485 rv9pdv4qih81hju7f85tj8j0rs Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2645';
20241014@182854.6075 12a1m0q8s14c6o8tumdjdn0fro Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@182854.6088 12a1m0q8s14c6o8tumdjdn0fro Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@182854.6150 12a1m0q8s14c6o8tumdjdn0fro Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2646';
20241014@182854.6203 12a1m0q8s14c6o8tumdjdn0fro Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2646';
20241014@182854.6259 12a1m0q8s14c6o8tumdjdn0fro Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2646';
20241014@182854.6287 12a1m0q8s14c6o8tumdjdn0fro Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2646';
20241014@182854.6340 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182854.6343 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@182854.6409 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182854.6412 12a1m0q8s14c6o8tumdjdn0fro Query : select no, estab,szadrsdesc from szadrs where u_coddest=832
20241014@182854.6486 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1643.00.1'
20241014@182854.6596 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.1643.00.1' and bi.lordem =1
20241014@182854.6875 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20241014@182854.6977 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.1831.00.2' and bi.lordem =2
20241014@182854.7255 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20241014@182854.7274 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.1831.00.2' and bi.lordem =3
20241014@182854.7552 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20241014@182854.7575 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.1831.00.2' and bi.lordem =3
20241014@182854.7590 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20241014@182854.7609 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.1831.00.2' and bi.lordem =4
20241014@182854.7897 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4962.00.1'
20241014@182854.8003 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.4962.00.1' and bi.lordem =5
20241014@182854.8290 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4961.00.1'
20241014@182854.8391 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.4961.00.1' and bi.lordem =7
20241014@182854.9657 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4963.00.1'
20241014@182854.9771 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.4963.00.1' and bi.lordem =9
20241014@182855.5400 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4964.00.1'
20241014@182855.1560 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.4964.00.1' and bi.lordem =11
20241014@182855.4300 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1462.00.1'
20241014@182855.5310 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.1462.00.1' and bi.lordem =13
20241014@182855.8250 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4906.00.1'
20241014@182855.9260 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.4906.00.1' and bi.lordem =14
20241014@182855.1197 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2222.00.1'
20241014@182855.1301 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.2222.00.1' and bi.lordem =16
20241014@182855.1586 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2223.00.1'
20241014@182855.1691 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.2223.00.1' and bi.lordem =18
20241014@182855.1978 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2335.00.1'
20241014@182855.1997 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.2335.00.1' and bi.lordem =20
20241014@182855.2267 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2326.00.1'
20241014@182855.2378 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.2326.00.1' and bi.lordem =22
20241014@182855.2653 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2357.00.1'
20241014@182855.2755 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406723 and bi.ref ='324.2357.00.1' and bi.lordem =24
20241014@182855.3021 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3024 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@182855.3058 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3061 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 1 valor from td where td.ndoc = 39
20241014@182855.3092 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3095 12a1m0q8s14c6o8tumdjdn0fro 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@182855.3121 12a1m0q8s14c6o8tumdjdn0fro 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@182855.3155 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3158 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 ~inactivo valor from cl where no = '101726' and estab = 0 order by inactivo desc
20241014@182855.3246 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3250 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241014@182855.3280 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3283 12a1m0q8s14c6o8tumdjdn0fro Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@182855.3324 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3327 12a1m0q8s14c6o8tumdjdn0fro Query : select szadrsstamp valor from szadrs where szadrsdesc='rick & mark - a mobiladora de padronelo,lda'
20241014@182855.3375 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.3378 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from td where ndoc = 39
20241014@182855.3390 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241014@182855.3404 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.3420 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182855.3438 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.3452 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182855.3481 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.3495 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182855.3508 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182855.3571 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182855.3583 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.3597 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182855.3612 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241014@182855.3755 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.3773 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182855.3804 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241014@182855.3816 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241014@182855.3828 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241014@182855.3839 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241014@182855.3850 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241014@182855.3861 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241014@182855.3872 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670d543005670d54d755',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241014@182855.4075 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 fno valor from wsftdata order by fno desc
20241014@182855.4096 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.4111 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182855.4133 12a1m0q8s14c6o8tumdjdn0fro Query : select 'normal' from dummy
20241014@182855.4147 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670d543005670d54d755',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1268,101726,0,'2024-10-14',39,'euro',0,0,2024 ,?,?)
20241014@182855.4373 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.4376 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.1643.00.1'
20241014@182855.4396 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1643.00.1'
20241014@182855.4506 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.4521 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.4554 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.4569 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.4579 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.4592 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.1643.00.1' and lote = 'r2101218200a'
20241014@182855.4619 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.4634 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.4648 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d561633670d54d770','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.4653 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.4669 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.4699 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d561633670d54d770',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',12.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241014@182855.4953 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.4956 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.1831.00.2'
20241014@182855.4989 12a1m0q8s14c6o8tumdjdn0fro 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.1831.00.2'
20241014@182855.5110 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5126 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.5151 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5167 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.5175 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.5187 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.1831.00.2' and lote = 'r2400481200a'
20241014@182855.5200 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5213 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.5224 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d581748670d54d77e','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.5228 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5242 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.5269 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d581748670d54d77e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20241014@182855.5499 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5514 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.5539 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5553 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.5562 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.5574 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5588 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.5600 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d571600670d54d788','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.5603 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.5618 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.5647 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d571600670d54d788',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,30000,?,?,?)
20241014@182855.6471 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.6914 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.1831.00.2'
20241014@182855.6942 12a1m0q8s14c6o8tumdjdn0fro 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.1831.00.2'
20241014@182855.6956 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.6976 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.7002 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7017 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.7025 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.7037 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.1831.00.2' and lote = 'r2400481200a'
20241014@182855.7049 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7063 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.7074 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d562256670d54d7ac','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.7078 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7093 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.7120 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d562256670d54d7ac',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',5.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20241014@182855.7335 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7349 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.7375 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7389 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.7397 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.7409 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7425 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.7437 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d527910670d54d7b4','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.7441 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7455 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.7483 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d527910670d54d7b4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,60000,?,?,?)
20241014@182855.7682 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.7685 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.1831.00.2'
20241014@182855.7703 12a1m0q8s14c6o8tumdjdn0fro 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.1831.00.2'
20241014@182855.7718 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7733 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.7757 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7772 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.7781 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.7793 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.1831.00.2' and lote = 'r2400481200a'
20241014@182855.7805 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7820 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.7831 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d599961670d54d7be','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.7835 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.7849 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.7877 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d599961670d54d7be',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,80000,?,?,?,?,?)
20241014@182855.8083 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8099 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.8127 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8143 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.8152 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.8166 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8181 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.8194 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d593808670d54d7c7','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.8198 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8214 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.8247 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d593808670d54d7c7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,90000,?,?,?)
20241014@182855.8440 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.8443 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.1831.00.2'
20241014@182855.8463 12a1m0q8s14c6o8tumdjdn0fro 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.1831.00.2'
20241014@182855.8477 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8491 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.8517 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8532 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.8541 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.8553 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.1831.00.2' and lote = 'r2400481200a'
20241014@182855.8566 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8579 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.8590 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d510995670d54d7d1','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.8594 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8608 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.8635 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d510995670d54d7d1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,110000,?,?,?,?,?)
20241014@182855.8846 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8864 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.8892 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8907 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.8916 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.8928 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8943 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.8954 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d570258670d54d7d9','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.8958 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.8973 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.9001 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d570258670d54d7d9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,120000,?,?,?)
20241014@182855.9201 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.9204 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.4962.00.1'
20241014@182855.9225 12a1m0q8s14c6o8tumdjdn0fro 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.4962.00.1'
20241014@182855.9329 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9344 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.9371 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9387 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.9396 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.9410 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.4962.00.1' and lote = 'r2101092100a'
20241014@182855.9433 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9449 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.9462 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d588090670d54d7e6','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.9466 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9482 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.9510 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d588090670d54d7e6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,140000,?,?,?,?,?)
20241014@182855.9710 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182855.9713 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.4961.00.1'
20241014@182855.9735 12a1m0q8s14c6o8tumdjdn0fro 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.4961.00.1'
20241014@182855.9839 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9854 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182855.9879 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9893 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.9901 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182855.9914 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.4961.00.1' and lote = 'r2101092200a'
20241014@182855.9934 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9948 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182855.9960 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d539542670d54d7f2','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182855.9963 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182855.9978 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.5000 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d539542670d54d7f2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,150000,?,?,?,?,?)
20241014@182856.2010 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.2040 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.4963.00.1'
20241014@182856.2260 12a1m0q8s14c6o8tumdjdn0fro 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.4963.00.1'
20241014@182856.3300 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.3460 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.3730 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.3870 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.3950 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.4070 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.4963.00.1' and lote = 'r2300717200a'
20241014@182856.4280 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4420 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.4540 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d542061670d54d80a','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.4640 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4780 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.5070 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d542061670d54d80a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,160000,?,?,?,?,?)
20241014@182856.7060 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.7090 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.4964.00.1'
20241014@182856.7340 12a1m0q8s14c6o8tumdjdn0fro 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.4964.00.1'
20241014@182856.8410 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8570 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.8830 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8970 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.9060 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.9180 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.4964.00.1' and lote = 'r2300717100a'
20241014@182856.9320 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9470 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.9580 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d500535670d54d816','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.9630 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9770 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.1005 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d500535670d54d816',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,170000,?,?,?,?,?)
20241014@182856.1240 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.1243 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.1462.00.1'
20241014@182856.1268 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1462.00.1'
20241014@182856.1384 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.1400 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.1428 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.1442 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.1452 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.1464 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.1462.00.1' and lote = 'r2101096200a'
20241014@182856.1478 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.1493 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.1506 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d564176670d54d824','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.1510 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.1526 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.1556 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d564176670d54d824',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,180000,?,?,?,?,?)
20241014@182856.1762 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.1765 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.4906.00.1'
20241014@182856.1787 12a1m0q8s14c6o8tumdjdn0fro 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.4906.00.1'
20241014@182856.1896 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.1911 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.1938 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.1953 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.1969 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.1984 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.4906.00.1' and lote = 'r2300207200a'
20241014@182856.2004 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2020 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.2031 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d551796670d54d830','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.2035 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2050 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.2081 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d551796670d54d830',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,190000,?,?,?,?,?)
20241014@182856.2301 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2320 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.2348 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2363 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.2372 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.2384 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2399 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.2412 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d547184670d54d83a','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.2416 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2436 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.2464 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d547184670d54d83a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,200000,?,?,?)
20241014@182856.2670 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.2673 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.2222.00.1'
20241014@182856.2692 12a1m0q8s14c6o8tumdjdn0fro 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.2222.00.1'
20241014@182856.2800 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2815 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.2840 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.2855 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.2875 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.4020 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.2222.00.1' and lote = 'r2301280100a'
20241014@182856.4033 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4050 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.4062 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d597811670d54d862','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.4067 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4081 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.4107 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d597811670d54d862',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,220000,?,?,?,?,?)
20241014@182856.4314 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.4317 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.2223.00.1'
20241014@182856.4336 12a1m0q8s14c6o8tumdjdn0fro 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.2223.00.1'
20241014@182856.4441 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4456 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.4482 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4495 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.4503 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.4515 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.2223.00.1' and lote = 'r2301281500a'
20241014@182856.4537 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4551 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.4564 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d500764670d54d86e','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.4568 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4582 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.4608 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d500764670d54d86e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,230000,?,?,?,?,?)
20241014@182856.4806 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.4809 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.2335.00.1'
20241014@182856.4829 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2335.00.1'
20241014@182856.4842 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4857 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.4881 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4896 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.4905 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.4918 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.2335.00.1' and lote = 'r2100585500a'
20241014@182856.4930 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4944 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.4955 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d510334670d54d878','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.4959 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.4977 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.5007 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d510334670d54d878',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',12.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,240000,?,?,?,?,?)
20241014@182856.5210 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.5213 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.2326.00.1'
20241014@182856.5231 12a1m0q8s14c6o8tumdjdn0fro 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.2326.00.1'
20241014@182856.5336 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5350 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.5373 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5387 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.5394 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.5406 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.2326.00.1' and lote = 'r2100576400a'
20241014@182856.5419 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5432 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.5443 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d590257670d54d884','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.5446 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5460 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.5487 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d590257670d54d884',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',36.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,250000,?,?,?,?,?)
20241014@182856.5684 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.5687 12a1m0q8s14c6o8tumdjdn0fro Query : select st.usalote valor from st where st.ref = '324.2357.00.1'
20241014@182856.5707 12a1m0q8s14c6o8tumdjdn0fro 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.2357.00.1'
20241014@182856.5817 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5831 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.5856 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5871 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.5880 12a1m0q8s14c6o8tumdjdn0fro Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.5891 12a1m0q8s14c6o8tumdjdn0fro Query : select sestamp valor from se where ref ='324.2357.00.1' and lote = 'r2200239100a'
20241014@182856.5920 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5934 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.5956 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d585580670d54d890','aut670d543005670d54d755' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.5960 12a1m0q8s14c6o8tumdjdn0fro Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.5974 12a1m0q8s14c6o8tumdjdn0fro Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.6000 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d585580670d54d890',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d543005670d54d755' ,0,0 ,2,23.00,260000,?,?,?,?,?)
20241014@182856.6199 12a1m0q8s14c6o8tumdjdn0fro Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut670d543005670d54d755','2406723','wait',39,'adm09112754980.682000002')
20241014@182856.6273 12a1m0q8s14c6o8tumdjdn0fro Query : use flama_phc
20241014@182856.6276 12a1m0q8s14c6o8tumdjdn0fro Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@182856.6308 12a1m0q8s14c6o8tumdjdn0fro Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2646';
20241014@182856.6341 12a1m0q8s14c6o8tumdjdn0fro Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2646';
20241014@182856.6387 12a1m0q8s14c6o8tumdjdn0fro Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2646';
20241014@182856.6412 12a1m0q8s14c6o8tumdjdn0fro Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2646';
20241014@182856.7065 ddeudap1rogpu06psbfo79mf27 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@182856.7077 ddeudap1rogpu06psbfo79mf27 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@182856.7135 ddeudap1rogpu06psbfo79mf27 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2647';
20241014@182856.7189 ddeudap1rogpu06psbfo79mf27 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2647';
20241014@182856.7240 ddeudap1rogpu06psbfo79mf27 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2647';
20241014@182856.7265 ddeudap1rogpu06psbfo79mf27 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2647';
20241014@182856.7315 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.7319 ddeudap1rogpu06psbfo79mf27 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@182856.7378 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.7381 ddeudap1rogpu06psbfo79mf27 Query : select no, estab,szadrsdesc from szadrs where u_coddest=227
20241014@182856.7421 ddeudap1rogpu06psbfo79mf27 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1685.00.1'
20241014@182856.7534 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406724 and bi.ref ='324.1685.00.1' and bi.lordem =1
20241014@182856.7815 ddeudap1rogpu06psbfo79mf27 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1685.00.1'
20241014@182856.7835 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406724 and bi.ref ='324.1685.00.1' and bi.lordem =1
20241014@182856.7853 ddeudap1rogpu06psbfo79mf27 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1685.00.1'
20241014@182856.7875 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406724 and bi.ref ='324.1685.00.1' and bi.lordem =2
20241014@182856.8147 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8150 ddeudap1rogpu06psbfo79mf27 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@182856.8182 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8185 ddeudap1rogpu06psbfo79mf27 Query : select top 1 1 valor from td where td.ndoc = 39
20241014@182856.8214 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8217 ddeudap1rogpu06psbfo79mf27 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@182856.8246 ddeudap1rogpu06psbfo79mf27 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@182856.8284 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8286 ddeudap1rogpu06psbfo79mf27 Query : select top 1 ~inactivo valor from cl where no = '100041' and estab = 0 order by inactivo desc
20241014@182856.8318 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8321 ddeudap1rogpu06psbfo79mf27 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241014@182856.8351 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8355 ddeudap1rogpu06psbfo79mf27 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@182856.8397 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8400 ddeudap1rogpu06psbfo79mf27 Query : select szadrsstamp valor from szadrs where szadrsdesc='radiobela som, lda'
20241014@182856.8449 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.8451 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from td where ndoc = 39
20241014@182856.8464 ddeudap1rogpu06psbfo79mf27 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241014@182856.8478 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8493 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182856.8512 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8526 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182856.8553 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8568 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182856.8580 ddeudap1rogpu06psbfo79mf27 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182856.8642 ddeudap1rogpu06psbfo79mf27 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182856.8654 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8669 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182856.8684 ddeudap1rogpu06psbfo79mf27 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670d599215670d54d8d1' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241014@182856.8826 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.8841 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182856.8873 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241014@182856.8885 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241014@182856.8896 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241014@182856.8907 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241014@182856.8919 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241014@182856.8930 ddeudap1rogpu06psbfo79mf27 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241014@182856.8941 ddeudap1rogpu06psbfo79mf27 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670d599215670d54d8d1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241014@182856.9143 ddeudap1rogpu06psbfo79mf27 Query : select top 1 fno valor from wsftdata order by fno desc
20241014@182856.9164 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9179 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182856.9201 ddeudap1rogpu06psbfo79mf27 Query : select 'normal' from dummy
20241014@182856.9216 ddeudap1rogpu06psbfo79mf27 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670d599215670d54d8d1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1269,100041,0,'2024-10-14',39,'euro',0,0,2024 ,?,?)
20241014@182856.9436 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.9439 ddeudap1rogpu06psbfo79mf27 Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20241014@182856.9460 ddeudap1rogpu06psbfo79mf27 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1685.00.1'
20241014@182856.9568 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9583 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.9608 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9622 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.9631 ddeudap1rogpu06psbfo79mf27 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182856.9643 ddeudap1rogpu06psbfo79mf27 Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2400173100a'
20241014@182856.9658 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9675 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182856.9687 ddeudap1rogpu06psbfo79mf27 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d563372670d54d8eb','aut670d599215670d54d8d1' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182856.9692 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9709 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182856.9737 ddeudap1rogpu06psbfo79mf27 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d563372670d54d8eb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut670d599215670d54d8d1' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241014@182856.9940 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182856.9943 ddeudap1rogpu06psbfo79mf27 Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20241014@182856.9963 ddeudap1rogpu06psbfo79mf27 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1685.00.1'
20241014@182856.9976 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182856.9990 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.1400 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.2700 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.3500 ddeudap1rogpu06psbfo79mf27 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.4600 ddeudap1rogpu06psbfo79mf27 Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2400173100a'
20241014@182857.5700 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7100 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.8100 ddeudap1rogpu06psbfo79mf27 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d502904670d54d901','aut670d599215670d54d8d1' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.8500 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.9800 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.1260 ddeudap1rogpu06psbfo79mf27 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d502904670d54d901',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',19.000 ,'aut670d599215670d54d8d1' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20241014@182857.3220 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182857.3240 ddeudap1rogpu06psbfo79mf27 Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20241014@182857.3430 ddeudap1rogpu06psbfo79mf27 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1685.00.1'
20241014@182857.3560 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.3700 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.3940 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4070 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.4160 ddeudap1rogpu06psbfo79mf27 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.4270 ddeudap1rogpu06psbfo79mf27 Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2400173100a'
20241014@182857.4390 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4520 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.4630 ddeudap1rogpu06psbfo79mf27 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d528794670d54d90a','aut670d599215670d54d8d1' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.4670 ddeudap1rogpu06psbfo79mf27 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4810 ddeudap1rogpu06psbfo79mf27 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.5080 ddeudap1rogpu06psbfo79mf27 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d528794670d54d90a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d599215670d54d8d1' ,0,0 ,2,23.00,30000,?,?,?,?,?)
20241014@182857.7130 ddeudap1rogpu06psbfo79mf27 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut670d599215670d54d8d1','2406724','wait',39,'adm09112754980.682000002')
20241014@182857.7860 ddeudap1rogpu06psbfo79mf27 Query : use flama_phc
20241014@182857.7890 ddeudap1rogpu06psbfo79mf27 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@182857.8180 ddeudap1rogpu06psbfo79mf27 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2647';
20241014@182857.8480 ddeudap1rogpu06psbfo79mf27 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2647';
20241014@182857.8910 ddeudap1rogpu06psbfo79mf27 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2647';
20241014@182857.9170 ddeudap1rogpu06psbfo79mf27 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2647';
20241014@182857.2094 qkjld1r5if9dhif5eiv4va9uaa Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@182857.2105 qkjld1r5if9dhif5eiv4va9uaa Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@182857.2163 qkjld1r5if9dhif5eiv4va9uaa Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2648';
20241014@182857.2217 qkjld1r5if9dhif5eiv4va9uaa Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2648';
20241014@182857.2272 qkjld1r5if9dhif5eiv4va9uaa Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2648';
20241014@182857.2298 qkjld1r5if9dhif5eiv4va9uaa Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2648';
20241014@182857.2349 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.2352 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@182857.2420 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.2423 qkjld1r5if9dhif5eiv4va9uaa Query : select no, estab,szadrsdesc from szadrs where u_coddest=2679
20241014@182857.2498 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20241014@182857.2519 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406726 and bi.ref ='324.1832.00.2' and bi.lordem =1
20241014@182857.2804 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20241014@182857.2831 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406726 and bi.ref ='324.1832.00.2' and bi.lordem =2
20241014@182857.3109 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1705.00.1'
20241014@182857.3130 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406726 and bi.ref ='324.1705.00.1' and bi.lordem =3
20241014@182857.3398 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1608.00.1'
20241014@182857.3516 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406726 and bi.ref ='324.1608.00.1' and bi.lordem =5
20241014@182857.3812 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9075.00.1'
20241014@182857.3919 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406726 and bi.ref ='328.9075.00.1' and bi.lordem =7
20241014@182857.4214 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4218 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@182857.4247 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4250 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 1 valor from td where td.ndoc = 39
20241014@182857.4282 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4286 qkjld1r5if9dhif5eiv4va9uaa 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@182857.4316 qkjld1r5if9dhif5eiv4va9uaa 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@182857.4351 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4354 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 ~inactivo valor from cl where no = '199525' and estab = 0 order by inactivo desc
20241014@182857.4446 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4449 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241014@182857.4479 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4482 qkjld1r5if9dhif5eiv4va9uaa Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@182857.4523 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4525 qkjld1r5if9dhif5eiv4va9uaa Query : select szadrsstamp valor from szadrs where szadrsdesc='euroilhas - soc.com.representaÇÕes,lda'
20241014@182857.4573 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.4576 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from td where ndoc = 39
20241014@182857.4588 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241014@182857.4609 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4625 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182857.4644 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4658 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182857.4685 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4699 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182857.4711 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182857.4776 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182857.4788 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4804 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182857.4819 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241014@182857.4964 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.4981 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182857.5016 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241014@182857.5030 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241014@182857.5043 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241014@182857.5057 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241014@182857.5070 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241014@182857.5083 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241014@182857.5096 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670d559758670d54d973',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241014@182857.5301 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 fno valor from wsftdata order by fno desc
20241014@182857.5323 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.5348 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182857.5371 qkjld1r5if9dhif5eiv4va9uaa Query : select 'normal' from dummy
20241014@182857.5385 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670d559758670d54d973',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1270,199525,0,'2024-10-14',39,'euro',0,0,2024 ,?,?)
20241014@182857.5649 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.5652 qkjld1r5if9dhif5eiv4va9uaa Query : select st.usalote valor from st where st.ref = '324.1832.00.2'
20241014@182857.5673 qkjld1r5if9dhif5eiv4va9uaa 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.1832.00.2'
20241014@182857.5688 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.5704 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.5733 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.5747 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.5755 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.5766 qkjld1r5if9dhif5eiv4va9uaa Query : select sestamp valor from se where ref ='324.1832.00.2' and lote = 'r2301257100a'
20241014@182857.5778 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.5792 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.5802 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d569248670d54d98d','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.5806 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.5820 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.5847 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d569248670d54d98d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',11.000 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241014@182857.6063 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6078 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.6107 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6121 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.6130 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.6142 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6156 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.6168 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d505354670d54d995','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.6172 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6185 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.6225 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d505354670d54d995',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,20000,?,?,?)
20241014@182857.6438 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.6441 qkjld1r5if9dhif5eiv4va9uaa Query : select st.usalote valor from st where st.ref = '324.1832.00.2'
20241014@182857.6461 qkjld1r5if9dhif5eiv4va9uaa 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.1832.00.2'
20241014@182857.6474 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6489 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.6514 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6528 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.6536 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.6547 qkjld1r5if9dhif5eiv4va9uaa Query : select sestamp valor from se where ref ='324.1832.00.2' and lote = 'r2301257100a'
20241014@182857.6559 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6574 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.6586 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d569154670d54d9a0','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.6590 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6604 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.6642 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d569154670d54d9a0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,40000,?,?,?,?,?)
20241014@182857.6873 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6889 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.6917 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6931 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.6939 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.6951 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6966 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.6979 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d517008670d54d9a9','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.6983 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.6997 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.7025 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d517008670d54d9a9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,50000,?,?,?)
20241014@182857.7240 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.7244 qkjld1r5if9dhif5eiv4va9uaa Query : select st.usalote valor from st where st.ref = '324.1705.00.1'
20241014@182857.7264 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1705.00.1'
20241014@182857.7277 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7293 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.7318 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7332 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.7341 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.7353 qkjld1r5if9dhif5eiv4va9uaa Query : select sestamp valor from se where ref ='324.1705.00.1' and lote = 'r2400050500a'
20241014@182857.7366 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7381 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.7392 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d562689670d54d9b3','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.7396 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7412 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.7441 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d562689670d54d9b3',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',12.000 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,70000,?,?,?,?,?)
20241014@182857.7649 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.7652 qkjld1r5if9dhif5eiv4va9uaa Query : select st.usalote valor from st where st.ref = '324.1608.00.1'
20241014@182857.7675 qkjld1r5if9dhif5eiv4va9uaa 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.1608.00.1'
20241014@182857.7786 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7801 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.7826 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7840 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.7848 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.7860 qkjld1r5if9dhif5eiv4va9uaa Query : select sestamp valor from se where ref ='324.1608.00.1' and lote = 'r2400237100a'
20241014@182857.7873 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7887 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.7898 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d502958670d54d9c0','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.7902 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.7917 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.7949 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d502958670d54d9c0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',12.000 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,80000,?,?,?,?,?)
20241014@182857.8191 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.8194 qkjld1r5if9dhif5eiv4va9uaa Query : select st.usalote valor from st where st.ref = '328.9075.00.1'
20241014@182857.8214 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9075.00.1'
20241014@182857.8548 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.8564 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.8589 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.8603 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.8613 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.8625 qkjld1r5if9dhif5eiv4va9uaa Query : select sestamp valor from se where ref ='328.9075.00.1' and lote = 'r2400212150a'
20241014@182857.8647 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.8668 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.8681 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d587666670d54d9d3','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.8685 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.8699 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.8726 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d587666670d54d9d3',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,90000,?,?,?,?,?)
20241014@182857.8956 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.8974 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.8999 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.9014 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.9022 qkjld1r5if9dhif5eiv4va9uaa Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182857.9034 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.9048 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182857.9060 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d591451670d54d9dc','aut670d559758670d54d973' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182857.9064 qkjld1r5if9dhif5eiv4va9uaa Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182857.9078 qkjld1r5if9dhif5eiv4va9uaa Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182857.9105 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d591451670d54d9dc',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d559758670d54d973' ,0,0 ,2,23.00,100000,?,?,?)
20241014@182857.9313 qkjld1r5if9dhif5eiv4va9uaa Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut670d559758670d54d973','2406726','wait',39,'adm09112754980.682000002')
20241014@182857.9382 qkjld1r5if9dhif5eiv4va9uaa Query : use flama_phc
20241014@182857.9385 qkjld1r5if9dhif5eiv4va9uaa Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@182857.9415 qkjld1r5if9dhif5eiv4va9uaa Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2648';
20241014@182858.5650 qkjld1r5if9dhif5eiv4va9uaa Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2648';
20241014@182858.6130 qkjld1r5if9dhif5eiv4va9uaa Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2648';
20241014@182858.6430 qkjld1r5if9dhif5eiv4va9uaa Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2648';
20241014@182858.1273 dv9etesi0fhq0ar489vs19np3o Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241014@182858.1285 dv9etesi0fhq0ar489vs19np3o Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241014@182858.1514 dv9etesi0fhq0ar489vs19np3o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2649';
20241014@182858.1575 dv9etesi0fhq0ar489vs19np3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2649';
20241014@182858.1629 dv9etesi0fhq0ar489vs19np3o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2649';
20241014@182858.1655 dv9etesi0fhq0ar489vs19np3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2649';
20241014@182858.1784 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.1788 dv9etesi0fhq0ar489vs19np3o Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@182858.1848 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.1851 dv9etesi0fhq0ar489vs19np3o Query : select no, estab,szadrsdesc from szadrs where u_coddest=2064
20241014@182858.1925 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8261.00.1'
20241014@182858.2040 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='327.8261.00.1' and bi.lordem =1
20241014@182858.2360 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '325.7002.00.1'
20241014@182858.2475 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='325.7002.00.1' and bi.lordem =2
20241014@182858.2944 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1536.00.1'
20241014@182858.3067 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='324.1536.00.1' and bi.lordem =3
20241014@182858.3359 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20241014@182858.3462 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='304.422.00.07' and bi.lordem =4
20241014@182858.3734 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.422.00.07'
20241014@182858.3755 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='304.422.00.07' and bi.lordem =4
20241014@182858.3771 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20241014@182858.3792 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='324.1834.00.1' and bi.lordem =5
20241014@182858.4102 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20241014@182858.4206 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='324.1884.00.1' and bi.lordem =6
20241014@182858.4500 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9005.00.1'
20241014@182858.4611 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='328.9005.00.1' and bi.lordem =7
20241014@182858.4894 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9335.00.1'
20241014@182858.5011 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='328.9335.00.1' and bi.lordem =8
20241014@182858.5302 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8171.00.1'
20241014@182858.5423 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='327.8171.00.1' and bi.lordem =9
20241014@182858.5782 dv9etesi0fhq0ar489vs19np3o Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8253.00.1'
20241014@182858.5923 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2067 and bo.obrano = 2406728 and bi.ref ='327.8253.00.1' and bi.lordem =10
20241014@182858.6236 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6239 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@182858.6270 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6273 dv9etesi0fhq0ar489vs19np3o Query : select top 1 1 valor from td where td.ndoc = 39
20241014@182858.6302 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6305 dv9etesi0fhq0ar489vs19np3o 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@182858.6335 dv9etesi0fhq0ar489vs19np3o 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@182858.6369 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6372 dv9etesi0fhq0ar489vs19np3o Query : select top 1 ~inactivo valor from cl where no = '101645' and estab = 0 order by inactivo desc
20241014@182858.6465 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6468 dv9etesi0fhq0ar489vs19np3o Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241014@182858.6499 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6502 dv9etesi0fhq0ar489vs19np3o Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@182858.6542 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6545 dv9etesi0fhq0ar489vs19np3o Query : select szadrsstamp valor from szadrs where szadrsdesc='macorlux - electrodomÉsticos, s.a.'
20241014@182858.6590 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.6593 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from td where ndoc = 39
20241014@182858.6605 dv9etesi0fhq0ar489vs19np3o Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241014@182858.6618 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.6635 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182858.6653 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.6666 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182858.6692 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.6706 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182858.6717 dv9etesi0fhq0ar489vs19np3o Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182858.6780 dv9etesi0fhq0ar489vs19np3o Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241014@182858.6793 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.6807 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241014@182858.6822 dv9etesi0fhq0ar489vs19np3o Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241014@182858.6965 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.6983 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241014@182858.7014 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241014@182858.7026 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241014@182858.7043 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241014@182858.7056 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241014@182858.7068 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241014@182858.7079 dv9etesi0fhq0ar489vs19np3o Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241014@182858.7090 dv9etesi0fhq0ar489vs19np3o Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670d527451670d54daa4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241014@182858.7288 dv9etesi0fhq0ar489vs19np3o Query : select top 1 fno valor from wsftdata order by fno desc
20241014@182858.7312 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.7327 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241014@182858.7348 dv9etesi0fhq0ar489vs19np3o Query : select 'normal' from dummy
20241014@182858.7362 dv9etesi0fhq0ar489vs19np3o Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670d527451670d54daa4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1271,101645,0,'2024-10-14',39,'euro',0,0,2024 ,?,?)
20241014@182858.7594 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.7596 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '327.8261.00.1'
20241014@182858.7618 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '327.8261.00.1'
20241014@182858.7725 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.7740 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182858.7764 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.7777 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182858.7785 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182858.7797 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='327.8261.00.1' and lote = 'r2400465200a'
20241014@182858.7810 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.7823 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182858.7834 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d563355670d54dabe','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182858.7838 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.7852 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182858.7878 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d563355670d54dabe',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241014@182858.9186 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9204 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182858.9228 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9241 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182858.9249 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182858.9261 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9274 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182858.9285 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d552769670d54dae2','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182858.9290 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9304 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182858.9332 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d552769670d54dae2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,20000,?,?,?)
20241014@182858.9552 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182858.9555 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '325.7002.00.1'
20241014@182858.9574 dv9etesi0fhq0ar489vs19np3o 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 = '325.7002.00.1'
20241014@182858.9687 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9702 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182858.9725 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9741 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182858.9749 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182858.9760 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='325.7002.00.1' and lote = '25/11'
20241014@182858.9773 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9787 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182858.9797 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d567133670d54daee','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182858.9801 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182858.9815 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182858.9840 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d567133670d54daee',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,40000,?,?,?,?,?)
20241014@182859.4700 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.5000 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '324.1536.00.1'
20241014@182859.6800 dv9etesi0fhq0ar489vs19np3o 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.1536.00.1'
20241014@182859.1830 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1990 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.2240 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2390 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2460 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.2580 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='324.1536.00.1' and lote = 'r2100240100a'
20241014@182859.2710 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2850 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2970 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d592102670d54db06','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.3000 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.3140 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.3410 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d592102670d54db06',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20241014@182859.5490 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.5520 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '304.422.00.07'
20241014@182859.5700 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.422.00.07'
20241014@182859.6760 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6910 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.7140 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7300 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.7380 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.7490 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='304.422.00.07' and lote = '230738'
20241014@182859.7850 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7990 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.8150 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d569780670d54db13','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.8190 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.8330 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.8590 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d569780670d54db13',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,60000,?,?,?,?,?)
20241014@182859.1065 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.1069 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '304.422.00.07'
20241014@182859.1087 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.422.00.07'
20241014@182859.1100 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1114 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.1138 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1151 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.1160 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.1171 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='304.422.00.07' and lote = '241004'
20241014@182859.1195 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1208 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.1219 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d579477670d54db1d','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.1223 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1237 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.1286 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d579477670d54db1d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,70000,?,?,?,?,?)
20241014@182859.1501 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.1503 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '324.1834.00.1'
20241014@182859.1521 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1834.00.1'
20241014@182859.1534 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1548 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.1571 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1585 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.1592 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.1603 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='324.1834.00.1' and lote = 'r2400214200a'
20241014@182859.1615 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1629 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.1640 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d562765670d54db27','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.1644 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1657 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.1683 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d562765670d54db27',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,80000,?,?,?,?,?)
20241014@182859.1905 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1920 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.1944 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1958 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.1966 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.1980 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.1994 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2005 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d590658670d54db30','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.2009 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2023 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.2049 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d590658670d54db30',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,90000,?,?,?)
20241014@182859.2271 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.2274 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '324.1884.00.1'
20241014@182859.2293 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1884.00.1'
20241014@182859.2415 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2431 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.2457 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2470 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2478 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.2489 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='324.1884.00.1' and lote = 'r2301208100a'
20241014@182859.2503 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2516 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2528 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d529996670d54db3d','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.2531 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2546 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.2573 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d529996670d54db3d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,110000,?,?,?,?,?)
20241014@182859.2784 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2799 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.2823 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2837 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2845 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.2856 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2870 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.2882 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d523017670d54db45','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.2886 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.2900 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.2926 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d523017670d54db45',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,120000,?,?,?)
20241014@182859.3194 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.3197 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '328.9005.00.1'
20241014@182859.3217 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9005.00.1'
20241014@182859.4404 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4422 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.4447 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4461 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.4469 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.4483 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='328.9005.00.1' and lote = 'r2400092600a'
20241014@182859.4496 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4509 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.4520 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d551517670d54db6d','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.4524 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4538 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.4563 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d551517670d54db6d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,140000,?,?,?,?,?)
20241014@182859.4788 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4803 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.4827 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4841 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.4849 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.4860 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4875 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.4886 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d574378670d54db76','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.4890 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.4904 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.4932 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d574378670d54db76',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,150000,?,?,?)
20241014@182859.5151 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.5154 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '328.9335.00.1'
20241014@182859.5174 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9335.00.1'
20241014@182859.5286 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5301 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.5325 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5340 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.5348 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.5360 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='328.9335.00.1' and lote = 'r2001448100a'
20241014@182859.5385 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5399 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.5410 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d549448670d54db83','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.5414 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5428 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.5454 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d549448670d54db83',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,170000,?,?,?,?,?)
20241014@182859.5673 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5689 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.5714 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5731 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.5740 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.5753 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5768 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.5782 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d508226670d54db8c','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.5786 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.5799 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.5832 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d508226670d54db8c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,180000,?,?,?)
20241014@182859.6046 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.6049 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '327.8171.00.1'
20241014@182859.6069 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '327.8171.00.1'
20241014@182859.6184 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6199 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.6223 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6238 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.6246 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.6257 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='327.8171.00.1' and lote = 'r2301073200a'
20241014@182859.6270 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6284 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.6295 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d558835670d54db99','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.6299 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6314 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.6341 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d558835670d54db99',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,200000,?,?,?,?,?)
20241014@182859.6560 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6577 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.6601 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6616 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.6625 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.6638 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6652 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.6664 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d520272670d54dba2','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.6668 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.6681 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.6708 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d520272670d54dba2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,210000,?,?,?)
20241014@182859.6905 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.6908 dv9etesi0fhq0ar489vs19np3o Query : select st.usalote valor from st where st.ref = '327.8253.00.1'
20241014@182859.6927 dv9etesi0fhq0ar489vs19np3o Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '327.8253.00.1'
20241014@182859.7043 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7059 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.7085 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7099 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.7107 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.7118 dv9etesi0fhq0ar489vs19np3o Query : select sestamp valor from se where ref ='327.8253.00.1' and lote = 'r2301073100a'
20241014@182859.7132 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7147 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.7158 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d529854670d54dbae','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.7163 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7177 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.7204 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670d529854670d54dbae',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,230000,?,?,?,?,?)
20241014@182859.7420 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7436 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.7459 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7473 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.7481 dv9etesi0fhq0ar489vs19np3o Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241014@182859.7493 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7507 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241014@182859.7518 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670d516618670d54dbb6','aut670d527451670d54daa4' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241014@182859.7522 dv9etesi0fhq0ar489vs19np3o Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241014@182859.7536 dv9etesi0fhq0ar489vs19np3o Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241014@182859.7564 dv9etesi0fhq0ar489vs19np3o Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut670d516618670d54dbb6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut670d527451670d54daa4' ,0,0 ,2,23.00,240000,?,?,?)
20241014@182859.7798 dv9etesi0fhq0ar489vs19np3o Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut670d527451670d54daa4','2406728','wait',39,'adm09112754980.682000002')
20241014@182859.7871 dv9etesi0fhq0ar489vs19np3o Query : use flama_phc
20241014@182859.7874 dv9etesi0fhq0ar489vs19np3o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241014@182859.7906 dv9etesi0fhq0ar489vs19np3o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2649';
20241014@182859.7938 dv9etesi0fhq0ar489vs19np3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2649';
20241014@182859.7981 dv9etesi0fhq0ar489vs19np3o Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2649';
20241014@182859.8007 dv9etesi0fhq0ar489vs19np3o Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2649';

20241014@184426.2304 7ci5mggn2isss9gu23h8p7eoi8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2650';
20241014@184426.2361 7ci5mggn2isss9gu23h8p7eoi8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2650';
20241014@184426.2389 7ci5mggn2isss9gu23h8p7eoi8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2650';
20241014@184426.2440 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.2443 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241014@184426.2506 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.2510 7ci5mggn2isss9gu23h8p7eoi8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=3883
20241014@184426.2591 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2714 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2735 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2754 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2771 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2791 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2811 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2831 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2850 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2874 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2894 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2913 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2932 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2950 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2968 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.2987 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3005 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3029 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3050 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3068 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3088 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3107 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.645.00.01'
20241014@184426.3150 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3153 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241014@184426.3186 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3190 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 1 valor from td where td.ndoc = 39
20241014@184426.3220 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3223 7ci5mggn2isss9gu23h8p7eoi8 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@184426.3250 7ci5mggn2isss9gu23h8p7eoi8 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@184426.3287 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3290 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 ~inactivo valor from cl where no = '101597' and estab = 0 order by inactivo desc
20241014@184426.3398 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3401 7ci5mggn2isss9gu23h8p7eoi8 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241014@184426.3448 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3451 7ci5mggn2isss9gu23h8p7eoi8 Query : select szadrsstamp valor from szadrs where szadrsdesc='pll- plataformalogistica lisboa norte'
20241014@184426.3497 7ci5mggn2isss9gu23h8p7eoi8 Query : use flama_phc
20241014@184426.3500 7ci5mggn2isss9gu23h8p7eoi8 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -230
20241014@184426.3558 7ci5mggn2isss9gu23h8p7eoi8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2650';
20241014@184426.3590 7ci5mggn2isss9gu23h8p7eoi8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2650';

20241015@050032.1479 loildc67q36a2hjnbhm1boslrd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2651';
20241015@050032.1605 loildc67q36a2hjnbhm1boslrd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2651';
20241015@050032.1646 loildc67q36a2hjnbhm1boslrd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2651';
20241015@050032.1735 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050032.1780 loildc67q36a2hjnbhm1boslrd Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241015@050032.2257 loildc67q36a2hjnbhm1boslrd Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.691.00.01'
20241015@050032.2364 loildc67q36a2hjnbhm1boslrd 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 = 2400485 and bi.ref ='324.691.00.01' and bi.lordem =20000
20241015@050032.2764 loildc67q36a2hjnbhm1boslrd 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 = 'cps24050657149,882000002 ' 
20241015@050032.3100 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050032.3105 loildc67q36a2hjnbhm1boslrd Query : select top 1 1 valor from ts where ts.ndos = 61
20241015@050032.3195 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050032.3198 loildc67q36a2hjnbhm1boslrd 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')
20241015@050032.3273 loildc67q36a2hjnbhm1boslrd 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
20241015@050032.3409 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050032.3413 loildc67q36a2hjnbhm1boslrd Query : select top 1 ~inactivo valor from fl where no = '202532' and estab = 00 order by inactivo desc
20241015@050032.3529 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050032.3533 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from ts where ndos = 61
20241015@050032.3604 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050032.3944 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241015@050032.4017 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050032.4036 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241015@050032.4048 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050032.4075 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241015@050032.4094 loildc67q36a2hjnbhm1boslrd 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
20241015@050032.4212 loildc67q36a2hjnbhm1boslrd Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241015@050032.4354 loildc67q36a2hjnbhm1boslrd Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241015@050032.4379 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050032.4388 loildc67q36a2hjnbhm1boslrd Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202532' and estab=00
20241015@050032.4670 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050032.4693 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241015@050032.4740 loildc67q36a2hjnbhm1boslrd Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670de85996670de8e06a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241015@050032.4835 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050032.4858 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241015@050032.4875 loildc67q36a2hjnbhm1boslrd Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670de85996670de8e06a','--','bo',1.1161637040099214551 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241015@050032.5071 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050032.5093 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241015@050032.5109 loildc67q36a2hjnbhm1boslrd 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 ('aut670de85996670de8e06a','guia r. fornecedor','2024-10-15',61,2403061,?,?,?,?,?,?,?,?,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')
20241015@050035.5750 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050035.5800 loildc67q36a2hjnbhm1boslrd Query : select st.usalote valor from st where st.ref = '324.691.00.01'
20241015@050035.6930 loildc67q36a2hjnbhm1boslrd 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.691.00.01'
20241015@050035.8330 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050035.8510 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241015@050035.8680 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050035.8860 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241015@050035.9000 loildc67q36a2hjnbhm1boslrd Query : select sestamp valor from se where ref ='324.691.00.01' and lote = 'r2400485200a'
20241015@050035.9540 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050035.9690 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241015@050035.9790 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050035.9970 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241015@050035.1010 loildc67q36a2hjnbhm1boslrd Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670de14374670de8e317',?,?,'20241015',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241015@050035.1604 loildc67q36a2hjnbhm1boslrd Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@050035.1648 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050035.1668 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241015@050035.1687 loildc67q36a2hjnbhm1boslrd Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670de95031670de8e328','aut670de85996670de8e06a',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 = 'aut670de85996670de8e06a'
20241015@050035.2092 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@050035.2115 loildc67q36a2hjnbhm1boslrd Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241015@050035.2136 loildc67q36a2hjnbhm1boslrd 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 'aut670de95031670de8e328',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1044, 1044*.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 ,24.19,24.19*200.48,24.19,24.19*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,24.19*1044,24.19*1044*200.48 ,31.778000,31.778000*200.48 ,31.778000,31.778000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,24.19,24.19*200.48,24.19*1044,24.19*1044*200.48,'cps24050657149,882000002 ',27,27*1044,27,27*1044,?,?,?,4 from bo bo where bo.bostamp = 'aut670de85996670de8e06a'
20241015@050043.9595 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050043.9637 loildc67q36a2hjnbhm1boslrd Query : declare @bostamp varchar(25) = 'aut670de85996670de8e06a' ,@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 
20241015@050050.4605 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050050.4608 loildc67q36a2hjnbhm1boslrd Query : select 1 valor from bo where bo.bostamp = 'aut670de85996670de8e06a'
20241015@050050.4702 loildc67q36a2hjnbhm1boslrd 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) = 'aut670de85996670de8e06a' 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 
20241015@050052.4945 loildc67q36a2hjnbhm1boslrd Query : use flama_phc
20241015@050052.4950 loildc67q36a2hjnbhm1boslrd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241015@050052.5026 loildc67q36a2hjnbhm1boslrd Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2651';
20241015@050052.5066 loildc67q36a2hjnbhm1boslrd Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2651';

20241015@075055.7385 trr16cn59tlc2meqkq7u5bjd82 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2652';
20241015@075055.7447 trr16cn59tlc2meqkq7u5bjd82 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2652';
20241015@075055.7477 trr16cn59tlc2meqkq7u5bjd82 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2652';
20241015@075055.7518 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075055.7521 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241015@075055.7620 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.682.00.01'
20241015@075055.7719 trr16cn59tlc2meqkq7u5bjd82 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 = 2400486 and bi.ref ='324.682.00.01' and bi.lordem =10000
20241015@075055.8063 trr16cn59tlc2meqkq7u5bjd82 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 = 'cps24050831587,706000003 ' 
20241015@075055.8373 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075055.8390 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 1 valor from ts where ts.ndos = 61
20241015@075055.8455 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075055.8458 trr16cn59tlc2meqkq7u5bjd82 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')
20241015@075055.8529 trr16cn59tlc2meqkq7u5bjd82 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
20241015@075055.8666 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075055.8670 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20241015@075055.8787 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075055.8789 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from ts where ndos = 61
20241015@075055.8838 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075055.9165 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241015@075055.9227 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075055.9243 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241015@075055.9255 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075055.9269 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241015@075055.9278 trr16cn59tlc2meqkq7u5bjd82 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
20241015@075055.9367 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241015@075055.9512 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241015@075055.9543 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075055.9550 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20241015@075055.9628 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075055.9663 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241015@075055.9705 trr16cn59tlc2meqkq7u5bjd82 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e163913670e10cfe8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241015@075055.9762 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075055.9778 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241015@075055.9802 trr16cn59tlc2meqkq7u5bjd82 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e163913670e10cfe8','--','bo',7.8652519893899204244 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241015@075055.9973 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075055.9990 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241015@075056.2000 trr16cn59tlc2meqkq7u5bjd82 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 ('aut670e163913670e10cfe8','guia r. fornecedor','2024-10-15',61,2403062,?,?,?,?,?,?,?,?,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')
20241015@075059.9490 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075059.9530 trr16cn59tlc2meqkq7u5bjd82 Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20241015@075059.1081 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.682.00.01'
20241015@075059.1207 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075059.1224 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241015@075059.1253 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075059.1268 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241015@075059.1277 trr16cn59tlc2meqkq7u5bjd82 Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400486100a'
20241015@075059.1338 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075059.1358 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241015@075059.1368 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075059.1382 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241015@075059.1416 trr16cn59tlc2meqkq7u5bjd82 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e143743670e10d321',?,?,'20241015',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241015@075059.1957 trr16cn59tlc2meqkq7u5bjd82 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@075059.1996 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075059.2013 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241015@075059.2026 trr16cn59tlc2meqkq7u5bjd82 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670e180845670e10d330','aut670e163913670e10cfe8',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 = 'aut670e163913670e10cfe8'
20241015@075059.2166 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075059.2198 trr16cn59tlc2meqkq7u5bjd82 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241015@075059.2291 trr16cn59tlc2meqkq7u5bjd82 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 'aut670e180845670e10d330',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1030, 1030*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,18.85,18.85*200.48,18.85,18.85*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,18.85*1030,18.85*1030*200.48 ,25.338000,25.338000*200.48 ,25.338000,25.338000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,18.85,18.85*200.48,18.85*1030,18.85*1030*200.48,'cps24050831587,706000003 ',148.26,148.26*1030,148.26,148.26*1030,?,?,?,4 from bo bo where bo.bostamp = 'aut670e163913670e10cfe8'
20241015@075109.7376 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075109.7385 trr16cn59tlc2meqkq7u5bjd82 Query : declare @bostamp varchar(25) = 'aut670e163913670e10cfe8' ,@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 
20241015@075121.9788 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075121.9792 trr16cn59tlc2meqkq7u5bjd82 Query : select 1 valor from bo where bo.bostamp = 'aut670e163913670e10cfe8'
20241015@075121.9883 trr16cn59tlc2meqkq7u5bjd82 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) = 'aut670e163913670e10cfe8' 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 
20241015@075124.4415 trr16cn59tlc2meqkq7u5bjd82 Query : use flama_phc
20241015@075124.4418 trr16cn59tlc2meqkq7u5bjd82 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241015@075124.4478 trr16cn59tlc2meqkq7u5bjd82 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2652';
20241015@075124.4508 trr16cn59tlc2meqkq7u5bjd82 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2652';
20241015@075124.5223 pvd15c4bmmi1ajahpglsg6g98p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241015@075124.5241 pvd15c4bmmi1ajahpglsg6g98p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241015@075124.5393 pvd15c4bmmi1ajahpglsg6g98p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2653';
20241015@075124.5461 pvd15c4bmmi1ajahpglsg6g98p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2653';
20241015@075124.5521 pvd15c4bmmi1ajahpglsg6g98p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2653';
20241015@075124.5589 pvd15c4bmmi1ajahpglsg6g98p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2653';
20241015@075124.5635 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075124.5638 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241015@075124.5774 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.678.00.01'
20241015@075124.5900 pvd15c4bmmi1ajahpglsg6g98p 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 = 2400745 and bi.ref ='324.678.00.01' and bi.lordem =20000
20241015@075124.6303 pvd15c4bmmi1ajahpglsg6g98p 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 = 'cps24061161191,334000002 ' 
20241015@075124.6708 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075124.6711 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 1 valor from ts where ts.ndos = 61
20241015@075124.6799 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075124.6813 pvd15c4bmmi1ajahpglsg6g98p 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')
20241015@075124.6846 pvd15c4bmmi1ajahpglsg6g98p 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
20241015@075124.6916 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075124.6919 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 ~inactivo valor from fl where no = '202549' and estab = 00 order by inactivo desc
20241015@075124.7080 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075124.7083 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from ts where ndos = 61
20241015@075124.7104 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075124.7174 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20241015@075124.7183 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075124.7221 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20241015@075124.7229 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075124.7244 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20241015@075124.7290 pvd15c4bmmi1ajahpglsg6g98p 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
20241015@075124.7314 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241015@075124.7399 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20241015@075124.7419 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075124.7425 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202549' and estab=00
20241015@075124.7521 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075124.7574 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20241015@075124.7585 pvd15c4bmmi1ajahpglsg6g98p Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e151429670e10ecb5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241015@075124.7589 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075124.7667 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20241015@075124.7755 pvd15c4bmmi1ajahpglsg6g98p Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e151429670e10ecb5','--','bo',7.8888888888888888888 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241015@075124.7760 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075124.7776 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20241015@075124.7787 pvd15c4bmmi1ajahpglsg6g98p 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 ('aut670e151429670e10ecb5','guia r. fornecedor','2024-10-15',61,2403063,?,?,?,?,?,?,?,?,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')
20241015@075127.8883 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075127.8887 pvd15c4bmmi1ajahpglsg6g98p Query : select st.usalote valor from st where st.ref = '324.678.00.01'
20241015@075127.8930 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.678.00.01'
20241015@075127.9075 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075127.9090 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20241015@075127.9102 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075127.9122 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20241015@075127.9130 pvd15c4bmmi1ajahpglsg6g98p Query : select sestamp valor from se where ref ='324.678.00.01' and lote = 'r2400745200a'
20241015@075127.9227 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075127.9323 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20241015@075127.9331 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075127.9355 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20241015@075127.9366 pvd15c4bmmi1ajahpglsg6g98p Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e103024670e10efe3',?,?,'20241015',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20241015@075127.9431 pvd15c4bmmi1ajahpglsg6g98p Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@075127.9444 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075127.9482 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20241015@075127.9493 pvd15c4bmmi1ajahpglsg6g98p Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut670e185039670e10efe6','aut670e151429670e10ecb5',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 = 'aut670e151429670e10ecb5'
20241015@075127.9719 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@075127.9741 pvd15c4bmmi1ajahpglsg6g98p Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20241015@075127.9757 pvd15c4bmmi1ajahpglsg6g98p 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 'aut670e185039670e10efe6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 788, 788*.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 ,43.2,43.2*200.48,43.2,43.2*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,43.2*788,43.2*788*200.48 ,.000000,.000000*200.48 ,.000000,.000000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,43.2,43.2*200.48,43.2*788,43.2*788*200.48,'cps24061161191,334000002 ',340.8,340.8*788,340.8,340.8*788,?,?,?,4 from bo bo where bo.bostamp = 'aut670e151429670e10ecb5'
20241015@075128.3077 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075128.3175 pvd15c4bmmi1ajahpglsg6g98p Query : declare @bostamp varchar(25) = 'aut670e151429670e10ecb5' ,@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 
20241015@075128.5176 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075128.5180 pvd15c4bmmi1ajahpglsg6g98p Query : select 1 valor from bo where bo.bostamp = 'aut670e151429670e10ecb5'
20241015@075128.5218 pvd15c4bmmi1ajahpglsg6g98p 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) = 'aut670e151429670e10ecb5' 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 
20241015@075128.8017 pvd15c4bmmi1ajahpglsg6g98p Query : use flama_phc
20241015@075128.8020 pvd15c4bmmi1ajahpglsg6g98p Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241015@075128.8094 pvd15c4bmmi1ajahpglsg6g98p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2653';
20241015@075128.8205 pvd15c4bmmi1ajahpglsg6g98p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2653';

20241015@115535.9647 u078v9cap9plj2la2shm8kpdks Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2654';
20241015@115535.9701 u078v9cap9plj2la2shm8kpdks Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='2654';
20241015@115535.9728 u078v9cap9plj2la2shm8kpdks Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='2654';
20241015@115535.9794 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115535.9799 u078v9cap9plj2la2shm8kpdks Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241015@115535.9869 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115535.9873 u078v9cap9plj2la2shm8kpdks Query : select no, estab,szadrsdesc from szadrs where u_coddest=5546
20241015@115535.9962 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.8000 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.3730 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.3940 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.4110 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.4330 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.4510 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.4740 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.4920 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.5130 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.5300 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.5490 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.5660 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.5860 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.6080 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.6280 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.6470 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.6680 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.6860 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.7070 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.7230 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.7420 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.7590 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.7780 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.7970 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.8280 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.8450 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.8660 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.8830 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.9040 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.9230 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.9440 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.1062 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.1087 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.1508 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.1797 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2619 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2647 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2667 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2695 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2724 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2746 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2764 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2787 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2804 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2824 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2841 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2862 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2879 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2898 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2913 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2933 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2949 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.2973 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.2989 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.3031 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.3115 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.3203 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.3223 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.3242 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.3260 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.3279 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.3300 u078v9cap9plj2la2shm8kpdks Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2300.00.1'
20241015@115536.3319 u078v9cap9plj2la2shm8kpdks Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2066 and bo.obrano = 2406633 and bi.ref ='324.2300.00.1' and bi.lordem =1
20241015@115536.3335 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.3339 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20241015@115536.3529 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.3533 u078v9cap9plj2la2shm8kpdks Query : select top 1 1 valor from td where td.ndoc = 39
20241015@115536.3603 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.3606 u078v9cap9plj2la2shm8kpdks 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')
20241015@115536.3645 u078v9cap9plj2la2shm8kpdks 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
20241015@115536.3763 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.3766 u078v9cap9plj2la2shm8kpdks Query : select top 1 ~inactivo valor from cl where no = '199506' and estab = 0 order by inactivo desc
20241015@115536.3861 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.3865 u078v9cap9plj2la2shm8kpdks Query : select top 1 tipodoc,regrd from td where ndoc = 39
20241015@115536.3936 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.3939 u078v9cap9plj2la2shm8kpdks Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241015@115536.4021 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.4025 u078v9cap9plj2la2shm8kpdks Query : select szadrsstamp valor from szadrs where szadrsdesc='199506 - itmp alimentar, s.a.'
20241015@115536.4102 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.4106 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from td where ndoc = 39
20241015@115536.4159 u078v9cap9plj2la2shm8kpdks Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20241015@115536.4261 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.4293 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20241015@115536.4347 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.4362 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20241015@115536.4393 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.4407 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20241015@115536.4420 u078v9cap9plj2la2shm8kpdks Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241015@115536.4587 u078v9cap9plj2la2shm8kpdks Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20241015@115536.4668 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.4684 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20241015@115536.4708 u078v9cap9plj2la2shm8kpdks Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20241015@115536.4997 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.5015 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20241015@115536.5057 u078v9cap9plj2la2shm8kpdks Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20241015@115536.5130 u078v9cap9plj2la2shm8kpdks Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20241015@115536.5194 u078v9cap9plj2la2shm8kpdks Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20241015@115536.5260 u078v9cap9plj2la2shm8kpdks Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20241015@115536.5323 u078v9cap9plj2la2shm8kpdks Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20241015@115536.5392 u078v9cap9plj2la2shm8kpdks Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20241015@115536.5454 u078v9cap9plj2la2shm8kpdks Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut670e444108670e4a286b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20241015@115536.6076 u078v9cap9plj2la2shm8kpdks Query : select top 1 fno valor from wsftdata order by fno desc
20241015@115536.6145 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.6164 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20241015@115536.6191 u078v9cap9plj2la2shm8kpdks Query : select 'normal' from dummy
20241015@115536.6239 u078v9cap9plj2la2shm8kpdks Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut670e444108670e4a286b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1272,199506,0,'2024-10-15',39,'euro',0,0,2024 ,?,?)
20241015@115536.6619 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.6622 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115536.6651 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115536.6789 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.6806 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.6845 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.6861 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.6871 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115536.6890 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115536.6906 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.6921 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.6934 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e496652670e4a28a8','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115536.6985 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.7001 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.7042 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e496652670e4a28a8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20241015@115536.7677 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.7681 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115536.7702 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115536.7724 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.7742 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.7772 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.7787 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.7796 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115536.7810 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115536.7824 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.7845 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.7870 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e434017670e4a28bf','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115536.7875 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.7893 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.7937 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e434017670e4a28bf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20241015@115536.8217 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.8261 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115536.8332 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115536.8382 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.8399 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.8437 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.8452 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.8461 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115536.8481 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115536.8495 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.8530 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.8544 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e484923670e4a28cf','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115536.8549 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.8566 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.8603 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e484923670e4a28cf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,30000,?,?,?,?,?)
20241015@115536.8860 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.8873 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115536.8893 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115536.8908 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.8925 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.8950 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.8966 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.8975 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115536.8987 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115536.9026 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9043 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.9057 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e486782670e4a28dc','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115536.9062 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9076 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.9105 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e486782670e4a28dc',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,40000,?,?,?,?,?)
20241015@115536.9331 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.9334 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115536.9411 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115536.9427 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9443 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.9468 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9482 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.9490 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115536.9503 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115536.9515 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9530 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.9541 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e486918670e4a28e8','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115536.9546 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9560 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.9587 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e486918670e4a28e8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20241015@115536.9813 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115536.9817 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115536.9838 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115536.9852 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9869 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115536.9894 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9908 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.9917 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115536.9929 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115536.9942 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9957 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115536.9969 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e499404670e4a28f2','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115536.9973 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115536.9988 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.1600 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e499404670e4a28f2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,60000,?,?,?,?,?)
20241015@115537.2390 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.2420 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.2620 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.2770 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.2930 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.3320 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3470 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.3560 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.3680 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.3810 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3960 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.4080 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e485383670e4a2909','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.4120 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4270 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.4590 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e485383670e4a2909',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,70000,?,?,?,?,?)
20241015@115537.6810 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.6850 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.7060 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.7300 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.7470 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.7740 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.7880 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.7970 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.8090 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.8210 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.8360 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.8480 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e411343670e4a2914','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.8530 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.8680 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.8990 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e411343670e4a2914',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,80000,?,?,?,?,?)
20241015@115537.1120 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.1123 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.1142 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.1156 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.1174 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.1201 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.1227 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.1235 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.1248 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.1261 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.1276 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.1288 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e464271670e4a291e','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.1293 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.1308 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.1337 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e464271670e4a291e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,90000,?,?,?,?,?)
20241015@115537.1817 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.1821 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.1880 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.1936 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.2287 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.3162 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3179 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.3188 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.3200 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.3212 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3227 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.3238 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e495574670e4a294e','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.3243 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3258 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.3286 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e495574670e4a294e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,100000,?,?,?,?,?)
20241015@115537.3515 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.3518 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.3539 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.3562 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3579 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.3602 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3617 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.3626 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.3639 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.3651 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3669 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.3680 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e414672670e4a2959','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.3685 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.3700 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.3728 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e414672670e4a2959',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,110000,?,?,?,?,?)
20241015@115537.4026 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.4029 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.4049 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.4062 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4078 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.4104 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4119 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.4127 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.4138 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.4150 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4164 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.4176 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e486295670e4a2965','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.4181 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4196 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.4226 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e486295670e4a2965',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,120000,?,?,?,?,?)
20241015@115537.4468 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.4471 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.4491 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.4505 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4521 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.4545 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4560 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.4568 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.4579 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.4592 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4606 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.4617 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e452660670e4a2970','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.4622 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4637 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.4664 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e452660670e4a2970',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,130000,?,?,?,?,?)
20241015@115537.4886 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.4889 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.4909 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.4923 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4940 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.4966 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.4982 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.4990 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.5002 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.5014 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5029 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.5041 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e493140670e4a297a','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.5045 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5059 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.5090 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e493140670e4a297a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,140000,?,?,?,?,?)
20241015@115537.5312 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.5315 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.5337 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.5352 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5368 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.5396 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5422 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.5432 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.5444 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.5457 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5475 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.5487 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e413990670e4a2985','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.5492 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5507 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.5540 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e413990670e4a2985',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,150000,?,?,?,?,?)
20241015@115537.5763 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.5766 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.5787 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.5801 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5817 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.5843 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5857 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.5866 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.5878 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.5891 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5905 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.5916 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e496484670e4a298f','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.5920 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.5936 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.5966 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e496484670e4a298f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,160000,?,?,?,?,?)
20241015@115537.6232 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.6236 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.6256 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.6272 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6290 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.6316 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6331 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.6339 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.6351 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.6364 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6378 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.6389 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e412363670e4a299b','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.6394 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6408 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.6437 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e412363670e4a299b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,170000,?,?,?,?,?)
20241015@115537.6654 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.6657 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.6678 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.6693 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6726 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.6753 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6768 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.6777 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.6792 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.6805 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6820 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.6832 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e478295670e4a29a6','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.6843 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.6859 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.6887 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e478295670e4a29a6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,180000,?,?,?,?,?)
20241015@115537.7107 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.7110 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.7130 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.7144 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.7160 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.7186 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.7201 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.7209 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.7222 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.7235 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.7250 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.7262 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e451568670e4a29b0','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.7266 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.7280 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.7331 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e451568670e4a29b0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,190000,?,?,?,?,?)
20241015@115537.7544 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.7547 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.7569 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.8889 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.8909 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.8935 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.8949 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.8958 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.8970 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.8983 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.8998 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.9010 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e480037670e4a29db','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.9016 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9030 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.9070 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e480037670e4a29db',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,200000,?,?,?,?,?)
20241015@115537.9296 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.9299 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.9319 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.9333 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9349 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.9376 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9391 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.9401 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.9415 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.9428 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9443 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.9455 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e417526670e4a29e6','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.9459 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9477 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.9520 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e417526670e4a29e6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,210000,?,?,?,?,?)
20241015@115537.9802 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
20241015@115537.9807 u078v9cap9plj2la2shm8kpdks Query : select st.usalote valor from st where st.ref = '324.2300.00.1'
20241015@115537.9837 u078v9cap9plj2la2shm8kpdks Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2300.00.1'
20241015@115537.9851 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9869 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115537.9895 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9909 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.9917 u078v9cap9plj2la2shm8kpdks Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241015@115537.9929 u078v9cap9plj2la2shm8kpdks Query : select sestamp valor from se where ref ='324.2300.00.1' and lote = 'r2400497200a'
20241015@115537.9940 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9954 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20241015@115537.9966 u078v9cap9plj2la2shm8kpdks Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut670e426445670e4a29f2','aut670e444108670e4a286b' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20241015@115537.9970 u078v9cap9plj2la2shm8kpdks Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241015@115537.9984 u078v9cap9plj2la2shm8kpdks Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20241015@115538.1200 u078v9cap9plj2la2shm8kpdks Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut670e426445670e4a29f2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',108.000 ,'aut670e444108670e4a286b' ,0,0 ,2,23.00,220000,?,?,?,?,?)
20241015@115538.2390 u078v9cap9plj2la2shm8kpdks Query : use flama_phc
