20240606@183526.6250 6jrjhre1f790t635iugiess162 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='283';
20240606@183526.6297 6jrjhre1f790t635iugiess162 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='283';
20240606@183526.6310 6jrjhre1f790t635iugiess162 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='283';
20240606@183526.6321 6jrjhre1f790t635iugiess162 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='283';
20240606@183526.6332 6jrjhre1f790t635iugiess162 Query : use flama_phc
20240606@183526.6335 6jrjhre1f790t635iugiess162 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.6349 6jrjhre1f790t635iugiess162 Query : use flama_phc
20240606@183526.6352 6jrjhre1f790t635iugiess162 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240606@183526.6384 6jrjhre1f790t635iugiess162 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1417.00.1'
20240606@183526.6394 6jrjhre1f790t635iugiess162 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1417.00.1'
20240606@183526.6404 6jrjhre1f790t635iugiess162 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1417.00.1'
20240606@183526.6413 6jrjhre1f790t635iugiess162 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1417.00.1'
20240606@183526.6423 6jrjhre1f790t635iugiess162 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240606@183526.6593 6jrjhre1f790t635iugiess162 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4980.00.1'
20240606@183526.6605 6jrjhre1f790t635iugiess162 Query : use flama_phc
20240606@183526.6608 6jrjhre1f790t635iugiess162 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.6621 6jrjhre1f790t635iugiess162 Query : use flama_phc
20240606@183526.6624 6jrjhre1f790t635iugiess162 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.6634 6jrjhre1f790t635iugiess162 Query : use flama_phc
20240606@183526.6637 6jrjhre1f790t635iugiess162 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')
20240606@183526.7103 p8up5h3lmhebk1idlta9rcquh0 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.7117 p8up5h3lmhebk1idlta9rcquh0 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.7133 p8up5h3lmhebk1idlta9rcquh0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='284';
20240606@183526.7172 p8up5h3lmhebk1idlta9rcquh0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='284';
20240606@183526.7187 p8up5h3lmhebk1idlta9rcquh0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='284';
20240606@183526.7198 p8up5h3lmhebk1idlta9rcquh0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='284';
20240606@183526.7209 p8up5h3lmhebk1idlta9rcquh0 Query : use flama_phc
20240606@183526.7212 p8up5h3lmhebk1idlta9rcquh0 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.7226 p8up5h3lmhebk1idlta9rcquh0 Query : use flama_phc
20240606@183526.7233 p8up5h3lmhebk1idlta9rcquh0 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4790
20240606@183526.7265 p8up5h3lmhebk1idlta9rcquh0 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.681.00.01'
20240606@183526.7432 p8up5h3lmhebk1idlta9rcquh0 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.681.00.01'
20240606@183526.7442 p8up5h3lmhebk1idlta9rcquh0 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.681.00.01'
20240606@183526.7453 p8up5h3lmhebk1idlta9rcquh0 Query : use flama_phc
20240606@183526.7456 p8up5h3lmhebk1idlta9rcquh0 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.7471 p8up5h3lmhebk1idlta9rcquh0 Query : use flama_phc
20240606@183526.7474 p8up5h3lmhebk1idlta9rcquh0 Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.7484 p8up5h3lmhebk1idlta9rcquh0 Query : use flama_phc
20240606@183526.7487 p8up5h3lmhebk1idlta9rcquh0 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')
20240606@183526.8885 sqvgpfc8f6dtajg6b888r84gvc Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.8997 sqvgpfc8f6dtajg6b888r84gvc Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.9014 sqvgpfc8f6dtajg6b888r84gvc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='285';
20240606@183526.9052 sqvgpfc8f6dtajg6b888r84gvc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='285';
20240606@183526.9065 sqvgpfc8f6dtajg6b888r84gvc Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='285';
20240606@183526.9075 sqvgpfc8f6dtajg6b888r84gvc Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='285';
20240606@183526.9087 sqvgpfc8f6dtajg6b888r84gvc Query : use flama_phc
20240606@183526.9090 sqvgpfc8f6dtajg6b888r84gvc Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.9103 sqvgpfc8f6dtajg6b888r84gvc Query : use flama_phc
20240606@183526.9106 sqvgpfc8f6dtajg6b888r84gvc Query : select no, estab,szadrsdesc from szadrs where u_coddest=2926
20240606@183526.9183 sqvgpfc8f6dtajg6b888r84gvc Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.681.00.01'
20240606@183526.9193 sqvgpfc8f6dtajg6b888r84gvc Query : use flama_phc
20240606@183526.9197 sqvgpfc8f6dtajg6b888r84gvc Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183526.9217 sqvgpfc8f6dtajg6b888r84gvc Query : use flama_phc
20240606@183526.9220 sqvgpfc8f6dtajg6b888r84gvc Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183526.9230 sqvgpfc8f6dtajg6b888r84gvc Query : use flama_phc
20240606@183526.9233 sqvgpfc8f6dtajg6b888r84gvc 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')
20240606@183526.9769 0bbgf9lcvluv3gveqb4o1t8gh8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183526.9784 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183526.9800 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='286';
20240606@183526.9842 0bbgf9lcvluv3gveqb4o1t8gh8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='286';
20240606@183526.9854 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='286';
20240606@183526.9865 0bbgf9lcvluv3gveqb4o1t8gh8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='286';
20240606@183526.9878 0bbgf9lcvluv3gveqb4o1t8gh8 Query : use flama_phc
20240606@183526.9881 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183526.9895 0bbgf9lcvluv3gveqb4o1t8gh8 Query : use flama_phc
20240606@183526.9898 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=6917
20240606@183526.9971 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2000.94.1'
20240606@183527.1310 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.900.94.02'
20240606@183527.2500 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.700.94.01'
20240606@183527.3740 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2200.94.1'
20240606@183527.5030 0bbgf9lcvluv3gveqb4o1t8gh8 Query : use flama_phc
20240606@183527.5060 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240606@183527.5480 0bbgf9lcvluv3gveqb4o1t8gh8 Query : use flama_phc
20240606@183527.5510 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -65
20240606@183527.6130 0bbgf9lcvluv3gveqb4o1t8gh8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='286';
20240606@183527.6260 0bbgf9lcvluv3gveqb4o1t8gh8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='286';
20240606@183527.1088 34e5fdl7mig3q3sburs2al2e4i Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240606@183527.1102 34e5fdl7mig3q3sburs2al2e4i Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240606@183527.1121 34e5fdl7mig3q3sburs2al2e4i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='287';
20240606@183527.1161 34e5fdl7mig3q3sburs2al2e4i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='287';
20240606@183527.1173 34e5fdl7mig3q3sburs2al2e4i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='287';
20240606@183527.1184 34e5fdl7mig3q3sburs2al2e4i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='287';
20240606@183527.1195 34e5fdl7mig3q3sburs2al2e4i Query : use flama_phc
20240606@183527.1198 34e5fdl7mig3q3sburs2al2e4i Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240606@183527.1213 34e5fdl7mig3q3sburs2al2e4i Query : use flama_phc
20240606@183527.1216 34e5fdl7mig3q3sburs2al2e4i Query : select no, estab,szadrsdesc from szadrs where u_coddest=4799
20240606@183527.1289 34e5fdl7mig3q3sburs2al2e4i Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.681.00.01'
20240606@183527.1300 34e5fdl7mig3q3sburs2al2e4i Query : use flama_phc
20240606@183527.1303 34e5fdl7mig3q3sburs2al2e4i Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240606@183527.1316 34e5fdl7mig3q3sburs2al2e4i Query : use flama_phc
20240606@183527.1319 34e5fdl7mig3q3sburs2al2e4i Query : select top 1 1 valor from td where td.ndoc = 39
20240606@183527.1329 34e5fdl7mig3q3sburs2al2e4i Query : use flama_phc
20240606@183527.1332 34e5fdl7mig3q3sburs2al2e4i 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')
20240606@183616.1103 m673slrt8a3g9vd7u35a46e72t Query : use flama_phc
20240606@183616.1108 m673slrt8a3g9vd7u35a46e72t Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@183616.1127 m673slrt8a3g9vd7u35a46e72t Query : use flama_phc
20240606@183616.1130 m673slrt8a3g9vd7u35a46e72t Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@191940.2754 7e57k9rsluk72ltphvqplqqdqr Query : use flama_phc
20240606@191940.2759 7e57k9rsluk72ltphvqplqqdqr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@191940.2785 7e57k9rsluk72ltphvqplqqdqr Query : use flama_phc
20240606@191940.2788 7e57k9rsluk72ltphvqplqqdqr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@193640.5086 toh2vslutj7r77qlflfn66n8d1 Query : use flama_phc
20240606@193640.5090 toh2vslutj7r77qlflfn66n8d1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@193640.5107 toh2vslutj7r77qlflfn66n8d1 Query : use flama_phc
20240606@193640.5110 toh2vslutj7r77qlflfn66n8d1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@201918.7314 ic8ig44hm483oef7jmh4lkjamu Query : use flama_phc
20240606@201918.7320 ic8ig44hm483oef7jmh4lkjamu Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@201918.7338 ic8ig44hm483oef7jmh4lkjamu Query : use flama_phc
20240606@201918.7341 ic8ig44hm483oef7jmh4lkjamu Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@203617.6213 dlsihkmosnfvvlpda4lia0hev1 Query : use flama_phc
20240606@203617.6218 dlsihkmosnfvvlpda4lia0hev1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@203617.6236 dlsihkmosnfvvlpda4lia0hev1 Query : use flama_phc
20240606@203617.6239 dlsihkmosnfvvlpda4lia0hev1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@211915.1020 48af9iua6kvf67qbsi39onoq6l Query : use flama_phc
20240606@211915.1110 48af9iua6kvf67qbsi39onoq6l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@211915.1310 48af9iua6kvf67qbsi39onoq6l Query : use flama_phc
20240606@211915.1340 48af9iua6kvf67qbsi39onoq6l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@213614.9871 vbue8kgtc155o2ossbel9evbsn Query : use flama_phc
20240606@213614.9876 vbue8kgtc155o2ossbel9evbsn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@213614.9895 vbue8kgtc155o2ossbel9evbsn Query : use flama_phc
20240606@213614.9898 vbue8kgtc155o2ossbel9evbsn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@221918.2960 ctb4909pah1jjvdstdtiq1fn6t Query : use flama_phc
20240606@221918.3020 ctb4909pah1jjvdstdtiq1fn6t Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@221918.3220 ctb4909pah1jjvdstdtiq1fn6t Query : use flama_phc
20240606@221918.3250 ctb4909pah1jjvdstdtiq1fn6t Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@223617.8175 8o6a6hitklvp00ov39q86emel4 Query : use flama_phc
20240606@223617.8180 8o6a6hitklvp00ov39q86emel4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@223617.8205 8o6a6hitklvp00ov39q86emel4 Query : use flama_phc
20240606@223617.8208 8o6a6hitklvp00ov39q86emel4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@231913.4510 ks6nqfgqacetftd757l92ce3rn Query : use flama_phc
20240606@231913.4515 ks6nqfgqacetftd757l92ce3rn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@231913.4535 ks6nqfgqacetftd757l92ce3rn Query : use flama_phc
20240606@231913.4538 ks6nqfgqacetftd757l92ce3rn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240606@233613.2705 g7futr26b434f8fq6c2bcfrg52 Query : use flama_phc
20240606@233613.2711 g7futr26b434f8fq6c2bcfrg52 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240606@233613.2729 g7futr26b434f8fq6c2bcfrg52 Query : use flama_phc
20240606@233613.2733 g7futr26b434f8fq6c2bcfrg52 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@071920.6923 gke18cr92spmp4pi1odfdbrdrn Query : use flama_phc
20240607@071920.6928 gke18cr92spmp4pi1odfdbrdrn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@071920.6988 gke18cr92spmp4pi1odfdbrdrn Query : use flama_phc
20240607@071920.6991 gke18cr92spmp4pi1odfdbrdrn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@073614.4347 bu2m819gv4bdcp9558549pi3il Query : use flama_phc
20240607@073614.4353 bu2m819gv4bdcp9558549pi3il Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@073614.4370 bu2m819gv4bdcp9558549pi3il Query : use flama_phc
20240607@073614.4372 bu2m819gv4bdcp9558549pi3il Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@081913.9947 rbddmo12nqob5pm4uto5cksjoo Query : use flama_phc
20240607@081913.9957 rbddmo12nqob5pm4uto5cksjoo Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@081914.4700 rbddmo12nqob5pm4uto5cksjoo Query : use flama_phc
20240607@081914.5000 rbddmo12nqob5pm4uto5cksjoo Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@083613.7685 somf2kd6s4c01u3emut5hh3h77 Query : use flama_phc
20240607@083613.7695 somf2kd6s4c01u3emut5hh3h77 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@083613.7781 somf2kd6s4c01u3emut5hh3h77 Query : use flama_phc
20240607@083613.7784 somf2kd6s4c01u3emut5hh3h77 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@091912.5214 gh7coprf5catifbs9lf4rildh9 Query : use flama_phc
20240607@091912.5219 gh7coprf5catifbs9lf4rildh9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@091912.5276 gh7coprf5catifbs9lf4rildh9 Query : use flama_phc
20240607@091912.5280 gh7coprf5catifbs9lf4rildh9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@093612.9319 ue70idsvakp470vfr6q46nqu8m Query : use flama_phc
20240607@093612.9343 ue70idsvakp470vfr6q46nqu8m Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@093612.9382 ue70idsvakp470vfr6q46nqu8m Query : use flama_phc
20240607@093612.9385 ue70idsvakp470vfr6q46nqu8m Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@095010.7470 225gfg9g5m13e88r7lbo1tuble Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@095010.7870 225gfg9g5m13e88r7lbo1tuble Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@095010.8810 225gfg9g5m13e88r7lbo1tuble Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='288';
20240607@095010.9190 225gfg9g5m13e88r7lbo1tuble Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='288';
20240607@095010.9540 225gfg9g5m13e88r7lbo1tuble Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='288';
20240607@095010.9670 225gfg9g5m13e88r7lbo1tuble Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='288';
20240607@095010.9940 225gfg9g5m13e88r7lbo1tuble Query : use flama_phc
20240607@095010.9980 225gfg9g5m13e88r7lbo1tuble Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@095010.1047 225gfg9g5m13e88r7lbo1tuble Query : use flama_phc
20240607@095010.1050 225gfg9g5m13e88r7lbo1tuble Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240607@095010.1134 225gfg9g5m13e88r7lbo1tuble Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.499.00.01'
20240607@095010.1282 225gfg9g5m13e88r7lbo1tuble Query : use flama_phc
20240607@095010.1285 225gfg9g5m13e88r7lbo1tuble Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240607@095010.1463 225gfg9g5m13e88r7lbo1tuble Query : use flama_phc
20240607@095010.1466 225gfg9g5m13e88r7lbo1tuble Query : select top 1 1 valor from td where td.ndoc = 39
20240607@095010.1545 225gfg9g5m13e88r7lbo1tuble Query : use flama_phc
20240607@095010.1593 225gfg9g5m13e88r7lbo1tuble 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')
20240607@101910.8456 gjgpr88mralrgksg06qh04r3kq Query : use flama_phc
20240607@101910.8463 gjgpr88mralrgksg06qh04r3kq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@101910.8487 gjgpr88mralrgksg06qh04r3kq Query : use flama_phc
20240607@101910.8491 gjgpr88mralrgksg06qh04r3kq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@102008.7399 f80nrbv4h4c708rcb8brgabhq9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@102008.7416 f80nrbv4h4c708rcb8brgabhq9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@102008.7448 f80nrbv4h4c708rcb8brgabhq9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='289';
20240607@102008.7490 f80nrbv4h4c708rcb8brgabhq9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='289';
20240607@102008.7505 f80nrbv4h4c708rcb8brgabhq9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='289';
20240607@102008.7519 f80nrbv4h4c708rcb8brgabhq9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='289';
20240607@102008.7543 f80nrbv4h4c708rcb8brgabhq9 Query : use flama_phc
20240607@102008.7557 f80nrbv4h4c708rcb8brgabhq9 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@102008.7600 f80nrbv4h4c708rcb8brgabhq9 Query : use flama_phc
20240607@102008.7604 f80nrbv4h4c708rcb8brgabhq9 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4743
20240607@102008.7730 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7891 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7913 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7924 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7958 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7970 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7985 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.7998 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8009 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8020 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8032 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8046 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8061 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8078 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8091 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8104 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8118 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8132 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8173 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8187 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8199 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8209 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8219 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8385 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8403 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8415 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8426 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8450 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8462 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8503 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8514 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8526 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8538 f80nrbv4h4c708rcb8brgabhq9 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'
20240607@102008.8549 f80nrbv4h4c708rcb8brgabhq9 Query : use flama_phc
20240607@102008.8552 f80nrbv4h4c708rcb8brgabhq9 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240607@102008.8568 f80nrbv4h4c708rcb8brgabhq9 Query : use flama_phc
20240607@102008.8571 f80nrbv4h4c708rcb8brgabhq9 Query : select top 1 1 valor from td where td.ndoc = 39
20240607@102008.8583 f80nrbv4h4c708rcb8brgabhq9 Query : use flama_phc
20240607@102008.8587 f80nrbv4h4c708rcb8brgabhq9 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')
20240607@102008.9190 n13q5j32lq9ki4ecvd75rk5c0c Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@102008.9204 n13q5j32lq9ki4ecvd75rk5c0c Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@102008.9223 n13q5j32lq9ki4ecvd75rk5c0c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='290';
20240607@102008.9300 n13q5j32lq9ki4ecvd75rk5c0c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='290';
20240607@102008.9315 n13q5j32lq9ki4ecvd75rk5c0c Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='290';
20240607@102008.9331 n13q5j32lq9ki4ecvd75rk5c0c Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='290';
20240607@102008.9372 n13q5j32lq9ki4ecvd75rk5c0c Query : use flama_phc
20240607@102008.9376 n13q5j32lq9ki4ecvd75rk5c0c Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@102008.9393 n13q5j32lq9ki4ecvd75rk5c0c Query : use flama_phc
20240607@102008.9396 n13q5j32lq9ki4ecvd75rk5c0c Query : select no, estab,szadrsdesc from szadrs where u_coddest=4743
20240607@102008.9430 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9459 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9475 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9486 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9496 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9514 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9533 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9566 n13q5j32lq9ki4ecvd75rk5c0c 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'
20240607@102008.9579 n13q5j32lq9ki4ecvd75rk5c0c Query : use flama_phc
20240607@102008.9583 n13q5j32lq9ki4ecvd75rk5c0c Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240607@102008.9598 n13q5j32lq9ki4ecvd75rk5c0c Query : use flama_phc
20240607@102008.9601 n13q5j32lq9ki4ecvd75rk5c0c Query : select top 1 1 valor from td where td.ndoc = 39
20240607@102008.9613 n13q5j32lq9ki4ecvd75rk5c0c Query : use flama_phc
20240607@102008.9617 n13q5j32lq9ki4ecvd75rk5c0c 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')
20240607@103610.9575 nbvnl7cho4hdkmq32u60s2ms57 Query : use flama_phc
20240607@103610.9580 nbvnl7cho4hdkmq32u60s2ms57 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@103610.9598 nbvnl7cho4hdkmq32u60s2ms57 Query : use flama_phc
20240607@103610.9600 nbvnl7cho4hdkmq32u60s2ms57 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@104731.3893 qlt3oksesr1puiaeregftgbjn7 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@104731.3908 qlt3oksesr1puiaeregftgbjn7 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@104731.3923 qlt3oksesr1puiaeregftgbjn7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='291';
20240607@104731.3961 qlt3oksesr1puiaeregftgbjn7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='291';
20240607@104731.3975 qlt3oksesr1puiaeregftgbjn7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='291';
20240607@104731.3987 qlt3oksesr1puiaeregftgbjn7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='291';
20240607@104731.3999 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104731.4002 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@104731.4016 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.646.00.01'
20240607@104731.4134 qlt3oksesr1puiaeregftgbjn7 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 = 2400055 and bi.ref ='324.646.00.01' and bi.lordem =10000
20240607@104731.4462 qlt3oksesr1puiaeregftgbjn7 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 = 'cps24011555062,367000003 ' 
20240607@104731.4762 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104731.4766 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 1 valor from ts where ts.ndos = 61
20240607@104731.4838 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104731.4841 qlt3oksesr1puiaeregftgbjn7 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')
20240607@104731.4863 qlt3oksesr1puiaeregftgbjn7 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
20240607@104731.5023 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104731.5026 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20240607@104731.5212 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104731.5217 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from ts where ndos = 61
20240607@104731.5299 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104731.5615 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240607@104731.5690 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104731.5703 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240607@104731.5710 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104731.5721 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240607@104731.5728 qlt3oksesr1puiaeregftgbjn7 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
20240607@104731.5851 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240607@104731.5943 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240607@104731.5959 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104731.5962 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20240607@104731.6092 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104731.6107 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240607@104731.7224 qlt3oksesr1puiaeregftgbjn7 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6662d954916662d73391',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240607@104731.7291 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104731.7307 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240607@104731.7314 qlt3oksesr1puiaeregftgbjn7 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6662d954916662d73391','--','bo',7.4184636118598382749 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240607@104731.7493 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104731.7507 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240607@104731.7514 qlt3oksesr1puiaeregftgbjn7 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 ('aut6662d954916662d73391','guia r. fornecedor','2024-06-07',61,2401636,?,?,?,?,?,?,?,?,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')
20240607@104732.5709 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104732.5713 qlt3oksesr1puiaeregftgbjn7 Query : select st.usalote valor from st where st.ref = '324.646.00.01'
20240607@104732.5829 qlt3oksesr1puiaeregftgbjn7 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'
20240607@104732.6002 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104732.6015 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240607@104732.6027 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104732.6038 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240607@104732.6045 qlt3oksesr1puiaeregftgbjn7 Query : select sestamp valor from se where ref ='324.646.00.01' and lote = 'r2400055100a'
20240607@104732.6100 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104732.6111 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240607@104732.6118 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104732.6129 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240607@104732.6136 qlt3oksesr1puiaeregftgbjn7 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6662d803276662d73495',?,?,'20240607',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240607@104732.6641 qlt3oksesr1puiaeregftgbjn7 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240607@104732.6681 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104732.6696 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240607@104732.6703 qlt3oksesr1puiaeregftgbjn7 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6662d436006662d734a3','aut6662d954916662d73391',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 = 'aut6662d954916662d73391'
20240607@104732.6865 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@104732.6880 qlt3oksesr1puiaeregftgbjn7 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240607@104732.6892 qlt3oksesr1puiaeregftgbjn7 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 'aut6662d436006662d734a3',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.84,14.84*200.48,14.84,14.84*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,14.84*1428,14.84*1428*200.48 ,18.322000,18.322000*200.48 ,18.322000,18.322000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,14.84,14.84*200.48,14.84*1428,14.84*1428*200.48,'cps24011555062,367000003 ',110.09,110.09*1428,110.09,110.09*1428,?,?,?,4 from bo bo where bo.bostamp = 'aut6662d954916662d73391'
20240607@104746.4905 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104746.4910 qlt3oksesr1puiaeregftgbjn7 Query : declare @bostamp varchar(25) = 'aut6662d954916662d73391' ,@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 
20240607@104758.4040 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104758.4044 qlt3oksesr1puiaeregftgbjn7 Query : select 1 valor from bo where bo.bostamp = 'aut6662d954916662d73391'
20240607@104758.4147 qlt3oksesr1puiaeregftgbjn7 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) = 'aut6662d954916662d73391' 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 
20240607@104800.5675 qlt3oksesr1puiaeregftgbjn7 Query : use flama_phc
20240607@104800.5678 qlt3oksesr1puiaeregftgbjn7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@104800.5692 qlt3oksesr1puiaeregftgbjn7 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='291';
20240607@104800.5705 qlt3oksesr1puiaeregftgbjn7 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='291';
20240607@111913.6371 bkpkl6in7bo4muq22tf09osedk Query : use flama_phc
20240607@111913.6376 bkpkl6in7bo4muq22tf09osedk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@111913.6465 bkpkl6in7bo4muq22tf09osedk Query : use flama_phc
20240607@111913.6469 bkpkl6in7bo4muq22tf09osedk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@113613.6299 qev793uc5mj4tie745cof1vtcv Query : use flama_phc
20240607@113613.6307 qev793uc5mj4tie745cof1vtcv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@113613.6507 qev793uc5mj4tie745cof1vtcv Query : use flama_phc
20240607@113613.6586 qev793uc5mj4tie745cof1vtcv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@121011.4855 29d4a7gii21k72e08vph7akuap Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@121011.4871 29d4a7gii21k72e08vph7akuap Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@121011.4887 29d4a7gii21k72e08vph7akuap Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='292';
20240607@121011.4929 29d4a7gii21k72e08vph7akuap Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='292';
20240607@121011.4942 29d4a7gii21k72e08vph7akuap Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='292';
20240607@121011.4953 29d4a7gii21k72e08vph7akuap Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='292';
20240607@121011.4964 29d4a7gii21k72e08vph7akuap Query : use flama_phc
20240607@121011.4968 29d4a7gii21k72e08vph7akuap Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@121011.4982 29d4a7gii21k72e08vph7akuap Query : use flama_phc
20240607@121011.4985 29d4a7gii21k72e08vph7akuap Query : select no, estab,szadrsdesc from szadrs where u_coddest=2915
20240607@121011.5073 29d4a7gii21k72e08vph7akuap 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'
20240607@121011.5274 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.4970.00.1' and bi.lordem =1
20240607@121011.5890 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4930.00.1'
20240607@121011.6056 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.4930.00.1' and bi.lordem =2
20240607@121011.6393 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.966.00.01'
20240607@121011.6552 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.966.00.01' and bi.lordem =3
20240607@121011.8044 29d4a7gii21k72e08vph7akuap 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'
20240607@121011.8303 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.670.00.01' and bi.lordem =4
20240607@121011.8652 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.969.00.01'
20240607@121011.8813 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.969.00.01' and bi.lordem =5
20240607@121011.9240 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2041.00.1'
20240607@121011.9457 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.2041.00.1' and bi.lordem =6
20240607@121011.9795 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4963.00.1'
20240607@121011.9955 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.4963.00.1' and bi.lordem =7
20240607@121012.3030 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.642.00.01'
20240607@121012.4720 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.642.00.01' and bi.lordem =8
20240607@121012.8450 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2224.00.1'
20240607@121012.1038 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.2224.00.1' and bi.lordem =9
20240607@121012.1419 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5343.00.1'
20240607@121012.1606 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.5343.00.1' and bi.lordem =10
20240607@121012.1956 29d4a7gii21k72e08vph7akuap 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'
20240607@121012.2165 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1684.00.1' and bi.lordem =11
20240607@121012.2525 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1805.00.1'
20240607@121012.2870 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1805.00.1' and bi.lordem =12
20240607@121012.3580 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1884.00.1'
20240607@121012.3764 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1884.00.1' and bi.lordem =13
20240607@121012.4180 29d4a7gii21k72e08vph7akuap 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'
20240607@121012.4340 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.945.00.01' and bi.lordem =14
20240607@121012.4678 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.698.00.01'
20240607@121012.4845 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.698.00.01' and bi.lordem =15
20240607@121012.5197 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5396.00.1'
20240607@121012.5370 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.5396.00.1' and bi.lordem =16
20240607@121012.5734 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9902.00.1'
20240607@121012.5899 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='328.9902.00.1' and bi.lordem =17
20240607@121012.6233 29d4a7gii21k72e08vph7akuap 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'
20240607@121012.6398 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1643.00.1' and bi.lordem =18
20240607@121012.6733 29d4a7gii21k72e08vph7akuap 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'
20240607@121012.6744 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1643.00.1' and bi.lordem =18
20240607@121012.6751 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2031.00.1'
20240607@121012.6921 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.2031.00.1' and bi.lordem =19
20240607@121012.7273 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1407.00.1'
20240607@121012.7447 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1407.00.1' and bi.lordem =20
20240607@121012.8181 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240607@121012.8898 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1832.00.2' and bi.lordem =21
20240607@121012.9291 29d4a7gii21k72e08vph7akuap Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1834.00.1'
20240607@121012.9470 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.1834.00.1' and bi.lordem =22
20240607@121013.9110 29d4a7gii21k72e08vph7akuap 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'
20240607@121013.1089 29d4a7gii21k72e08vph7akuap Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2033 and bo.obrano = 2403354 and bi.ref ='324.2232.00.1' and bi.lordem =23
20240607@121013.1414 29d4a7gii21k72e08vph7akuap Query : use flama_phc
20240607@121013.1417 29d4a7gii21k72e08vph7akuap Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240607@121013.1431 29d4a7gii21k72e08vph7akuap Query : use flama_phc
20240607@121013.1434 29d4a7gii21k72e08vph7akuap Query : select top 1 1 valor from td where td.ndoc = 39
20240607@121013.1447 29d4a7gii21k72e08vph7akuap Query : use flama_phc
20240607@121013.1450 29d4a7gii21k72e08vph7akuap 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')
20240607@121911.8284 ql9thma43b18mhl0iigsv1525a Query : use flama_phc
20240607@121911.8289 ql9thma43b18mhl0iigsv1525a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@121911.8306 ql9thma43b18mhl0iigsv1525a Query : use flama_phc
20240607@121911.8309 ql9thma43b18mhl0iigsv1525a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@123612.4788 jdac6s7hkr9v9srr941kdgintd Query : use flama_phc
20240607@123612.4793 jdac6s7hkr9v9srr941kdgintd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@123612.4811 jdac6s7hkr9v9srr941kdgintd Query : use flama_phc
20240607@123612.4813 jdac6s7hkr9v9srr941kdgintd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@131916.3561 be2aa9f8q4u3fkav2p9iu3jmij Query : use flama_phc
20240607@131916.3566 be2aa9f8q4u3fkav2p9iu3jmij Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@131916.3584 be2aa9f8q4u3fkav2p9iu3jmij Query : use flama_phc
20240607@131916.3587 be2aa9f8q4u3fkav2p9iu3jmij Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@133616.7859 4sr955volb42500erhek415dru Query : use flama_phc
20240607@133616.7864 4sr955volb42500erhek415dru Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@133616.7975 4sr955volb42500erhek415dru Query : use flama_phc
20240607@133616.7987 4sr955volb42500erhek415dru Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@141914.5107 ts6ftf3riiq5q9p7o0mb37eo8v Query : use flama_phc
20240607@141914.5161 ts6ftf3riiq5q9p7o0mb37eo8v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@141914.5639 ts6ftf3riiq5q9p7o0mb37eo8v Query : use flama_phc
20240607@141914.5695 ts6ftf3riiq5q9p7o0mb37eo8v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@143614.8763 q9bjccpnft4iqhi936ri4ihbbq Query : use flama_phc
20240607@143614.8768 q9bjccpnft4iqhi936ri4ihbbq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@143614.8786 q9bjccpnft4iqhi936ri4ihbbq Query : use flama_phc
20240607@143614.8789 q9bjccpnft4iqhi936ri4ihbbq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@151911.3382 numbql66u2kj5muujfm37ib8em Query : use flama_phc
20240607@151911.3393 numbql66u2kj5muujfm37ib8em Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@151911.3450 numbql66u2kj5muujfm37ib8em Query : use flama_phc
20240607@151911.3469 numbql66u2kj5muujfm37ib8em Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@153611.1687 n5b3ju9coj7dlrb0oohtqfaee4 Query : use flama_phc
20240607@153611.1692 n5b3ju9coj7dlrb0oohtqfaee4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@153611.1709 n5b3ju9coj7dlrb0oohtqfaee4 Query : use flama_phc
20240607@153611.1712 n5b3ju9coj7dlrb0oohtqfaee4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@160312.4228 207ith578rsnekq398e0jtad47 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@160312.4255 207ith578rsnekq398e0jtad47 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@160312.4304 207ith578rsnekq398e0jtad47 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='293';
20240607@160312.4348 207ith578rsnekq398e0jtad47 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='293';
20240607@160312.4360 207ith578rsnekq398e0jtad47 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='293';
20240607@160312.4372 207ith578rsnekq398e0jtad47 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='293';
20240607@160312.4386 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.4389 207ith578rsnekq398e0jtad47 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@160312.4408 207ith578rsnekq398e0jtad47 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.682.00.01'
20240607@160312.4518 207ith578rsnekq398e0jtad47 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 = 2400059 and bi.ref ='324.682.00.01' and bi.lordem =20000
20240607@160312.4855 207ith578rsnekq398e0jtad47 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 = 'cps24011555899,240000002 ' 
20240607@160312.5170 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.5173 207ith578rsnekq398e0jtad47 Query : select top 1 1 valor from ts where ts.ndos = 61
20240607@160312.5192 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.5194 207ith578rsnekq398e0jtad47 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')
20240607@160312.5239 207ith578rsnekq398e0jtad47 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
20240607@160312.5268 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.5272 207ith578rsnekq398e0jtad47 Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20240607@160312.5299 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.5302 207ith578rsnekq398e0jtad47 Query : select 1 valor from ts where ndos = 61
20240607@160312.5323 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.5356 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240607@160312.5403 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.5417 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240607@160312.5423 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.5434 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240607@160312.5440 207ith578rsnekq398e0jtad47 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
20240607@160312.5461 207ith578rsnekq398e0jtad47 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240607@160312.5486 207ith578rsnekq398e0jtad47 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240607@160312.5502 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.5505 207ith578rsnekq398e0jtad47 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20240607@160312.5664 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.5714 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240607@160312.5798 207ith578rsnekq398e0jtad47 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66632635636663213086',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240607@160312.5932 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.6072 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240607@160312.6084 207ith578rsnekq398e0jtad47 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut66632635636663213086','--','bo',7.4167083541770885442 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240607@160312.6091 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.6106 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240607@160312.6144 207ith578rsnekq398e0jtad47 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 ('aut66632635636663213086','guia r. fornecedor','2024-06-07',61,2401652,?,?,?,?,?,?,?,?,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')
20240607@160312.6804 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160312.6807 207ith578rsnekq398e0jtad47 Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20240607@160312.6830 207ith578rsnekq398e0jtad47 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.682.00.01'
20240607@160312.6982 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.6994 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240607@160312.7008 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.7021 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240607@160312.7028 207ith578rsnekq398e0jtad47 Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400059200a'
20240607@160312.7037 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.7050 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240607@160312.7056 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.7068 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240607@160312.7074 207ith578rsnekq398e0jtad47 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666322988566632130ac',?,?,'20240607',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240607@160312.7880 207ith578rsnekq398e0jtad47 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240607@160312.7898 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.7911 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240607@160312.7917 207ith578rsnekq398e0jtad47 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut666327841466632130c0','aut66632635636663213086',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 = 'aut66632635636663213086'
20240607@160312.8095 207ith578rsnekq398e0jtad47 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@160312.8110 207ith578rsnekq398e0jtad47 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240607@160312.8121 207ith578rsnekq398e0jtad47 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 'aut666327841466632130c0',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 1030, 1030*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,19.99,19.99*200.48,19.99,19.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,19.99*1030,19.99*1030*200.48 ,26.826000,26.826000*200.48 ,26.826000,26.826000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,19.99,19.99*200.48,19.99*1030,19.99*1030*200.48,'cps24011555899,240000002 ',148.26,148.26*1030,148.26,148.26*1030,?,?,?,4 from bo bo where bo.bostamp = 'aut66632635636663213086'
20240607@160328.4630 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160328.5297 207ith578rsnekq398e0jtad47 Query : declare @bostamp varchar(25) = 'aut66632635636663213086' ,@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 
20240607@160337.1446 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160337.1455 207ith578rsnekq398e0jtad47 Query : select 1 valor from bo where bo.bostamp = 'aut66632635636663213086'
20240607@160337.1605 207ith578rsnekq398e0jtad47 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) = 'aut66632635636663213086' 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 
20240607@160339.6049 207ith578rsnekq398e0jtad47 Query : use flama_phc
20240607@160339.6052 207ith578rsnekq398e0jtad47 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@160339.6063 207ith578rsnekq398e0jtad47 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='293';
20240607@160339.6077 207ith578rsnekq398e0jtad47 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='293';
20240607@161915.3193 1scv2s3bu70i8d1ejdf02jfdj6 Query : use flama_phc
20240607@161915.3199 1scv2s3bu70i8d1ejdf02jfdj6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@161915.3217 1scv2s3bu70i8d1ejdf02jfdj6 Query : use flama_phc
20240607@161915.3221 1scv2s3bu70i8d1ejdf02jfdj6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@163615.3318 gudnkt42029qo4j6d60pb9forh Query : use flama_phc
20240607@163615.3664 gudnkt42029qo4j6d60pb9forh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@163615.4232 gudnkt42029qo4j6d60pb9forh Query : use flama_phc
20240607@163615.4269 gudnkt42029qo4j6d60pb9forh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@171914.7160 7m0njobebogljm63sidpd010fv Query : use flama_phc
20240607@171914.7165 7m0njobebogljm63sidpd010fv Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@171914.7185 7m0njobebogljm63sidpd010fv Query : use flama_phc
20240607@171914.7189 7m0njobebogljm63sidpd010fv Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@173614.8362 eu9t9o9pnl43uddd5tcp036id1 Query : use flama_phc
20240607@173614.8367 eu9t9o9pnl43uddd5tcp036id1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@173614.8385 eu9t9o9pnl43uddd5tcp036id1 Query : use flama_phc
20240607@173614.8388 eu9t9o9pnl43uddd5tcp036id1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@180413.4249 ml1nv6v77k7uiil5o1apht1okp Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240607@180413.4264 ml1nv6v77k7uiil5o1apht1okp Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240607@180413.4288 ml1nv6v77k7uiil5o1apht1okp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='294';
20240607@180413.4339 ml1nv6v77k7uiil5o1apht1okp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='294';
20240607@180413.4351 ml1nv6v77k7uiil5o1apht1okp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='294';
20240607@180413.4363 ml1nv6v77k7uiil5o1apht1okp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='294';
20240607@180413.4374 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180413.4390 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240607@180413.4413 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.645.00.01'
20240607@180413.4520 ml1nv6v77k7uiil5o1apht1okp 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 = 2400055 and bi.ref ='324.645.00.01' and bi.lordem =20000
20240607@180413.4858 ml1nv6v77k7uiil5o1apht1okp 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 = 'cps24011555061,998000002 ' 
20240607@180413.5230 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180413.5234 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 1 valor from ts where ts.ndos = 61
20240607@180413.5305 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180413.5308 ml1nv6v77k7uiil5o1apht1okp 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')
20240607@180413.5339 ml1nv6v77k7uiil5o1apht1okp 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
20240607@180413.5460 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180413.5464 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 ~inactivo valor from fl where no = '202090' and estab = 00 order by inactivo desc
20240607@180413.5540 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180413.5543 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from ts where ndos = 61
20240607@180413.5608 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180413.5990 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20240607@180413.6043 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180413.6055 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20240607@180413.6062 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180413.6073 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20240607@180413.6080 ml1nv6v77k7uiil5o1apht1okp 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
20240607@180413.6266 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240607@180413.6367 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2024 order by obrano desc
20240607@180413.6384 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180413.6387 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202090' and estab=00
20240607@180413.6468 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180413.6482 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20240607@180413.6514 ml1nv6v77k7uiil5o1apht1okp Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666332389566633d8d9b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240607@180413.6568 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180413.6581 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20240607@180413.6588 ml1nv6v77k7uiil5o1apht1okp Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666332389566633d8d9b','--','bo',7.4184636118598382749 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240607@180413.6778 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180413.6794 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20240607@180413.6801 ml1nv6v77k7uiil5o1apht1okp 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 ('aut666332389566633d8d9b','guia r. fornecedor','2024-06-07',61,2401653,?,?,?,?,?,?,?,?,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')
20240607@180414.5152 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180414.5156 ml1nv6v77k7uiil5o1apht1okp Query : select st.usalote valor from st where st.ref = '324.645.00.01'
20240607@180414.5180 ml1nv6v77k7uiil5o1apht1okp 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'
20240607@180414.5333 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180414.5349 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20240607@180414.5362 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180414.5374 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20240607@180414.5381 ml1nv6v77k7uiil5o1apht1okp Query : select sestamp valor from se where ref ='324.645.00.01' and lote = 'r2400055200a'
20240607@180414.5391 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180414.5404 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20240607@180414.5413 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180414.5425 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20240607@180414.5433 ml1nv6v77k7uiil5o1apht1okp Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut666339564866633d8e84',?,?,'20240607',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20240607@180414.6369 ml1nv6v77k7uiil5o1apht1okp Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240607@180414.6408 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180414.6421 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20240607@180414.6429 ml1nv6v77k7uiil5o1apht1okp Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut666337312566633d8e9c','aut666332389566633d8d9b',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 = 'aut666332389566633d8d9b'
20240607@180414.6757 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240607@180414.6814 ml1nv6v77k7uiil5o1apht1okp Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20240607@180414.6828 ml1nv6v77k7uiil5o1apht1okp 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 'aut666337312566633d8e9c',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.84,14.84*200.48,14.84,14.84*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,14.84*1428,14.84*1428*200.48 ,18.267000,18.267000*200.48 ,18.267000,18.267000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,14.84,14.84*200.48,14.84*1428,14.84*1428*200.48,'cps24011555061,998000002 ',110.09,110.09*1428,110.09,110.09*1428,?,?,?,4 from bo bo where bo.bostamp = 'aut666332389566633d8d9b'
20240607@180431.4888 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180431.4893 ml1nv6v77k7uiil5o1apht1okp Query : declare @bostamp varchar(25) = 'aut666332389566633d8d9b' ,@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 
20240607@180437.4847 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180437.4851 ml1nv6v77k7uiil5o1apht1okp Query : select 1 valor from bo where bo.bostamp = 'aut666332389566633d8d9b'
20240607@180437.4871 ml1nv6v77k7uiil5o1apht1okp 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) = 'aut666332389566633d8d9b' 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 
20240607@180437.8302 ml1nv6v77k7uiil5o1apht1okp Query : use flama_phc
20240607@180437.8306 ml1nv6v77k7uiil5o1apht1okp Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@180437.8318 ml1nv6v77k7uiil5o1apht1okp Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='294';
20240607@180437.8332 ml1nv6v77k7uiil5o1apht1okp Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='294';
20240607@181911.5142 kj7rpu6d17d992pn895f0cqs71 Query : use flama_phc
20240607@181911.5147 kj7rpu6d17d992pn895f0cqs71 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@181911.5165 kj7rpu6d17d992pn895f0cqs71 Query : use flama_phc
20240607@181911.5168 kj7rpu6d17d992pn895f0cqs71 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@183611.8576 e81tduv29tdube1rf4rpqbq0tq Query : use flama_phc
20240607@183611.8583 e81tduv29tdube1rf4rpqbq0tq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@183611.8602 e81tduv29tdube1rf4rpqbq0tq Query : use flama_phc
20240607@183611.8605 e81tduv29tdube1rf4rpqbq0tq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@191927.4771 ghel848dg40p7rfidufco2fkju Query : use flama_phc
20240607@191927.4794 ghel848dg40p7rfidufco2fkju Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@191927.4811 ghel848dg40p7rfidufco2fkju Query : use flama_phc
20240607@191927.4813 ghel848dg40p7rfidufco2fkju Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@193627.8514 a204f1putkd6jkfkm4sf92002d Query : use flama_phc
20240607@193627.8519 a204f1putkd6jkfkm4sf92002d Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@193627.8538 a204f1putkd6jkfkm4sf92002d Query : use flama_phc
20240607@193627.8541 a204f1putkd6jkfkm4sf92002d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@201914.3122 i9ga8iiebb08gqt0tvovtris9p Query : use flama_phc
20240607@201914.3127 i9ga8iiebb08gqt0tvovtris9p Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@201914.3144 i9ga8iiebb08gqt0tvovtris9p Query : use flama_phc
20240607@201914.3147 i9ga8iiebb08gqt0tvovtris9p Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@203614.3067 8ql05ca12j1h8uaq28je9085j9 Query : use flama_phc
20240607@203614.3072 8ql05ca12j1h8uaq28je9085j9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@203614.3090 8ql05ca12j1h8uaq28je9085j9 Query : use flama_phc
20240607@203614.3093 8ql05ca12j1h8uaq28je9085j9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@211914.3050 1s90t20k43drdd12m3sg356c85 Query : use flama_phc
20240607@211914.3160 1s90t20k43drdd12m3sg356c85 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@211914.3350 1s90t20k43drdd12m3sg356c85 Query : use flama_phc
20240607@211914.3380 1s90t20k43drdd12m3sg356c85 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@213614.7640 n27shreki757e47jrqfr8r0eee Query : use flama_phc
20240607@213614.7700 n27shreki757e47jrqfr8r0eee Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@213614.7890 n27shreki757e47jrqfr8r0eee Query : use flama_phc
20240607@213614.7920 n27shreki757e47jrqfr8r0eee Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@221918.6547 2elok1e4emltl8ala10co7rnep Query : use flama_phc
20240607@221918.6552 2elok1e4emltl8ala10co7rnep Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@221918.6572 2elok1e4emltl8ala10co7rnep Query : use flama_phc
20240607@221918.6575 2elok1e4emltl8ala10co7rnep Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@223619.4790 js3ciphklctnau2u8vcr76ps5o Query : use flama_phc
20240607@223619.4860 js3ciphklctnau2u8vcr76ps5o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@223619.5070 js3ciphklctnau2u8vcr76ps5o Query : use flama_phc
20240607@223619.5100 js3ciphklctnau2u8vcr76ps5o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@231913.3730 1rduk5052mvf6jqm3h8v3a11r5 Query : use flama_phc
20240607@231913.3840 1rduk5052mvf6jqm3h8v3a11r5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@231913.4040 1rduk5052mvf6jqm3h8v3a11r5 Query : use flama_phc
20240607@231913.4070 1rduk5052mvf6jqm3h8v3a11r5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240607@233613.1675 tgmbm01i0200cfqo2capqpjgrl Query : use flama_phc
20240607@233613.1789 tgmbm01i0200cfqo2capqpjgrl Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240607@233613.2585 tgmbm01i0200cfqo2capqpjgrl Query : use flama_phc
20240607@233613.2588 tgmbm01i0200cfqo2capqpjgrl Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@071915.8306 555gncq7f531js0nn8cdt07om4 Query : use flama_phc
20240608@071915.8310 555gncq7f531js0nn8cdt07om4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@071915.8372 555gncq7f531js0nn8cdt07om4 Query : use flama_phc
20240608@071915.8375 555gncq7f531js0nn8cdt07om4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@073632.6655 e20t1qib7u5rhtd3b09gucr36a Query : use flama_phc
20240608@073632.6660 e20t1qib7u5rhtd3b09gucr36a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@073632.6678 e20t1qib7u5rhtd3b09gucr36a Query : use flama_phc
20240608@073632.6681 e20t1qib7u5rhtd3b09gucr36a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@081912.9011 ek0eqcd8co236dkrb7b73vi4h8 Query : use flama_phc
20240608@081912.9016 ek0eqcd8co236dkrb7b73vi4h8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@081912.9070 ek0eqcd8co236dkrb7b73vi4h8 Query : use flama_phc
20240608@081912.9073 ek0eqcd8co236dkrb7b73vi4h8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@083612.8187 jnpd6l386g0963bcj55gdmj8mo Query : use flama_phc
20240608@083612.8192 jnpd6l386g0963bcj55gdmj8mo Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@083612.8211 jnpd6l386g0963bcj55gdmj8mo Query : use flama_phc
20240608@083612.8214 jnpd6l386g0963bcj55gdmj8mo Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@091912.3188 ml07ilqlv2h08roatj1r8rguvc Query : use flama_phc
20240608@091912.3193 ml07ilqlv2h08roatj1r8rguvc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@091912.3247 ml07ilqlv2h08roatj1r8rguvc Query : use flama_phc
20240608@091912.3250 ml07ilqlv2h08roatj1r8rguvc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@093612.6156 0b7rq44miu505ncup72dsauk5l Query : use flama_phc
20240608@093612.6161 0b7rq44miu505ncup72dsauk5l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@093612.6183 0b7rq44miu505ncup72dsauk5l Query : use flama_phc
20240608@093612.6186 0b7rq44miu505ncup72dsauk5l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@101911.6171 pbnnlj9s3c9euvjc6sgm6pigvm Query : use flama_phc
20240608@101911.6175 pbnnlj9s3c9euvjc6sgm6pigvm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@101911.6194 pbnnlj9s3c9euvjc6sgm6pigvm Query : use flama_phc
20240608@101911.6196 pbnnlj9s3c9euvjc6sgm6pigvm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@103611.4043 t0ruod5vnubom4ag28gd6732bs Query : use flama_phc
20240608@103611.4048 t0ruod5vnubom4ag28gd6732bs Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@103611.4065 t0ruod5vnubom4ag28gd6732bs Query : use flama_phc
20240608@103611.4068 t0ruod5vnubom4ag28gd6732bs Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@111912.2395 if303vqsd7v7gv3n73dfe3ml8d Query : use flama_phc
20240608@111912.2400 if303vqsd7v7gv3n73dfe3ml8d Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@111912.2417 if303vqsd7v7gv3n73dfe3ml8d Query : use flama_phc
20240608@111912.2420 if303vqsd7v7gv3n73dfe3ml8d Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@113612.4849 381p7kjofunud6g696lhqkpg6k Query : use flama_phc
20240608@113612.4855 381p7kjofunud6g696lhqkpg6k Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@113612.4876 381p7kjofunud6g696lhqkpg6k Query : use flama_phc
20240608@113612.4879 381p7kjofunud6g696lhqkpg6k Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@121913.7453 aq4thl96m19i2usuujmb3uuf7e Query : use flama_phc
20240608@121913.7457 aq4thl96m19i2usuujmb3uuf7e Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@121913.7477 aq4thl96m19i2usuujmb3uuf7e Query : use flama_phc
20240608@121913.7480 aq4thl96m19i2usuujmb3uuf7e Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@123613.6914 j1v8cs38oo7qiih1j45da3n1f4 Query : use flama_phc
20240608@123613.6919 j1v8cs38oo7qiih1j45da3n1f4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@123613.6940 j1v8cs38oo7qiih1j45da3n1f4 Query : use flama_phc
20240608@123613.6943 j1v8cs38oo7qiih1j45da3n1f4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@131912.4213 02e2qvad2b3dnv18ra2pjtp373 Query : use flama_phc
20240608@131912.4217 02e2qvad2b3dnv18ra2pjtp373 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@131912.4236 02e2qvad2b3dnv18ra2pjtp373 Query : use flama_phc
20240608@131912.4238 02e2qvad2b3dnv18ra2pjtp373 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@133611.5405 rv30ru64j38f4kb7l74jnb45c1 Query : use flama_phc
20240608@133611.5410 rv30ru64j38f4kb7l74jnb45c1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@133611.5432 rv30ru64j38f4kb7l74jnb45c1 Query : use flama_phc
20240608@133611.5435 rv30ru64j38f4kb7l74jnb45c1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@141910.9433 ru65gcnogqo3rgnrour8b5vstn Query : use flama_phc
20240608@141910.9438 ru65gcnogqo3rgnrour8b5vstn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@141910.9456 ru65gcnogqo3rgnrour8b5vstn Query : use flama_phc
20240608@141910.9458 ru65gcnogqo3rgnrour8b5vstn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@143610.8915 0iiv36u2jl4hgv2ga82iqtqet0 Query : use flama_phc
20240608@143610.8920 0iiv36u2jl4hgv2ga82iqtqet0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@143610.8939 0iiv36u2jl4hgv2ga82iqtqet0 Query : use flama_phc
20240608@143610.8942 0iiv36u2jl4hgv2ga82iqtqet0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@151910.5186 ltoairuqfbosbvphh3hjeg4mli Query : use flama_phc
20240608@151910.5191 ltoairuqfbosbvphh3hjeg4mli Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@151910.5208 ltoairuqfbosbvphh3hjeg4mli Query : use flama_phc
20240608@151910.5212 ltoairuqfbosbvphh3hjeg4mli Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@153611.3680 gho9gjdno3dm72aihkisgcnefk Query : use flama_phc
20240608@153611.3685 gho9gjdno3dm72aihkisgcnefk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@153611.3712 gho9gjdno3dm72aihkisgcnefk Query : use flama_phc
20240608@153611.3719 gho9gjdno3dm72aihkisgcnefk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@161912.5060 qm02r4u3hisb35hl4dafgm9675 Query : use flama_phc
20240608@161912.5065 qm02r4u3hisb35hl4dafgm9675 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@161912.5086 qm02r4u3hisb35hl4dafgm9675 Query : use flama_phc
20240608@161912.5090 qm02r4u3hisb35hl4dafgm9675 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@163612.9425 f9fhte5gov8gjfca9ipehhbjt3 Query : use flama_phc
20240608@163612.9432 f9fhte5gov8gjfca9ipehhbjt3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@163612.9452 f9fhte5gov8gjfca9ipehhbjt3 Query : use flama_phc
20240608@163612.9455 f9fhte5gov8gjfca9ipehhbjt3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@171911.4376 6s9kmes4nja36v240pos10cck7 Query : use flama_phc
20240608@171911.4395 6s9kmes4nja36v240pos10cck7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@171911.4415 6s9kmes4nja36v240pos10cck7 Query : use flama_phc
20240608@171911.4418 6s9kmes4nja36v240pos10cck7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@173611.4984 1tio1ahllikgjosgt4fnc4udhh Query : use flama_phc
20240608@173611.4989 1tio1ahllikgjosgt4fnc4udhh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@173611.5009 1tio1ahllikgjosgt4fnc4udhh Query : use flama_phc
20240608@173611.5012 1tio1ahllikgjosgt4fnc4udhh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@181915.5257 vdmo3se7fea2ibvvl8se02n73p Query : use flama_phc
20240608@181915.5263 vdmo3se7fea2ibvvl8se02n73p Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@181915.5280 vdmo3se7fea2ibvvl8se02n73p Query : use flama_phc
20240608@181915.5283 vdmo3se7fea2ibvvl8se02n73p Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@183615.6036 hihf3i35stbk32gq9oreesncoi Query : use flama_phc
20240608@183615.6042 hihf3i35stbk32gq9oreesncoi Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@183615.6059 hihf3i35stbk32gq9oreesncoi Query : use flama_phc
20240608@183615.6062 hihf3i35stbk32gq9oreesncoi Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@191914.8697 6f90r5fsc3n3qheho6gfc06vth Query : use flama_phc
20240608@191914.8702 6f90r5fsc3n3qheho6gfc06vth Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@191914.8720 6f90r5fsc3n3qheho6gfc06vth Query : use flama_phc
20240608@191914.8722 6f90r5fsc3n3qheho6gfc06vth Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@193614.4867 c7ec9v7q112t67ioolfi0jlcvn Query : use flama_phc
20240608@193614.4872 c7ec9v7q112t67ioolfi0jlcvn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@193614.4892 c7ec9v7q112t67ioolfi0jlcvn Query : use flama_phc
20240608@193614.4895 c7ec9v7q112t67ioolfi0jlcvn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@201916.9194 qlhrrmorqaocd4h7dq13lh2ht6 Query : use flama_phc
20240608@201916.9199 qlhrrmorqaocd4h7dq13lh2ht6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@201916.9217 qlhrrmorqaocd4h7dq13lh2ht6 Query : use flama_phc
20240608@201916.9220 qlhrrmorqaocd4h7dq13lh2ht6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@203614.7950 ulclttfoe04psqkt37kjlokecb Query : use flama_phc
20240608@203614.8390 ulclttfoe04psqkt37kjlokecb Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@203614.8750 ulclttfoe04psqkt37kjlokecb Query : use flama_phc
20240608@203614.8780 ulclttfoe04psqkt37kjlokecb Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@211914.6689 3icprje5jcs2fs2v8n3mqrek3q Query : use flama_phc
20240608@211914.6693 3icprje5jcs2fs2v8n3mqrek3q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@211914.6712 3icprje5jcs2fs2v8n3mqrek3q Query : use flama_phc
20240608@211914.6715 3icprje5jcs2fs2v8n3mqrek3q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@213614.1707 91jbveh2o0d1uv793m8j6dhnl1 Query : use flama_phc
20240608@213614.1712 91jbveh2o0d1uv793m8j6dhnl1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@213614.1731 91jbveh2o0d1uv793m8j6dhnl1 Query : use flama_phc
20240608@213614.1734 91jbveh2o0d1uv793m8j6dhnl1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@221911.9277 f812i2jolmil38q46m2p03vldp Query : use flama_phc
20240608@221911.9285 f812i2jolmil38q46m2p03vldp Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@221911.9302 f812i2jolmil38q46m2p03vldp Query : use flama_phc
20240608@221911.9305 f812i2jolmil38q46m2p03vldp Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@223611.8877 mbtdmj1vp53tvicq6634vkgd9s Query : use flama_phc
20240608@223611.8882 mbtdmj1vp53tvicq6634vkgd9s Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@223611.8918 mbtdmj1vp53tvicq6634vkgd9s Query : use flama_phc
20240608@223611.8921 mbtdmj1vp53tvicq6634vkgd9s Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@231914.3167 l0luq0lbciung4veqdncgqsps8 Query : use flama_phc
20240608@231914.3175 l0luq0lbciung4veqdncgqsps8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@231914.3196 l0luq0lbciung4veqdncgqsps8 Query : use flama_phc
20240608@231914.3199 l0luq0lbciung4veqdncgqsps8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240608@233614.4217 gtkli99o26rglbd8mdjjj4c8uf Query : use flama_phc
20240608@233614.4222 gtkli99o26rglbd8mdjjj4c8uf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240608@233614.4239 gtkli99o26rglbd8mdjjj4c8uf Query : use flama_phc
20240608@233614.4241 gtkli99o26rglbd8mdjjj4c8uf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@071951.1301 77v15s8ji1kpkujti5l4pa08ds Query : use flama_phc
20240609@071951.1305 77v15s8ji1kpkujti5l4pa08ds Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@071951.1362 77v15s8ji1kpkujti5l4pa08ds Query : use flama_phc
20240609@071951.1365 77v15s8ji1kpkujti5l4pa08ds Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@073651.6923 pj7u22mdfn0d2ml4ii5bu4tfal Query : use flama_phc
20240609@073651.6928 pj7u22mdfn0d2ml4ii5bu4tfal Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@073651.6946 pj7u22mdfn0d2ml4ii5bu4tfal Query : use flama_phc
20240609@073651.6948 pj7u22mdfn0d2ml4ii5bu4tfal Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@081912.6566 e3n79ecg98t57779v677ncdjqg Query : use flama_phc
20240609@081912.6571 e3n79ecg98t57779v677ncdjqg Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@081912.6594 e3n79ecg98t57779v677ncdjqg Query : use flama_phc
20240609@081912.6598 e3n79ecg98t57779v677ncdjqg Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@083612.5076 4bbqja2hhbqd88g2dnde9sueef Query : use flama_phc
20240609@083612.5081 4bbqja2hhbqd88g2dnde9sueef Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@083612.5102 4bbqja2hhbqd88g2dnde9sueef Query : use flama_phc
20240609@083612.5105 4bbqja2hhbqd88g2dnde9sueef Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@091910.1818 on7dsou8vajhmnbongci6kdkln Query : use flama_phc
20240609@091910.1823 on7dsou8vajhmnbongci6kdkln Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@091910.1843 on7dsou8vajhmnbongci6kdkln Query : use flama_phc
20240609@091910.1847 on7dsou8vajhmnbongci6kdkln Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@093610.5297 ha9dp9kabgn85b5miul6481gb0 Query : use flama_phc
20240609@093610.5303 ha9dp9kabgn85b5miul6481gb0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@093610.5321 ha9dp9kabgn85b5miul6481gb0 Query : use flama_phc
20240609@093610.5324 ha9dp9kabgn85b5miul6481gb0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@101916.8023 s90mq22gv1h2gvuprn2mg6sggm Query : use flama_phc
20240609@101916.8028 s90mq22gv1h2gvuprn2mg6sggm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@101916.8047 s90mq22gv1h2gvuprn2mg6sggm Query : use flama_phc
20240609@101916.8049 s90mq22gv1h2gvuprn2mg6sggm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@103616.5031 co7m36qi1gq9kv4v86ltjdadln Query : use flama_phc
20240609@103616.5043 co7m36qi1gq9kv4v86ltjdadln Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@103616.5066 co7m36qi1gq9kv4v86ltjdadln Query : use flama_phc
20240609@103616.5069 co7m36qi1gq9kv4v86ltjdadln Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@111910.9436 bqtclptts67ohpro1hkoeruok2 Query : use flama_phc
20240609@111910.9440 bqtclptts67ohpro1hkoeruok2 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@111910.9458 bqtclptts67ohpro1hkoeruok2 Query : use flama_phc
20240609@111910.9460 bqtclptts67ohpro1hkoeruok2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@113611.1641 llmihcuhg8pcqsetgikeo94t13 Query : use flama_phc
20240609@113611.1645 llmihcuhg8pcqsetgikeo94t13 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@113611.1663 llmihcuhg8pcqsetgikeo94t13 Query : use flama_phc
20240609@113611.1666 llmihcuhg8pcqsetgikeo94t13 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@121914.7433 d3abp52h7uev333mcgqrh1vsru Query : use flama_phc
20240609@121914.8017 d3abp52h7uev333mcgqrh1vsru Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@121914.8079 d3abp52h7uev333mcgqrh1vsru Query : use flama_phc
20240609@121914.8081 d3abp52h7uev333mcgqrh1vsru Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@123614.9238 7rqv8trj563m7aevmma2hunlof Query : use flama_phc
20240609@123614.9243 7rqv8trj563m7aevmma2hunlof Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@123614.9259 7rqv8trj563m7aevmma2hunlof Query : use flama_phc
20240609@123614.9262 7rqv8trj563m7aevmma2hunlof Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@131911.3412 ck9g90ghr99k2ou4frf2klls9f Query : use flama_phc
20240609@131911.3420 ck9g90ghr99k2ou4frf2klls9f Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@131911.3598 ck9g90ghr99k2ou4frf2klls9f Query : use flama_phc
20240609@131911.3619 ck9g90ghr99k2ou4frf2klls9f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@133611.6415 6phd312j6dsc7afkalechahfvh Query : use flama_phc
20240609@133611.6420 6phd312j6dsc7afkalechahfvh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@133611.6438 6phd312j6dsc7afkalechahfvh Query : use flama_phc
20240609@133611.6440 6phd312j6dsc7afkalechahfvh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@141909.6483 ptlg4un8u91it45cu08s5hc3m4 Query : use flama_phc
20240609@141909.6488 ptlg4un8u91it45cu08s5hc3m4 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@141909.6510 ptlg4un8u91it45cu08s5hc3m4 Query : use flama_phc
20240609@141909.6513 ptlg4un8u91it45cu08s5hc3m4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@143609.6472 u39f8g5du2ec8i53fa1cue6vvp Query : use flama_phc
20240609@143609.6477 u39f8g5du2ec8i53fa1cue6vvp Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@143609.6510 u39f8g5du2ec8i53fa1cue6vvp Query : use flama_phc
20240609@143609.6513 u39f8g5du2ec8i53fa1cue6vvp Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@151910.6833 95bn1rsjuj81nl7rj846bog8f6 Query : use flama_phc
20240609@151910.6838 95bn1rsjuj81nl7rj846bog8f6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@151910.6857 95bn1rsjuj81nl7rj846bog8f6 Query : use flama_phc
20240609@151910.6898 95bn1rsjuj81nl7rj846bog8f6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@153610.6945 d7li1pi5ut18m587o7fj410epc Query : use flama_phc
20240609@153610.6950 d7li1pi5ut18m587o7fj410epc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@153610.6970 d7li1pi5ut18m587o7fj410epc Query : use flama_phc
20240609@153610.6973 d7li1pi5ut18m587o7fj410epc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@161910.4087 7l8pmlk2oernd03b5dulnhlj4q Query : use flama_phc
20240609@161910.4093 7l8pmlk2oernd03b5dulnhlj4q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@161910.4112 7l8pmlk2oernd03b5dulnhlj4q Query : use flama_phc
20240609@161910.4114 7l8pmlk2oernd03b5dulnhlj4q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@163610.4544 ev5nr69vesugj9vdb8u6gdktuh Query : use flama_phc
20240609@163610.4549 ev5nr69vesugj9vdb8u6gdktuh Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@163610.4589 ev5nr69vesugj9vdb8u6gdktuh Query : use flama_phc
20240609@163610.4592 ev5nr69vesugj9vdb8u6gdktuh Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@171910.3160 gcu78vdnohj7q3c8ta9hh97r2b Query : use flama_phc
20240609@171910.3210 gcu78vdnohj7q3c8ta9hh97r2b Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@171910.3380 gcu78vdnohj7q3c8ta9hh97r2b Query : use flama_phc
20240609@171910.3400 gcu78vdnohj7q3c8ta9hh97r2b Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@173610.1505 t6mufn2ue4d4gnpph05v6tuvul Query : use flama_phc
20240609@173610.1510 t6mufn2ue4d4gnpph05v6tuvul Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@173610.1527 t6mufn2ue4d4gnpph05v6tuvul Query : use flama_phc
20240609@173610.1530 t6mufn2ue4d4gnpph05v6tuvul Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@181909.7285 re8nmeik1o0e3950pgrvrvvnno Query : use flama_phc
20240609@181909.7289 re8nmeik1o0e3950pgrvrvvnno Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@181909.7307 re8nmeik1o0e3950pgrvrvvnno Query : use flama_phc
20240609@181909.7310 re8nmeik1o0e3950pgrvrvvnno Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@183609.7545 hldaq8g6mvkf3qddrpu6jd0n83 Query : use flama_phc
20240609@183609.7550 hldaq8g6mvkf3qddrpu6jd0n83 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@183609.7567 hldaq8g6mvkf3qddrpu6jd0n83 Query : use flama_phc
20240609@183609.7570 hldaq8g6mvkf3qddrpu6jd0n83 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@191910.5866 bt2ti9n5srd0av9skf8uh8jr7v Query : use flama_phc
20240609@191910.5872 bt2ti9n5srd0av9skf8uh8jr7v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@191910.6094 bt2ti9n5srd0av9skf8uh8jr7v Query : use flama_phc
20240609@191910.6150 bt2ti9n5srd0av9skf8uh8jr7v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@193610.2359 3q9tap61m3q5348im1pm959ru7 Query : use flama_phc
20240609@193610.2364 3q9tap61m3q5348im1pm959ru7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@193610.2382 3q9tap61m3q5348im1pm959ru7 Query : use flama_phc
20240609@193610.2385 3q9tap61m3q5348im1pm959ru7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@201911.9006 lrkmkl4ook0m5j2ju1sh3jtlm7 Query : use flama_phc
20240609@201911.9011 lrkmkl4ook0m5j2ju1sh3jtlm7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@201911.9030 lrkmkl4ook0m5j2ju1sh3jtlm7 Query : use flama_phc
20240609@201911.9033 lrkmkl4ook0m5j2ju1sh3jtlm7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@203612.2629 rvkssi0pvf42c4renj6j8s6l8r Query : use flama_phc
20240609@203612.2635 rvkssi0pvf42c4renj6j8s6l8r Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@203612.2653 rvkssi0pvf42c4renj6j8s6l8r Query : use flama_phc
20240609@203612.2656 rvkssi0pvf42c4renj6j8s6l8r Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@211910.5668 9d7g5uilid7b0prk44p6p6k2kd Query : use flama_phc
20240609@211910.5672 9d7g5uilid7b0prk44p6p6k2kd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@211910.5690 9d7g5uilid7b0prk44p6p6k2kd Query : use flama_phc
20240609@211910.5693 9d7g5uilid7b0prk44p6p6k2kd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@213610.6730 v88i1t768tpjtgneiv5niopma8 Query : use flama_phc
20240609@213610.6735 v88i1t768tpjtgneiv5niopma8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@213610.6764 v88i1t768tpjtgneiv5niopma8 Query : use flama_phc
20240609@213610.6782 v88i1t768tpjtgneiv5niopma8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@221913.2294 de9eunssmutu4m978p5n8pikfj Query : use flama_phc
20240609@221913.2298 de9eunssmutu4m978p5n8pikfj Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@221913.2333 de9eunssmutu4m978p5n8pikfj Query : use flama_phc
20240609@221913.2336 de9eunssmutu4m978p5n8pikfj Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@223612.9158 5t2ibtfk4smsvt38pffdq0jqfd Query : use flama_phc
20240609@223612.9162 5t2ibtfk4smsvt38pffdq0jqfd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@223612.9180 5t2ibtfk4smsvt38pffdq0jqfd Query : use flama_phc
20240609@223612.9183 5t2ibtfk4smsvt38pffdq0jqfd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@231909.1940 bt9opqnptiko9nitfp25rlb08n Query : use flama_phc
20240609@231909.1947 bt9opqnptiko9nitfp25rlb08n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@231909.1969 bt9opqnptiko9nitfp25rlb08n Query : use flama_phc
20240609@231909.1974 bt9opqnptiko9nitfp25rlb08n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240609@233609.3199 3uljiqrua6vhcqhha9kjb1ag4g Query : use flama_phc
20240609@233609.3205 3uljiqrua6vhcqhha9kjb1ag4g Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240609@233609.3222 3uljiqrua6vhcqhha9kjb1ag4g Query : use flama_phc
20240609@233609.3225 3uljiqrua6vhcqhha9kjb1ag4g Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@071916.2110 nb7i85b3p27herg0pumm1ruq8o Query : use flama_phc
20240610@071916.2160 nb7i85b3p27herg0pumm1ruq8o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@071916.2520 nb7i85b3p27herg0pumm1ruq8o Query : use flama_phc
20240610@071916.2550 nb7i85b3p27herg0pumm1ruq8o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@073658.5685 gm5sepit3kere4if4v5v4b3jpf Query : use flama_phc
20240610@073658.5691 gm5sepit3kere4if4v5v4b3jpf Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@073658.5710 gm5sepit3kere4if4v5v4b3jpf Query : use flama_phc
20240610@073658.5713 gm5sepit3kere4if4v5v4b3jpf Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@081913.2761 37nlre8rh89tc01ggnou49tc09 Query : use flama_phc
20240610@081913.2767 37nlre8rh89tc01ggnou49tc09 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@081913.2788 37nlre8rh89tc01ggnou49tc09 Query : use flama_phc
20240610@081913.2792 37nlre8rh89tc01ggnou49tc09 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@083613.2088 92jf3kals0okj11fofp5qd8as7 Query : use flama_phc
20240610@083613.2094 92jf3kals0okj11fofp5qd8as7 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@083613.2119 92jf3kals0okj11fofp5qd8as7 Query : use flama_phc
20240610@083613.2123 92jf3kals0okj11fofp5qd8as7 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@091912.3745 kobo449sq4nri5r91bk70c7gqq Query : use flama_phc
20240610@091912.3750 kobo449sq4nri5r91bk70c7gqq Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@091912.3769 kobo449sq4nri5r91bk70c7gqq Query : use flama_phc
20240610@091912.3772 kobo449sq4nri5r91bk70c7gqq Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@093612.8007 o31n30sqmhbd8gesa64tgi4klr Query : use flama_phc
20240610@093612.8012 o31n30sqmhbd8gesa64tgi4klr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@093612.8030 o31n30sqmhbd8gesa64tgi4klr Query : use flama_phc
20240610@093612.8033 o31n30sqmhbd8gesa64tgi4klr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@101910.4289 vejv9cvmommflv4fpm0d01igak Query : use flama_phc
20240610@101910.4294 vejv9cvmommflv4fpm0d01igak Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@101910.4312 vejv9cvmommflv4fpm0d01igak Query : use flama_phc
20240610@101910.4315 vejv9cvmommflv4fpm0d01igak Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@103610.8807 rs4flf6uufndapn064u7d8lua3 Query : use flama_phc
20240610@103610.8813 rs4flf6uufndapn064u7d8lua3 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@103610.8834 rs4flf6uufndapn064u7d8lua3 Query : use flama_phc
20240610@103610.8837 rs4flf6uufndapn064u7d8lua3 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@111911.8740 9prsnkujnc3pbqhoq1kfeik34l Query : use flama_phc
20240610@111911.8890 9prsnkujnc3pbqhoq1kfeik34l Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@111911.9070 9prsnkujnc3pbqhoq1kfeik34l Query : use flama_phc
20240610@111911.9100 9prsnkujnc3pbqhoq1kfeik34l Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@113610.6696 m119nicffphqqumc8utfnhjrl0 Query : use flama_phc
20240610@113610.6701 m119nicffphqqumc8utfnhjrl0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@113610.6722 m119nicffphqqumc8utfnhjrl0 Query : use flama_phc
20240610@113610.6725 m119nicffphqqumc8utfnhjrl0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@121916.1070 c8047mfhq4ek72t4piemqsnkil Query : use flama_phc
20240610@121916.1120 c8047mfhq4ek72t4piemqsnkil Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@121916.1320 c8047mfhq4ek72t4piemqsnkil Query : use flama_phc
20240610@121916.1350 c8047mfhq4ek72t4piemqsnkil Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@123615.8041 eo462kveq44qke2m3gehu9c70j Query : use flama_phc
20240610@123615.8045 eo462kveq44qke2m3gehu9c70j Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@123615.8063 eo462kveq44qke2m3gehu9c70j Query : use flama_phc
20240610@123615.8065 eo462kveq44qke2m3gehu9c70j Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@131913.9106 in7gqjavvvv45t1n1h80r92nn6 Query : use flama_phc
20240610@131913.9113 in7gqjavvvv45t1n1h80r92nn6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@131913.9133 in7gqjavvvv45t1n1h80r92nn6 Query : use flama_phc
20240610@131913.9136 in7gqjavvvv45t1n1h80r92nn6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@133614.1170 qmvn03lh6mrarirdqo5u3631s1 Query : use flama_phc
20240610@133614.1220 qmvn03lh6mrarirdqo5u3631s1 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@133614.1880 qmvn03lh6mrarirdqo5u3631s1 Query : use flama_phc
20240610@133614.1920 qmvn03lh6mrarirdqo5u3631s1 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@141912.4774 6r29fumghmd6ttu7n4r6qsufop Query : use flama_phc
20240610@141912.4787 6r29fumghmd6ttu7n4r6qsufop Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@141912.4812 6r29fumghmd6ttu7n4r6qsufop Query : use flama_phc
20240610@141912.4816 6r29fumghmd6ttu7n4r6qsufop Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@143612.6646 cr0alt4jl4qgf3pmr0nnhmvrnn Query : use flama_phc
20240610@143612.6652 cr0alt4jl4qgf3pmr0nnhmvrnn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@143612.7097 cr0alt4jl4qgf3pmr0nnhmvrnn Query : use flama_phc
20240610@143612.7101 cr0alt4jl4qgf3pmr0nnhmvrnn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@151910.6972 hdd0bqqdu7g3165qgqsvf227s6 Query : use flama_phc
20240610@151910.6983 hdd0bqqdu7g3165qgqsvf227s6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@151910.7026 hdd0bqqdu7g3165qgqsvf227s6 Query : use flama_phc
20240610@151910.7029 hdd0bqqdu7g3165qgqsvf227s6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@153610.6714 bjkmu9l31ssgndn15uv77e4qj6 Query : use flama_phc
20240610@153610.6719 bjkmu9l31ssgndn15uv77e4qj6 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@153610.6736 bjkmu9l31ssgndn15uv77e4qj6 Query : use flama_phc
20240610@153610.6739 bjkmu9l31ssgndn15uv77e4qj6 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@161910.3893 r5movaqvv6erbgsdpq9si3ll17 Query : use flama_phc
20240610@161910.3897 r5movaqvv6erbgsdpq9si3ll17 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@161910.3915 r5movaqvv6erbgsdpq9si3ll17 Query : use flama_phc
20240610@161910.3917 r5movaqvv6erbgsdpq9si3ll17 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@163610.3390 qlfophqagl97ski4mk9kan0apk Query : use flama_phc
20240610@163610.3395 qlfophqagl97ski4mk9kan0apk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@163610.3415 qlfophqagl97ski4mk9kan0apk Query : use flama_phc
20240610@163610.3418 qlfophqagl97ski4mk9kan0apk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@171912.1746 54nijuumr71jeehpqoq109lkdr Query : use flama_phc
20240610@171912.1751 54nijuumr71jeehpqoq109lkdr Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@171912.1770 54nijuumr71jeehpqoq109lkdr Query : use flama_phc
20240610@171912.1774 54nijuumr71jeehpqoq109lkdr Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@173612.4861 g49kkjv8dn9dct835uhsb9e63f Query : use flama_phc
20240610@173612.4871 g49kkjv8dn9dct835uhsb9e63f Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@173612.4889 g49kkjv8dn9dct835uhsb9e63f Query : use flama_phc
20240610@173612.4892 g49kkjv8dn9dct835uhsb9e63f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@181911.9762 gvbmscv2aiepg6n5pbdi2u5b3o Query : use flama_phc
20240610@181911.9767 gvbmscv2aiepg6n5pbdi2u5b3o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@181911.9785 gvbmscv2aiepg6n5pbdi2u5b3o Query : use flama_phc
20240610@181911.9788 gvbmscv2aiepg6n5pbdi2u5b3o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@183611.9828 8vk6vgul540vmjndjq95jm7kf2 Query : use flama_phc
20240610@183611.9833 8vk6vgul540vmjndjq95jm7kf2 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@183611.9854 8vk6vgul540vmjndjq95jm7kf2 Query : use flama_phc
20240610@183611.9856 8vk6vgul540vmjndjq95jm7kf2 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@190839.6864 4848m1aq08cn7hq7cuj5508ijt Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240610@190839.6898 4848m1aq08cn7hq7cuj5508ijt Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240610@190839.6964 4848m1aq08cn7hq7cuj5508ijt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='295';
20240610@190839.6998 4848m1aq08cn7hq7cuj5508ijt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='295';
20240610@190839.7021 4848m1aq08cn7hq7cuj5508ijt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='295';
20240610@190839.7032 4848m1aq08cn7hq7cuj5508ijt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='295';
20240610@190839.7237 k8i9eaja5854e0dpe03f5ucj3l Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240610@190839.7250 k8i9eaja5854e0dpe03f5ucj3l Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240610@190839.7264 k8i9eaja5854e0dpe03f5ucj3l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='296';
20240610@190839.7298 k8i9eaja5854e0dpe03f5ucj3l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='296';
20240610@190839.7311 k8i9eaja5854e0dpe03f5ucj3l Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='296';
20240610@190839.7321 k8i9eaja5854e0dpe03f5ucj3l Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='296';
20240610@190844.9570 hfssbji9ld4vfl573pc15cseug Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240610@190844.9584 hfssbji9ld4vfl573pc15cseug Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240610@190844.9600 hfssbji9ld4vfl573pc15cseug Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='297';
20240610@190844.9636 hfssbji9ld4vfl573pc15cseug Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='297';
20240610@190844.9648 hfssbji9ld4vfl573pc15cseug Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='297';
20240610@190844.9659 hfssbji9ld4vfl573pc15cseug Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='297';
20240610@191913.7686 l99pft8707par3vu785lgtiiqd Query : use flama_phc
20240610@191913.7694 l99pft8707par3vu785lgtiiqd Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@191913.7712 l99pft8707par3vu785lgtiiqd Query : use flama_phc
20240610@191913.7715 l99pft8707par3vu785lgtiiqd Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@193614.4740 q2k33log562lmos728a3bmgjkt Query : use flama_phc
20240610@193614.4790 q2k33log562lmos728a3bmgjkt Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@193614.5390 q2k33log562lmos728a3bmgjkt Query : use flama_phc
20240610@193614.5420 q2k33log562lmos728a3bmgjkt Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@201916.8900 4u3gjn2u8jih36l9jgph85g3sm Query : use flama_phc
20240610@201916.8960 4u3gjn2u8jih36l9jgph85g3sm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@201916.9180 4u3gjn2u8jih36l9jgph85g3sm Query : use flama_phc
20240610@201916.9210 4u3gjn2u8jih36l9jgph85g3sm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@203616.3648 ch016bu2tekp4p1hhcvjk592ve Query : use flama_phc
20240610@203616.3654 ch016bu2tekp4p1hhcvjk592ve Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@203616.3672 ch016bu2tekp4p1hhcvjk592ve Query : use flama_phc
20240610@203616.3676 ch016bu2tekp4p1hhcvjk592ve Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@211915.1664 hog1bv82sihslk3qpg04qb3fcc Query : use flama_phc
20240610@211915.1669 hog1bv82sihslk3qpg04qb3fcc Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@211915.1687 hog1bv82sihslk3qpg04qb3fcc Query : use flama_phc
20240610@211915.1690 hog1bv82sihslk3qpg04qb3fcc Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@213615.3527 ccde2pt6b2tp8betn7a6ihab4a Query : use flama_phc
20240610@213615.3533 ccde2pt6b2tp8betn7a6ihab4a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@213615.3552 ccde2pt6b2tp8betn7a6ihab4a Query : use flama_phc
20240610@213615.3555 ccde2pt6b2tp8betn7a6ihab4a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@221914.7691 u4cvrhmqk3ag0vf909uepula78 Query : use flama_phc
20240610@221914.7696 u4cvrhmqk3ag0vf909uepula78 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@221914.7714 u4cvrhmqk3ag0vf909uepula78 Query : use flama_phc
20240610@221914.7717 u4cvrhmqk3ag0vf909uepula78 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@223614.8255 6e2r8hfu3npmefk265r47j9b4o Query : use flama_phc
20240610@223614.8731 6e2r8hfu3npmefk265r47j9b4o Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@223614.9391 6e2r8hfu3npmefk265r47j9b4o Query : use flama_phc
20240610@223614.9395 6e2r8hfu3npmefk265r47j9b4o Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@231914.9370 ah2vg04skulel8lavq5dllghgs Query : use flama_phc
20240610@231914.9430 ah2vg04skulel8lavq5dllghgs Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@231914.9840 ah2vg04skulel8lavq5dllghgs Query : use flama_phc
20240610@231914.9870 ah2vg04skulel8lavq5dllghgs Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240610@233614.3850 eftkj9caqd77b8a5qcj1hpj44v Query : use flama_phc
20240610@233614.3900 eftkj9caqd77b8a5qcj1hpj44v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240610@233614.4080 eftkj9caqd77b8a5qcj1hpj44v Query : use flama_phc
20240610@233614.4110 eftkj9caqd77b8a5qcj1hpj44v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@071935.5773 nj30u1fnb8hootd30s7mb17kg8 Query : use flama_phc
20240611@071935.5781 nj30u1fnb8hootd30s7mb17kg8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240611@071935.5871 nj30u1fnb8hootd30s7mb17kg8 Query : use flama_phc
20240611@071935.5875 nj30u1fnb8hootd30s7mb17kg8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@073603.1319 rmufshtdgeol23rmcphg9m99p9 Query : use flama_phc
20240611@073603.1324 rmufshtdgeol23rmcphg9m99p9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240611@073603.1344 rmufshtdgeol23rmcphg9m99p9 Query : use flama_phc
20240611@073603.1346 rmufshtdgeol23rmcphg9m99p9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@074602.6623 c0ve3a8tamuor0mhud4evo6bv6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074602.6647 c0ve3a8tamuor0mhud4evo6bv6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074602.6680 c0ve3a8tamuor0mhud4evo6bv6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='298';
20240611@074602.6913 c0ve3a8tamuor0mhud4evo6bv6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='298';
20240611@074602.6999 c0ve3a8tamuor0mhud4evo6bv6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='298';
20240611@074602.7065 c0ve3a8tamuor0mhud4evo6bv6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='298';
20240611@074602.7078 c0ve3a8tamuor0mhud4evo6bv6 Query : use flama_phc
20240611@074602.7081 c0ve3a8tamuor0mhud4evo6bv6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074602.7135 c0ve3a8tamuor0mhud4evo6bv6 Query : use flama_phc
20240611@074602.7138 c0ve3a8tamuor0mhud4evo6bv6 Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20240611@074602.7214 c0ve3a8tamuor0mhud4evo6bv6 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '328.9326.00.1'
20240611@074602.7456 c0ve3a8tamuor0mhud4evo6bv6 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403989 and bi.ref ='328.9326.00.1' and bi.lordem =1
20240611@074602.7854 c0ve3a8tamuor0mhud4evo6bv6 Query : use flama_phc
20240611@074602.7857 c0ve3a8tamuor0mhud4evo6bv6 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074602.8041 c0ve3a8tamuor0mhud4evo6bv6 Query : use flama_phc
20240611@074602.8044 c0ve3a8tamuor0mhud4evo6bv6 Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074602.8126 c0ve3a8tamuor0mhud4evo6bv6 Query : use flama_phc
20240611@074602.8129 c0ve3a8tamuor0mhud4evo6bv6 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')
20240611@074602.8678 7a1cgbhd1fjv0kq34a18k9hvg5 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074602.8693 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074602.8709 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='299';
20240611@074602.8749 7a1cgbhd1fjv0kq34a18k9hvg5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='299';
20240611@074602.8769 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='299';
20240611@074602.8780 7a1cgbhd1fjv0kq34a18k9hvg5 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='299';
20240611@074602.8791 7a1cgbhd1fjv0kq34a18k9hvg5 Query : use flama_phc
20240611@074602.8794 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074602.8810 7a1cgbhd1fjv0kq34a18k9hvg5 Query : use flama_phc
20240611@074602.8813 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240611@074602.8888 7a1cgbhd1fjv0kq34a18k9hvg5 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'
20240611@074602.9060 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403990 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240611@074602.9386 7a1cgbhd1fjv0kq34a18k9hvg5 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'
20240611@074602.9397 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2039 and bo.obrano = 2403990 and bi.ref ='324.4723.00.2' and bi.lordem =1
20240611@074602.9405 7a1cgbhd1fjv0kq34a18k9hvg5 Query : use flama_phc
20240611@074602.9408 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074602.9421 7a1cgbhd1fjv0kq34a18k9hvg5 Query : use flama_phc
20240611@074602.9424 7a1cgbhd1fjv0kq34a18k9hvg5 Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074602.9434 7a1cgbhd1fjv0kq34a18k9hvg5 Query : use flama_phc
20240611@074602.9437 7a1cgbhd1fjv0kq34a18k9hvg5 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')
20240611@074603.5050 13nbkhe8gmgnplsu4b85be3g1h Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074603.5340 13nbkhe8gmgnplsu4b85be3g1h Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074603.1697 13nbkhe8gmgnplsu4b85be3g1h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='300';
20240611@074603.1789 13nbkhe8gmgnplsu4b85be3g1h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='300';
20240611@074603.1802 13nbkhe8gmgnplsu4b85be3g1h Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='300';
20240611@074603.1914 13nbkhe8gmgnplsu4b85be3g1h Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='300';
20240611@074603.1927 13nbkhe8gmgnplsu4b85be3g1h Query : use flama_phc
20240611@074603.1930 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074603.1947 13nbkhe8gmgnplsu4b85be3g1h Query : use flama_phc
20240611@074603.1949 13nbkhe8gmgnplsu4b85be3g1h Query : select no, estab,szadrsdesc from szadrs where u_coddest=4743
20240611@074603.2104 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5500.00.1'
20240611@074603.2582 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404015 and bi.ref ='324.5500.00.1' and bi.lordem =1
20240611@074603.2949 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.5500.00.1'
20240611@074603.2960 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404015 and bi.ref ='324.5500.00.1' and bi.lordem =1
20240611@074603.2968 13nbkhe8gmgnplsu4b85be3g1h Query : use flama_phc
20240611@074603.2971 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074603.2983 13nbkhe8gmgnplsu4b85be3g1h Query : use flama_phc
20240611@074603.2986 13nbkhe8gmgnplsu4b85be3g1h Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074603.2996 13nbkhe8gmgnplsu4b85be3g1h Query : use flama_phc
20240611@074603.2998 13nbkhe8gmgnplsu4b85be3g1h 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')
20240611@074603.3474 bad3ui1m7lsbh82ot6erjeusih Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074603.3488 bad3ui1m7lsbh82ot6erjeusih Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074603.3503 bad3ui1m7lsbh82ot6erjeusih Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='301';
20240611@074603.3542 bad3ui1m7lsbh82ot6erjeusih Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='301';
20240611@074603.3555 bad3ui1m7lsbh82ot6erjeusih Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='301';
20240611@074603.3570 bad3ui1m7lsbh82ot6erjeusih Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='301';
20240611@074603.3581 bad3ui1m7lsbh82ot6erjeusih Query : use flama_phc
20240611@074603.3584 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074603.3600 bad3ui1m7lsbh82ot6erjeusih Query : use flama_phc
20240611@074603.3603 bad3ui1m7lsbh82ot6erjeusih Query : select no, estab,szadrsdesc from szadrs where u_coddest=2117
20240611@074603.3679 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1805.00.1'
20240611@074603.3862 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404016 and bi.ref ='324.1805.00.1' and bi.lordem =1
20240611@074603.4218 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1805.00.1'
20240611@074603.4231 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404016 and bi.ref ='324.1805.00.1' and bi.lordem =1
20240611@074603.4238 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240611@074603.4694 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404016 and bi.ref ='324.1831.00.2' and bi.lordem =2
20240611@074603.5108 bad3ui1m7lsbh82ot6erjeusih Query : use flama_phc
20240611@074603.5111 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074603.5146 bad3ui1m7lsbh82ot6erjeusih Query : use flama_phc
20240611@074603.5148 bad3ui1m7lsbh82ot6erjeusih Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074603.5159 bad3ui1m7lsbh82ot6erjeusih Query : use flama_phc
20240611@074603.5162 bad3ui1m7lsbh82ot6erjeusih 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')
20240611@074603.5619 3rn62emarm2o7keuaqnet522ff Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074603.5635 3rn62emarm2o7keuaqnet522ff Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074603.5650 3rn62emarm2o7keuaqnet522ff Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='302';
20240611@074603.5716 3rn62emarm2o7keuaqnet522ff Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='302';
20240611@074603.5730 3rn62emarm2o7keuaqnet522ff Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='302';
20240611@074603.5742 3rn62emarm2o7keuaqnet522ff Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='302';
20240611@074603.5753 3rn62emarm2o7keuaqnet522ff Query : use flama_phc
20240611@074603.5757 3rn62emarm2o7keuaqnet522ff Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074603.5771 3rn62emarm2o7keuaqnet522ff Query : use flama_phc
20240611@074603.5774 3rn62emarm2o7keuaqnet522ff Query : select no, estab,szadrsdesc from szadrs where u_coddest=227
20240611@074603.6027 3rn62emarm2o7keuaqnet522ff Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.2203.00.1'
20240611@074603.6195 3rn62emarm2o7keuaqnet522ff Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404017 and bi.ref ='324.2203.00.1' and bi.lordem =1
20240611@074603.6552 3rn62emarm2o7keuaqnet522ff 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'
20240611@074603.6713 3rn62emarm2o7keuaqnet522ff Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404017 and bi.ref ='324.2232.00.1' and bi.lordem =3
20240611@074603.7080 3rn62emarm2o7keuaqnet522ff Query : use flama_phc
20240611@074603.7085 3rn62emarm2o7keuaqnet522ff Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074603.7099 3rn62emarm2o7keuaqnet522ff Query : use flama_phc
20240611@074603.7102 3rn62emarm2o7keuaqnet522ff Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074603.7115 3rn62emarm2o7keuaqnet522ff Query : use flama_phc
20240611@074603.7118 3rn62emarm2o7keuaqnet522ff 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')
20240611@074603.7618 ueur4r6tm8ek6i0djpoq9f03md Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074603.7631 ueur4r6tm8ek6i0djpoq9f03md Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074603.7645 ueur4r6tm8ek6i0djpoq9f03md Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='303';
20240611@074603.7684 ueur4r6tm8ek6i0djpoq9f03md Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='303';
20240611@074603.7696 ueur4r6tm8ek6i0djpoq9f03md Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='303';
20240611@074603.7706 ueur4r6tm8ek6i0djpoq9f03md Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='303';
20240611@074603.7718 ueur4r6tm8ek6i0djpoq9f03md Query : use flama_phc
20240611@074603.7721 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074603.7734 ueur4r6tm8ek6i0djpoq9f03md Query : use flama_phc
20240611@074603.7737 ueur4r6tm8ek6i0djpoq9f03md Query : select no, estab,szadrsdesc from szadrs where u_coddest=1549
20240611@074603.7821 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240611@074603.8188 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404018 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240611@074603.8516 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '327.8171.00.1'
20240611@074603.8700 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404018 and bi.ref ='327.8171.00.1' and bi.lordem =2
20240611@074603.9053 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1896.00.1'
20240611@074603.9293 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404018 and bi.ref ='324.1896.00.1' and bi.lordem =3
20240611@074603.9634 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20240611@074604.1705 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404018 and bi.ref ='324.1833.00.2' and bi.lordem =4
20240611@074604.2076 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.969.00.01'
20240611@074604.2234 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404018 and bi.ref ='324.969.00.01' and bi.lordem =5
20240611@074604.2596 ueur4r6tm8ek6i0djpoq9f03md Query : use flama_phc
20240611@074604.2600 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074604.2613 ueur4r6tm8ek6i0djpoq9f03md Query : use flama_phc
20240611@074604.2617 ueur4r6tm8ek6i0djpoq9f03md Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074604.2627 ueur4r6tm8ek6i0djpoq9f03md Query : use flama_phc
20240611@074604.2630 ueur4r6tm8ek6i0djpoq9f03md 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')
20240611@074604.3668 enlkupcg48isvesv09lnpdti09 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074604.3690 enlkupcg48isvesv09lnpdti09 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074604.3705 enlkupcg48isvesv09lnpdti09 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='304';
20240611@074604.3743 enlkupcg48isvesv09lnpdti09 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='304';
20240611@074604.3757 enlkupcg48isvesv09lnpdti09 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='304';
20240611@074604.3767 enlkupcg48isvesv09lnpdti09 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='304';
20240611@074604.3778 enlkupcg48isvesv09lnpdti09 Query : use flama_phc
20240611@074604.3781 enlkupcg48isvesv09lnpdti09 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074604.3794 enlkupcg48isvesv09lnpdti09 Query : use flama_phc
20240611@074604.3797 enlkupcg48isvesv09lnpdti09 Query : select no, estab,szadrsdesc from szadrs where u_coddest=698
20240611@074604.3875 enlkupcg48isvesv09lnpdti09 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.4421.00.1'
20240611@074604.5260 enlkupcg48isvesv09lnpdti09 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404019 and bi.ref ='324.4421.00.1' and bi.lordem =1
20240611@074604.6036 enlkupcg48isvesv09lnpdti09 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'
20240611@074604.6049 enlkupcg48isvesv09lnpdti09 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404019 and bi.ref ='324.2232.00.1' and bi.lordem =2
20240611@074604.6399 enlkupcg48isvesv09lnpdti09 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'
20240611@074604.6567 enlkupcg48isvesv09lnpdti09 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404019 and bi.ref ='324.2231.00.1' and bi.lordem =3
20240611@074604.6930 enlkupcg48isvesv09lnpdti09 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'
20240611@074604.7087 enlkupcg48isvesv09lnpdti09 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404019 and bi.ref ='324.1706.00.1' and bi.lordem =4
20240611@074604.7437 enlkupcg48isvesv09lnpdti09 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1528.00.1'
20240611@074604.7598 enlkupcg48isvesv09lnpdti09 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404019 and bi.ref ='324.1528.00.1' and bi.lordem =5
20240611@074604.7961 enlkupcg48isvesv09lnpdti09 Query : use flama_phc
20240611@074604.7964 enlkupcg48isvesv09lnpdti09 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074604.7977 enlkupcg48isvesv09lnpdti09 Query : use flama_phc
20240611@074604.7980 enlkupcg48isvesv09lnpdti09 Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074604.7990 enlkupcg48isvesv09lnpdti09 Query : use flama_phc
20240611@074604.7992 enlkupcg48isvesv09lnpdti09 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')
20240611@074604.8535 f3eg49pgp0lpusuipj7qo4psmo Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074604.8549 f3eg49pgp0lpusuipj7qo4psmo Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074604.8565 f3eg49pgp0lpusuipj7qo4psmo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='305';
20240611@074604.8607 f3eg49pgp0lpusuipj7qo4psmo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='305';
20240611@074604.8619 f3eg49pgp0lpusuipj7qo4psmo Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='305';
20240611@074604.8630 f3eg49pgp0lpusuipj7qo4psmo Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='305';
20240611@074604.8641 f3eg49pgp0lpusuipj7qo4psmo Query : use flama_phc
20240611@074604.8644 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074604.8657 f3eg49pgp0lpusuipj7qo4psmo Query : use flama_phc
20240611@074604.8659 f3eg49pgp0lpusuipj7qo4psmo Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240611@074604.8704 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240611@074604.8714 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404021 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240611@074604.9058 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240611@074604.9069 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404021 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240611@074604.9075 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240611@074604.9087 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404021 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240611@074604.9093 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1832.00.2'
20240611@074604.9102 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404021 and bi.ref ='324.1832.00.2' and bi.lordem =1
20240611@074604.9110 f3eg49pgp0lpusuipj7qo4psmo Query : use flama_phc
20240611@074604.9112 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074604.9125 f3eg49pgp0lpusuipj7qo4psmo Query : use flama_phc
20240611@074604.9128 f3eg49pgp0lpusuipj7qo4psmo Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074604.9138 f3eg49pgp0lpusuipj7qo4psmo Query : use flama_phc
20240611@074604.9141 f3eg49pgp0lpusuipj7qo4psmo 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')
20240611@074604.9619 naqsqhe50hogeihkoultiabv2i Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074604.9667 naqsqhe50hogeihkoultiabv2i Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074604.9715 naqsqhe50hogeihkoultiabv2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='306';
20240611@074604.9765 naqsqhe50hogeihkoultiabv2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='306';
20240611@074604.9798 naqsqhe50hogeihkoultiabv2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='306';
20240611@074604.9815 naqsqhe50hogeihkoultiabv2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='306';
20240611@074604.9829 naqsqhe50hogeihkoultiabv2i Query : use flama_phc
20240611@074604.9832 naqsqhe50hogeihkoultiabv2i Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074604.9846 naqsqhe50hogeihkoultiabv2i Query : use flama_phc
20240611@074604.9848 naqsqhe50hogeihkoultiabv2i Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240611@074605.9390 naqsqhe50hogeihkoultiabv2i Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20240611@074605.9500 naqsqhe50hogeihkoultiabv2i Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404022 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240611@074605.1325 naqsqhe50hogeihkoultiabv2i Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20240611@074605.1336 naqsqhe50hogeihkoultiabv2i Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404022 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240611@074605.1342 naqsqhe50hogeihkoultiabv2i Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20240611@074605.1351 naqsqhe50hogeihkoultiabv2i Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404022 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240611@074605.1358 naqsqhe50hogeihkoultiabv2i Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1833.00.2'
20240611@074605.1368 naqsqhe50hogeihkoultiabv2i Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404022 and bi.ref ='324.1833.00.2' and bi.lordem =1
20240611@074605.1375 naqsqhe50hogeihkoultiabv2i Query : use flama_phc
20240611@074605.1378 naqsqhe50hogeihkoultiabv2i Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074605.1391 naqsqhe50hogeihkoultiabv2i Query : use flama_phc
20240611@074605.1393 naqsqhe50hogeihkoultiabv2i Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074605.1407 naqsqhe50hogeihkoultiabv2i Query : use flama_phc
20240611@074605.1409 naqsqhe50hogeihkoultiabv2i 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')
20240611@074605.2083 l37239esfk60l437n49lkp5g28 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074605.2097 l37239esfk60l437n49lkp5g28 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074605.2112 l37239esfk60l437n49lkp5g28 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='307';
20240611@074605.2152 l37239esfk60l437n49lkp5g28 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='307';
20240611@074605.2164 l37239esfk60l437n49lkp5g28 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='307';
20240611@074605.2175 l37239esfk60l437n49lkp5g28 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='307';
20240611@074605.2186 l37239esfk60l437n49lkp5g28 Query : use flama_phc
20240611@074605.2189 l37239esfk60l437n49lkp5g28 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074605.2202 l37239esfk60l437n49lkp5g28 Query : use flama_phc
20240611@074605.2205 l37239esfk60l437n49lkp5g28 Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20240611@074605.2235 l37239esfk60l437n49lkp5g28 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240611@074605.2244 l37239esfk60l437n49lkp5g28 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404023 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240611@074605.2603 l37239esfk60l437n49lkp5g28 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240611@074605.2614 l37239esfk60l437n49lkp5g28 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404023 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240611@074605.2623 l37239esfk60l437n49lkp5g28 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240611@074605.2633 l37239esfk60l437n49lkp5g28 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404023 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240611@074605.2639 l37239esfk60l437n49lkp5g28 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240611@074605.2650 l37239esfk60l437n49lkp5g28 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404023 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240611@074605.2658 l37239esfk60l437n49lkp5g28 Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.1831.00.2'
20240611@074605.2667 l37239esfk60l437n49lkp5g28 Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404023 and bi.ref ='324.1831.00.2' and bi.lordem =1
20240611@074605.2674 l37239esfk60l437n49lkp5g28 Query : use flama_phc
20240611@074605.2676 l37239esfk60l437n49lkp5g28 Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074605.2768 l37239esfk60l437n49lkp5g28 Query : use flama_phc
20240611@074605.2810 l37239esfk60l437n49lkp5g28 Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074605.3017 l37239esfk60l437n49lkp5g28 Query : use flama_phc
20240611@074605.3032 l37239esfk60l437n49lkp5g28 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')
20240611@074605.3575 eav1vacuuscojlr2q7675ifjou Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@074605.3592 eav1vacuuscojlr2q7675ifjou Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@074605.3608 eav1vacuuscojlr2q7675ifjou Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='308';
20240611@074605.3663 eav1vacuuscojlr2q7675ifjou Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='308';
20240611@074605.3675 eav1vacuuscojlr2q7675ifjou Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='308';
20240611@074605.3686 eav1vacuuscojlr2q7675ifjou Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='308';
20240611@074605.3697 eav1vacuuscojlr2q7675ifjou Query : use flama_phc
20240611@074605.3700 eav1vacuuscojlr2q7675ifjou Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@074605.3714 eav1vacuuscojlr2q7675ifjou Query : use flama_phc
20240611@074605.3717 eav1vacuuscojlr2q7675ifjou Query : select no, estab,szadrsdesc from szadrs where u_coddest=2410
20240611@074605.3793 eav1vacuuscojlr2q7675ifjou Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '304.4005.00.2'
20240611@074605.3957 eav1vacuuscojlr2q7675ifjou Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404024 and bi.ref ='304.4005.00.2' and bi.lordem =1
20240611@074605.4284 eav1vacuuscojlr2q7675ifjou Query : select top 1 isnull(design,'') valor from st (nolock) left join stobs (nolock) on st.ref = stobs.ref where st.ref = '324.658.00.01'
20240611@074605.4440 eav1vacuuscojlr2q7675ifjou Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =240 and bo.boano =2040 and bo.obrano = 2404024 and bi.ref ='324.658.00.01' and bi.lordem =2
20240611@074605.4792 eav1vacuuscojlr2q7675ifjou Query : use flama_phc
20240611@074605.4795 eav1vacuuscojlr2q7675ifjou Query : select top 1 convert(date,fdata) valor from ft where ndoc = 39 and anulado= 0 and fno>0 order by fdata desc
20240611@074605.4809 eav1vacuuscojlr2q7675ifjou Query : use flama_phc
20240611@074605.4812 eav1vacuuscojlr2q7675ifjou Query : select top 1 1 valor from td where td.ndoc = 39
20240611@074605.4822 eav1vacuuscojlr2q7675ifjou Query : use flama_phc
20240611@074605.4825 eav1vacuuscojlr2q7675ifjou 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')
20240611@081803.1784 lh8tnfdfqi5vit2jih2i5lpnkh Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@081803.1801 lh8tnfdfqi5vit2jih2i5lpnkh Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@081803.1844 lh8tnfdfqi5vit2jih2i5lpnkh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='309';
20240611@081803.2010 lh8tnfdfqi5vit2jih2i5lpnkh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='309';
20240611@081803.2057 lh8tnfdfqi5vit2jih2i5lpnkh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='309';
20240611@081803.2072 lh8tnfdfqi5vit2jih2i5lpnkh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='309';
20240611@081803.2936 8kbud51d7raa5ae8lcio31tbuf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@081803.2953 8kbud51d7raa5ae8lcio31tbuf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@081803.2971 8kbud51d7raa5ae8lcio31tbuf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='310';
20240611@081803.3013 8kbud51d7raa5ae8lcio31tbuf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='310';
20240611@081803.3027 8kbud51d7raa5ae8lcio31tbuf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='310';
20240611@081803.3040 8kbud51d7raa5ae8lcio31tbuf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='310';
20240611@081803.3056 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3060 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@081803.3117 8kbud51d7raa5ae8lcio31tbuf Query : select no, estab,szadrsdesc from szadrs where u_coddest=2
20240611@081803.3187 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.686.00.01'
20240611@081803.3307 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.686.00.01'
20240611@081803.3319 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.646.00.01'
20240611@081803.3429 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3432 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 1 valor from ts where ts.ndos = 5
20240611@081803.3507 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3510 8kbud51d7raa5ae8lcio31tbuf 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')
20240611@081803.3564 8kbud51d7raa5ae8lcio31tbuf 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
20240611@081803.3707 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3710 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 ~inactivo valor from fl where no = '100500' and estab = 0 order by inactivo desc
20240611@081803.3794 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3797 8kbud51d7raa5ae8lcio31tbuf Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240611@081803.3845 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3847 8kbud51d7raa5ae8lcio31tbuf Query : select szadrsstamp valor from szadrs where szadrsdesc='n/instalaÇÕes sede'
20240611@081803.3866 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.3870 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from ts where ndos = 5
20240611@081803.3951 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@081803.4251 8kbud51d7raa5ae8lcio31tbuf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@081803.4317 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@081803.4332 8kbud51d7raa5ae8lcio31tbuf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@081803.4339 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@081803.4352 8kbud51d7raa5ae8lcio31tbuf Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@081803.4359 8kbud51d7raa5ae8lcio31tbuf 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
20240611@081803.4670 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@081803.4824 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@081803.4890 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.4894 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20240611@081803.4978 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@081803.4993 8kbud51d7raa5ae8lcio31tbuf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@081803.5027 8kbud51d7raa5ae8lcio31tbuf Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6667f515256667fa2b77',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240611@081803.5091 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@081803.5107 8kbud51d7raa5ae8lcio31tbuf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@081803.5115 8kbud51d7raa5ae8lcio31tbuf Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut6667f515256667fa2b77','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20240611','08:48',?,?)
20240611@081803.6760 8kbud51d7raa5ae8lcio31tbuf Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@081803.6777 8kbud51d7raa5ae8lcio31tbuf Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@081803.6791 8kbud51d7raa5ae8lcio31tbuf 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 ('aut6667f515256667fa2b77','trf entre armazéns a','2024-06-11',5,310,?,?,?,?,?,?,?,?,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',?)
20240611@081803.7368 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7372 8kbud51d7raa5ae8lcio31tbuf Query : select st.usalote valor from st where st.ref = '324.686.00.01'
20240611@081803.7487 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7490 8kbud51d7raa5ae8lcio31tbuf Query : select st.stns valor from st where st.ref = '324.686.00.01'
20240611@081803.7599 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7602 8kbud51d7raa5ae8lcio31tbuf 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.686.00.01' and sa.armazem = 133 
20240611@081803.7766 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7770 8kbud51d7raa5ae8lcio31tbuf Query : select st.stns valor from st where st.ref = '324.686.00.01'
20240611@081803.7799 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7802 8kbud51d7raa5ae8lcio31tbuf Query : select st.usalote valor from st where st.ref = '324.686.00.01'
20240611@081803.7813 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7816 8kbud51d7raa5ae8lcio31tbuf Query : select st.usalote valor from st where st.ref = '324.646.00.01'
20240611@081803.7837 8kbud51d7raa5ae8lcio31tbuf Query : use flama_phc
20240611@081803.7841 8kbud51d7raa5ae8lcio31tbuf Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -1050
20240611@081803.8059 8kbud51d7raa5ae8lcio31tbuf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='310';
20240611@081803.8074 8kbud51d7raa5ae8lcio31tbuf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='310';
20240611@081918.5350 usu4h8p2q0tlo0m3dcgo629g1u Query : use flama_phc
20240611@081918.5420 usu4h8p2q0tlo0m3dcgo629g1u Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240611@081918.5660 usu4h8p2q0tlo0m3dcgo629g1u Query : use flama_phc
20240611@081918.5700 usu4h8p2q0tlo0m3dcgo629g1u Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@083306.1030 l2qbq2qpnqhithsvev0ttkfrh9 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@083306.1050 l2qbq2qpnqhithsvev0ttkfrh9 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@083306.1072 l2qbq2qpnqhithsvev0ttkfrh9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='311';
20240611@083306.1135 l2qbq2qpnqhithsvev0ttkfrh9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='311';
20240611@083306.1152 l2qbq2qpnqhithsvev0ttkfrh9 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='311';
20240611@083306.1166 l2qbq2qpnqhithsvev0ttkfrh9 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='311';
20240611@083306.2644 g2tkghn8okqub27qun2fpkrjpe Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@083306.2660 g2tkghn8okqub27qun2fpkrjpe Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@083306.2680 g2tkghn8okqub27qun2fpkrjpe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='312';
20240611@083306.2725 g2tkghn8okqub27qun2fpkrjpe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='312';
20240611@083306.2738 g2tkghn8okqub27qun2fpkrjpe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='312';
20240611@083306.2751 g2tkghn8okqub27qun2fpkrjpe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='312';
20240611@083306.2765 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.2769 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@083306.2787 g2tkghn8okqub27qun2fpkrjpe Query : select no, estab,szadrsdesc from szadrs where u_coddest=2
20240611@083306.3005 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.679.00.01'
20240611@083306.3308 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.679.00.01'
20240611@083306.3321 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.600.94.01'
20240611@083306.3462 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3466 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 1 valor from ts where ts.ndos = 5
20240611@083306.3479 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3483 g2tkghn8okqub27qun2fpkrjpe 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')
20240611@083306.3505 g2tkghn8okqub27qun2fpkrjpe 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
20240611@083306.3525 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3528 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 ~inactivo valor from fl where no = '100500' and estab = 0 order by inactivo desc
20240611@083306.3541 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3544 g2tkghn8okqub27qun2fpkrjpe Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240611@083306.3556 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3559 g2tkghn8okqub27qun2fpkrjpe Query : select szadrsstamp valor from szadrs where szadrsdesc='n/instalaÇÕes sede'
20240611@083306.3576 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3580 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from ts where ndos = 5
20240611@083306.3592 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.3608 g2tkghn8okqub27qun2fpkrjpe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@083306.3620 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.3633 g2tkghn8okqub27qun2fpkrjpe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@083306.3639 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.3654 g2tkghn8okqub27qun2fpkrjpe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@083306.3661 g2tkghn8okqub27qun2fpkrjpe 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
20240611@083306.3676 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@083306.3703 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@083306.3717 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.3720 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20240611@083306.3735 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.3749 g2tkghn8okqub27qun2fpkrjpe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@083306.3756 g2tkghn8okqub27qun2fpkrjpe Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6667f147596667fdb25a',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240611@083306.3761 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.3775 g2tkghn8okqub27qun2fpkrjpe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@083306.3782 g2tkghn8okqub27qun2fpkrjpe Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut6667f147596667fdb25a','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20240611','09:03',?,?)
20240611@083306.4012 g2tkghn8okqub27qun2fpkrjpe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.4057 g2tkghn8okqub27qun2fpkrjpe Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@083306.4320 g2tkghn8okqub27qun2fpkrjpe 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 ('aut6667f147596667fdb25a','trf entre armazéns a','2024-06-11',5,310,?,?,?,?,?,?,?,?,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',?)
20240611@083306.4721 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.4725 g2tkghn8okqub27qun2fpkrjpe Query : select st.usalote valor from st where st.ref = '324.679.00.01'
20240611@083306.4741 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.4744 g2tkghn8okqub27qun2fpkrjpe Query : select st.stns valor from st where st.ref = '324.679.00.01'
20240611@083306.4756 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.4759 g2tkghn8okqub27qun2fpkrjpe 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 
20240611@083306.4825 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.4828 g2tkghn8okqub27qun2fpkrjpe Query : select st.stns valor from st where st.ref = '324.679.00.01'
20240611@083306.4890 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.4932 g2tkghn8okqub27qun2fpkrjpe Query : select st.usalote valor from st where st.ref = '324.679.00.01'
20240611@083306.5059 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.5073 g2tkghn8okqub27qun2fpkrjpe Query : select st.usalote valor from st where st.ref = '324.600.94.01'
20240611@083306.5093 g2tkghn8okqub27qun2fpkrjpe Query : use flama_phc
20240611@083306.5097 g2tkghn8okqub27qun2fpkrjpe Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -1050
20240611@083306.5111 g2tkghn8okqub27qun2fpkrjpe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='312';
20240611@083306.5166 g2tkghn8okqub27qun2fpkrjpe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='312';
20240611@083306.6724 g79tr58kiq107g0cnsbkhl9fgt Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@083306.6738 g79tr58kiq107g0cnsbkhl9fgt Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@083306.6755 g79tr58kiq107g0cnsbkhl9fgt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='313';
20240611@083306.6799 g79tr58kiq107g0cnsbkhl9fgt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='313';
20240611@083306.6811 g79tr58kiq107g0cnsbkhl9fgt Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='313';
20240611@083306.6825 g79tr58kiq107g0cnsbkhl9fgt Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='313';
20240611@083306.7071 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@083306.7085 c756ehr3m3da5c8r15ck2e7dd4 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@083306.7106 c756ehr3m3da5c8r15ck2e7dd4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='314';
20240611@083306.7154 c756ehr3m3da5c8r15ck2e7dd4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='314';
20240611@083306.7168 c756ehr3m3da5c8r15ck2e7dd4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='314';
20240611@083306.7184 c756ehr3m3da5c8r15ck2e7dd4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='314';
20240611@083306.7197 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.7201 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@083306.7220 c756ehr3m3da5c8r15ck2e7dd4 Query : select no, estab,szadrsdesc from szadrs where u_coddest=39
20240611@083306.7303 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9170.00.1'
20240611@083306.7422 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9902.00.1'
20240611@083306.7541 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9205.00.1'
20240611@083306.7659 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5347.00.1'
20240611@083306.7771 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5396.00.1'
20240611@083306.7900 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.670.00.01'
20240611@083306.8018 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.682.00.01'
20240611@083306.8143 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.682.00.01'
20240611@083306.8154 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1803.00.1'
20240611@083306.8276 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1824.00.1'
20240611@083306.8426 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8430 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 1 valor from ts where ts.ndos = 5
20240611@083306.8442 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8446 c756ehr3m3da5c8r15ck2e7dd4 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')
20240611@083306.8473 c756ehr3m3da5c8r15ck2e7dd4 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
20240611@083306.8494 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8498 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 ~inactivo valor from fl where no = '100500' and estab = 0 order by inactivo desc
20240611@083306.8514 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8517 c756ehr3m3da5c8r15ck2e7dd4 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240611@083306.8533 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8537 c756ehr3m3da5c8r15ck2e7dd4 Query : select szadrsstamp valor from szadrs where szadrsdesc='n/instalaÇÕes - 1685-525 caneÇas'
20240611@083306.8658 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8662 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from ts where ndos = 5
20240611@083306.8678 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.8697 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@083306.8709 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.8722 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@083306.8729 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.8743 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@083306.8750 c756ehr3m3da5c8r15ck2e7dd4 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
20240611@083306.8765 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@083306.8793 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@083306.8809 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.8814 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20240611@083306.8828 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.8846 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@083306.8854 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6667f048516667fdb2d7',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240611@083306.8866 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.8882 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@083306.8889 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut6667f048516667fdb2d7','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20240611','09:03',?,?)
20240611@083306.9077 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.9096 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@083306.9108 c756ehr3m3da5c8r15ck2e7dd4 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 ('aut6667f048516667fdb2d7','trf entre armazéns a','2024-06-11',5,310,?,?,?,?,?,?,?,?,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',?)
20240611@083306.9518 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.9523 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '328.9170.00.1'
20240611@083306.9540 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.9543 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '328.9170.00.1'
20240611@083306.9558 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.9561 c756ehr3m3da5c8r15ck2e7dd4 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 = '328.9170.00.1' and sa.armazem = 133 
20240611@083306.9630 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083306.9633 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '328.9170.00.1'
20240611@083306.9651 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9170.00.1'
20240611@083306.9851 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.9868 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083306.9882 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083306.9898 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083306.9907 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='328.9170.00.1' and lote = 'r2100308100a'
20240611@083307.0000 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.4600 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.6800 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.7900 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f876086667fdb301','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.3260 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.3440 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.3590 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f876086667fdb301',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,10000 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*1.000,0*1.000*200.48 ,175.485000,175.485000*200.48 ,175.485000,175.485000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*1.000,0*1.000*200.48,0,0*1.000,0,0*1.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.2238 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.2243 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '328.9902.00.1'
20240611@083307.2258 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.2262 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '328.9902.00.1'
20240611@083307.2276 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.2280 c756ehr3m3da5c8r15ck2e7dd4 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 = '328.9902.00.1' and sa.armazem = 133 
20240611@083307.2348 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.2352 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '328.9902.00.1'
20240611@083307.2365 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9902.00.1'
20240611@083307.2547 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.2567 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.2584 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.2600 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.2608 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='328.9902.00.1' and lote = 'r2301241100a'
20240611@083307.2633 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.2644 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.2659 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.2666 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f589696667fdb340','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.2814 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.2844 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.2858 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f589696667fdb340',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,20000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*2.000,0*2.000*200.48 ,164.541000,164.541000*200.48 ,164.541000,164.541000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*2.000,0*2.000*200.48,0,0*2.000,0,0*2.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.3161 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.3164 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '328.9205.00.1'
20240611@083307.3180 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.3184 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '328.9205.00.1'
20240611@083307.3197 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.3200 c756ehr3m3da5c8r15ck2e7dd4 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 = '328.9205.00.1' and sa.armazem = 133 
20240611@083307.3268 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.3272 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '328.9205.00.1'
20240611@083307.3283 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9205.00.1'
20240611@083307.3441 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.3458 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.3471 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.3484 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.3493 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='328.9205.00.1' and lote = 'r2001612100a'
20240611@083307.3530 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.3542 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.3556 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.3563 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f257376667fdb356','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.3695 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.3712 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.3725 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f257376667fdb356',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,30000 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*1.000,0*1.000*200.48 ,68.142000,68.142000*200.48 ,68.142000,68.142000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*1.000,0*1.000*200.48,0,0*1.000,0,0*1.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.4001 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4005 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.5347.00.1'
20240611@083307.4020 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4034 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.5347.00.1'
20240611@083307.4047 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4050 c756ehr3m3da5c8r15ck2e7dd4 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.5347.00.1' and sa.armazem = 133 
20240611@083307.4127 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4131 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.5347.00.1'
20240611@083307.4161 c756ehr3m3da5c8r15ck2e7dd4 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.5347.00.1'
20240611@083307.4329 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.4347 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.4358 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.4372 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.4379 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.5347.00.1' and lote = 'r2300915100a'
20240611@083307.4399 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.4409 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.4422 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.4430 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f274436667fdb36b','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.4562 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.4579 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.4593 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f274436667fdb36b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 12.000, 12.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,40000 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*12.000,0*12.000*200.48 ,7.306000,7.306000*200.48 ,7.306000,7.306000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*12.000,0*12.000*200.48,0,0*12.000,0,0*12.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.4871 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4877 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.5396.00.1'
20240611@083307.4890 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4894 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.5396.00.1'
20240611@083307.4918 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.4921 c756ehr3m3da5c8r15ck2e7dd4 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.5396.00.1' and sa.armazem = 133 
20240611@083307.4998 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.5001 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.5396.00.1'
20240611@083307.5014 c756ehr3m3da5c8r15ck2e7dd4 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.5396.00.1'
20240611@083307.5208 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.5224 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.5237 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.5253 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.5261 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.5396.00.1' and lote = 'r2300840100a'
20240611@083307.5340 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.5351 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.5367 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.5374 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f973666667fdb382','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.5503 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.5520 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.5534 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f973666667fdb382',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 12.000, 12.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,50000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*12.000,0*12.000*200.48 ,9.272000,9.272000*200.48 ,9.272000,9.272000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*12.000,0*12.000*200.48,0,0*12.000,0,0*12.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.5809 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.5813 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.670.00.01'
20240611@083307.6166 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.6170 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.670.00.01'
20240611@083307.6183 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.6186 c756ehr3m3da5c8r15ck2e7dd4 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.670.00.01' and sa.armazem = 133 
20240611@083307.6251 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.6254 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.670.00.01'
20240611@083307.6267 c756ehr3m3da5c8r15ck2e7dd4 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'
20240611@083307.6437 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.6452 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.6464 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.6478 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.6486 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.670.00.01' and lote = 'r2300533200a'
20240611@083307.6510 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.6522 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.6537 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.6545 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f671166667fdb39f','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.6675 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.6691 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.6704 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f671166667fdb39f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,60000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*6.000,0*6.000*200.48 ,27.140000,27.140000*200.48 ,27.140000,27.140000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*6.000,0*6.000*200.48,0,0*6.000,0,0*6.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.6976 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.6980 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20240611@083307.6994 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.6998 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20240611@083307.7025 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.7029 c756ehr3m3da5c8r15ck2e7dd4 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.682.00.01' and sa.armazem = 133 
20240611@083307.7095 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.7098 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20240611@083307.7111 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.682.00.01'
20240611@083307.7278 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.7296 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.7309 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.7323 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.7330 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2301181200a'
20240611@083307.7349 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.7360 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.7376 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.7383 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f498986667fdb3b3','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.7512 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.7531 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.7544 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f498986667fdb3b3',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 14.000, 14.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 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*14.000,0*14.000*200.48 ,23.221000,23.221000*200.48 ,23.221000,23.221000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*14.000,0*14.000*200.48,0,0*14.000,0,0*14.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.7812 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.7816 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.682.00.01'
20240611@083307.7829 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.7832 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20240611@083307.7844 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.7846 c756ehr3m3da5c8r15ck2e7dd4 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.682.00.01' and sa.armazem = 133 
20240611@083307.7861 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.7865 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.682.00.01'
20240611@083307.7890 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.682.00.01'
20240611@083307.7905 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.7921 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.7933 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.7947 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.7954 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.682.00.01' and lote = 'r2400059200a'
20240611@083307.7974 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.7996 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.8011 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.8019 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f665596667fdb3c3','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.8151 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.8169 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.8182 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f665596667fdb3c3',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,80000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*2.000,0*2.000*200.48 ,23.221000,23.221000*200.48 ,23.221000,23.221000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*2.000,0*2.000*200.48,0,0*2.000,0,0*2.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.8449 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.8453 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.1803.00.1'
20240611@083307.8467 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.8470 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.1803.00.1'
20240611@083307.8484 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.8488 c756ehr3m3da5c8r15ck2e7dd4 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1803.00.1' and sa.armazem = 133 
20240611@083307.8554 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.8558 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.1803.00.1'
20240611@083307.8571 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1803.00.1'
20240611@083307.8822 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.8838 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.8850 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.8864 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.8871 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.1803.00.1' and lote = 'r2301207200a'
20240611@083307.8894 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083307.8905 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.8919 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083307.8926 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f817866667fdb3d9','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083307.9055 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083307.9072 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083307.9084 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f817866667fdb3d9',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,90000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*6.000,0*6.000*200.48 ,33.125000,33.125000*200.48 ,33.125000,33.125000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*6.000,0*6.000*200.48,0,0*6.000,0,0*6.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083307.9390 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083307.9954 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.usalote valor from st where st.ref = '324.1824.00.1'
20240611@083308.5250 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083308.5290 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.1824.00.1'
20240611@083308.5470 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083308.5500 c756ehr3m3da5c8r15ck2e7dd4 Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1824.00.1' and sa.armazem = 133 
20240611@083308.6240 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083308.6280 c756ehr3m3da5c8r15ck2e7dd4 Query : select st.stns valor from st where st.ref = '324.1824.00.1'
20240611@083308.6430 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1824.00.1'
20240611@083308.8030 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083308.8200 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083308.8310 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083308.8460 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083308.8540 c756ehr3m3da5c8r15ck2e7dd4 Query : select sestamp valor from se where ref ='324.1824.00.1' and lote = 'r2301208200a'
20240611@083308.8700 c756ehr3m3da5c8r15ck2e7dd4 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@083308.8820 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083308.8970 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@083308.9060 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6667f308376667fdb415','aut6667f048516667fdb2d7',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 = 'aut6667f048516667fdb2d7'
20240611@083308.1063 c756ehr3m3da5c8r15ck2e7dd4 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@083308.1081 c756ehr3m3da5c8r15ck2e7dd4 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@083308.1095 c756ehr3m3da5c8r15ck2e7dd4 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6667f308376667fdb415',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,100000 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*20.000,0*20.000*200.48 ,27.304000,27.304000*200.48 ,27.304000,27.304000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*20.000,0*20.000*200.48,0,0*20.000,0,0*20.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6667f048516667fdb2d7'
20240611@083308.1384 c756ehr3m3da5c8r15ck2e7dd4 Query : insert into wsbocreationlog (initialstamp,externalid,creationstatus,documenttypeid,idustamp,transactionid) values ('aut6667f048516667fdb2d7','','wait',5,'','')
20240611@083308.1438 c756ehr3m3da5c8r15ck2e7dd4 Query : use flama_phc
20240611@083308.1441 c756ehr3m3da5c8r15ck2e7dd4 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@083308.1454 c756ehr3m3da5c8r15ck2e7dd4 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='314';
20240611@083308.1472 c756ehr3m3da5c8r15ck2e7dd4 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='314';
20240611@083618.5448 sl51biafqd9f2na0rm5pfaos4v Query : use flama_phc
20240611@083618.5457 sl51biafqd9f2na0rm5pfaos4v Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240611@083618.5479 sl51biafqd9f2na0rm5pfaos4v Query : use flama_phc
20240611@083618.5483 sl51biafqd9f2na0rm5pfaos4v Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@085003.3805 em85j0ocjgk88td3qr1nolfaua Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@085003.3821 em85j0ocjgk88td3qr1nolfaua Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@085003.3838 em85j0ocjgk88td3qr1nolfaua Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='315';
20240611@085003.4035 em85j0ocjgk88td3qr1nolfaua Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='315';
20240611@085003.4120 em85j0ocjgk88td3qr1nolfaua Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='315';
20240611@085003.4232 em85j0ocjgk88td3qr1nolfaua Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='315';
20240611@085003.5056 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@085003.5071 bkpsurq8vdvgki0ujsf0pnm1qr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@085003.5087 bkpsurq8vdvgki0ujsf0pnm1qr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='316';
20240611@085003.5126 bkpsurq8vdvgki0ujsf0pnm1qr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='316';
20240611@085003.5139 bkpsurq8vdvgki0ujsf0pnm1qr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='316';
20240611@085003.5151 bkpsurq8vdvgki0ujsf0pnm1qr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='316';
20240611@085003.5167 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.5170 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@085003.5186 bkpsurq8vdvgki0ujsf0pnm1qr Query : select no, estab,szadrsdesc from szadrs where u_coddest=2
20240611@085003.5217 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '323.367.09.00'
20240611@085003.5326 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9902.00.1'
20240611@085003.5337 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9902.00.1'
20240611@085003.5346 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.4840.00.1'
20240611@085003.5445 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.642.00.01'
20240611@085003.5914 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.642.00.01'
20240611@085003.5926 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1834.00.1'
20240611@085003.6067 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1578.00.1'
20240611@085003.6221 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1578.00.1'
20240611@085003.6231 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1293.00.1'
20240611@085003.6328 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1256.00.1'
20240611@085003.6419 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1256.00.1'
20240611@085003.6431 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1685.00.1'
20240611@085003.6527 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1685.00.1'
20240611@085003.6537 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5500.00.1'
20240611@085003.6639 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1462.00.1'
20240611@085003.6753 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2221.00.1'
20240611@085003.6868 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.691.00.01'
20240611@085003.7139 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.691.00.01'
20240611@085003.7335 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.692.00.01'
20240611@085003.7449 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.698.00.01'
20240611@085003.7557 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1266.00.1'
20240611@085003.7701 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7704 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 1 valor from ts where ts.ndos = 5
20240611@085003.7715 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7717 bkpsurq8vdvgki0ujsf0pnm1qr 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')
20240611@085003.7736 bkpsurq8vdvgki0ujsf0pnm1qr 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
20240611@085003.7754 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7757 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 ~inactivo valor from fl where no = '100500' and estab = 0 order by inactivo desc
20240611@085003.7768 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7771 bkpsurq8vdvgki0ujsf0pnm1qr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20240611@085003.7782 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7810 bkpsurq8vdvgki0ujsf0pnm1qr Query : select szadrsstamp valor from szadrs where szadrsdesc='n/instalaÇÕes sede'
20240611@085003.7828 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7831 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from ts where ndos = 5
20240611@085003.7841 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.7856 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@085003.7866 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.7879 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@085003.7885 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.7897 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@085003.7903 bkpsurq8vdvgki0ujsf0pnm1qr 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
20240611@085003.7920 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@085003.7955 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2024 order by obrano desc
20240611@085003.7967 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.7971 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100500' and estab=0
20240611@085003.7982 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.7996 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20240611@085003.8003 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut6668046371666801abc2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20240611@085003.8007 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.8019 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20240611@085003.8025 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut6668046371666801abc2','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20240611','09:20',?,?)
20240611@085003.8191 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.8206 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20240611@085003.8217 bkpsurq8vdvgki0ujsf0pnm1qr 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 ('aut6668046371666801abc2','trf entre armazéns a','2024-06-11',5,311,?,?,?,?,?,?,?,?,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',?)
20240611@085003.8586 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.8590 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '323.367.09.00'
20240611@085003.8603 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.8605 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '323.367.09.00'
20240611@085003.8617 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.8620 bkpsurq8vdvgki0ujsf0pnm1qr 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 
20240611@085003.8696 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085003.8699 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '323.367.09.00'
20240611@085003.8715 bkpsurq8vdvgki0ujsf0pnm1qr 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'
20240611@085003.8867 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.8882 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085003.9137 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.9153 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085003.9164 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='323.367.09.00' and lote = 'r2100870100a'
20240611@085003.9264 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085003.9274 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.9291 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085003.9798 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668013213666801abe2','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085003.9958 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085003.9976 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085003.9986 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668013213666801abe2',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 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*2.000,0*2.000*200.48 ,69.650000,69.650000*200.48 ,69.650000,69.650000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*2.000,0*2.000*200.48,0,0*2.000,0,0*2.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.2620 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2670 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '328.9902.00.1'
20240611@085004.2790 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2830 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '328.9902.00.1'
20240611@085004.2950 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2980 bkpsurq8vdvgki0ujsf0pnm1qr 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 = '328.9902.00.1' and sa.armazem = 133 
20240611@085004.3110 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.3140 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '328.9902.00.1'
20240611@085004.3250 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9902.00.1'
20240611@085004.3370 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.3530 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.3650 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.3790 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.4090 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='328.9902.00.1' and lote = 'r2301241100a'
20240611@085004.4280 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.4400 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.4540 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.4620 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668037114666801ac0a','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.5940 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6150 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.6270 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668037114666801ac0a',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,20000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*2.000,0*2.000*200.48 ,164.541000,164.541000*200.48 ,164.541000,164.541000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*2.000,0*2.000*200.48,0,0*2.000,0,0*2.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.9400 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.9820 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '328.9902.00.1'
20240611@085004.1190 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.1232 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '328.9902.00.1'
20240611@085004.1276 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.1278 bkpsurq8vdvgki0ujsf0pnm1qr 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 = '328.9902.00.1' and sa.armazem = 133 
20240611@085004.1292 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.1294 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '328.9902.00.1'
20240611@085004.1305 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '328.9902.00.1'
20240611@085004.1318 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.1332 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.1343 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.1356 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.1363 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='328.9902.00.1' and lote = 'r2301241100a'
20240611@085004.1374 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.1384 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.1397 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.1404 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668086252666801ac21','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.1535 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.1552 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.1564 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668086252666801ac21',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,30000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*1.000,0*1.000*200.48 ,164.541000,164.541000*200.48 ,164.541000,164.541000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*1.000,0*1.000*200.48,0,0*1.000,0,0*1.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.1850 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.1853 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.4840.00.1'
20240611@085004.1911 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.1914 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.4840.00.1'
20240611@085004.1927 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.1930 bkpsurq8vdvgki0ujsf0pnm1qr 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.4840.00.1' and sa.armazem = 133 
20240611@085004.1998 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2002 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.4840.00.1'
20240611@085004.2014 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.4840.00.1'
20240611@085004.2170 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.2208 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.2220 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.2234 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.2240 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.4840.00.1' and lote = 'r2101353200a'
20240611@085004.2271 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.2283 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.2303 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.2312 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668068482666801ac37','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.2447 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.2465 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.2477 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668068482666801ac37',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,40000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*10.000,0*10.000*200.48 ,19.959000,19.959000*200.48 ,19.959000,19.959000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*10.000,0*10.000*200.48,0,0*10.000,0,0*10.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.2752 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2756 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.642.00.01'
20240611@085004.2771 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2775 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.642.00.01'
20240611@085004.2787 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2791 bkpsurq8vdvgki0ujsf0pnm1qr 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.642.00.01' and sa.armazem = 133 
20240611@085004.2857 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.2861 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.642.00.01'
20240611@085004.2874 bkpsurq8vdvgki0ujsf0pnm1qr 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.642.00.01'
20240611@085004.3189 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.3206 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.3219 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.3233 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.3239 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.642.00.01' and lote = 'r2100892200a'
20240611@085004.3257 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.3298 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.3314 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.3322 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668027706666801ac50','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.3503 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.5552 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.5564 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668027706666801ac50',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 14.000, 14.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 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*14.000,0*14.000*200.48 ,18.573000,18.573000*200.48 ,18.573000,18.573000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*14.000,0*14.000*200.48,0,0*14.000,0,0*14.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.5850 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.5854 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.642.00.01'
20240611@085004.5865 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.5868 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.642.00.01'
20240611@085004.5878 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.5881 bkpsurq8vdvgki0ujsf0pnm1qr 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.642.00.01' and sa.armazem = 133 
20240611@085004.5893 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.5895 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.642.00.01'
20240611@085004.5914 bkpsurq8vdvgki0ujsf0pnm1qr 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.642.00.01'
20240611@085004.6065 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6080 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.6091 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6103 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.6109 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.642.00.01' and lote = 'r2100892200a'
20240611@085004.6119 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.6129 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6142 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.6148 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668059508666801ac95','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.6270 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6285 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.6300 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668059508666801ac95',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,60000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*2.000,0*2.000*200.48 ,18.573000,18.573000*200.48 ,18.573000,18.573000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*2.000,0*2.000*200.48,0,0*2.000,0,0*2.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.6566 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.6571 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1834.00.1'
20240611@085004.6584 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.6587 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1834.00.1'
20240611@085004.6600 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.6602 bkpsurq8vdvgki0ujsf0pnm1qr 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.1834.00.1' and sa.armazem = 133 
20240611@085004.6665 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.6667 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1834.00.1'
20240611@085004.6678 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1834.00.1'
20240611@085004.6825 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6843 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.6855 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6869 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.6877 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1834.00.1' and lote = 'r2301209100a'
20240611@085004.6889 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.6900 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.6913 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.6920 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668016705666801aca8','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.7044 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.7059 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.7070 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668016705666801aca8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 13.000, 13.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 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*13.000,0*13.000*200.48 ,28.770000,28.770000*200.48 ,28.770000,28.770000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*13.000,0*13.000*200.48,0,0*13.000,0,0*13.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.7406 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.7448 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20240611@085004.7660 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.7698 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1578.00.1'
20240611@085004.7713 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.7716 bkpsurq8vdvgki0ujsf0pnm1qr 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 
20240611@085004.7809 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.7812 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1578.00.1'
20240611@085004.7824 bkpsurq8vdvgki0ujsf0pnm1qr 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'
20240611@085004.7988 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8003 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.8015 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8029 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.8035 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2100121100a'
20240611@085004.8069 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.8078 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8093 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.8102 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668060580666801acc5','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.8331 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8352 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.8364 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668060580666801acc5',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,80000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*1.000,0*1.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*200.48,0*1.000,0*1.000*200.48,0,0*1.000,0,0*1.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.8647 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.8651 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1578.00.1'
20240611@085004.8663 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.8666 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1578.00.1'
20240611@085004.8678 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.8680 bkpsurq8vdvgki0ujsf0pnm1qr 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 
20240611@085004.8695 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.8698 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1578.00.1'
20240611@085004.8709 bkpsurq8vdvgki0ujsf0pnm1qr 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'
20240611@085004.8721 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8735 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.8748 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8762 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.8769 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1578.00.1' and lote = 'r2100121100a'
20240611@085004.8780 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085004.8833 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.8902 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085004.8909 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668062086666801acd7','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085004.9100 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085004.9284 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085004.9298 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668062086666801acd7',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,90000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*4.000,0*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*200.48,0*4.000,0*4.000*200.48,0,0*4.000,0,0*4.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085004.9574 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.9577 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1293.00.1'
20240611@085004.9591 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.9594 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1293.00.1'
20240611@085004.9608 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.9611 bkpsurq8vdvgki0ujsf0pnm1qr 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.1293.00.1' and sa.armazem = 133 
20240611@085004.9677 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085004.9681 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1293.00.1'
20240611@085004.9693 bkpsurq8vdvgki0ujsf0pnm1qr 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.1293.00.1'
20240611@085004.9920 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.5300 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.1530 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.1720 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.1800 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1293.00.1' and lote = 'r2101042200a'
20240611@085005.2130 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.2250 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.2420 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.2500 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668029595666801ad05','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.3820 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4030 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.4150 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668029595666801ad05',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 14.000, 14.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 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*14.000,0*14.000*200.48 ,154.657000,154.657000*200.48 ,154.657000,154.657000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*14.000,0*14.000*200.48,0,0*14.000,0,0*14.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.6910 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.6970 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1256.00.1'
20240611@085005.7110 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.7140 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1256.00.1'
20240611@085005.7270 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.7310 bkpsurq8vdvgki0ujsf0pnm1qr 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.1256.00.1' and sa.armazem = 133 
20240611@085005.7970 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.8000 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1256.00.1'
20240611@085005.8110 bkpsurq8vdvgki0ujsf0pnm1qr 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.1256.00.1'
20240611@085005.9740 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.9890 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.1004 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.1018 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.1026 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1256.00.1' and lote = 'r210135200a'
20240611@085005.1039 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.1282 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.1302 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.1309 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668000870666801ad1f','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.1525 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.1564 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.1577 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668000870666801ad1f',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,110000 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*7.000,0*7.000*200.48 ,46.885000,46.885000*200.48 ,46.885000,46.885000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*7.000,0*7.000*200.48,0,0*7.000,0,0*7.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.1857 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.1862 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1256.00.1'
20240611@085005.1876 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.1879 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1256.00.1'
20240611@085005.1891 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.1894 bkpsurq8vdvgki0ujsf0pnm1qr 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.1256.00.1' and sa.armazem = 133 
20240611@085005.1907 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.1909 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1256.00.1'
20240611@085005.2996 bkpsurq8vdvgki0ujsf0pnm1qr 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.1256.00.1'
20240611@085005.3015 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.3030 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.3042 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.3129 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.3138 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1256.00.1' and lote = 'r210135200a'
20240611@085005.3151 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.3163 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.3179 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.3187 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668040425666801ad4d','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.3345 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.3364 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.3380 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668040425666801ad4d',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,120000 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*2.000,0*2.000*200.48 ,46.885000,46.885000*200.48 ,46.885000,46.885000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*2.000,0*2.000*200.48,0,0*2.000,0,0*2.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.3773 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.3777 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20240611@085005.3792 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.3796 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20240611@085005.3809 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.3812 bkpsurq8vdvgki0ujsf0pnm1qr 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 
20240611@085005.3876 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.3879 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20240611@085005.3892 bkpsurq8vdvgki0ujsf0pnm1qr 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'
20240611@085005.4047 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4062 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.4072 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4085 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.4099 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2100529200a'
20240611@085005.4129 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.4139 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4152 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.4159 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668077416666801ad65','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.4288 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4306 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.4318 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668077416666801ad65',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 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*9.000,0*9.000*200.48 ,29.410000,29.410000*200.48 ,29.410000,29.410000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*9.000,0*9.000*200.48,0,0*9.000,0,0*9.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.4590 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.4595 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1685.00.1'
20240611@085005.4606 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.4609 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20240611@085005.4620 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.4623 bkpsurq8vdvgki0ujsf0pnm1qr 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 
20240611@085005.4635 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.4638 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1685.00.1'
20240611@085005.4650 bkpsurq8vdvgki0ujsf0pnm1qr 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'
20240611@085005.4661 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4676 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.4686 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.4700 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.4747 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1685.00.1' and lote = 'r2100529200a'
20240611@085005.5974 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.5986 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.6002 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.6009 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668093829666801ad92','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.6366 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.6665 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.6784 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668093829666801ad92',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 11.000, 11.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 ,0,0*200.48,0,0*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,0*11.000,0*11.000*200.48 ,29.410000,29.410000*200.48 ,29.410000,29.410000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*11.000,0*11.000*200.48,0,0*11.000,0,0*11.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.7062 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.7067 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.5500.00.1'
20240611@085005.7082 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.7085 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.5500.00.1'
20240611@085005.7100 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.7103 bkpsurq8vdvgki0ujsf0pnm1qr 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.5500.00.1' and sa.armazem = 133 
20240611@085005.7180 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.7183 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.5500.00.1'
20240611@085005.7241 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5500.00.1'
20240611@085005.7410 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.7424 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.7436 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.7450 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.7456 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.5500.00.1' and lote = 'r2301223200a'
20240611@085005.7475 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.7489 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.7503 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.7510 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668048602666801adb6','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.7655 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.7723 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.7735 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668048602666801adb6',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,150000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*10.000,0*10.000*200.48 ,24.067000,24.067000*200.48 ,24.067000,24.067000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*10.000,0*10.000*200.48,0,0*10.000,0,0*10.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.7998 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.8002 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1462.00.1'
20240611@085005.8015 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.8018 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1462.00.1'
20240611@085005.8056 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.8059 bkpsurq8vdvgki0ujsf0pnm1qr 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.1462.00.1' and sa.armazem = 133 
20240611@085005.8125 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.8128 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.1462.00.1'
20240611@085005.8140 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1462.00.1'
20240611@085005.8320 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.8337 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.8349 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.8361 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.8369 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.1462.00.1' and lote = 'r2101096200a'
20240611@085005.8436 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.8448 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.8465 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.8472 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668087562666801adce','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.8609 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.8632 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.8644 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668087562666801adce',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,160000 ,0,0*200.48,0,0*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,0*10.000,0*10.000*200.48 ,30.730000,30.730000*200.48 ,30.730000,30.730000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*10.000,0*10.000*200.48,0,0*10.000,0,0*10.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085005.8959 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.8966 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.2221.00.1'
20240611@085005.9079 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.9105 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.2221.00.1'
20240611@085005.9172 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.9175 bkpsurq8vdvgki0ujsf0pnm1qr 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.2221.00.1' and sa.armazem = 133 
20240611@085005.9247 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085005.9250 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.2221.00.1'
20240611@085005.9263 bkpsurq8vdvgki0ujsf0pnm1qr 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.2221.00.1'
20240611@085005.9458 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.9477 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.9502 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.9521 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.9528 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.2221.00.1' and lote = 'r2301281300a'
20240611@085005.9552 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20240611@085005.9563 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.9579 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085005.9587 bkpsurq8vdvgki0ujsf0pnm1qr Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut6668001810666801ade9','aut6668046371666801abc2',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 = 'aut6668046371666801abc2'
20240611@085005.9714 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085005.9730 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085005.9742 bkpsurq8vdvgki0ujsf0pnm1qr 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,eslvu,slvu,esltt,sltt,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,stipo) select 'aut6668001810666801ade9',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,170000 ,0,0*200.48,0,0*200.48 ,0,0,'un ','' ,bo.marcada,1 ,0*16.000,0*16.000*200.48 ,9.892000,9.892000*200.48 ,9.892000,9.892000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0*200.48,0*16.000,0*16.000*200.48,0,0*16.000,0,0*16.000,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut6668046371666801abc2'
20240611@085006.2760 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.2810 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.691.00.01'
20240611@085006.2950 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.2970 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.691.00.01'
20240611@085006.3100 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.3130 bkpsurq8vdvgki0ujsf0pnm1qr 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.691.00.01' and sa.armazem = 133 
20240611@085006.3800 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.3820 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.stns valor from st where st.ref = '324.691.00.01'
20240611@085006.3950 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.691.00.01'
20240611@085006.5490 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085006.5650 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20240611@085006.5770 bkpsurq8vdvgki0ujsf0pnm1qr Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20240611@085006.5900 bkpsurq8vdvgki0ujsf0pnm1qr Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20240611@085006.5970 bkpsurq8vdvgki0ujsf0pnm1qr Query : select sestamp valor from se where ref ='324.691.00.01' and lote = 'r2400062100a'
20240611@085006.6070 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.6100 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.691.00.01'
20240611@085006.6210 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.6230 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.692.00.01'
20240611@085006.6330 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.6360 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.698.00.01'
20240611@085006.6500 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.6540 bkpsurq8vdvgki0ujsf0pnm1qr Query : select st.usalote valor from st where st.ref = '324.1266.00.1'
20240611@085006.6760 bkpsurq8vdvgki0ujsf0pnm1qr Query : use flama_phc
20240611@085006.6790 bkpsurq8vdvgki0ujsf0pnm1qr Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -116
20240611@085006.7360 bkpsurq8vdvgki0ujsf0pnm1qr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='316';
20240611@085006.7510 bkpsurq8vdvgki0ujsf0pnm1qr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='316';
20240611@091914.1281 ov7d9et5cgsk82d8g56p4a115e Query : use flama_phc
20240611@091914.1293 ov7d9et5cgsk82d8g56p4a115e Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20240611@091914.1339 ov7d9et5cgsk82d8g56p4a115e Query : use flama_phc
20240611@091914.1342 ov7d9et5cgsk82d8g56p4a115e Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20240611@092026.4952 adsg2gukb5sejojlb2rvevlk4f Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@092026.4979 adsg2gukb5sejojlb2rvevlk4f Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@092026.4995 adsg2gukb5sejojlb2rvevlk4f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='317';
20240611@092026.5039 adsg2gukb5sejojlb2rvevlk4f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='317';
20240611@092026.5052 adsg2gukb5sejojlb2rvevlk4f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='317';
20240611@092026.5063 adsg2gukb5sejojlb2rvevlk4f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='317';
20240611@092026.6522 gpq3bhrvbj3hrh9j0vsif67g8m Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20240611@092026.6539 gpq3bhrvbj3hrh9j0vsif67g8m Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20240611@092026.6558 gpq3bhrvbj3hrh9j0vsif67g8m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='318';
20240611@092026.6619 gpq3bhrvbj3hrh9j0vsif67g8m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='318';
20240611@092026.6653 gpq3bhrvbj3hrh9j0vsif67g8m Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='318';
20240611@092026.6667 gpq3bhrvbj3hrh9j0vsif67g8m Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='318';
20240611@092026.6679 gpq3bhrvbj3hrh9j0vsif67g8m Query : use flama_phc
20240611@092026.6682 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20240611@092026.6707 gpq3bhrvbj3hrh9j0vsif67g8m Query : select no, estab,szadrsdesc from szadrs where u_coddest=2
20240611@092026.6744 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.497.00.01'
20240611@092026.6871 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.969.00.01'
20240611@092026.6992 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.969.00.01'
20240611@092026.7016 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.4521.00.1'
20240611@092026.7132 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5347.00.1'
20240611@092026.7142 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5347.00.1'
20240611@092026.7151 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5501.00.1'
20240611@092026.7264 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5500.00.1'
20240611@092026.7275 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.642.00.01'
20240611@092026.7290 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.658.00.01'
20240611@092026.7404 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.682.00.01'
20240611@092026.7423 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.4585.00.1'
20240611@092026.7533 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.4960.00.1'
20240611@092026.7650 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.4964.00.1'
20240611@092026.7762 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2221.00.1'
20240611@092026.7777 gpq3bhrvbj3hrh9j0vsif67g8m Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2222.00.1'
