20240731@080307.3710 p5gq82cg4fcn6as06h3nob90av INICIO DE FICHEIRO DE LOG :: /var/www/webservices/logs/website.sql.log
20240731@080307.3707 p5gq82cg4fcn6as06h3nob90av Query : use flama_phc
20240731@080307.3714 p5gq82cg4fcn6as06h3nob90av Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@080307.4049 p5gq82cg4fcn6as06h3nob90av Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1269';
20240731@080307.4080 p5gq82cg4fcn6as06h3nob90av Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1269';
20240731@080307.4133 p5gq82cg4fcn6as06h3nob90av Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1269';
20240731@080307.4162 p5gq82cg4fcn6as06h3nob90av Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1269';
20240731@080307.4811 7v4sced07khtssfje0f9o590id Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240731@080307.4834 7v4sced07khtssfje0f9o590id Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240731@080307.4896 7v4sced07khtssfje0f9o590id Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1270';
20240731@080307.4973 7v4sced07khtssfje0f9o590id Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1270';
20240731@080307.5037 7v4sced07khtssfje0f9o590id Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1270';
20240731@080307.5065 7v4sced07khtssfje0f9o590id Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1270';
20240731@080307.5953 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240731@080307.5970 4vu59s16cf6vvut65v9mqjjfs8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240731@080307.6209 4vu59s16cf6vvut65v9mqjjfs8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1271';
20240731@080307.6271 4vu59s16cf6vvut65v9mqjjfs8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1271';
20240731@080307.6333 4vu59s16cf6vvut65v9mqjjfs8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1271';
20240731@080307.6362 4vu59s16cf6vvut65v9mqjjfs8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1271';
20240731@080307.6427 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080307.6431 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@080307.6690 4vu59s16cf6vvut65v9mqjjfs8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2
20240731@080307.6790 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.698.00.01'
20240731@080307.6926 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.698.00.01' and bi.lordem =10000
20240731@080307.7315 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073053673,520000001 ' 
20240731@080307.7817 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.698.00.01'
20240731@080307.7838 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.698.00.01' and bi.lordem =10000
20240731@080307.7860 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073053673,520000001 ' 
20240731@080307.7883 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.649.00.01'
20240731@080307.8021 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.649.00.01' and bi.lordem =20000
20240731@080307.8444 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073053732,504000002 ' 
20240731@080307.9798 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.679.00.01'
20240731@080308.2300 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.679.00.01' and bi.lordem =30000
20240731@080308.4210 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073053792,544000003 ' 
20240731@080308.1633 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1578.00.1'
20240731@080308.2163 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1578.00.1' and bi.lordem =40000
20240731@080308.2521 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073053806,661000004 ' 
20240731@080308.4238 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.497.00.01'
20240731@080308.4371 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.497.00.01' and bi.lordem =50000
20240731@080308.4704 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054115,638000005 ' 
20240731@080308.5036 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1685.00.1'
20240731@080308.5155 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1685.00.1' and bi.lordem =60000
20240731@080308.5504 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054134,948000006 ' 
20240731@080308.5823 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1684.00.1'
20240731@080308.5947 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1684.00.1' and bi.lordem =70000
20240731@080308.6310 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054145,211000007 ' 
20240731@080308.6642 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1646.00.1'
20240731@080308.6766 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1646.00.1' and bi.lordem =80000
20240731@080308.7113 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054165,661000008 ' 
20240731@080308.7613 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1646.00.1'
20240731@080308.7639 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1646.00.1' and bi.lordem =80000
20240731@080308.7665 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054165,661000008 ' 
20240731@080308.7691 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1675.00.2'
20240731@080308.7946 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1675.00.2' and bi.lordem =90000
20240731@080308.8325 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054176,313000009 ' 
20240731@080308.8914 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5540.00.1'
20240731@080308.9093 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.5540.00.1' and bi.lordem =100000
20240731@080308.9716 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054191,889000010 ' 
20240731@080309.1930 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5540.00.1'
20240731@080309.3140 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.5540.00.1' and bi.lordem =100000
20240731@080309.3900 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054191,889000010 ' 
20240731@080309.4140 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1705.00.1'
20240731@080309.5460 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='324.1705.00.1' and bi.lordem =110000
20240731@080309.8950 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054203,893000011 ' 
20240731@080309.1363 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '325.4961.0100'
20240731@080309.1543 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='325.4961.0100' and bi.lordem =120000
20240731@080309.1909 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054213,431000012 ' 
20240731@080309.2257 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '323.318.09.00'
20240731@080309.2383 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='323.318.09.00' and bi.lordem =130000
20240731@080309.2730 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054259,357000013 ' 
20240731@080309.3677 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '323.318.09.00'
20240731@080309.3813 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='323.318.09.00' and bi.lordem =130000
20240731@080309.3990 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054259,357000013 ' 
20240731@080309.4036 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '323.367.09.00'
20240731@080309.4217 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =001 and bo.boano =2024 and bo.obrano = 0001627 and bi.ref ='323.367.09.00' and bi.lordem =140000
20240731@080309.6126 4vu59s16cf6vvut65v9mqjjfs8 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 = 'az24073054271,049000014 ' 
20240731@080309.6468 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.6472 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 1 valor from ts where ts.ndos = 5
20240731@080309.6576 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.6579 4vu59s16cf6vvut65v9mqjjfs8 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')
20240731@080309.6647 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 assinadoc issigned ,ts.stocks ,ts.bdempresas origin ,case when (cmstocks between 1 and 50 or cm2stocks between 1 and 50 ) then 1 else 0 end entrada ,case when cmstocks>50 or (cm2stocks>50 and trfa =1) then 1 else 0 end saida ,stneg validatestock ,tiposaft ,veserie useserialnumber ,foserie assetin ,ftserie assetout ,veserie assets ,trfarm assetstransfer ,grelha usegridfields from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos =5
20240731@080309.7410 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.7464 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 ~inactivo valor from fl where no = '100500' and estab = 0 order by inactivo desc
20240731@080309.7834 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.7838 4vu59s16cf6vvut65v9mqjjfs8 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240731@080309.7886 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.7890 4vu59s16cf6vvut65v9mqjjfs8 Query : select szadrsstamp valor from szadrs where szadrsdesc='n/instalaÇÕes sede'
20240731@080309.8189 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.8249 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from ts where ndos = 5
20240731@080309.8530 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080309.8548 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20240731@080309.8575 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080309.8654 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20240731@080309.8674 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080309.8697 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20240731@080309.8713 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 5
20240731@080309.9011 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240731@080309.9353 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240731@080309.9650 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080309.9658 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20240731@080309.9755 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080309.9779 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20240731@080309.9793 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e5334466a9e1adeb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@080309.9944 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080309.9965 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20240731@080309.9983 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut66a9e5334466a9e1adeb','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20240731','08:33',?,?)
20240731@080310.4560 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.4790 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20240731@080310.5000 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbodata (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,maquina ) values ('aut66a9e5334466a9e1adeb','trf entre armazéns a','2024-07-31',5,413,?,?,?,?,?,?,?,?,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',?)
20240731@080310.1898 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.1901 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.698.00.01'
20240731@080310.1918 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.1920 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.698.00.01'
20240731@080310.2044 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.2047 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.698.00.01' and sa.armazem = 133 
20240731@080310.2131 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.2134 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.698.00.01'
20240731@080310.2159 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.698.00.01'
20240731@080310.2320 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.2337 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.2352 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.2369 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.2379 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.698.00.01' and lote = 'r2301182200a'
20240731@080310.2393 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080310.2406 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.2426 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.2438 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e5071966a9e1ae3a','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.2792 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.2810 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.2828 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e5071966a9e1ae3a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 2.000, 2.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,115.2,115.2*200.48,115.2,115.2*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,115.2*2.000,115.2*2.000*200.48 ,37.773000,37.773000*200.48 ,37.773000,37.773000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,115.2,115.2*200.48,115.2*2.000,115.2*2.000*200.48,'az24073053673,520000001 ',115.2,115.2*2.000,115.2,115.2*2.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.3543 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.3547 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.698.00.01'
20240731@080310.3560 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.3563 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.698.00.01'
20240731@080310.3584 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.3587 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.698.00.01' and sa.armazem = 133 
20240731@080310.3610 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.3612 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.698.00.01'
20240731@080310.3636 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.698.00.01'
20240731@080310.3650 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.3666 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.3684 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.3698 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.3706 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.698.00.01' and lote = 'r2301182200a'
20240731@080310.3729 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080310.3742 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.3759 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.3772 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e6427366a9e1ae5b','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.3915 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.3933 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.3948 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e6427366a9e1ae5b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,20000 ,115.2,115.2*200.48,115.2,115.2*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,115.2*4.000,115.2*4.000*200.48 ,37.773000,37.773000*200.48 ,37.773000,37.773000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,115.2,115.2*200.48,115.2*4.000,115.2*4.000*200.48,'az24073053673,520000001 ',115.2,115.2*4.000,115.2,115.2*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.4291 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.4299 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.649.00.01'
20240731@080310.4316 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.4319 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.649.00.01'
20240731@080310.4338 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.4341 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.649.00.01' and sa.armazem = 133 
20240731@080310.4455 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.4459 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.649.00.01'
20240731@080310.4479 4vu59s16cf6vvut65v9mqjjfs8 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.649.00.01'
20240731@080310.4639 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.4655 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.4669 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.4684 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.4694 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.649.00.01' and lote = 'r2400277200a'
20240731@080310.4710 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080310.4725 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.4743 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.4757 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e1817766a9e1ae73','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.4956 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.4978 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.4994 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e1817766a9e1ae73',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 16.000, 16.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,30000 ,96,96*200.48,96,96*200.48 ,0,0,'un ','' ,bo.marcada,1 ,96*16.000,96*16.000*200.48 ,31.930000,31.930000*200.48 ,31.930000,31.930000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,96,96*200.48,96*16.000,96*16.000*200.48,'az24073053732,504000002 ',96,96*16.000,96,96*16.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.5309 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.5313 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.679.00.01'
20240731@080310.5330 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.5334 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.679.00.01'
20240731@080310.5353 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.5356 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.679.00.01' and sa.armazem = 133 
20240731@080310.5425 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.5427 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.679.00.01'
20240731@080310.5448 4vu59s16cf6vvut65v9mqjjfs8 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.679.00.01'
20240731@080310.5604 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.5621 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.5637 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.5653 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.5662 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.679.00.01' and lote = 'r2400282100a'
20240731@080310.5677 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080310.5692 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.5708 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.5720 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e7073966a9e1ae8a','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.5866 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.5883 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.5902 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e7073966a9e1ae8a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,40000 ,128,128*200.48,128,128*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,128*8.000,128*8.000*200.48 ,53.662000,53.662000*200.48 ,53.662000,53.662000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,128,128*200.48,128*8.000,128*8.000*200.48,'az24073053792,544000003 ',128,128*8.000,128,128*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.6227 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.6231 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20240731@080310.6246 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.6249 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1578.00.1'
20240731@080310.6269 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.6272 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1578.00.1' and sa.armazem = 133 
20240731@080310.6345 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.6348 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1578.00.1'
20240731@080310.6460 4vu59s16cf6vvut65v9mqjjfs8 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.1578.00.1'
20240731@080310.6649 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.6669 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.6684 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.6704 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.6714 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2100121100a'
20240731@080310.6737 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080310.6752 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.6768 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.6782 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e6556666a9e1aea4','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.7059 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.7157 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.7174 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e6556666a9e1aea4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,50000 ,121.6,121.6*200.48,121.6,121.6*200.48 ,0,0,'un ','' ,bo.marcada,1 ,121.6*4.000,121.6*4.000*200.48 ,51.717000,51.717000*200.48 ,51.717000,51.717000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,121.6,121.6*200.48,121.6*4.000,121.6*4.000*200.48,'az24073053806,661000004 ',121.6,121.6*4.000,121.6,121.6*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.7500 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.7514 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.497.00.01'
20240731@080310.7532 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.7535 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.497.00.01'
20240731@080310.7553 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.7556 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.497.00.01' and sa.armazem = 133 
20240731@080310.7630 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.7633 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.497.00.01'
20240731@080310.7658 4vu59s16cf6vvut65v9mqjjfs8 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.497.00.01'
20240731@080310.8025 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.8045 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.8065 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.8184 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.8411 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.497.00.01' and lote = 'r2300022100a'
20240731@080310.8438 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080310.8454 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.8477 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080310.8564 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e5895166a9e1aece','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.8756 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080310.8985 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080310.9392 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e5895166a9e1aece',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 20.000, 20.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,60000 ,19.2,19.2*200.48,19.2,19.2*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,19.2*20.000,19.2*20.000*200.48 ,8.279000,8.279000*200.48 ,8.279000,8.279000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19.2,19.2*200.48,19.2*20.000,19.2*20.000*200.48,'az24073054115,638000005 ',19.2,19.2*20.000,19.2,19.2*20.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080310.9884 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.9904 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20240731@080310.9985 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080310.9988 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20240731@080311.1800 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.2200 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1685.00.1' and sa.armazem = 133 
20240731@080311.1540 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.1580 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20240731@080311.1880 4vu59s16cf6vvut65v9mqjjfs8 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'
20240731@080311.3620 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.3950 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.4110 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.4950 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.5070 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2400173100a'
20240731@080311.5280 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080311.5430 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.5740 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.6590 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e6513066a9e1af0d','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.8350 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.1202 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.1426 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e6513066a9e1af0d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 15.000, 15.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,70000 ,62.1,62.1*200.48,62.1,62.1*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,62.1*15.000,62.1*15.000*200.48 ,25.406000,25.406000*200.48 ,25.406000,25.406000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,62.1,62.1*200.48,62.1*15.000,62.1*15.000*200.48,'az24073054134,948000006 ',62.1,62.1*15.000,62.1,62.1*15.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.1764 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.1869 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1684.00.1'
20240731@080311.1943 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.1953 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1684.00.1'
20240731@080311.2338 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.2342 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1684.00.1' and sa.armazem = 133 
20240731@080311.2550 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.2556 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1684.00.1'
20240731@080311.2671 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1684.00.1'
20240731@080311.2845 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.2863 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.2879 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.3031 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.3043 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1684.00.1' and lote = 'r2301217200a'
20240731@080311.3091 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080311.3105 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.3126 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.3141 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e4352666a9e1af4b','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.3416 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.3655 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.3769 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e4352666a9e1af4b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 16.000, 16.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,80000 ,51.2,51.2*200.48,51.2,51.2*200.48 ,0,0,'un ','' ,bo.marcada,1 ,51.2*16.000,51.2*16.000*200.48 ,20.129000,20.129000*200.48 ,20.129000,20.129000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,51.2,51.2*200.48,51.2*16.000,51.2*16.000*200.48,'az24073054145,211000007 ',51.2,51.2*16.000,51.2,51.2*16.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.4099 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.4128 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1646.00.1'
20240731@080311.4184 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.4201 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1646.00.1'
20240731@080311.4218 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.4221 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1646.00.1' and sa.armazem = 133 
20240731@080311.4486 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.4489 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1646.00.1'
20240731@080311.4511 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1646.00.1'
20240731@080311.4848 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.4893 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.4912 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.4928 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.4940 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1646.00.1' and lote = 'r2101259200a'
20240731@080311.4956 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080311.4996 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.5047 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.5077 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e8183566a9e1af79','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.5237 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.5261 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.5279 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e8183566a9e1af79',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 8.000, 8.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,90000 ,108.8,108.8*200.48,108.8,108.8*200.48 ,0,0,'un ','' ,bo.marcada,1 ,108.8*8.000,108.8*8.000*200.48 ,45.381000,45.381000*200.48 ,45.381000,45.381000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,108.8,108.8*200.48,108.8*8.000,108.8*8.000*200.48,'az24073054165,661000008 ',108.8,108.8*8.000,108.8,108.8*8.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.5618 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.5623 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1646.00.1'
20240731@080311.5731 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.5738 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1646.00.1'
20240731@080311.5762 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.5767 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1646.00.1' and sa.armazem = 133 
20240731@080311.5808 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.5814 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1646.00.1'
20240731@080311.5868 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1646.00.1'
20240731@080311.5888 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.5913 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.5927 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.5945 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.5954 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1646.00.1' and lote = 'r2101259200a'
20240731@080311.6105 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080311.6196 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.6286 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.6301 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e8849366a9e1af97','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.6474 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.6502 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.6543 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e8849366a9e1af97',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 22.000, 22.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,100000 ,108.8,108.8*200.48,108.8,108.8*200.48 ,0,0,'un ','' ,bo.marcada,1 ,108.8*22.000,108.8*22.000*200.48 ,45.381000,45.381000*200.48 ,45.381000,45.381000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,108.8,108.8*200.48,108.8*22.000,108.8*22.000*200.48,'az24073054165,661000008 ',108.8,108.8*22.000,108.8,108.8*22.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.6939 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.6961 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1675.00.2'
20240731@080311.7009 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.7013 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1675.00.2'
20240731@080311.7030 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.7033 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1675.00.2' and sa.armazem = 133 
20240731@080311.7198 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080311.7202 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1675.00.2'
20240731@080311.7225 4vu59s16cf6vvut65v9mqjjfs8 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.1675.00.2'
20240731@080311.7431 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.7518 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080311.7720 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.7811 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.7822 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1675.00.2' and lote = 'r2200299200a'
20240731@080311.7861 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080311.8050 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080311.8159 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080311.8194 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e4070366a9e1afc4','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080311.8345 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.4600 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.3250 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e4070366a9e1afc4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 10.000, 10.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,110000 ,57.6,57.6*200.48,57.6,57.6*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,57.6*10.000,57.6*10.000*200.48 ,25.541000,25.541000*200.48 ,25.541000,25.541000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,57.6,57.6*200.48,57.6*10.000,57.6*10.000*200.48,'az24073054176,313000009 ',57.6,57.6*10.000,57.6,57.6*10.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.6820 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.7520 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.5540.00.1'
20240731@080312.7730 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.7820 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20240731@080312.8020 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.8060 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5540.00.1' and sa.armazem = 133 
20240731@080312.9670 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.9700 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20240731@080312.1005 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5540.00.1'
20240731@080312.1207 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.1234 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.1247 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.1289 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.1299 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.5540.00.1' and lote = 'r2300830100a'
20240731@080312.1324 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080312.1341 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.1362 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.1897 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e3770166a9e1b020','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.2169 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.2209 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.2306 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e3770166a9e1b020',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 3.000, 3.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,120000 ,102.4,102.4*200.48,102.4,102.4*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,102.4*3.000,102.4*3.000*200.48 ,36.952000,36.952000*200.48 ,36.952000,36.952000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,102.4,102.4*200.48,102.4*3.000,102.4*3.000*200.48,'az24073054191,889000010 ',102.4,102.4*3.000,102.4,102.4*3.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.2629 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.2646 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.5540.00.1'
20240731@080312.2758 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.2763 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20240731@080312.2804 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.2807 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5540.00.1' and sa.armazem = 133 
20240731@080312.2921 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.2924 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20240731@080312.2943 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5540.00.1'
20240731@080312.2973 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.2989 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.3081 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.3098 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.3107 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.5540.00.1' and lote = 'r2300830100a'
20240731@080312.3129 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080312.3143 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.3159 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.3231 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e8868466a9e1b04c','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.3385 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.3438 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.3458 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e8868466a9e1b04c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 9.000, 9.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,130000 ,102.4,102.4*200.48,102.4,102.4*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,102.4*9.000,102.4*9.000*200.48 ,36.952000,36.952000*200.48 ,36.952000,36.952000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,102.4,102.4*200.48,102.4*9.000,102.4*9.000*200.48,'az24073054191,889000010 ',102.4,102.4*9.000,102.4,102.4*9.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.3791 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.3796 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '324.1705.00.1'
20240731@080312.3813 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.3822 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1705.00.1'
20240731@080312.3840 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.3845 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1705.00.1' and sa.armazem = 133 
20240731@080312.4176 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.4180 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '324.1705.00.1'
20240731@080312.4264 4vu59s16cf6vvut65v9mqjjfs8 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'
20240731@080312.4493 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.4520 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.4533 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.4548 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.4556 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='324.1705.00.1' and lote = 'r2400050500a'
20240731@080312.4572 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080312.4912 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.4937 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.4957 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e1093866a9e1b077','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.5120 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.5146 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.5229 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e1093866a9e1b077',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 32.000, 32.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,140000 ,32,32*200.48,32,32*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,32*32.000,32*32.000*200.48 ,11.739000,11.739000*200.48 ,11.739000,11.739000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,32,32*200.48,32*32.000,32*32.000*200.48,'az24073054203,893000011 ',32,32*32.000,32,32*32.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.5597 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.5610 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '325.4961.0100'
20240731@080312.5626 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.5629 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '325.4961.0100'
20240731@080312.5697 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.5701 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '325.4961.0100' and sa.armazem = 133 
20240731@080312.5805 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.5808 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '325.4961.0100'
20240731@080312.5830 4vu59s16cf6vvut65v9mqjjfs8 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.4961.0100'
20240731@080312.6024 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.6079 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.6095 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.6112 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.6122 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='325.4961.0100' and lote = 'r210109215'
20240731@080312.6142 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080312.6156 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.6172 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.6184 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e9823366a9e1b096','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.6328 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.6349 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.6366 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e9823366a9e1b096',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 30.000, 30.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,150000 ,6.4,6.4*200.48,6.4,6.4*200.48 ,0,0,'un ','' ,bo.marcada,1 ,6.4*30.000,6.4*30.000*200.48 ,2.566000,2.566000*200.48 ,2.566000,2.566000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,6.4,6.4*200.48,6.4*30.000,6.4*30.000*200.48,'az24073054213,431000012 ',6.4,6.4*30.000,6.4,6.4*30.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.6687 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.6698 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '323.318.09.00'
20240731@080312.6716 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.6719 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '323.318.09.00'
20240731@080312.6742 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.6745 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '323.318.09.00' and sa.armazem = 133 
20240731@080312.6835 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.6838 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '323.318.09.00'
20240731@080312.6860 4vu59s16cf6vvut65v9mqjjfs8 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 = '323.318.09.00'
20240731@080312.7019 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.7039 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.7052 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.7068 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.7077 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='323.318.09.00' and lote = 'r2400053200a'
20240731@080312.7092 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080312.7106 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.7121 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.7133 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e0557166a9e1b0ad','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.7277 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.7297 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.7314 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e0557166a9e1b0ad',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1.000, 1.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,160000 ,140.8,140.8*200.48,140.8,140.8*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,140.8*1.000,140.8*1.000*200.48 ,58.326000,58.326000*200.48 ,58.326000,58.326000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,140.8,140.8*200.48,140.8*1.000,140.8*1.000*200.48,'az24073054259,357000013 ',140.8,140.8*1.000,140.8,140.8*1.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.7857 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.7862 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '323.318.09.00'
20240731@080312.7878 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.7881 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '323.318.09.00'
20240731@080312.7897 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.7900 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '323.318.09.00' and sa.armazem = 133 
20240731@080312.7934 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080312.7940 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '323.318.09.00'
20240731@080312.7959 4vu59s16cf6vvut65v9mqjjfs8 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 = '323.318.09.00'
20240731@080312.7982 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.7998 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080312.8013 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.8028 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.8037 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='323.318.09.00' and lote = 'r2400053200a'
20240731@080312.8051 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080312.8069 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.8224 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080312.8238 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e9952566a9e1b0c5','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080312.8435 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080312.8734 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080313.4110 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e9952566a9e1b0c5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 7.000, 7.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,170000 ,140.8,140.8*200.48,140.8,140.8*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,140.8*7.000,140.8*7.000*200.48 ,58.326000,58.326000*200.48 ,58.326000,58.326000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,140.8,140.8*200.48,140.8*7.000,140.8*7.000*200.48,'az24073054259,357000013 ',140.8,140.8*7.000,140.8,140.8*7.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080313.2157 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080313.2166 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.usalote valor from st where st.ref = '323.367.09.00'
20240731@080313.2197 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080313.2201 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '323.367.09.00'
20240731@080313.2224 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080313.2228 4vu59s16cf6vvut65v9mqjjfs8 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '323.367.09.00' and sa.armazem = 133 
20240731@080313.2363 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080313.2366 4vu59s16cf6vvut65v9mqjjfs8 Query : select st.stns valor from st where st.ref = '323.367.09.00'
20240731@080313.2384 4vu59s16cf6vvut65v9mqjjfs8 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 = '323.367.09.00'
20240731@080313.2705 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080313.2724 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080313.2796 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080313.2824 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080313.2889 4vu59s16cf6vvut65v9mqjjfs8 Query : select sestamp valor from se where ref ='323.367.09.00' and lote = 'r2400053200a'
20240731@080313.2958 4vu59s16cf6vvut65v9mqjjfs8 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@080313.2976 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080313.2992 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240731@080313.3003 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e5410366a9e1b148','aut66a9e5334466a9e1adeb',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080313.3155 4vu59s16cf6vvut65v9mqjjfs8 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@080313.3462 4vu59s16cf6vvut65v9mqjjfs8 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240731@080313.3482 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut66a9e5410366a9e1b148',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 5.000, 5.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,180000 ,140.8,140.8*200.48,140.8,140.8*200.48 ,0,0,'un ','' ,bo.marcada,1 ,140.8*5.000,140.8*5.000*200.48 ,58.417000,58.417000*200.48 ,58.417000,58.417000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,140.8,140.8*200.48,140.8*5.000,140.8*5.000*200.48,'az24073054271,049000014 ',140.8,140.8*5.000,140.8,140.8*5.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut66a9e5334466a9e1adeb'
20240731@080313.3796 4vu59s16cf6vvut65v9mqjjfs8 Query : insert into wsbocreationlog (initialstamp,externalid,creationstatus,documenttypeid,idustamp,transactionid) values ('aut66a9e5334466a9e1adeb','','wait',5,'adm12071144683,938000003','')
20240731@080313.4246 4vu59s16cf6vvut65v9mqjjfs8 Query : use flama_phc
20240731@080313.4250 4vu59s16cf6vvut65v9mqjjfs8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@080313.4397 4vu59s16cf6vvut65v9mqjjfs8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1271';
20240731@080313.4481 4vu59s16cf6vvut65v9mqjjfs8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1271';
20240731@081804.5796 r7cmv1b8emngbjoiodeecj54fk Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240731@081804.5824 r7cmv1b8emngbjoiodeecj54fk Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240731@081804.5936 r7cmv1b8emngbjoiodeecj54fk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1272';
20240731@081804.6023 r7cmv1b8emngbjoiodeecj54fk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1272';
20240731@081804.6168 r7cmv1b8emngbjoiodeecj54fk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1272';
20240731@081804.6206 r7cmv1b8emngbjoiodeecj54fk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1272';
20240731@081804.6300 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081804.6320 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@081804.6493 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081804.6514 r7cmv1b8emngbjoiodeecj54fk Query : select no, estab,szadrsdesc from szadrs where u_coddest=2138
20240731@081804.6680 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.421.00.04'
20240731@081804.6979 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='304.421.00.04' and bi.lordem =1
20240731@081804.7834 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1706.00.1'
20240731@081804.8259 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1706.00.1' and bi.lordem =2
20240731@081804.8768 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4320.00.1'
20240731@081804.9001 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='304.4320.00.1' and bi.lordem =3
20240731@081804.9486 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081804.9780 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1685.00.1' and bi.lordem =4
20240731@081805.2760 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240731@081805.5390 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1667.00.1' and bi.lordem =5
20240731@081805.1208 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1667.00.1'
20240731@081805.1280 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1667.00.1' and bi.lordem =5
20240731@081805.1326 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4743.00.1'
20240731@081805.1602 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.4743.00.1' and bi.lordem =6
20240731@081805.2343 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4723.00.2'
20240731@081805.2621 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.4723.00.2' and bi.lordem =7
20240731@081805.3067 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1406.00.1'
20240731@081805.3340 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1406.00.1' and bi.lordem =8
20240731@081805.3865 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1690.00.1'
20240731@081805.4166 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1690.00.1' and bi.lordem =9
20240731@081805.4673 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240731@081805.4948 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.4902.00.1' and bi.lordem =10
20240731@081805.5474 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081805.5754 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.4906.00.1' and bi.lordem =11
20240731@081805.6278 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1684.00.1'
20240731@081805.6566 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1684.00.1' and bi.lordem =12
20240731@081805.7140 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081805.7768 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.2222.00.1' and bi.lordem =13
20240731@081805.8330 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.670.00.01'
20240731@081805.8624 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.670.00.01' and bi.lordem =14
20240731@081805.9128 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2160.00.1'
20240731@081805.9415 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.2160.00.1' and bi.lordem =15
20240731@081806.3017 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081806.3300 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1643.00.1' and bi.lordem =16
20240731@081806.4109 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.945.00.01'
20240731@081806.4466 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.945.00.01' and bi.lordem =17
20240731@081806.5029 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2231.00.1'
20240731@081806.5458 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.2231.00.1' and bi.lordem =18
20240731@081806.6097 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1847.00.1'
20240731@081806.6380 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.1847.00.1' and bi.lordem =19
20240731@081806.6988 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.946.00.01'
20240731@081806.7479 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.946.00.01' and bi.lordem =20
20240731@081806.7995 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2232.00.1'
20240731@081806.8219 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.2232.00.1' and bi.lordem =21
20240731@081806.8729 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081806.9038 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.645.00.01' and bi.lordem =22
20240731@081806.9498 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.646.00.01'
20240731@081806.9735 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2051 and bo.obrano = 2405101 and bi.ref ='324.646.00.01' and bi.lordem =23
20240731@081807.1680 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.1730 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240731@081807.2590 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.2620 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 1 valor from td where td.ndoc = 39
20240731@081807.3360 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.3390 r7cmv1b8emngbjoiodeecj54fk 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')
20240731@081807.4250 r7cmv1b8emngbjoiodeecj54fk 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
20240731@081807.5320 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.5360 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 ~inactivo valor from cl where no = '100404' and estab = 0 order by inactivo desc
20240731@081807.8560 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.8590 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240731@081807.9490 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.9720 r7cmv1b8emngbjoiodeecj54fk Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240731@081807.1104 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.1109 r7cmv1b8emngbjoiodeecj54fk Query : select szadrsstamp valor from szadrs where szadrsdesc='bitranlis, agentes transitára'
20240731@081807.1393 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.1397 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from td where ndoc = 39
20240731@081807.1434 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240731@081807.1470 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.1490 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@081807.1550 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.1568 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@081807.2922 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.2970 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@081807.3005 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@081807.3314 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@081807.3350 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.3387 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@081807.3423 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240731@081807.3708 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.3750 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@081807.3826 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240731@081807.3857 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240731@081807.3870 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240731@081807.3901 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240731@081807.3932 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240731@081807.3974 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240731@081807.3997 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66a9e3847766a9e52f49',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240731@081807.4369 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 fno valor from wsftdata order by fno desc
20240731@081807.4406 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.4445 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@081807.4494 r7cmv1b8emngbjoiodeecj54fk Query : select 'normal' from dummy
20240731@081807.4534 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66a9e3847766a9e52f49',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',110,100404,0,'2024-07-31',39,'euro',0,0,2024 ,?,?)
20240731@081807.5001 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.5004 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '304.421.00.04'
20240731@081807.5071 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '304.421.00.04'
20240731@081807.5276 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.5327 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.5410 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.5443 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.5452 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081807.5464 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='304.421.00.04' and lote = '240896'
20240731@081807.5498 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.5534 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.5564 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e1680766a9e52f86','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081807.5584 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.5616 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.5687 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e1680766a9e52f86',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20240731@081807.6067 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.6132 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.6211 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.6246 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.6255 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081807.6288 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.6326 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.6361 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e3785566a9e52f99','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081807.6365 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.6399 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.6448 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e3785566a9e52f99',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,20000,?,?,?)
20240731@081807.7320 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.7347 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1706.00.1'
20240731@081807.7556 r7cmv1b8emngbjoiodeecj54fk 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.1706.00.1'
20240731@081807.7924 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.7961 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.8033 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.8071 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.8081 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081807.8148 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1706.00.1' and lote = 'r2100123100b'
20240731@081807.8198 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.8234 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.8265 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e4564666a9e52fc8','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081807.8271 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.8305 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.8377 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e4564666a9e52fc8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,40000,?,?,?,?,?)
20240731@081807.8737 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.8741 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '304.4320.00.1'
20240731@081807.8780 r7cmv1b8emngbjoiodeecj54fk 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.4320.00.1'
20240731@081807.8999 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.9038 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.9085 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.9120 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.9130 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081807.9161 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='304.4320.00.1' and lote = '240897'
20240731@081807.9197 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.9234 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.9267 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e0900166a9e52fe0','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081807.9271 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.9307 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.9356 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e0900166a9e52fe0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20240731@081807.9760 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081807.9764 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20240731@081807.9821 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081807.9854 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.9871 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081807.9936 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081807.9952 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081807.9960 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081808.3200 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2400173100a'
20240731@081808.7590 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.1057 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.1288 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e0835466a9e53012','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081808.1340 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.1384 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.1972 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e0835466a9e53012',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,60000,?,?,?,?,?)
20240731@081808.2504 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081808.2546 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1667.00.1'
20240731@081808.2604 r7cmv1b8emngbjoiodeecj54fk 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.1667.00.1'
20240731@081808.2767 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.2785 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.2829 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.2865 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.2878 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081808.2892 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1667.00.1' and lote = 'r2400065200a'
20240731@081808.2907 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.2938 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.2950 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7445666a9e53046','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081808.2955 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.2972 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.3487 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e7445666a9e53046',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,70000,?,?,?,?,?)
20240731@081808.4291 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.4549 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.4858 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.4903 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.5104 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081808.5361 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.5620 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.5686 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e8126266a9e53082','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081808.5691 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.5881 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.5910 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e8126266a9e53082',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,80000,?,?,?)
20240731@081808.6407 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081808.6448 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1667.00.1'
20240731@081808.6579 r7cmv1b8emngbjoiodeecj54fk 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.1667.00.1'
20240731@081808.6874 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.7168 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.7529 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.7551 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.7959 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081808.8235 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1667.00.1' and lote = 'r2400065200a'
20240731@081808.8255 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.8547 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081808.8763 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e5597366a9e530c9','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081808.8808 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081808.9042 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081808.9214 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e5597366a9e530c9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,100000,?,?,?,?,?)
20240731@081809.1884 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.2140 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081809.2472 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.3061 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081809.3414 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081809.4322 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.4513 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081809.4525 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7136666a9e53169','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081809.4530 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.4818 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081809.5325 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e7136666a9e53169',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,110000,?,?,?)
20240731@081809.5922 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081809.5970 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.4743.00.1'
20240731@081809.6039 r7cmv1b8emngbjoiodeecj54fk 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.4743.00.1'
20240731@081809.6564 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.6824 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081809.7188 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.7203 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081809.7213 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081809.7226 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.4743.00.1' and lote = 'r2200085100a'
20240731@081809.7254 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.7449 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081809.7606 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e1028966a9e531b1','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081809.7610 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081809.7826 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081809.8585 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e1028966a9e531b1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,130000,?,?,?,?,?)
20240731@081809.9028 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081809.9038 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.4723.00.2'
20240731@081809.9418 r7cmv1b8emngbjoiodeecj54fk 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.4723.00.2'
20240731@081810.7800 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.3390 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.5860 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.7140 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.7230 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081810.7380 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.4723.00.2' and lote = 'r2200682200a'
20240731@081810.7530 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.7690 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.7810 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e3795166a9e53212','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081810.7850 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.7990 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.8320 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e3795166a9e53212',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',3.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,140000,?,?,?,?,?)
20240731@081810.1341 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081810.1357 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1406.00.1'
20240731@081810.1498 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1406.00.1'
20240731@081810.2013 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.2266 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.2474 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.2493 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.2503 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081810.2516 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1406.00.1' and lote = '10/20'
20240731@081810.2580 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.2827 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.2850 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e0039466a9e5323e','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081810.2854 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.3101 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.3634 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e0039466a9e5323e',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',6.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,150000,?,?,?,?,?)
20240731@081810.4063 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081810.4066 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1690.00.1'
20240731@081810.4563 r7cmv1b8emngbjoiodeecj54fk 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.1690.00.1'
20240731@081810.5218 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.5665 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.6024 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.6092 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.6100 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081810.6168 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1690.00.1' and lote = 'r2100755200a'
20240731@081810.6377 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.6456 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.6585 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7436666a9e5329b','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081810.6629 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.6883 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.7494 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e7436666a9e5329b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,160000,?,?,?,?,?)
20240731@081810.8055 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.8307 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.8853 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.9032 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.9041 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081810.9053 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.9069 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081810.9086 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e9389966a9e532dd','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081810.9090 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081810.9104 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081810.9142 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e9389966a9e532dd',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,170000,?,?,?)
20240731@081810.9617 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081810.9659 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.4902.00.1'
20240731@081810.9697 r7cmv1b8emngbjoiodeecj54fk 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.4902.00.1'
20240731@081811.2490 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.5020 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.6730 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.7830 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.7920 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081811.8130 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.4902.00.1' and lote = 'r2400145200a'
20240731@081811.1025 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.2122 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.2332 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e8102766a9e53319','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081811.2377 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.2632 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.2809 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e8102766a9e53319',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,190000,?,?,?,?,?)
20240731@081811.3376 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.3473 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.3862 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.4116 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.4261 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081811.4274 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.4420 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.4432 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e8297166a9e53368','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081811.4444 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.4465 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.4898 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e8297166a9e53368',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,200000,?,?,?)
20240731@081811.5622 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081811.5664 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.4906.00.1'
20240731@081811.6001 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081811.6287 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.6311 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.6584 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.6603 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.6723 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081811.6973 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.4906.00.1' and lote = 'r2300207200a'
20240731@081811.7345 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.8053 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.8132 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e0346666a9e533b3','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081811.8137 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.8153 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.8184 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e0346666a9e533b3',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,220000,?,?,?,?,?)
20240731@081811.8738 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.8755 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.8916 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.8955 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.8973 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081811.8988 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.9014 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.9029 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e8049566a9e533db','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081811.9033 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.9052 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.9102 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e8049566a9e533db',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,230000,?,?,?)
20240731@081811.9466 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081811.9469 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1684.00.1'
20240731@081811.9493 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1684.00.1'
20240731@081811.9507 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.9532 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.9558 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.9696 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.9705 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081811.9718 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1684.00.1' and lote = 'r2301217200a'
20240731@081811.9735 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.9756 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081811.9769 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7327166a9e533ed','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081811.9774 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081811.9797 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081811.9863 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e7327166a9e533ed',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,250000,?,?,?,?,?)
20240731@081812.2260 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081812.2350 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.2222.00.1'
20240731@081812.3080 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081812.4780 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.5050 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.6520 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.7120 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.7750 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081812.7880 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.2222.00.1' and lote = 'r2301281400a'
20240731@081812.8260 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.1494 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.1613 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7391466a9e53414','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081812.1621 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.1651 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.1781 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e7391466a9e53414',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,260000,?,?,?,?,?)
20240731@081812.2144 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081812.2152 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.670.00.01'
20240731@081812.2274 r7cmv1b8emngbjoiodeecj54fk 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.670.00.01'
20240731@081812.2574 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.2618 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.2680 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.2746 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.2772 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081812.2920 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.670.00.01' and lote = 'r2300533200a'
20240731@081812.3315 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.3639 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.3762 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e6883866a9e53450','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081812.3766 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.3942 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.4181 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e6883866a9e53450',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,270000,?,?,?,?,?)
20240731@081812.4813 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081812.4963 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.2160.00.1'
20240731@081812.5222 r7cmv1b8emngbjoiodeecj54fk 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.2160.00.1'
20240731@081812.5606 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.5791 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.6615 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.6765 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.6793 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081812.6820 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.2160.00.1' and lote = 'r2300936200a'
20240731@081812.6891 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.6971 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.7023 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e2027266a9e534a8','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081812.7042 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.7377 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.7759 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e2027266a9e534a8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,280000,?,?,?,?,?)
20240731@081812.8135 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081812.8139 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1643.00.1'
20240731@081812.8159 r7cmv1b8emngbjoiodeecj54fk 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'
20240731@081812.8360 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.8385 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.8480 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.8514 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.8531 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081812.8741 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1643.00.1' and lote = 'r2101218200a'
20240731@081812.8756 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.8776 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081812.8791 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e5712066a9e534d5','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081812.8863 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081812.8896 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081812.8932 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e5712066a9e534d5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,290000,?,?,?,?,?)
20240731@081812.9554 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081812.9681 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.945.00.01'
20240731@081812.9934 r7cmv1b8emngbjoiodeecj54fk 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.945.00.01'
20240731@081813.1090 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.1227 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.1718 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.1743 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.1758 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081813.1770 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.945.00.01' and lote = 'r2200799100a'
20240731@081813.1784 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.1799 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.1811 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e4458866a9e5352b','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081813.1815 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.1830 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.1859 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e4458866a9e5352b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,300000,?,?,?,?,?)
20240731@081813.2147 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081813.2151 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.2231.00.1'
20240731@081813.2172 r7cmv1b8emngbjoiodeecj54fk 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.2231.00.1'
20240731@081813.2328 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.2344 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.2370 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.2384 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.2393 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081813.2405 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.2231.00.1' and lote = 'r2300389200a'
20240731@081813.2419 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.2441 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.2454 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7504966a9e5353b','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081813.2458 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.2473 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.2518 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e7504966a9e5353b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,310000,?,?,?,?,?)
20240731@081813.2814 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081813.2817 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.1847.00.1'
20240731@081813.2838 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1847.00.1'
20240731@081813.3016 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.3032 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.3258 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.3281 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.3317 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081813.3329 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.1847.00.1' and lote = 'r2400288100a'
20240731@081813.3342 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.3359 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.3371 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e3275166a9e53551','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081813.3376 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.7064 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.8319 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e3275166a9e53551',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,320000,?,?,?,?,?)
20240731@081813.8702 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.8743 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.8816 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.8833 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.8867 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081813.8904 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.8940 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.8953 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e8951966a9e535d9','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081813.8978 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.9029 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.9136 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e8951966a9e535d9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,330000,?,?,?)
20240731@081813.9522 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081813.9525 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.946.00.01'
20240731@081813.9566 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.946.00.01'
20240731@081813.9796 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.9831 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081813.9879 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081813.9914 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081813.9926 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081813.9963 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.946.00.01' and lote = 'r2300941200a'
20240731@081813.9998 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.3700 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.6900 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e5822566a9e535f4','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081814.7300 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.1090 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.4160 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e5822566a9e535f4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,350000,?,?,?,?,?)
20240731@081814.8490 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081814.8530 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.2232.00.1'
20240731@081814.8970 r7cmv1b8emngbjoiodeecj54fk 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.2232.00.1'
20240731@081814.1111 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.1148 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.1216 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.1234 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.1264 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081814.1295 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.2232.00.1' and lote = 'r2400241100a'
20240731@081814.1316 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.1356 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.1388 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e1981666a9e53620','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081814.1393 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.1427 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.1502 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e1981666a9e53620',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,360000,?,?,?,?,?)
20240731@081814.1886 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081814.1889 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.645.00.01'
20240731@081814.1949 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.645.00.01'
20240731@081814.2162 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.2204 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.2279 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.2318 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.2327 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081814.2359 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.645.00.01' and lote = 'r2400055200a'
20240731@081814.2394 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.2433 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.2446 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e0679966a9e5363a','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081814.2450 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.2487 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.2535 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e0679966a9e5363a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,370000,?,?,?,?,?)
20240731@081814.2963 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.3005 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.3059 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.3106 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.3132 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081814.3168 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.3206 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.3220 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e0011666a9e5364d','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081814.3225 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.3272 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.3359 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e0011666a9e5364d',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,380000,?,?,?)
20240731@081814.3735 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081814.3761 r7cmv1b8emngbjoiodeecj54fk Query : select st.usalote valor from st where st.ref = '324.646.00.01'
20240731@081814.3801 r7cmv1b8emngbjoiodeecj54fk 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.646.00.01'
20240731@081814.4049 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.4088 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.4133 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.4168 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.4197 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081814.4212 r7cmv1b8emngbjoiodeecj54fk Query : select sestamp valor from se where ref ='324.646.00.01' and lote = 'r2400055100a'
20240731@081814.4248 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.4284 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.4313 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e7224266a9e53667','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081814.4318 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.4350 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.4401 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66a9e7224266a9e53667',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,400000,?,?,?,?,?)
20240731@081814.4839 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.4880 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.4945 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.4981 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.5019 r7cmv1b8emngbjoiodeecj54fk Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@081814.5052 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.5088 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@081814.5127 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e6944966a9e5367b','aut66a9e3847766a9e52f49' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@081814.5131 r7cmv1b8emngbjoiodeecj54fk Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@081814.5167 r7cmv1b8emngbjoiodeecj54fk Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@081814.5265 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66a9e6944966a9e5367b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66a9e3847766a9e52f49' ,0,0 ,2,23.00,410000,?,?,?)
20240731@081814.6586 r7cmv1b8emngbjoiodeecj54fk Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66a9e3847766a9e52f49','2405101','wait',39,'adm09112754980.682000002')
20240731@081814.7178 r7cmv1b8emngbjoiodeecj54fk Query : use flama_phc
20240731@081814.7182 r7cmv1b8emngbjoiodeecj54fk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@081814.7255 r7cmv1b8emngbjoiodeecj54fk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1272';
20240731@081814.7315 r7cmv1b8emngbjoiodeecj54fk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1272';
20240731@081814.7416 r7cmv1b8emngbjoiodeecj54fk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1272';
20240731@081814.8891 r7cmv1b8emngbjoiodeecj54fk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1272';

20240731@083542.7039 d4m60ll9obl1unplqmp1401fc7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1273';
20240731@083542.7390 d4m60ll9obl1unplqmp1401fc7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1273';
20240731@083542.7455 d4m60ll9obl1unplqmp1401fc7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1273';
20240731@083542.7605 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083542.7608 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@083542.8020 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.646.00.01'
20240731@083542.8531 d4m60ll9obl1unplqmp1401fc7 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 = 2400224 and bi.ref ='324.646.00.01' and bi.lordem =10000
20240731@083542.9320 d4m60ll9obl1unplqmp1401fc7 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 = 'cps24022844921,561000003 ' 
20240731@083543.8000 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083543.1210 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 1 valor from ts where ts.ndos = 61
20240731@083543.6200 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083543.6620 d4m60ll9obl1unplqmp1401fc7 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')
20240731@083543.8070 d4m60ll9obl1unplqmp1401fc7 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
20240731@083543.1334 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083543.1378 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20240731@083543.2169 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083543.2174 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from ts where ndos = 61
20240731@083543.2377 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083543.2727 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240731@083543.2882 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083543.3316 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240731@083543.3487 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083543.3745 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240731@083543.3834 d4m60ll9obl1unplqmp1401fc7 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
20240731@083543.4102 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240731@083543.4791 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240731@083543.5331 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083543.5420 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20240731@083543.5962 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083543.6115 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240731@083543.6133 d4m60ll9obl1unplqmp1401fc7 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e2933466a9e94f82',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@083543.6478 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083543.6500 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240731@083543.6716 d4m60ll9obl1unplqmp1401fc7 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e2933466a9e94f82','--','bo',7.8022678951098511693 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@083543.7281 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083543.7677 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240731@083543.7908 d4m60ll9obl1unplqmp1401fc7 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 ('aut66a9e2933466a9e94f82','guia r. fornecedor','2024-07-31',61,2402260,?,?,?,?,?,?,?,?,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')
20240731@083543.9682 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083543.9724 d4m60ll9obl1unplqmp1401fc7 Query : select st.usalote valor from st where st.ref = '324.646.00.01'
20240731@083543.9827 d4m60ll9obl1unplqmp1401fc7 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.646.00.01'
20240731@083544.2370 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083544.3250 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240731@083544.5810 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083544.8420 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240731@083544.1011 d4m60ll9obl1unplqmp1401fc7 Query : select sestamp valor from se where ref ='324.646.00.01' and lote = 'r2400224100a'
20240731@083544.1057 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083544.1211 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240731@083544.1225 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083544.1393 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240731@083544.1574 d4m60ll9obl1unplqmp1401fc7 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66a9e3181966a9e9501d',?,?,'20240731',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240731@083544.3663 d4m60ll9obl1unplqmp1401fc7 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@083544.3939 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083544.4194 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240731@083544.4378 d4m60ll9obl1unplqmp1401fc7 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66a9e6909166a9e95060','aut66a9e2933466a9e94f82',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 = 'aut66a9e2933466a9e94f82'
20240731@083544.5797 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@083544.6253 d4m60ll9obl1unplqmp1401fc7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240731@083544.7638 d4m60ll9obl1unplqmp1401fc7 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 'aut66a9e6909166a9e95060',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1428, 1428*.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 ,14.11,14.11*200.48,14.11,14.11*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,14.11*1428,14.11*1428*200.48 ,17.898000,17.898000*200.48 ,17.898000,17.898000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,14.11,14.11*200.48,14.11*1428,14.11*1428*200.48,'cps24022844921,561000003 ',110.09,110.09*1428,110.09,110.09*1428,?,?,?,4 from bo bo where bo.bostamp = 'aut66a9e2933466a9e94f82'
20240731@083555.2041 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083555.2083 d4m60ll9obl1unplqmp1401fc7 Query : declare @bostamp varchar(25) = 'aut66a9e2933466a9e94f82' ,@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 
20240731@083606.8556 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083606.8596 d4m60ll9obl1unplqmp1401fc7 Query : select 1 valor from bo where bo.bostamp = 'aut66a9e2933466a9e94f82'
20240731@083606.8876 d4m60ll9obl1unplqmp1401fc7 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) = 'aut66a9e2933466a9e94f82' 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 
20240731@083607.4983 d4m60ll9obl1unplqmp1401fc7 Query : use flama_phc
20240731@083607.5090 d4m60ll9obl1unplqmp1401fc7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@083607.5384 d4m60ll9obl1unplqmp1401fc7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1273';
20240731@083607.5420 d4m60ll9obl1unplqmp1401fc7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1273';

20240731@105144.1615 ku4mnksj3doeosquut4rbfu4d1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1274';
20240731@105144.1683 ku4mnksj3doeosquut4rbfu4d1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1274';
20240731@105144.1716 ku4mnksj3doeosquut4rbfu4d1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1274';
20240731@105144.1790 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.1799 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@105144.2776 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.2781 ku4mnksj3doeosquut4rbfu4d1 Query : select no, estab,szadrsdesc from szadrs where u_coddest=210
20240731@105144.2878 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4970.00.1'
20240731@105144.3059 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.3063 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240731@105144.3283 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.3287 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 1 valor from td where td.ndoc = 39
20240731@105144.3527 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.3531 ku4mnksj3doeosquut4rbfu4d1 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')
20240731@105144.3626 ku4mnksj3doeosquut4rbfu4d1 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
20240731@105144.3799 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.3802 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 ~inactivo valor from cl where no = '101895' and estab = 0 order by inactivo desc
20240731@105144.3937 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.3940 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240731@105144.4046 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.4049 ku4mnksj3doeosquut4rbfu4d1 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240731@105144.4127 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.4130 ku4mnksj3doeosquut4rbfu4d1 Query : select szadrsstamp valor from szadrs where szadrsdesc='quase bom-com.de electrodomÉsticos, lda.-pombal'
20240731@105144.4180 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.4183 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from td where ndoc = 39
20240731@105144.4267 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240731@105144.4340 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.4651 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@105144.4750 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.4766 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@105144.4797 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.4813 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@105144.4826 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@105144.5019 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@105144.5130 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.5147 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@105144.5190 ku4mnksj3doeosquut4rbfu4d1 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66aa00944966aa093075' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240731@105144.5509 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.5529 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@105144.5572 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240731@105144.5664 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240731@105144.5740 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240731@105144.5811 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240731@105144.5880 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240731@105144.5950 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240731@105144.6021 ku4mnksj3doeosquut4rbfu4d1 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66aa00944966aa093075',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240731@105144.6537 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 fno valor from wsftdata order by fno desc
20240731@105144.7276 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.7294 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@105144.7318 ku4mnksj3doeosquut4rbfu4d1 Query : select 'normal' from dummy
20240731@105144.7370 ku4mnksj3doeosquut4rbfu4d1 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66aa00944966aa093075',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',111,101895,0,'2024-07-31',39,'euro',0,0,2024 ,?,?)
20240731@105144.7861 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.7864 ku4mnksj3doeosquut4rbfu4d1 Query : select st.usalote valor from st where st.ref = '324.4970.00.1'
20240731@105144.7991 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.4970.00.1'
20240731@105144.8145 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.8162 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@105144.8189 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.8204 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@105144.8214 ku4mnksj3doeosquut4rbfu4d1 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@105144.8253 ku4mnksj3doeosquut4rbfu4d1 Query : select sestamp valor from se where ref ='324.4970.00.1' and lote = 'r2400205200a'
20240731@105144.8313 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.8329 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@105144.8343 ku4mnksj3doeosquut4rbfu4d1 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa07959366aa0930ca','aut66aa00944966aa093075' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@105144.8399 ku4mnksj3doeosquut4rbfu4d1 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@105144.8417 ku4mnksj3doeosquut4rbfu4d1 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@105144.8450 ku4mnksj3doeosquut4rbfu4d1 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66aa07959366aa0930ca',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',4.000 ,'aut66aa00944966aa093075' ,0,0 ,2,23.00,10000,?,?,?,?)
20240731@105144.8924 ku4mnksj3doeosquut4rbfu4d1 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66aa00944966aa093075','2408212','wait',39,'adm09112754980.682000002')
20240731@105144.9015 ku4mnksj3doeosquut4rbfu4d1 Query : use flama_phc
20240731@105144.9020 ku4mnksj3doeosquut4rbfu4d1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@105144.9066 ku4mnksj3doeosquut4rbfu4d1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1274';
20240731@105144.9094 ku4mnksj3doeosquut4rbfu4d1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1274';
20240731@105144.9147 ku4mnksj3doeosquut4rbfu4d1 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1274';
20240731@105144.9179 ku4mnksj3doeosquut4rbfu4d1 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1274';
20240731@110644.7340 4g2alqmsgegsvisgfa6iae78hv Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240731@110644.7470 4g2alqmsgegsvisgfa6iae78hv Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240731@110644.8100 4g2alqmsgegsvisgfa6iae78hv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1275';
20240731@110644.8750 4g2alqmsgegsvisgfa6iae78hv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1275';
20240731@110644.9360 4g2alqmsgegsvisgfa6iae78hv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1275';
20240731@110644.9710 4g2alqmsgegsvisgfa6iae78hv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1275';
20240731@110644.1050 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.1066 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@110644.1178 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.1191 4g2alqmsgegsvisgfa6iae78hv Query : select no, estab,szadrsdesc from szadrs where u_coddest=4774
20240731@110644.1341 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20240731@110644.1517 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1461.00.1'
20240731@110644.1558 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.1561 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240731@110644.1695 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.1753 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 1 valor from td where td.ndoc = 39
20240731@110644.1811 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.1815 4g2alqmsgegsvisgfa6iae78hv 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')
20240731@110644.1957 4g2alqmsgegsvisgfa6iae78hv 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
20240731@110644.2147 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.2193 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 ~inactivo valor from cl where no = '100800' and estab = 0 order by inactivo desc
20240731@110644.2368 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.2371 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240731@110644.2415 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.2419 4g2alqmsgegsvisgfa6iae78hv Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240731@110644.2526 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.2546 4g2alqmsgegsvisgfa6iae78hv Query : select szadrsstamp valor from szadrs where szadrsdesc='100800 - modelo continente hipermercados, sa'
20240731@110644.2627 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.2630 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from td where ndoc = 39
20240731@110644.2721 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240731@110644.2749 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.2786 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@110644.2825 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.2863 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@110644.2901 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.2920 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@110644.2936 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@110644.3019 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@110644.3034 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.3055 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@110644.3103 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66aa00309166aa0cb447' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240731@110644.3374 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.3395 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@110644.3477 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240731@110644.3492 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240731@110644.3505 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240731@110644.3518 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240731@110644.3533 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240731@110644.3546 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240731@110644.3561 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66aa00309166aa0cb447',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240731@110644.3859 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 fno valor from wsftdata order by fno desc
20240731@110644.3894 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.3914 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@110644.3946 4g2alqmsgegsvisgfa6iae78hv Query : select 'normal' from dummy
20240731@110644.3975 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66aa00309166aa0cb447',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',112,100800,0,'2024-07-31',39,'euro',0,0,2024 ,?,?)
20240731@110644.4414 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.4418 4g2alqmsgegsvisgfa6iae78hv Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20240731@110644.4461 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20240731@110644.4630 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.4767 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@110644.4904 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.4922 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@110644.4935 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@110644.5010 4g2alqmsgegsvisgfa6iae78hv Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20240731@110644.5056 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.5118 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@110644.5132 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa09818566aa0cb47b','aut66aa00309166aa0cb447' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@110644.5137 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.5174 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@110644.5230 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66aa09818566aa0cb47b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',2.000 ,'aut66aa00309166aa0cb447' ,0,0 ,2,23.00,10000,?,?,?,?)
20240731@110644.5621 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.5626 4g2alqmsgegsvisgfa6iae78hv Query : select st.usalote valor from st where st.ref = '324.1461.00.1'
20240731@110644.5751 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1461.00.1'
20240731@110644.5851 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.5890 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@110644.5931 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.5995 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@110644.6008 4g2alqmsgegsvisgfa6iae78hv Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@110644.6024 4g2alqmsgegsvisgfa6iae78hv Query : select sestamp valor from se where ref ='324.1461.00.1' and lote = 'r2100463200a'
20240731@110644.6106 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.6142 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@110644.6197 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa04497866aa0cb495','aut66aa00309166aa0cb447' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@110644.6230 4g2alqmsgegsvisgfa6iae78hv Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@110644.6263 4g2alqmsgegsvisgfa6iae78hv Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@110644.6306 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem) values ('aut66aa04497866aa0cb495',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',1.000 ,'aut66aa00309166aa0cb447' ,0,0 ,2,23.00,20000,?,?,?,?)
20240731@110644.6628 4g2alqmsgegsvisgfa6iae78hv Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66aa00309166aa0cb447','2405100','wait',39,'adm09112754980.682000002')
20240731@110644.6705 4g2alqmsgegsvisgfa6iae78hv Query : use flama_phc
20240731@110644.6727 4g2alqmsgegsvisgfa6iae78hv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@110644.6761 4g2alqmsgegsvisgfa6iae78hv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1275';
20240731@110644.6797 4g2alqmsgegsvisgfa6iae78hv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1275';
20240731@110644.6856 4g2alqmsgegsvisgfa6iae78hv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1275';
20240731@110644.6891 4g2alqmsgegsvisgfa6iae78hv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1275';

20240731@142645.8390 dfbkk9218lem8lsef53vub3did Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1276';
20240731@142645.8454 dfbkk9218lem8lsef53vub3did Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1276';
20240731@142645.8481 dfbkk9218lem8lsef53vub3did Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1276';
20240731@142645.8519 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142645.8522 dfbkk9218lem8lsef53vub3did Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@142645.8628 dfbkk9218lem8lsef53vub3did Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1879.00.1'
20240731@142645.8755 dfbkk9218lem8lsef53vub3did 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 = 2400283 and bi.ref ='324.1879.00.1' and bi.lordem =20000
20240731@142645.9149 dfbkk9218lem8lsef53vub3did 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 = 'cps24031433615,643000002 ' 
20240731@142645.9547 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142645.9551 dfbkk9218lem8lsef53vub3did Query : select top 1 1 valor from ts where ts.ndos = 61
20240731@142645.9651 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142645.9654 dfbkk9218lem8lsef53vub3did 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')
20240731@142645.9747 dfbkk9218lem8lsef53vub3did 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
20240731@142645.9914 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142645.9918 dfbkk9218lem8lsef53vub3did Query : select top 1 ~inactivo valor from fl where no = '202133' and estab = 00 order by inactivo desc
20240731@142646.4000 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142646.4400 dfbkk9218lem8lsef53vub3did Query : select 1 valor from ts where ndos = 61
20240731@142646.1230 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.4450 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240731@142646.7480 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.7910 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240731@142646.8030 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.8200 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240731@142646.8310 dfbkk9218lem8lsef53vub3did 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
20240731@142646.9770 dfbkk9218lem8lsef53vub3did Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240731@142646.1086 dfbkk9218lem8lsef53vub3did Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240731@142646.1111 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142646.1119 dfbkk9218lem8lsef53vub3did Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202133' and estab=00
20240731@142646.1229 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.1249 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240731@142646.1293 dfbkk9218lem8lsef53vub3did Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa33951066aa3b961b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@142646.1368 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.1388 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240731@142646.1406 dfbkk9218lem8lsef53vub3did Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa33951066aa3b961b','--','bo',7.8628158844765342960 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@142646.1635 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.1660 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240731@142646.1675 dfbkk9218lem8lsef53vub3did 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 ('aut66aa33951066aa3b961b','guia r. fornecedor','2024-07-31',61,2402267,?,?,?,?,?,?,?,?,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')
20240731@142646.2307 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142646.2310 dfbkk9218lem8lsef53vub3did Query : select st.usalote valor from st where st.ref = '324.1879.00.1'
20240731@142646.2474 dfbkk9218lem8lsef53vub3did 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.1879.00.1'
20240731@142646.2674 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.2696 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240731@142646.2717 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.2735 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240731@142646.2748 dfbkk9218lem8lsef53vub3did Query : select sestamp valor from se where ref ='324.1879.00.1' and lote = 'r2400283200a'
20240731@142646.2808 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.2824 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240731@142646.2835 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.2852 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240731@142646.2867 dfbkk9218lem8lsef53vub3did Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa31382266aa3b9645',?,?,'20240731',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240731@142646.3971 dfbkk9218lem8lsef53vub3did Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@142646.4013 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.4031 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240731@142646.4047 dfbkk9218lem8lsef53vub3did Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66aa39677966aa3b9661','aut66aa33951066aa3b961b',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 = 'aut66aa33951066aa3b961b'
20240731@142646.4274 dfbkk9218lem8lsef53vub3did Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@142646.4294 dfbkk9218lem8lsef53vub3did Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240731@142646.4316 dfbkk9218lem8lsef53vub3did 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 'aut66aa39677966aa3b9661',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1290, 1290*.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.93,24.93*200.48,24.93,24.93*200.48 ,0,0,'un ','' ,bo.marcada,1 ,24.93*1290,24.93*1290*200.48 ,28.085000,28.085000*200.48 ,28.085000,28.085000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,24.93,24.93*200.48,24.93*1290,24.93*1290*200.48,'cps24031433615,643000002 ',196.02,196.02*1290,196.02,196.02*1290,?,?,?,4 from bo bo where bo.bostamp = 'aut66aa33951066aa3b961b'
20240731@142658.1235 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142658.1241 dfbkk9218lem8lsef53vub3did Query : declare @bostamp varchar(25) = 'aut66aa33951066aa3b961b' ,@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 
20240731@142711.9280 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142711.9330 dfbkk9218lem8lsef53vub3did Query : select 1 valor from bo where bo.bostamp = 'aut66aa33951066aa3b961b'
20240731@142711.1076 dfbkk9218lem8lsef53vub3did 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) = 'aut66aa33951066aa3b961b' 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 
20240731@142711.3283 dfbkk9218lem8lsef53vub3did Query : use flama_phc
20240731@142711.3287 dfbkk9218lem8lsef53vub3did Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@142711.3345 dfbkk9218lem8lsef53vub3did Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1276';
20240731@142711.3377 dfbkk9218lem8lsef53vub3did Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1276';

20240731@145946.1751 6cs3orblem6ko0u9cs9o6r9mim Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1277';
20240731@145946.1835 6cs3orblem6ko0u9cs9o6r9mim Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1277';
20240731@145946.1860 6cs3orblem6ko0u9cs9o6r9mim Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1277';
20240731@145946.1898 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.1902 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@145946.1975 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.645.00.01'
20240731@145946.2113 6cs3orblem6ko0u9cs9o6r9mim 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 = 2400224 and bi.ref ='324.645.00.01' and bi.lordem =20000
20240731@145946.2550 6cs3orblem6ko0u9cs9o6r9mim 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 = 'cps24022844921,205000002 ' 
20240731@145946.2914 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.2920 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 1 valor from ts where ts.ndos = 61
20240731@145946.2955 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.2959 6cs3orblem6ko0u9cs9o6r9mim 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')
20240731@145946.2991 6cs3orblem6ko0u9cs9o6r9mim 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
20240731@145946.3032 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.3036 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20240731@145946.3174 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.3178 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from ts where ndos = 61
20240731@145946.3195 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.3214 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240731@145946.3232 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.3252 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240731@145946.3263 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.3282 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240731@145946.3293 6cs3orblem6ko0u9cs9o6r9mim 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
20240731@145946.3312 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240731@145946.3344 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240731@145946.3366 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.3374 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20240731@145946.3483 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.3503 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240731@145946.3516 6cs3orblem6ko0u9cs9o6r9mim Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa44789766aa435252',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@145946.3521 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.3549 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240731@145946.3565 6cs3orblem6ko0u9cs9o6r9mim Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa44789766aa435252','--','bo',7.8022678951098511693 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240731@145946.3571 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.3589 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240731@145946.3604 6cs3orblem6ko0u9cs9o6r9mim 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 ('aut66aa44789766aa435252','guia r. fornecedor','2024-07-31',61,2402270,?,?,?,?,?,?,?,?,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')
20240731@145946.4143 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.4146 6cs3orblem6ko0u9cs9o6r9mim Query : select st.usalote valor from st where st.ref = '324.645.00.01'
20240731@145946.4177 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.645.00.01'
20240731@145946.4339 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.4357 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240731@145946.4371 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.4387 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240731@145946.4400 6cs3orblem6ko0u9cs9o6r9mim Query : select sestamp valor from se where ref ='324.645.00.01' and lote = 'r2400224200a'
20240731@145946.4428 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.4455 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240731@145946.4466 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.4484 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240731@145946.4500 6cs3orblem6ko0u9cs9o6r9mim Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aa49700666aa43526d',?,?,'20240731',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240731@145946.4575 6cs3orblem6ko0u9cs9o6r9mim Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@145946.4593 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.4619 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240731@145946.4634 6cs3orblem6ko0u9cs9o6r9mim Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut66aa42267366aa435270','aut66aa44789766aa435252',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 = 'aut66aa44789766aa435252'
20240731@145946.4922 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@145946.4954 6cs3orblem6ko0u9cs9o6r9mim Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240731@145946.4975 6cs3orblem6ko0u9cs9o6r9mim 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 'aut66aa42267366aa435270',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1428, 1428*.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 ,14.11,14.11*200.48,14.11,14.11*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,14.11*1428,14.11*1428*200.48 ,17.946000,17.946000*200.48 ,17.946000,17.946000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,14.11,14.11*200.48,14.11*1428,14.11*1428*200.48,'cps24022844921,205000002 ',110.09,110.09*1428,110.09,110.09*1428,?,?,?,4 from bo bo where bo.bostamp = 'aut66aa44789766aa435252'
20240731@145946.8169 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.8174 6cs3orblem6ko0u9cs9o6r9mim Query : declare @bostamp varchar(25) = 'aut66aa44789766aa435252' ,@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 
20240731@145946.9869 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145946.9873 6cs3orblem6ko0u9cs9o6r9mim Query : select 1 valor from bo where bo.bostamp = 'aut66aa44789766aa435252'
20240731@145946.9893 6cs3orblem6ko0u9cs9o6r9mim 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) = 'aut66aa44789766aa435252' 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 
20240731@145947.2509 6cs3orblem6ko0u9cs9o6r9mim Query : use flama_phc
20240731@145947.2516 6cs3orblem6ko0u9cs9o6r9mim Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@145947.2595 6cs3orblem6ko0u9cs9o6r9mim Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1277';
20240731@145947.2631 6cs3orblem6ko0u9cs9o6r9mim Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1277';

20240731@214912.2810 7gd3to29ur803at9vq6qo23ns3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1278';
20240731@214912.3550 7gd3to29ur803at9vq6qo23ns3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1278';
20240731@214912.3810 7gd3to29ur803at9vq6qo23ns3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1278';
20240731@214912.4310 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.4350 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240731@214912.5660 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.5700 7gd3to29ur803at9vq6qo23ns3 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240731@214912.6610 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1706.00.1'
20240731@214912.9680 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.1706.00.1' and bi.lordem =1
20240731@214912.1386 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '325.551.00.15'
20240731@214912.1561 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='325.551.00.15' and bi.lordem =2
20240731@214912.1970 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.958.00.01'
20240731@214912.2151 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.958.00.01' and bi.lordem =3
20240731@214912.2595 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.958.00.01'
20240731@214912.2619 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.958.00.01' and bi.lordem =3
20240731@214912.2637 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1716.00.1'
20240731@214912.2833 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.1716.00.1' and bi.lordem =4
20240731@214912.3205 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1716.00.1'
20240731@214912.3228 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.1716.00.1' and bi.lordem =4
20240731@214912.3245 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240731@214912.3470 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.4902.00.1' and bi.lordem =5
20240731@214912.3817 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4902.00.1'
20240731@214912.3837 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.4902.00.1' and bi.lordem =5
20240731@214912.3854 7gd3to29ur803at9vq6qo23ns3 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'
20240731@214912.4033 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.4906.00.1' and bi.lordem =6
20240731@214912.4372 7gd3to29ur803at9vq6qo23ns3 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'
20240731@214912.4599 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.4964.00.1' and bi.lordem =7
20240731@214912.4942 7gd3to29ur803at9vq6qo23ns3 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'
20240731@214912.6224 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.4961.00.1' and bi.lordem =8
20240731@214912.6563 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1426.00.1'
20240731@214912.6751 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.1426.00.1' and bi.lordem =9
20240731@214912.7108 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1426.00.1'
20240731@214912.7133 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.1426.00.1' and bi.lordem =9
20240731@214912.7156 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5501.00.1'
20240731@214912.7325 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.5501.00.1' and bi.lordem =10
20240731@214912.7656 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240731@214912.7815 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.2907.00.1' and bi.lordem =11
20240731@214912.8127 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2907.00.1'
20240731@214912.8149 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2050 and bo.obrano = 2405015 and bi.ref ='324.2907.00.1' and bi.lordem =11
20240731@214912.8170 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.8174 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240731@214912.8377 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.8380 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 1 valor from td where td.ndoc = 39
20240731@214912.8483 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.8486 7gd3to29ur803at9vq6qo23ns3 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')
20240731@214912.8675 7gd3to29ur803at9vq6qo23ns3 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
20240731@214912.8828 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.8831 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 ~inactivo valor from cl where no = '199510' and estab = 0 order by inactivo desc
20240731@214912.8957 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.8961 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 tipodoc,regrd from td where ndoc = 39
20240731@214912.9059 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.9062 7gd3to29ur803at9vq6qo23ns3 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240731@214912.9158 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.9162 7gd3to29ur803at9vq6qo23ns3 Query : select szadrsstamp valor from szadrs where szadrsdesc='199510 - cdnogueira regedoura'
20240731@214912.9224 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214912.9228 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from td where ndoc = 39
20240731@214912.9316 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 manternumero, tiposaft, nmdos,td.assinadoc from td where td.ndoc = 39
20240731@214912.9379 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7700 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@214913.1640 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.1820 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@214913.2250 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.2450 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@214913.2660 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 ft.fno valor from ft ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@214913.5990 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 ft.fno valor from wsftdata ft where ft.ndoc = 39 and ftano=2024 order by fno desc
20240731@214913.7060 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7260 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft3' and documentnumber = 39
20240731@214913.7690 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsft3data (ft3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,taxpointdt ) values ('aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?)
20240731@214913.1078 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.1097 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft2' and documentnumber = 39
20240731@214913.1141 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bo.u_nomeenv valor from bo where bo.bostamp=''
20240731@214913.1245 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bo.u_moradaen valor from bo where bo.bostamp=''
20240731@214913.1317 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bo.u_codposen valor from bo where bo.bostamp=''
20240731@214913.1402 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bo.u_localenv valor from bo where bo.bostamp=''
20240731@214913.1478 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bo.trab5 valor from bo where bo.bostamp=''
20240731@214913.1551 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 bo.serie valor from bo where bo.bostamp=''
20240731@214913.1636 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsft2data (ft2stamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,u_nomeenv ,u_moradaen ,u_codposen ,u_localenv ,u_coddest ,u_codby ) values ('aut66aaa6212466aaa34906',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',?,?,?,?,?,?)
20240731@214913.2177 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 fno valor from wsftdata order by fno desc
20240731@214913.2274 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.2294 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'ft' and documentnumber = 39
20240731@214913.2323 7gd3to29ur803at9vq6qo23ns3 Query : select 'normal' from dummy
20240731@214913.2378 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsftdata (ftstamp, ousrdata,ousrhora, usrdata,usrhora,ousrinis,usrinis,fno,no,estab,fdata,ndoc,moeda,cambio,cambiofixo,ftano,site ,classe ) values ('aut66aaa6212466aaa34906',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',113,199510,0,'2024-07-31',39,'euro',0,0,2024 ,?,?)
20240731@214913.3056 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.3061 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.1706.00.1'
20240731@214913.3194 7gd3to29ur803at9vq6qo23ns3 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.1706.00.1'
20240731@214913.3327 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.3343 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.3370 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.3385 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.3395 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.3433 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.1706.00.1' and lote = 'r2100123100b'
20240731@214913.3514 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.3529 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.3543 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa1304866aaa34955','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.3611 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.3628 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.3660 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa1304866aaa34955',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',24.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,10000,?,?,?,?,?)
20240731@214913.4078 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.4082 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '325.551.00.15'
20240731@214913.4104 7gd3to29ur803at9vq6qo23ns3 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.551.00.15'
20240731@214913.4252 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.4268 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.4296 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.4311 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.4321 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.4333 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='325.551.00.15' and lote = 'r210109070'
20240731@214913.4361 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.4376 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.4388 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa0910866aaa3496a','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.4392 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.4408 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.4436 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa0910866aaa3496a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',54.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,20000,?,?,?,?,?)
20240731@214913.5141 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6013 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.6045 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6062 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.6070 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.6083 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6097 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.6109 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa0361266aaa34994','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.6113 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6128 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.6159 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66aaa0361266aaa34994',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,30000,?,?,?)
20240731@214913.6664 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.6668 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.958.00.01'
20240731@214913.6697 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.958.00.01'
20240731@214913.6848 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6865 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.6892 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6909 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.6918 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.6932 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.958.00.01' and lote = 'r2400240200a'
20240731@214913.6953 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.6970 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.6982 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa1694766aaa349a9','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.6986 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7003 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.7035 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa1694766aaa349a9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,50000,?,?,?,?,?)
20240731@214913.7286 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.7289 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.958.00.01'
20240731@214913.7308 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.958.00.01'
20240731@214913.7322 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7339 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.7367 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7383 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.7395 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.7408 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.958.00.01' and lote = 'r2400240200a'
20240731@214913.7421 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7437 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.7450 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa5108566aaa349b5','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.7455 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7473 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.7507 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa5108566aaa349b5',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',36.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,60000,?,?,?,?,?)
20240731@214913.7765 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.7768 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.1716.00.1'
20240731@214913.7788 7gd3to29ur803at9vq6qo23ns3 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.1716.00.1'
20240731@214913.7937 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.7955 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.7985 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8001 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.8011 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.8023 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.1716.00.1' and lote = 'r2100312300a'
20240731@214913.8065 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8081 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.8094 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa5958866aaa349c4','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.8098 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8116 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.8149 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa5958866aaa349c4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,70000,?,?,?,?,?)
20240731@214913.8417 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.8420 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.1716.00.1'
20240731@214913.8442 7gd3to29ur803at9vq6qo23ns3 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.1716.00.1'
20240731@214913.8457 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8474 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.8503 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8518 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.8527 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.8542 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.1716.00.1' and lote = 'r2100312300a'
20240731@214913.8558 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8600 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.8613 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa6139166aaa349d0','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.8617 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.8633 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.8667 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa6139166aaa349d0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',44.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,80000,?,?,?,?,?)
20240731@214913.8924 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214913.8928 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.4902.00.1'
20240731@214913.8956 7gd3to29ur803at9vq6qo23ns3 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.4902.00.1'
20240731@214913.9175 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9196 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.9229 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9246 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.9257 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.9273 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.4902.00.1' and lote = 'r2400145200a'
20240731@214913.9298 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9314 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.9326 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa7836766aaa349e3','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.9331 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9348 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.9382 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa7836766aaa349e3',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',40.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,90000,?,?,?,?,?)
20240731@214913.9668 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9689 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.9717 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9734 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.9745 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214913.9759 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9774 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214913.9788 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa5409966aaa349ee','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214913.9792 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214913.9809 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214913.9843 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66aaa5409966aaa349ee',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,100000,?,?,?)
20240731@214914.1200 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.1250 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.4902.00.1'
20240731@214914.1500 7gd3to29ur803at9vq6qo23ns3 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.4902.00.1'
20240731@214914.1690 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.1890 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.2190 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.2370 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.2460 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.2620 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.4902.00.1' and lote = 'r2400145200a'
20240731@214914.2770 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.2960 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.3090 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa0540666aaa34a06','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.3140 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.3300 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.3610 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa0540666aaa34a06',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,120000,?,?,?,?,?)
20240731@214914.6360 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6570 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.6900 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7060 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.7160 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.7320 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7500 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.7640 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa7548266aaa34a11','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.7690 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7870 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.8200 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66aaa7548266aaa34a11',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,130000,?,?,?)
20240731@214914.1079 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.1082 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.4906.00.1'
20240731@214914.1105 7gd3to29ur803at9vq6qo23ns3 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'
20240731@214914.1260 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.3052 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.3633 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.3656 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.3665 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.3741 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.4906.00.1' and lote = 'r2300207200a'
20240731@214914.3772 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.3790 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.3803 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa4861366aaa34a5c','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.3808 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.3823 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.3853 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa4861366aaa34a5c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,150000,?,?,?,?,?)
20240731@214914.4130 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4150 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.4184 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4200 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.4210 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.4224 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4242 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.4263 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa5253266aaa34a67','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.4267 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4282 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.4314 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66aaa5253266aaa34a67',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,160000,?,?,?)
20240731@214914.4575 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.4579 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.4964.00.1'
20240731@214914.4600 7gd3to29ur803at9vq6qo23ns3 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'
20240731@214914.4754 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4773 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.4802 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4817 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.4826 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.4839 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.4964.00.1' and lote = 'r2300717100a'
20240731@214914.4866 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4883 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.4899 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa0528666aaa34a76','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.4903 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.4920 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.4950 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa0528666aaa34a76',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,180000,?,?,?,?,?)
20240731@214914.5211 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.5214 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.4961.00.1'
20240731@214914.5238 7gd3to29ur803at9vq6qo23ns3 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'
20240731@214914.5389 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.5407 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.5435 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.5450 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.5459 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.5471 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.4961.00.1' and lote = 'r2101092200a'
20240731@214914.5491 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.5506 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.5518 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa4428366aaa34a86','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.5522 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.5536 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.5567 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa4428366aaa34a86',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',32.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,190000,?,?,?,?,?)
20240731@214914.5833 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.5836 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.1426.00.1'
20240731@214914.5856 7gd3to29ur803at9vq6qo23ns3 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.1426.00.1'
20240731@214914.6012 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6028 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.6055 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6069 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.6077 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.6089 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.1426.00.1' and lote = 'r2100465200a'
20240731@214914.6123 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6141 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.6152 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa4153266aaa34a95','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.6156 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6171 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.6200 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa4153266aaa34a95',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',24.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,200000,?,?,?,?,?)
20240731@214914.6473 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6489 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.6519 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6535 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.6544 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.6558 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6576 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.6588 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa7545966aaa34aa0','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.6593 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6612 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.6643 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66aaa7545966aaa34aa0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,210000,?,?,?)
20240731@214914.6915 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.6918 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.1426.00.1'
20240731@214914.6940 7gd3to29ur803at9vq6qo23ns3 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.1426.00.1'
20240731@214914.6955 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.6973 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.7003 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7022 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.7033 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.7048 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.1426.00.1' and lote = 'r2100465200a'
20240731@214914.7061 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7078 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.7092 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa8678666aaa34aac','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.7097 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7113 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.7148 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa8678666aaa34aac',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',8.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,230000,?,?,?,?,?)
20240731@214914.7449 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7468 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.7496 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7513 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.7523 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.7537 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7554 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.7567 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa4668066aaa34ab8','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.7572 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.7588 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.7622 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,armazem) values ('aut66aaa4668066aaa34ab8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',0 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,240000,?,?,?)
20240731@214914.7868 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.7873 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.5501.00.1'
20240731@214914.7896 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5501.00.1'
20240731@214914.8055 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8074 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.8103 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8120 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.8129 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.8142 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.5501.00.1' and lote = 'r2300908100a'
20240731@214914.8173 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8191 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.8206 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa4142266aaa34ac7','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.8211 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8229 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.8264 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa4142266aaa34ac7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',20.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,260000,?,?,?,?,?)
20240731@214914.8549 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.8552 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.2907.00.1'
20240731@214914.8577 7gd3to29ur803at9vq6qo23ns3 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.2907.00.1'
20240731@214914.8739 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8757 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.8789 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8807 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.8817 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.8830 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.2907.00.1' and lote = 'r2400091200a'
20240731@214914.8853 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8870 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.8884 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa1909666aaa34ad8','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.8888 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.8905 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.8940 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa1909666aaa34ad8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',84.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,270000,?,?,?,?,?)
20240731@214914.9197 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.9201 7gd3to29ur803at9vq6qo23ns3 Query : select st.usalote valor from st where st.ref = '324.2907.00.1'
20240731@214914.9222 7gd3to29ur803at9vq6qo23ns3 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.2907.00.1'
20240731@214914.9239 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.9259 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.9289 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.9305 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.9315 7gd3to29ur803at9vq6qo23ns3 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240731@214914.9329 7gd3to29ur803at9vq6qo23ns3 Query : select sestamp valor from se where ref ='324.2907.00.1' and lote = 'r2400091200a'
20240731@214914.9345 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.9362 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi2' and documentnumber = 39
20240731@214914.9379 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfi2data (fi2stamp,ftstamp ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66aaa0649566aaa34ae4','aut66aaa6212466aaa34906' ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv')
20240731@214914.9385 7gd3to29ur803at9vq6qo23ns3 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240731@214914.9404 7gd3to29ur803at9vq6qo23ns3 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'fi' and documentnumber = 39
20240731@214914.9438 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsfidata (fistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,qtt ,ftstamp ,epv,pvmoeda ,tabiva,iva,lordem ,ref, design ,lote,armazem,bistamp ) values ('aut66aaa0649566aaa34ae4',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'wsv','wsv',16.000 ,'aut66aaa6212466aaa34906' ,0,0 ,2,23.00,280000,?,?,?,?,?)
20240731@214914.9702 7gd3to29ur803at9vq6qo23ns3 Query : insert into wsftcreationlog (initialftstamp,externalid,creationstatus,documenttypeid,idustamp) values ('aut66aaa6212466aaa34906','2405015','wait',39,'adm09112754980.682000002')
20240731@214914.9813 7gd3to29ur803at9vq6qo23ns3 Query : use flama_phc
20240731@214914.9816 7gd3to29ur803at9vq6qo23ns3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240731@214914.9848 7gd3to29ur803at9vq6qo23ns3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1278';
20240731@214914.9876 7gd3to29ur803at9vq6qo23ns3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1278';
20240731@214914.9918 7gd3to29ur803at9vq6qo23ns3 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1278';
20240731@214914.9944 7gd3to29ur803at9vq6qo23ns3 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1278';
20240731@214915.1243 fv06e2o5vb7jd36d91mp7t1bki Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240731@214915.1257 fv06e2o5vb7jd36d91mp7t1bki Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240731@214915.1316 fv06e2o5vb7jd36d91mp7t1bki Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1279';
20240731@214915.1378 fv06e2o5vb7jd36d91mp7t1bki Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1279';
20240731@214915.1429 fv06e2o5vb7jd36d91mp7t1bki Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='1279';
20240731@214915.1493 fv06e2o5vb7jd36d91mp7t1bki Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='1279';
