20250306@163609.4287 k6ibrtgiocvl5d41tr0ud3ktr8 Query : use flama_phc
20250306@163609.4320 k6ibrtgiocvl5d41tr0ud3ktr8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@171909.6058 c2ar7vape79kq0luq711l5vdma Query : use flama_phc
20250306@171909.6063 c2ar7vape79kq0luq711l5vdma Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@171909.6156 c2ar7vape79kq0luq711l5vdma Query : use flama_phc
20250306@171909.6161 c2ar7vape79kq0luq711l5vdma Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@173609.6859 t05me9bfuev7lov5adjnovme8q Query : use flama_phc
20250306@173609.6863 t05me9bfuev7lov5adjnovme8q Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@173609.7013 t05me9bfuev7lov5adjnovme8q Query : use flama_phc
20250306@173609.7017 t05me9bfuev7lov5adjnovme8q Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@181908.5447 jmu3hheb6bbedhn174d5ls8i0s Query : use flama_phc
20250306@181908.5451 jmu3hheb6bbedhn174d5ls8i0s Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@181908.5539 jmu3hheb6bbedhn174d5ls8i0s Query : use flama_phc
20250306@181908.5542 jmu3hheb6bbedhn174d5ls8i0s Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@182005.2854 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250306@182005.2988 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250306@182005.3533 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5747';
20250306@182005.4750 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5747';
20250306@182005.5137 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5747';
20250306@182005.5490 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5747';
20250306@182005.5970 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : use flama_phc
20250306@182005.6045 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250306@182005.6733 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : use flama_phc
20250306@182005.6779 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select no, estab,szadrsdesc from szadrs where u_coddest=376
20250306@182005.7223 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501583 
20250306@182005.8310 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : use flama_phc
20250306@182005.8358 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250306@182005.8770 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : use flama_phc
20250306@182005.8817 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250306@182005.9174 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250306@182005.9395 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5747';
20250306@182005.9746 lgkmnhkv6ndcrrk9oc0vfm9l7p Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5747';
20250306@182006.6060 qfam03rh3o7e4i7sifnma6qc3n Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250306@182006.6880 qfam03rh3o7e4i7sifnma6qc3n Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250306@182006.1232 qfam03rh3o7e4i7sifnma6qc3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5748';
20250306@182006.1639 qfam03rh3o7e4i7sifnma6qc3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5748';
20250306@182006.2091 qfam03rh3o7e4i7sifnma6qc3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5748';
20250306@182006.2407 qfam03rh3o7e4i7sifnma6qc3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5748';
20250306@182006.2769 qfam03rh3o7e4i7sifnma6qc3n Query : use flama_phc
20250306@182006.2811 qfam03rh3o7e4i7sifnma6qc3n Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250306@182006.3431 qfam03rh3o7e4i7sifnma6qc3n Query : use flama_phc
20250306@182006.3471 qfam03rh3o7e4i7sifnma6qc3n Query : select no, estab,szadrsdesc from szadrs where u_coddest=3304
20250306@182006.3865 qfam03rh3o7e4i7sifnma6qc3n Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501585 
20250306@182006.8327 qfam03rh3o7e4i7sifnma6qc3n Query : use flama_phc
20250306@182006.8522 qfam03rh3o7e4i7sifnma6qc3n Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250306@182007.4760 qfam03rh3o7e4i7sifnma6qc3n Query : use flama_phc
20250306@182007.5590 qfam03rh3o7e4i7sifnma6qc3n Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250306@182007.1310 qfam03rh3o7e4i7sifnma6qc3n Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250306@182007.1517 qfam03rh3o7e4i7sifnma6qc3n Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5748';
20250306@182007.1915 qfam03rh3o7e4i7sifnma6qc3n Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5748';
20250306@182007.3305 1kh2akqu6khjf9fhk14r0m51ss Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250306@182007.3318 1kh2akqu6khjf9fhk14r0m51ss Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250306@182007.3402 1kh2akqu6khjf9fhk14r0m51ss Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5749';
20250306@182007.3482 1kh2akqu6khjf9fhk14r0m51ss Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5749';
20250306@182007.3560 1kh2akqu6khjf9fhk14r0m51ss Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5749';
20250306@182007.3623 1kh2akqu6khjf9fhk14r0m51ss Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5749';
20250306@182007.3711 1kh2akqu6khjf9fhk14r0m51ss Query : use flama_phc
20250306@182007.3715 1kh2akqu6khjf9fhk14r0m51ss Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250306@182007.3786 1kh2akqu6khjf9fhk14r0m51ss Query : use flama_phc
20250306@182007.3790 1kh2akqu6khjf9fhk14r0m51ss Query : select no, estab,szadrsdesc from szadrs where u_coddest=2338
20250306@182007.3889 1kh2akqu6khjf9fhk14r0m51ss Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501588 
20250306@182007.4309 1kh2akqu6khjf9fhk14r0m51ss Query : use flama_phc
20250306@182007.4312 1kh2akqu6khjf9fhk14r0m51ss Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250306@182007.4344 1kh2akqu6khjf9fhk14r0m51ss Query : use flama_phc
20250306@182007.4348 1kh2akqu6khjf9fhk14r0m51ss Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250306@182007.4367 1kh2akqu6khjf9fhk14r0m51ss Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250306@182007.4396 1kh2akqu6khjf9fhk14r0m51ss Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5749';
20250306@182007.4455 1kh2akqu6khjf9fhk14r0m51ss Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5749';
20250306@182007.5741 4mr9ss9t2gp7bc91m7knptdid8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250306@182007.5828 4mr9ss9t2gp7bc91m7knptdid8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250306@182007.6352 4mr9ss9t2gp7bc91m7knptdid8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5750';
20250306@182007.7148 4mr9ss9t2gp7bc91m7knptdid8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5750';
20250306@182007.8156 4mr9ss9t2gp7bc91m7knptdid8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5750';
20250306@182007.8971 4mr9ss9t2gp7bc91m7knptdid8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5750';
20250306@182007.9623 4mr9ss9t2gp7bc91m7knptdid8 Query : use flama_phc
20250306@182007.9669 4mr9ss9t2gp7bc91m7knptdid8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250306@182008.3580 4mr9ss9t2gp7bc91m7knptdid8 Query : use flama_phc
20250306@182008.4030 4mr9ss9t2gp7bc91m7knptdid8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=339
20250306@182008.8200 4mr9ss9t2gp7bc91m7knptdid8 Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501589 
20250306@182008.2007 4mr9ss9t2gp7bc91m7knptdid8 Query : use flama_phc
20250306@182008.2052 4mr9ss9t2gp7bc91m7knptdid8 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250306@182008.2445 4mr9ss9t2gp7bc91m7knptdid8 Query : use flama_phc
20250306@182008.2489 4mr9ss9t2gp7bc91m7knptdid8 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250306@182008.2706 4mr9ss9t2gp7bc91m7knptdid8 Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250306@182008.2923 4mr9ss9t2gp7bc91m7knptdid8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5750';
20250306@182008.3250 4mr9ss9t2gp7bc91m7knptdid8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5750';
20250306@182008.5030 srb43t9r0kuihvi91oekjgt9dk Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250306@182008.5317 srb43t9r0kuihvi91oekjgt9dk Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250306@182008.5465 srb43t9r0kuihvi91oekjgt9dk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5751';
20250306@182008.5775 srb43t9r0kuihvi91oekjgt9dk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5751';
20250306@182008.7563 srb43t9r0kuihvi91oekjgt9dk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5751';
20250306@182008.7964 srb43t9r0kuihvi91oekjgt9dk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5751';
20250306@182008.8517 srb43t9r0kuihvi91oekjgt9dk Query : use flama_phc
20250306@182008.8600 srb43t9r0kuihvi91oekjgt9dk Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250306@182008.9814 srb43t9r0kuihvi91oekjgt9dk Query : use flama_phc
20250306@182008.9855 srb43t9r0kuihvi91oekjgt9dk Query : select no, estab,szadrsdesc from szadrs where u_coddest=672
20250306@182009.3200 srb43t9r0kuihvi91oekjgt9dk Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501591 
20250306@182009.2795 srb43t9r0kuihvi91oekjgt9dk Query : use flama_phc
20250306@182009.2837 srb43t9r0kuihvi91oekjgt9dk Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250306@182009.3209 srb43t9r0kuihvi91oekjgt9dk Query : use flama_phc
20250306@182009.3252 srb43t9r0kuihvi91oekjgt9dk Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250306@182009.3461 srb43t9r0kuihvi91oekjgt9dk Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250306@182009.3681 srb43t9r0kuihvi91oekjgt9dk Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5751';
20250306@182009.3995 srb43t9r0kuihvi91oekjgt9dk Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5751';
20250306@182009.5004 u3aocvivlg7dq2ere5ll3jttoe Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250306@182009.5014 u3aocvivlg7dq2ere5ll3jttoe Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250306@182009.5087 u3aocvivlg7dq2ere5ll3jttoe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5752';
20250306@182009.5156 u3aocvivlg7dq2ere5ll3jttoe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5752';
20250306@182009.5223 u3aocvivlg7dq2ere5ll3jttoe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5752';
20250306@182009.5275 u3aocvivlg7dq2ere5ll3jttoe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5752';
20250306@182009.5357 u3aocvivlg7dq2ere5ll3jttoe Query : use flama_phc
20250306@182009.5360 u3aocvivlg7dq2ere5ll3jttoe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250306@182009.5420 u3aocvivlg7dq2ere5ll3jttoe Query : use flama_phc
20250306@182009.5423 u3aocvivlg7dq2ere5ll3jttoe Query : select no, estab,szadrsdesc from szadrs where u_coddest=2448
20250306@182009.5510 u3aocvivlg7dq2ere5ll3jttoe Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501592 
20250306@182009.5883 u3aocvivlg7dq2ere5ll3jttoe Query : use flama_phc
20250306@182009.5886 u3aocvivlg7dq2ere5ll3jttoe Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250306@182009.5915 u3aocvivlg7dq2ere5ll3jttoe Query : use flama_phc
20250306@182009.5918 u3aocvivlg7dq2ere5ll3jttoe Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250306@182009.5934 u3aocvivlg7dq2ere5ll3jttoe Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250306@182009.5961 u3aocvivlg7dq2ere5ll3jttoe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5752';
20250306@182009.6008 u3aocvivlg7dq2ere5ll3jttoe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5752';
20250306@183608.8427 m4ni1rvirc11qbr20uvum5da4n Query : use flama_phc
20250306@183608.8431 m4ni1rvirc11qbr20uvum5da4n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@183608.8536 m4ni1rvirc11qbr20uvum5da4n Query : use flama_phc
20250306@183608.8539 m4ni1rvirc11qbr20uvum5da4n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@191909.8467 c2pm5t35lt5kl5c9helgk0u6bu Query : use flama_phc
20250306@191909.8472 c2pm5t35lt5kl5c9helgk0u6bu Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@191909.8563 c2pm5t35lt5kl5c9helgk0u6bu Query : use flama_phc
20250306@191909.8567 c2pm5t35lt5kl5c9helgk0u6bu Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@193609.6458 cor44utmtn1hf27gvc1hcbpjmn Query : use flama_phc
20250306@193609.6462 cor44utmtn1hf27gvc1hcbpjmn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@193609.6559 cor44utmtn1hf27gvc1hcbpjmn Query : use flama_phc
20250306@193609.6564 cor44utmtn1hf27gvc1hcbpjmn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@201908.9744 18jqoomuoomsnc8e44r5l7fjjn Query : use flama_phc
20250306@201908.9797 18jqoomuoomsnc8e44r5l7fjjn Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@201909.2400 18jqoomuoomsnc8e44r5l7fjjn Query : use flama_phc
20250306@201909.2800 18jqoomuoomsnc8e44r5l7fjjn Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@203608.8393 bgl5assuvfb1k0tuni34ko8tb9 Query : use flama_phc
20250306@203608.8398 bgl5assuvfb1k0tuni34ko8tb9 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@203608.8911 bgl5assuvfb1k0tuni34ko8tb9 Query : use flama_phc
20250306@203608.8915 bgl5assuvfb1k0tuni34ko8tb9 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@211908.7755 2eqh3s2o48d8l0n29i5tav5tfj Query : use flama_phc
20250306@211908.7759 2eqh3s2o48d8l0n29i5tav5tfj Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@211908.7848 2eqh3s2o48d8l0n29i5tav5tfj Query : use flama_phc
20250306@211908.7851 2eqh3s2o48d8l0n29i5tav5tfj Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@213608.8680 q5n3ofjb5dj5b8667odfe4gcq8 Query : use flama_phc
20250306@213608.8684 q5n3ofjb5dj5b8667odfe4gcq8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@213608.8767 q5n3ofjb5dj5b8667odfe4gcq8 Query : use flama_phc
20250306@213608.8770 q5n3ofjb5dj5b8667odfe4gcq8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@221910.3165 i71gu6crer1k1sn7oqvrd352ft Query : use flama_phc
20250306@221910.3170 i71gu6crer1k1sn7oqvrd352ft Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@221910.3259 i71gu6crer1k1sn7oqvrd352ft Query : use flama_phc
20250306@221910.3263 i71gu6crer1k1sn7oqvrd352ft Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@223610.4338 ku7g434h6fll8ajeivn79meia5 Query : use flama_phc
20250306@223610.4344 ku7g434h6fll8ajeivn79meia5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@223610.4445 ku7g434h6fll8ajeivn79meia5 Query : use flama_phc
20250306@223610.4448 ku7g434h6fll8ajeivn79meia5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@231908.5091 94ujnd9k0kuqb4m0sel3aretqb Query : use flama_phc
20250306@231908.5095 94ujnd9k0kuqb4m0sel3aretqb Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@231908.5191 94ujnd9k0kuqb4m0sel3aretqb Query : use flama_phc
20250306@231908.5194 94ujnd9k0kuqb4m0sel3aretqb Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250306@233608.5780 v2qd1mr2e1218tlmqrig75hihk Query : use flama_phc
20250306@233608.5784 v2qd1mr2e1218tlmqrig75hihk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250306@233608.5868 v2qd1mr2e1218tlmqrig75hihk Query : use flama_phc
20250306@233608.5871 v2qd1mr2e1218tlmqrig75hihk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@071908.7545 k0qh0of5nd1iqv8btfesu8l9pk Query : use flama_phc
20250307@071908.7550 k0qh0of5nd1iqv8btfesu8l9pk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@071908.7711 k0qh0of5nd1iqv8btfesu8l9pk Query : use flama_phc
20250307@071908.7715 k0qh0of5nd1iqv8btfesu8l9pk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@073624.6171 p2fkdn4tf780n4v1rnt718uh5a Query : use flama_phc
20250307@073624.6182 p2fkdn4tf780n4v1rnt718uh5a Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@073624.6303 p2fkdn4tf780n4v1rnt718uh5a Query : use flama_phc
20250307@073624.6306 p2fkdn4tf780n4v1rnt718uh5a Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@081908.9678 1cfab6d3sgj3c9ao7il2bkckvm Query : use flama_phc
20250307@081908.9683 1cfab6d3sgj3c9ao7il2bkckvm Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@081908.9786 1cfab6d3sgj3c9ao7il2bkckvm Query : use flama_phc
20250307@081908.9789 1cfab6d3sgj3c9ao7il2bkckvm Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@083609.8620 2dqos5d4au6c82heuh2vg2k81j Query : use flama_phc
20250307@083609.8670 2dqos5d4au6c82heuh2vg2k81j Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@083609.9610 2dqos5d4au6c82heuh2vg2k81j Query : use flama_phc
20250307@083609.9660 2dqos5d4au6c82heuh2vg2k81j Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@091909.1752 nvqaoc6qh7cpqve85ng23grm69 Query : use flama_phc
20250307@091909.1756 nvqaoc6qh7cpqve85ng23grm69 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@091909.1848 nvqaoc6qh7cpqve85ng23grm69 Query : use flama_phc
20250307@091909.1851 nvqaoc6qh7cpqve85ng23grm69 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@092748.8661 v1glof44bm0ba6hu6vkhbhqjuv Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@092748.8693 v1glof44bm0ba6hu6vkhbhqjuv Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@092748.9081 v1glof44bm0ba6hu6vkhbhqjuv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5753';
20250307@092748.9161 v1glof44bm0ba6hu6vkhbhqjuv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5753';
20250307@092748.9254 v1glof44bm0ba6hu6vkhbhqjuv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5753';
20250307@092748.9299 v1glof44bm0ba6hu6vkhbhqjuv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5753';
20250307@092748.9367 v1glof44bm0ba6hu6vkhbhqjuv Query : use flama_phc
20250307@092748.9370 v1glof44bm0ba6hu6vkhbhqjuv Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@092748.9479 v1glof44bm0ba6hu6vkhbhqjuv Query : use flama_phc
20250307@092748.9483 v1glof44bm0ba6hu6vkhbhqjuv Query : select no, estab,szadrsdesc from szadrs where u_coddest=8797
20250307@092748.9575 v1glof44bm0ba6hu6vkhbhqjuv Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501580 
20250307@092749.1720 v1glof44bm0ba6hu6vkhbhqjuv Query : use flama_phc
20250307@092749.1760 v1glof44bm0ba6hu6vkhbhqjuv Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@092749.2370 v1glof44bm0ba6hu6vkhbhqjuv Query : use flama_phc
20250307@092749.2400 v1glof44bm0ba6hu6vkhbhqjuv Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@092749.3030 v1glof44bm0ba6hu6vkhbhqjuv Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@092749.3390 v1glof44bm0ba6hu6vkhbhqjuv Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5753';
20250307@092749.1554 v1glof44bm0ba6hu6vkhbhqjuv Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5753';
20250307@093609.1999 h6r34l0eema649ta118hqcis8f Query : use flama_phc
20250307@093609.2005 h6r34l0eema649ta118hqcis8f Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@093609.2241 h6r34l0eema649ta118hqcis8f Query : use flama_phc
20250307@093609.2246 h6r34l0eema649ta118hqcis8f Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@101909.3294 4d9f5rg5a0fln80aullr7rojsk Query : use flama_phc
20250307@101909.3347 4d9f5rg5a0fln80aullr7rojsk Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@101909.3439 4d9f5rg5a0fln80aullr7rojsk Query : use flama_phc
20250307@101909.3443 4d9f5rg5a0fln80aullr7rojsk Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@103609.1294 smlc1tk70l8kdp4touqcte9mls Query : use flama_phc
20250307@103609.1299 smlc1tk70l8kdp4touqcte9mls Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@103609.1391 smlc1tk70l8kdp4touqcte9mls Query : use flama_phc
20250307@103609.1395 smlc1tk70l8kdp4touqcte9mls Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@111909.3984 vamdsdjcph6cqqnfh5edgb13c5 Query : use flama_phc
20250307@111909.3989 vamdsdjcph6cqqnfh5edgb13c5 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@111909.4080 vamdsdjcph6cqqnfh5edgb13c5 Query : use flama_phc
20250307@111909.4084 vamdsdjcph6cqqnfh5edgb13c5 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@112817.3733 0k2iersjoodl02rlcklj2ceckm Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@112817.3796 0k2iersjoodl02rlcklj2ceckm Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@112817.4339 0k2iersjoodl02rlcklj2ceckm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5754';
20250307@112817.4419 0k2iersjoodl02rlcklj2ceckm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5754';
20250307@112817.4540 0k2iersjoodl02rlcklj2ceckm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5754';
20250307@112817.5965 0k2iersjoodl02rlcklj2ceckm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5754';
20250307@112817.6028 0k2iersjoodl02rlcklj2ceckm Query : use flama_phc
20250307@112817.6031 0k2iersjoodl02rlcklj2ceckm Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@112817.6134 0k2iersjoodl02rlcklj2ceckm Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2237.00.1'
20250307@112817.6231 0k2iersjoodl02rlcklj2ceckm Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2025 and bo.obrano = 0000011 and bi.ref ='324.2237.00.1' and bi.lordem =1
20250307@112817.6617 0k2iersjoodl02rlcklj2ceckm Query : use flama_phc
20250307@112817.6621 0k2iersjoodl02rlcklj2ceckm Query : select top 1 1 valor from ts where ts.ndos = 61
20250307@112817.6701 0k2iersjoodl02rlcklj2ceckm Query : use flama_phc
20250307@112817.6704 0k2iersjoodl02rlcklj2ceckm 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')
20250307@112817.6777 0k2iersjoodl02rlcklj2ceckm 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
20250307@112817.6903 0k2iersjoodl02rlcklj2ceckm Query : use flama_phc
20250307@112817.6907 0k2iersjoodl02rlcklj2ceckm Query : select top 1 ~inactivo valor from fl where no = '1626' and estab = 26 order by inactivo desc
20250307@112817.7000 0k2iersjoodl02rlcklj2ceckm Query : use flama_phc
20250307@112817.7003 0k2iersjoodl02rlcklj2ceckm Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -230
20250307@112817.7096 0k2iersjoodl02rlcklj2ceckm Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5754';
20250307@112817.7153 0k2iersjoodl02rlcklj2ceckm Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5754';
20250307@113609.6931 0ngrof0j327qvganfgcn8nvi58 Query : use flama_phc
20250307@113609.6936 0ngrof0j327qvganfgcn8nvi58 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@113609.7083 0ngrof0j327qvganfgcn8nvi58 Query : use flama_phc
20250307@113609.7089 0ngrof0j327qvganfgcn8nvi58 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@121359.4645 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@121359.4701 39mn3pbs0hocsjb9hsfs4lvt24 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@121359.4791 39mn3pbs0hocsjb9hsfs4lvt24 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5755';
20250307@121359.4863 39mn3pbs0hocsjb9hsfs4lvt24 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5755';
20250307@121359.4933 39mn3pbs0hocsjb9hsfs4lvt24 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5755';
20250307@121359.4970 39mn3pbs0hocsjb9hsfs4lvt24 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5755';
20250307@121359.5026 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121359.5029 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@121359.5101 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9326.00.1'
20250307@121359.5200 39mn3pbs0hocsjb9hsfs4lvt24 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 = 2401259 and bi.ref ='328.9326.00.1' and bi.lordem =100000
20250307@121359.5555 39mn3pbs0hocsjb9hsfs4lvt24 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 = 'cps24103144590,180000010 ' 
20250307@121359.5898 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9316.00.1'
20250307@121359.5994 39mn3pbs0hocsjb9hsfs4lvt24 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 = 2401259 and bi.ref ='328.9316.00.1' and bi.lordem =90000
20250307@121359.6305 39mn3pbs0hocsjb9hsfs4lvt24 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 = 'cps24103144589,981000009 ' 
20250307@121359.6629 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9006.00.1'
20250307@121359.6722 39mn3pbs0hocsjb9hsfs4lvt24 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 = 2401259 and bi.ref ='328.9006.00.1' and bi.lordem =80000
20250307@121359.7043 39mn3pbs0hocsjb9hsfs4lvt24 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 = 'cps24103144589,786000008 ' 
20250307@121359.7557 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121359.7561 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 1 valor from ts where ts.ndos = 61
20250307@121359.7594 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121359.7597 39mn3pbs0hocsjb9hsfs4lvt24 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')
20250307@121359.7629 39mn3pbs0hocsjb9hsfs4lvt24 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
20250307@121359.7681 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121359.7685 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 ~inactivo valor from fl where no = '202356' and estab = 00 order by inactivo desc
20250307@121359.7850 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121359.7879 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from ts where ndos = 61
20250307@121359.8198 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121359.8779 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250307@121359.8892 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121359.9056 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250307@121359.9087 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121359.9104 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250307@121359.9114 39mn3pbs0hocsjb9hsfs4lvt24 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
20250307@121359.9288 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250307@121359.9482 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250307@121359.9514 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121359.9521 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='202356' and estab=00
20250307@121359.9640 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121359.9659 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 61
20250307@121359.9720 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into bo3 (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67cae0212367cae307e8',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250307@121359.9801 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121359.9824 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 61
20250307@121359.9841 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into bo2 (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67cae0212367cae307e8','--','bo',7.8605200945626477541 ,1,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250307@121400.8500 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121400.1280 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 61
20250307@121400.1450 39mn3pbs0hocsjb9hsfs4lvt24 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 ('aut67cae0212367cae307e8','guia r. fornecedor','2025-03-07',61,2500898,?,?,?,?,?,?,?,?,2025, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20250307@121403.7377 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121403.7381 39mn3pbs0hocsjb9hsfs4lvt24 Query : select st.usalote valor from st where st.ref = '328.9326.00.1'
20250307@121403.7472 39mn3pbs0hocsjb9hsfs4lvt24 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.9326.00.1'
20250307@121403.7595 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121403.7610 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250307@121403.7624 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121403.7642 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250307@121403.7651 39mn3pbs0hocsjb9hsfs4lvt24 Query : select sestamp valor from se where ref ='328.9326.00.1' and lote = 'r2401259100a'
20250307@121403.7701 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121403.7715 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250307@121403.7725 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121403.7740 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250307@121403.7751 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67cae2646067cae30bbc',?,?,'20250307',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250307@121403.8943 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250307@121403.8987 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121403.9006 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250307@121403.9019 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67cae3396667cae30bdb','aut67cae0212367cae307e8',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 = 'aut67cae0212367cae307e8'
20250307@121403.9182 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121403.9200 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250307@121403.9218 39mn3pbs0hocsjb9hsfs4lvt24 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 'aut67cae3396667cae30bdb',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 150, 150*.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 ,26.715789473684,26.715789473684*200.48,26.715789473684,26.715789473684*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,26.715789473684*150,26.715789473684*150*200.48 ,26.993000,26.993000*200.48 ,26.993000,26.993000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,26.715789473684,26.715789473684*200.48,26.715789473684*150,26.715789473684*150*200.48,'cps24103144590,180000010 ',210,210*150,210,210*150,?,?,?,4 from bo bo where bo.bostamp = 'aut67cae0212367cae307e8'
20250307@121434.3079 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121434.3215 39mn3pbs0hocsjb9hsfs4lvt24 Query : select st.usalote valor from st where st.ref = '328.9316.00.1'
20250307@121434.3858 39mn3pbs0hocsjb9hsfs4lvt24 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.9316.00.1'
20250307@121434.4415 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121434.4792 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250307@121434.5300 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121434.6677 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250307@121434.6843 39mn3pbs0hocsjb9hsfs4lvt24 Query : select sestamp valor from se where ref ='328.9316.00.1' and lote = 'r2401259900a'
20250307@121434.7160 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121434.7510 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250307@121434.7705 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121434.8058 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250307@121434.8377 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67cae7844167cae32abc',?,?,'20250307',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250307@121434.8621 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250307@121434.9139 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121434.9393 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250307@121434.9728 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67cae2440167cae32adf','aut67cae0212367cae307e8',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 = 'aut67cae0212367cae307e8'
20250307@121435.3700 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121435.2930 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250307@121435.6790 39mn3pbs0hocsjb9hsfs4lvt24 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 'aut67cae2440167cae32adf',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 150, 150*.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 ,27.944715789474,27.944715789474*200.48,27.944715789474,27.944715789474*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,27.944715789474*150,27.944715789474*150*200.48 ,34.915000,34.915000*200.48 ,34.915000,34.915000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,27.944715789474,27.944715789474*200.48,27.944715789474*150,27.944715789474*150*200.48,'cps24103144589,981000009 ',219.66,219.66*150,219.66,219.66*150,?,?,?,4 from bo bo where bo.bostamp = 'aut67cae0212367cae307e8'
20250307@121437.2111 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121437.3041 39mn3pbs0hocsjb9hsfs4lvt24 Query : select st.usalote valor from st where st.ref = '328.9006.00.1'
20250307@121437.3719 39mn3pbs0hocsjb9hsfs4lvt24 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.9006.00.1'
20250307@121437.4365 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121437.4836 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 61
20250307@121437.5268 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121437.5688 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 61
20250307@121437.5857 39mn3pbs0hocsjb9hsfs4lvt24 Query : select sestamp valor from se where ref ='328.9006.00.1' and lote = 'r2401259800a'
20250307@121437.6170 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121437.6484 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'se' and documentnumber = 0
20250307@121437.6767 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121437.7020 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'se' and documentnumber = 0
20250307@121437.7455 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into se (sestamp,ref, lote, data,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut67cae2836567cae32da5',?,?,'20250307',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut;','aut;')
20250307@121437.7631 39mn3pbs0hocsjb9hsfs4lvt24 Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20250307@121437.7970 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121437.8362 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 61
20250307@121437.8711 39mn3pbs0hocsjb9hsfs4lvt24 Query : insert into bi2 (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut67cae4694767cae32dc2','aut67cae0212367cae307e8',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 = 'aut67cae0212367cae307e8'
20250307@121437.9214 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@121437.9649 39mn3pbs0hocsjb9hsfs4lvt24 Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 61
20250307@121438.2900 39mn3pbs0hocsjb9hsfs4lvt24 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 'aut67cae4694767cae32dc2',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 250, 250*.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 ,50.76,50.76*200.48,50.76,50.76*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,50.76*250,50.76*250*200.48 ,51.247000,51.247000*200.48 ,51.247000,51.247000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,50.76,50.76*200.48,50.76*250,50.76*250*200.48,'cps24103144589,786000008 ',399,399*250,399,399*250,?,?,?,4 from bo bo where bo.bostamp = 'aut67cae0212367cae307e8'
20250307@121438.8341 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121438.8385 39mn3pbs0hocsjb9hsfs4lvt24 Query : declare @bostamp varchar(25) = 'aut67cae0212367cae307e8' ,@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 
20250307@121454.6670 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121454.7070 39mn3pbs0hocsjb9hsfs4lvt24 Query : select 1 valor from bo where bo.bostamp = 'aut67cae0212367cae307e8'
20250307@121454.1528 39mn3pbs0hocsjb9hsfs4lvt24 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) = 'aut67cae0212367cae307e8' 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 
20250307@121458.6956 39mn3pbs0hocsjb9hsfs4lvt24 Query : use flama_phc
20250307@121458.6997 39mn3pbs0hocsjb9hsfs4lvt24 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@121458.7492 39mn3pbs0hocsjb9hsfs4lvt24 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5755';
20250307@121458.7899 39mn3pbs0hocsjb9hsfs4lvt24 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5755';
20250307@121909.8803 f13l4q3l4777lugv9jh6m02kat Query : use flama_phc
20250307@121909.8808 f13l4q3l4777lugv9jh6m02kat Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@121909.8936 f13l4q3l4777lugv9jh6m02kat Query : use flama_phc
20250307@121909.8944 f13l4q3l4777lugv9jh6m02kat Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@123610.3420 9v3pu5b49llob8difvdm0rlu6n Query : use flama_phc
20250307@123610.3460 9v3pu5b49llob8difvdm0rlu6n Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@123610.4430 9v3pu5b49llob8difvdm0rlu6n Query : use flama_phc
20250307@123610.4470 9v3pu5b49llob8difvdm0rlu6n Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@131909.8489 haurvnk2p7rn2dcprah008mf2g Query : use flama_phc
20250307@131909.8494 haurvnk2p7rn2dcprah008mf2g Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@131909.8585 haurvnk2p7rn2dcprah008mf2g Query : use flama_phc
20250307@131909.8589 haurvnk2p7rn2dcprah008mf2g Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@133122.3395 3rj2t1hi0pkflvo396pjle49mg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133122.3411 3rj2t1hi0pkflvo396pjle49mg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133122.3557 3rj2t1hi0pkflvo396pjle49mg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5756';
20250307@133122.3635 3rj2t1hi0pkflvo396pjle49mg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5756';
20250307@133122.3705 3rj2t1hi0pkflvo396pjle49mg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5756';
20250307@133122.3745 3rj2t1hi0pkflvo396pjle49mg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5756';
20250307@133122.3808 3rj2t1hi0pkflvo396pjle49mg Query : use flama_phc
20250307@133122.3812 3rj2t1hi0pkflvo396pjle49mg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133122.3888 3rj2t1hi0pkflvo396pjle49mg Query : use flama_phc
20250307@133122.3891 3rj2t1hi0pkflvo396pjle49mg Query : select no, estab,szadrsdesc from szadrs where u_coddest=4242
20250307@133122.3982 3rj2t1hi0pkflvo396pjle49mg Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501577 
20250307@133122.4450 3rj2t1hi0pkflvo396pjle49mg Query : use flama_phc
20250307@133122.4454 3rj2t1hi0pkflvo396pjle49mg Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133122.4560 3rj2t1hi0pkflvo396pjle49mg Query : use flama_phc
20250307@133122.4563 3rj2t1hi0pkflvo396pjle49mg Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133122.4626 3rj2t1hi0pkflvo396pjle49mg Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133122.4660 3rj2t1hi0pkflvo396pjle49mg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5756';
20250307@133122.4709 3rj2t1hi0pkflvo396pjle49mg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5756';
20250307@133122.5346 ounmfd7gf5ju0gchqi5fbsnkhq Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133122.5357 ounmfd7gf5ju0gchqi5fbsnkhq Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133122.5435 ounmfd7gf5ju0gchqi5fbsnkhq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5757';
20250307@133122.5554 ounmfd7gf5ju0gchqi5fbsnkhq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5757';
20250307@133122.5637 ounmfd7gf5ju0gchqi5fbsnkhq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5757';
20250307@133122.5692 ounmfd7gf5ju0gchqi5fbsnkhq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5757';
20250307@133122.5818 ounmfd7gf5ju0gchqi5fbsnkhq Query : use flama_phc
20250307@133122.5822 ounmfd7gf5ju0gchqi5fbsnkhq Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133122.5884 ounmfd7gf5ju0gchqi5fbsnkhq Query : use flama_phc
20250307@133122.5887 ounmfd7gf5ju0gchqi5fbsnkhq Query : select no, estab,szadrsdesc from szadrs where u_coddest=6917
20250307@133122.6029 ounmfd7gf5ju0gchqi5fbsnkhq Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501582 
20250307@133122.6414 ounmfd7gf5ju0gchqi5fbsnkhq Query : use flama_phc
20250307@133122.6417 ounmfd7gf5ju0gchqi5fbsnkhq Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133122.6449 ounmfd7gf5ju0gchqi5fbsnkhq Query : use flama_phc
20250307@133122.6452 ounmfd7gf5ju0gchqi5fbsnkhq Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133122.6468 ounmfd7gf5ju0gchqi5fbsnkhq Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133122.6495 ounmfd7gf5ju0gchqi5fbsnkhq Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5757';
20250307@133122.6542 ounmfd7gf5ju0gchqi5fbsnkhq Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5757';
20250307@133122.7718 6f3vnsehj235sijfbseggbh6ss Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133122.7728 6f3vnsehj235sijfbseggbh6ss Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133122.7804 6f3vnsehj235sijfbseggbh6ss Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5758';
20250307@133122.7874 6f3vnsehj235sijfbseggbh6ss Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5758';
20250307@133122.7943 6f3vnsehj235sijfbseggbh6ss Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5758';
20250307@133122.7984 6f3vnsehj235sijfbseggbh6ss Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5758';
20250307@133122.8053 6f3vnsehj235sijfbseggbh6ss Query : use flama_phc
20250307@133122.8056 6f3vnsehj235sijfbseggbh6ss Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133122.8124 6f3vnsehj235sijfbseggbh6ss Query : use flama_phc
20250307@133122.8127 6f3vnsehj235sijfbseggbh6ss Query : select no, estab,szadrsdesc from szadrs where u_coddest=8748
20250307@133122.8216 6f3vnsehj235sijfbseggbh6ss Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501587 
20250307@133122.8595 6f3vnsehj235sijfbseggbh6ss Query : use flama_phc
20250307@133122.8598 6f3vnsehj235sijfbseggbh6ss Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133122.8628 6f3vnsehj235sijfbseggbh6ss Query : use flama_phc
20250307@133122.8632 6f3vnsehj235sijfbseggbh6ss Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133122.8650 6f3vnsehj235sijfbseggbh6ss Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133122.8671 6f3vnsehj235sijfbseggbh6ss Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5758';
20250307@133122.8765 6f3vnsehj235sijfbseggbh6ss Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5758';
20250307@133122.9378 gbs5c5j311jd34e0fac2ln5lg6 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133122.9389 gbs5c5j311jd34e0fac2ln5lg6 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133122.9469 gbs5c5j311jd34e0fac2ln5lg6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5759';
20250307@133122.9544 gbs5c5j311jd34e0fac2ln5lg6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5759';
20250307@133122.9665 gbs5c5j311jd34e0fac2ln5lg6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5759';
20250307@133122.9710 gbs5c5j311jd34e0fac2ln5lg6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5759';
20250307@133122.9791 gbs5c5j311jd34e0fac2ln5lg6 Query : use flama_phc
20250307@133122.9795 gbs5c5j311jd34e0fac2ln5lg6 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133122.9860 gbs5c5j311jd34e0fac2ln5lg6 Query : use flama_phc
20250307@133122.9863 gbs5c5j311jd34e0fac2ln5lg6 Query : select no, estab,szadrsdesc from szadrs where u_coddest=16
20250307@133122.9999 gbs5c5j311jd34e0fac2ln5lg6 Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501594 
20250307@133123.3810 gbs5c5j311jd34e0fac2ln5lg6 Query : use flama_phc
20250307@133123.3840 gbs5c5j311jd34e0fac2ln5lg6 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133123.4140 gbs5c5j311jd34e0fac2ln5lg6 Query : use flama_phc
20250307@133123.4170 gbs5c5j311jd34e0fac2ln5lg6 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133123.4330 gbs5c5j311jd34e0fac2ln5lg6 Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133123.4600 gbs5c5j311jd34e0fac2ln5lg6 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5759';
20250307@133123.5520 gbs5c5j311jd34e0fac2ln5lg6 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5759';
20250307@133123.1048 p4osfk0urpbf4uun4u619d0ugr Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133123.1060 p4osfk0urpbf4uun4u619d0ugr Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133123.2199 p4osfk0urpbf4uun4u619d0ugr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5760';
20250307@133123.2335 p4osfk0urpbf4uun4u619d0ugr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5760';
20250307@133123.2468 p4osfk0urpbf4uun4u619d0ugr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5760';
20250307@133123.2808 p4osfk0urpbf4uun4u619d0ugr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5760';
20250307@133123.2978 p4osfk0urpbf4uun4u619d0ugr Query : use flama_phc
20250307@133123.2982 p4osfk0urpbf4uun4u619d0ugr Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133123.3105 p4osfk0urpbf4uun4u619d0ugr Query : use flama_phc
20250307@133123.3108 p4osfk0urpbf4uun4u619d0ugr Query : select no, estab,szadrsdesc from szadrs where u_coddest=16
20250307@133123.3161 p4osfk0urpbf4uun4u619d0ugr Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501597 
20250307@133123.3814 p4osfk0urpbf4uun4u619d0ugr Query : use flama_phc
20250307@133123.3824 p4osfk0urpbf4uun4u619d0ugr Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133123.3880 p4osfk0urpbf4uun4u619d0ugr Query : use flama_phc
20250307@133123.3907 p4osfk0urpbf4uun4u619d0ugr Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133123.3927 p4osfk0urpbf4uun4u619d0ugr Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133123.3965 p4osfk0urpbf4uun4u619d0ugr Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5760';
20250307@133123.4013 p4osfk0urpbf4uun4u619d0ugr Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5760';
20250307@133123.4547 sm3l55999d7nqkc3odbtq6db2i Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133123.4560 sm3l55999d7nqkc3odbtq6db2i Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133123.4638 sm3l55999d7nqkc3odbtq6db2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5761';
20250307@133123.4707 sm3l55999d7nqkc3odbtq6db2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5761';
20250307@133123.4784 sm3l55999d7nqkc3odbtq6db2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5761';
20250307@133123.4874 sm3l55999d7nqkc3odbtq6db2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5761';
20250307@133123.4958 sm3l55999d7nqkc3odbtq6db2i Query : use flama_phc
20250307@133123.4961 sm3l55999d7nqkc3odbtq6db2i Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133123.5025 sm3l55999d7nqkc3odbtq6db2i Query : use flama_phc
20250307@133123.5073 sm3l55999d7nqkc3odbtq6db2i Query : select no, estab,szadrsdesc from szadrs where u_coddest=6737
20250307@133123.5164 sm3l55999d7nqkc3odbtq6db2i Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2015 and bo.obrano = 2501599 
20250307@133123.6136 sm3l55999d7nqkc3odbtq6db2i Query : use flama_phc
20250307@133123.6139 sm3l55999d7nqkc3odbtq6db2i Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133123.6177 sm3l55999d7nqkc3odbtq6db2i Query : use flama_phc
20250307@133123.6182 sm3l55999d7nqkc3odbtq6db2i Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133123.6202 sm3l55999d7nqkc3odbtq6db2i Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133123.6228 sm3l55999d7nqkc3odbtq6db2i Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5761';
20250307@133123.6284 sm3l55999d7nqkc3odbtq6db2i Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5761';
20250307@133123.6844 g30m8diq3fo5itc2l9vhbr0gk8 Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133123.6856 g30m8diq3fo5itc2l9vhbr0gk8 Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133123.6936 g30m8diq3fo5itc2l9vhbr0gk8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5762';
20250307@133123.7172 g30m8diq3fo5itc2l9vhbr0gk8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5762';
20250307@133123.7269 g30m8diq3fo5itc2l9vhbr0gk8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5762';
20250307@133123.7314 g30m8diq3fo5itc2l9vhbr0gk8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5762';
20250307@133123.7402 g30m8diq3fo5itc2l9vhbr0gk8 Query : use flama_phc
20250307@133123.7405 g30m8diq3fo5itc2l9vhbr0gk8 Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133123.7545 g30m8diq3fo5itc2l9vhbr0gk8 Query : use flama_phc
20250307@133123.7549 g30m8diq3fo5itc2l9vhbr0gk8 Query : select no, estab,szadrsdesc from szadrs where u_coddest=2158
20250307@133123.7668 g30m8diq3fo5itc2l9vhbr0gk8 Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2016 and bo.obrano = 2501601 
20250307@133123.8093 g30m8diq3fo5itc2l9vhbr0gk8 Query : use flama_phc
20250307@133123.8096 g30m8diq3fo5itc2l9vhbr0gk8 Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133123.8127 g30m8diq3fo5itc2l9vhbr0gk8 Query : use flama_phc
20250307@133123.8130 g30m8diq3fo5itc2l9vhbr0gk8 Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133123.8147 g30m8diq3fo5itc2l9vhbr0gk8 Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133123.8168 g30m8diq3fo5itc2l9vhbr0gk8 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5762';
20250307@133123.8216 g30m8diq3fo5itc2l9vhbr0gk8 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5762';
20250307@133123.8732 hda7u22ibj3l8o4urqs7d0r0kg Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@133123.8743 hda7u22ibj3l8o4urqs7d0r0kg Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@133123.8820 hda7u22ibj3l8o4urqs7d0r0kg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5763';
20250307@133123.8956 hda7u22ibj3l8o4urqs7d0r0kg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5763';
20250307@133123.9439 hda7u22ibj3l8o4urqs7d0r0kg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5763';
20250307@133123.9490 hda7u22ibj3l8o4urqs7d0r0kg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5763';
20250307@133123.9603 hda7u22ibj3l8o4urqs7d0r0kg Query : use flama_phc
20250307@133123.9610 hda7u22ibj3l8o4urqs7d0r0kg Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@133123.9798 hda7u22ibj3l8o4urqs7d0r0kg Query : use flama_phc
20250307@133123.9802 hda7u22ibj3l8o4urqs7d0r0kg Query : select no, estab,szadrsdesc from szadrs where u_coddest=4740
20250307@133123.9962 hda7u22ibj3l8o4urqs7d0r0kg Query : select bi.bistamp ,bi.ref code ,bi.qtt quantity ,bi.edebito ,bi.desconto ,bi.desc2 ,bi.desc3 ,bi.desc4 ,bi.bostamp ,st.u_uncxcl from bi inner join bo on bo.bostamp=bi.bostamp inner join st on st.ref = bi.ref where bo.ndos = 250 and bo.boano = 2016 and bo.obrano = 2501602 
20250307@133124.8080 hda7u22ibj3l8o4urqs7d0r0kg Query : use flama_phc
20250307@133124.8120 hda7u22ibj3l8o4urqs7d0r0kg Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20250307@133124.8450 hda7u22ibj3l8o4urqs7d0r0kg Query : use flama_phc
20250307@133124.8480 hda7u22ibj3l8o4urqs7d0r0kg Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -9010
20250307@133124.8650 hda7u22ibj3l8o4urqs7d0r0kg Query : insert into wserrorlog (errornumber, errormsg,requesttable,initialdata,finaldata) values (-9010,?,'ft',?,?)
20250307@133124.8890 hda7u22ibj3l8o4urqs7d0r0kg Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5763';
20250307@133124.9450 hda7u22ibj3l8o4urqs7d0r0kg Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5763';
20250307@133609.4284 ki5ngb9u826i95plaabcte6678 Query : use flama_phc
20250307@133609.4288 ki5ngb9u826i95plaabcte6678 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@133609.4374 ki5ngb9u826i95plaabcte6678 Query : use flama_phc
20250307@133609.4377 ki5ngb9u826i95plaabcte6678 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@141909.9582 cfupngjn3jnfoljqicj37ok09j Query : use flama_phc
20250307@141909.9588 cfupngjn3jnfoljqicj37ok09j Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@141909.9748 cfupngjn3jnfoljqicj37ok09j Query : use flama_phc
20250307@141909.9755 cfupngjn3jnfoljqicj37ok09j Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@142048.1438 mbknlumom867fpdjbbe57ec07f Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@142048.1466 mbknlumom867fpdjbbe57ec07f Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@142048.1655 mbknlumom867fpdjbbe57ec07f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5764';
20250307@142048.1746 mbknlumom867fpdjbbe57ec07f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5764';
20250307@142048.1819 mbknlumom867fpdjbbe57ec07f Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5764';
20250307@142048.1871 mbknlumom867fpdjbbe57ec07f Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5764';
20250307@142048.2820 e4a1s79ic341ah0kl33spve5ur Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@142048.2832 e4a1s79ic341ah0kl33spve5ur Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@142048.2913 e4a1s79ic341ah0kl33spve5ur Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5765';
20250307@142048.2994 e4a1s79ic341ah0kl33spve5ur Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5765';
20250307@142048.3071 e4a1s79ic341ah0kl33spve5ur Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5765';
20250307@142048.3126 e4a1s79ic341ah0kl33spve5ur Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5765';
20250307@142048.3193 e4a1s79ic341ah0kl33spve5ur Query : use flama_phc
20250307@142048.3197 e4a1s79ic341ah0kl33spve5ur Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@142048.3304 e4a1s79ic341ah0kl33spve5ur Query : select no, estab,szadrsdesc from szadrs where u_coddest=00000001
20250307@142048.3407 e4a1s79ic341ah0kl33spve5ur Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.2187.00.1'
20250307@142048.3582 e4a1s79ic341ah0kl33spve5ur Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.2187.00.1'
20250307@142048.3616 e4a1s79ic341ah0kl33spve5ur Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '304.2187.00.1'
20250307@142048.3656 e4a1s79ic341ah0kl33spve5ur Query : use flama_phc
20250307@142048.3660 e4a1s79ic341ah0kl33spve5ur Query : select top 1 1 valor from ts where ts.ndos = 5
20250307@142048.3746 e4a1s79ic341ah0kl33spve5ur Query : use flama_phc
20250307@142048.3749 e4a1s79ic341ah0kl33spve5ur 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')
20250307@142048.3837 e4a1s79ic341ah0kl33spve5ur 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
20250307@142048.3974 e4a1s79ic341ah0kl33spve5ur Query : use flama_phc
20250307@142048.3978 e4a1s79ic341ah0kl33spve5ur Query : select top 1 ~inactivo valor from fl where no = '102245' and estab = 0 order by inactivo desc
20250307@142048.4090 e4a1s79ic341ah0kl33spve5ur Query : use flama_phc
20250307@142048.4093 e4a1s79ic341ah0kl33spve5ur Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -230
20250307@142048.4190 e4a1s79ic341ah0kl33spve5ur Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5765';
20250307@142048.4318 e4a1s79ic341ah0kl33spve5ur Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5765';
20250307@143609.9803 mf5j59jpairmhlcpnecit0uue0 Query : use flama_phc
20250307@143609.9807 mf5j59jpairmhlcpnecit0uue0 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@143610.1830 mf5j59jpairmhlcpnecit0uue0 Query : use flama_phc
20250307@143610.1833 mf5j59jpairmhlcpnecit0uue0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@143709.7350 gdabcdu765o6l1cvk6ag9645in Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@143709.7470 gdabcdu765o6l1cvk6ag9645in Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@143709.8230 gdabcdu765o6l1cvk6ag9645in Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5766';
20250307@143709.8890 gdabcdu765o6l1cvk6ag9645in Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5766';
20250307@143709.9600 gdabcdu765o6l1cvk6ag9645in Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5766';
20250307@143709.1003 gdabcdu765o6l1cvk6ag9645in Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5766';
20250307@143709.3817 4ifgc28kcn9c4bgbnv038qrg7q Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@143709.3827 4ifgc28kcn9c4bgbnv038qrg7q Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@143709.3915 4ifgc28kcn9c4bgbnv038qrg7q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5767';
20250307@143709.3984 4ifgc28kcn9c4bgbnv038qrg7q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5767';
20250307@143709.4053 4ifgc28kcn9c4bgbnv038qrg7q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5767';
20250307@143709.4093 4ifgc28kcn9c4bgbnv038qrg7q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5767';
20250307@143709.4156 4ifgc28kcn9c4bgbnv038qrg7q Query : use flama_phc
20250307@143709.4159 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@143709.4219 4ifgc28kcn9c4bgbnv038qrg7q Query : select no, estab,szadrsdesc from szadrs where u_coddest=00000001
20250307@143709.4267 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9006.00.1'
20250307@143709.4371 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9316.00.1'
20250307@143709.4459 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9316.00.1'
20250307@143709.4476 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9316.00.1'
20250307@143709.4498 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9316.00.1'
20250307@143709.4516 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '328.9326.00.1'
20250307@143709.4616 4ifgc28kcn9c4bgbnv038qrg7q Query : use flama_phc
20250307@143709.4619 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 1 valor from ts where ts.ndos = 5
20250307@143709.4648 4ifgc28kcn9c4bgbnv038qrg7q Query : use flama_phc
20250307@143709.4651 4ifgc28kcn9c4bgbnv038qrg7q 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')
20250307@143709.4679 4ifgc28kcn9c4bgbnv038qrg7q 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
20250307@143709.4746 4ifgc28kcn9c4bgbnv038qrg7q Query : use flama_phc
20250307@143709.4749 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 ~inactivo valor from fl where no = '102245' and estab = 0 order by inactivo desc
20250307@143709.4820 4ifgc28kcn9c4bgbnv038qrg7q Query : use flama_phc
20250307@143709.4823 4ifgc28kcn9c4bgbnv038qrg7q Query : select top 1 errorresult result ,errornumber errornumber ,descriptionpt description ,isnull(descriptionen,'') descriptionen ,isnull(descriptionfr,'') descriptionfr from wserrorcodes where errornumber = -230
20250307@143709.4867 4ifgc28kcn9c4bgbnv038qrg7q Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5767';
20250307@143709.4916 4ifgc28kcn9c4bgbnv038qrg7q Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5767';
20250307@151909.8008 lmaecikcgs842fr8lgqp9usrj8 Query : use flama_phc
20250307@151909.8013 lmaecikcgs842fr8lgqp9usrj8 Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@151909.8112 lmaecikcgs842fr8lgqp9usrj8 Query : use flama_phc
20250307@151909.8115 lmaecikcgs842fr8lgqp9usrj8 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@153609.7897 650b197enlgt40pg376tt8mpde Query : use flama_phc
20250307@153609.7901 650b197enlgt40pg376tt8mpde Query : select secretkey valor from u_wsusers u where u.userid = ? and u.username=? and u.password=? and u.inactivo=0
20250307@153609.8001 650b197enlgt40pg376tt8mpde Query : use flama_phc
20250307@153609.8006 650b197enlgt40pg376tt8mpde Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20250307@155233.2079 ihr7vdireiematgpv531uhrpfe Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20250307@155233.2091 ihr7vdireiematgpv531uhrpfe Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20250307@155233.2176 ihr7vdireiematgpv531uhrpfe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5768';
20250307@155233.2255 ihr7vdireiematgpv531uhrpfe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5768';
20250307@155233.2326 ihr7vdireiematgpv531uhrpfe Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='5768';
20250307@155233.2386 ihr7vdireiematgpv531uhrpfe Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='5768';
20250307@155233.2441 ihr7vdireiematgpv531uhrpfe Query : use flama_phc
20250307@155233.2444 ihr7vdireiematgpv531uhrpfe Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20250307@155233.2514 ihr7vdireiematgpv531uhrpfe Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.966.00.01'
20250307@155233.2611 ihr7vdireiematgpv531uhrpfe 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 = 2401239 and bi.ref ='324.966.00.01' and bi.lordem =20000
20250307@155233.2949 ihr7vdireiematgpv531uhrpfe 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 = 'cps24102961573,192000002 ' 
20250307@155233.3257 ihr7vdireiematgpv531uhrpfe Query : use flama_phc
20250307@155233.3260 ihr7vdireiematgpv531uhrpfe Query : select top 1 1 valor from ts where ts.ndos = 61
20250307@155233.3334 ihr7vdireiematgpv531uhrpfe Query : use flama_phc
20250307@155233.3337 ihr7vdireiematgpv531uhrpfe 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')
20250307@155233.3376 ihr7vdireiematgpv531uhrpfe 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
20250307@155233.3505 ihr7vdireiematgpv531uhrpfe Query : use flama_phc
20250307@155233.3508 ihr7vdireiematgpv531uhrpfe Query : select top 1 ~inactivo valor from fl where no = '202576' and estab = 00 order by inactivo desc
20250307@155233.3611 ihr7vdireiematgpv531uhrpfe Query : use flama_phc
20250307@155233.3614 ihr7vdireiematgpv531uhrpfe Query : select 1 valor from ts where ndos = 61
20250307@155233.3672 ihr7vdireiematgpv531uhrpfe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@155233.3985 ihr7vdireiematgpv531uhrpfe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 61
20250307@155233.4052 ihr7vdireiematgpv531uhrpfe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@155233.4069 ihr7vdireiematgpv531uhrpfe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 61
20250307@155233.4079 ihr7vdireiematgpv531uhrpfe Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20250307@155233.4094 ihr7vdireiematgpv531uhrpfe Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 61
20250307@155233.4104 ihr7vdireiematgpv531uhrpfe 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
20250307@155233.4198 ihr7vdireiematgpv531uhrpfe Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
20250307@155233.4566 ihr7vdireiematgpv531uhrpfe Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 61 and boano=2025 order by obrano desc
