20241108@105307.5680 incr0pn06skrk4otr8sh8g3nd0 Query : use flama_phc
20241108@105307.5721 incr0pn06skrk4otr8sh8g3nd0 Query : select 1 valor from bo where bo.bostamp = 'aut672de03672672ded6d66'
20241108@105307.5971 incr0pn06skrk4otr8sh8g3nd0 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) = 'aut672de03672672ded6d66' 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 
20241108@105312.1910 incr0pn06skrk4otr8sh8g3nd0 Query : use flama_phc
20241108@105312.2330 incr0pn06skrk4otr8sh8g3nd0 Query : update u_wsusers set rqsttoken =? where userid ='userls001'
20241108@105312.6440 incr0pn06skrk4otr8sh8g3nd0 Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3181';
20241108@105312.9500 incr0pn06skrk4otr8sh8g3nd0 Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3181';
20241108@105312.1749 bm3c52thu84rngf5iml4j6ovgf Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241108@105312.1760 bm3c52thu84rngf5iml4j6ovgf Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241108@105312.1818 bm3c52thu84rngf5iml4j6ovgf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3182';
20241108@105312.2001 bm3c52thu84rngf5iml4j6ovgf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3182';
20241108@105312.2058 bm3c52thu84rngf5iml4j6ovgf Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3182';
20241108@105312.2089 bm3c52thu84rngf5iml4j6ovgf Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3182';
20241108@105312.3475 jpimak7drsp7u6hs6afhcvr6gh Query : insert into uploadfiles ( name_original, name_new, option_type, relative_path, whencreated ) values ( ?, ?, ?, ?, getdate() )
20241108@105312.3486 jpimak7drsp7u6hs6afhcvr6gh Query : select uploadfile_id valor from uploadfiles where name_new = ? and option_type = ? 
20241108@105312.3545 jpimak7drsp7u6hs6afhcvr6gh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3183';
20241108@105312.3614 jpimak7drsp7u6hs6afhcvr6gh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3183';
20241108@105312.3700 jpimak7drsp7u6hs6afhcvr6gh Query : select concat(rtrim(relative_path),ltrim(name_new)) as valor from uploadfiles where uploadfile_id='3183';
20241108@105312.3734 jpimak7drsp7u6hs6afhcvr6gh Query : update uploadfiles set whenupdated=current_timestamp where uploadfile_id='3183';
20241108@105312.3779 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105312.3783 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 secretkey valor from u_wsusers u where u.userid = ? and u.inactivo=0
20241108@105312.3843 jpimak7drsp7u6hs6afhcvr6gh Query : select no, estab,szadrsdesc from szadrs where u_coddest=23
20241108@105312.3931 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1824.00.1'
20241108@105312.4048 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.1824.00.1' and bi.lordem =10000
20241108@105312.4384 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560153,597000001 ' 
20241108@105312.4686 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1834.00.1'
20241108@105312.4805 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.1834.00.1' and bi.lordem =15000
20241108@105312.5122 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560388,764000009 ' 
20241108@105312.6820 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5540.00.1'
20241108@105312.7004 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.5540.00.1' and bi.lordem =20000
20241108@105312.7787 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560183,541000002 ' 
20241108@105313.4020 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5540.00.1'
20241108@105313.1914 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.5540.00.1' and bi.lordem =20000
20241108@105313.1943 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560183,541000002 ' 
20241108@105313.1966 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1862.00.1'
20241108@105313.2174 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.1862.00.1' and bi.lordem =30000
20241108@105313.2550 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560212,318000003 ' 
20241108@105313.3039 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1862.00.1'
20241108@105313.3060 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.1862.00.1' and bi.lordem =30000
20241108@105313.3084 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560212,318000003 ' 
20241108@105313.3124 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.5500.00.1'
20241108@105313.3282 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.5500.00.1' and bi.lordem =40000
20241108@105313.3669 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560234,728000004 ' 
20241108@105313.4075 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2318.00.1'
20241108@105313.4269 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.2318.00.1' and bi.lordem =50000
20241108@105313.4718 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560310,667000005 ' 
20241108@105313.5070 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2318.00.1'
20241108@105313.5102 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.2318.00.1' and bi.lordem =50000
20241108@105313.5129 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560310,667000005 ' 
20241108@105313.5156 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1426.00.1'
20241108@105313.5301 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.1426.00.1' and bi.lordem =60000
20241108@105313.5717 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560336,238000006 ' 
20241108@105313.6035 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.649.00.01'
20241108@105313.6188 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.649.00.01' and bi.lordem =70000
20241108@105313.6700 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560361,022000007 ' 
20241108@105313.7096 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.649.00.01'
20241108@105313.7122 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.649.00.01' and bi.lordem =70000
20241108@105313.7148 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560361,022000007 ' 
20241108@105313.7176 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '326.597.00.01'
20241108@105313.7786 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='326.597.00.01' and bi.lordem =80000
20241108@105313.8519 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560378,101000008 ' 
20241108@105313.8855 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '326.597.00.01'
20241108@105313.8876 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='326.597.00.01' and bi.lordem =80000
20241108@105313.8901 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560378,101000008 ' 
20241108@105313.8925 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.2231.00.2'
20241108@105313.9056 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.2231.00.2' and bi.lordem =90000
20241108@105313.9397 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560426,565000010 ' 
20241108@105313.9718 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '324.1816.00.1'
20241108@105313.9843 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='324.1816.00.1' and bi.lordem =100000
20241108@105314.3410 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110560574,657000013 ' 
20241108@105314.6490 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 isnull(design,'') valor from st (nolock) where st.ref = '321.181.45.00'
20241108@105314.7680 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bistamp valor from bi inner join bo on bo.bostamp=bi.bostamp where bo.ndos =054 and bo.boano =2024 and bo.obrano = 0000042 and bi.ref ='321.181.45.00' and bi.lordem =110000
20241108@105314.1117 jpimak7drsp7u6hs6afhcvr6gh 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 = 'pll24110563115,797000016 ' 
20241108@105314.1810 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.1813 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 1 valor from ts where ts.ndos = 5
20241108@105314.1948 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.1951 jpimak7drsp7u6hs6afhcvr6gh 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')
20241108@105314.1996 jpimak7drsp7u6hs6afhcvr6gh 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
20241108@105314.2366 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.2391 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 ~inactivo valor from fl where no = '100999' and estab = 0 order by inactivo desc
20241108@105314.2557 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.2561 jpimak7drsp7u6hs6afhcvr6gh Query : select szadrsstamp valor from szadrs where szadrsdesc='espaÇotrans,lda'
20241108@105314.2641 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.2644 jpimak7drsp7u6hs6afhcvr6gh Query : select szadrsstamp valor from szadrs where szadrsdesc='flama-fab.louÇas e electrodomesticos,sa'
20241108@105314.2724 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.2729 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from ts where ndos = 5
20241108@105314.2746 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.2764 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo' and documentnumber = 5
20241108@105314.2778 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.2795 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo2' and documentnumber = 5
20241108@105314.2811 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.2829 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bo3' and documentnumber = 5
20241108@105314.2838 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 ts2.manternumero, ts.tiposaft, ts.idserie,ts.nmdos,ts.bdempresas from ts inner join ts2 on ts.tsstamp=ts2.ts2stamp where ts.ndos = 5
20241108@105314.2984 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bo.obrano valor from bo bo where bo.ndos = 5 and boano=2024 order by obrano desc
20241108@105314.3137 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 bo.obrano valor from wsbodata bo where bo.ndos = 5 and boano=2024 order by obrano desc
20241108@105314.3269 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.3276 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 no,estab,nome, morada, local,codpost,ncont,pncont,pais,inactivo,motiseimp,codmotiseimp from fl where no='100999' and estab=0
20241108@105314.3372 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.3388 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo3' and documentnumber = 5
20241108@105314.3403 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbo3data (bo3stamp, ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) values ('aut672de32847672ded9a4f',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut')
20241108@105314.3470 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.3486 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo2' and documentnumber = 5
20241108@105314.3500 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbo2data (bo2stamp, tiposaft, idserie,cambio,cambiofixo,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,xpddata,xpdhora,carga,descar) values ('aut672de32847672ded9a4f','ga','bo',0 ,0,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut','20241108','11:23',?,?)
20241108@105314.3890 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.3908 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bo' and documentnumber = 5
20241108@105314.3925 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbodata (bostamp, nmdos, dataobra, ndos, obrano, no, estab, nome, ncont, morada, local, codpost, moeda, boano, memissao,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis,maquina ) values ('aut672de32847672ded9a4f','trf entre armazéns a','2024-11-08',5,546,?,?,?,?,?,?,?,?,2024, (select valor from para1 where descricao = 'ge_euro') ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',?)
20241108@105314.4583 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.4586 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.1824.00.1'
20241108@105314.4603 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.4606 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1824.00.1'
20241108@105314.4737 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.4740 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1824.00.1' and sa.armazem = 133 
20241108@105314.4808 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.4811 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1824.00.1'
20241108@105314.4833 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1824.00.1'
20241108@105314.4983 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.4999 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.5013 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.5028 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.5037 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.1824.00.1' and lote = 'r2400215200a'
20241108@105314.5051 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105314.5063 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.5078 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.5090 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de77755672ded9a7b','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.5478 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.5497 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.5514 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de77755672ded9a7b',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 20.000, 20.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,10000 ,69.99,69.99*200.48,69.99,69.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,69.99*20.000,69.99*20.000*200.48 ,27.295000,27.295000*200.48 ,27.295000,27.295000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,69.99,69.99*200.48,69.99*20.000,69.99*20.000*200.48,'pll24110560153,597000001 ',69.99,69.99*20.000,69.99,69.99*20.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.6011 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.6015 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.1834.00.1'
20241108@105314.6029 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.6032 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1834.00.1'
20241108@105314.6063 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.6066 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1834.00.1' and sa.armazem = 133 
20241108@105314.6140 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.6143 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1834.00.1'
20241108@105314.6161 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1834.00.1'
20241108@105314.6318 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.6334 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.6347 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.6361 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.6370 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.1834.00.1' and lote = 'r2400214200a'
20241108@105314.6383 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105314.6396 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.6411 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.6422 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de05897672ded9a9c','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.6575 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.6592 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.6608 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de05897672ded9a9c',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,20000 ,79.99,79.99*200.48,79.99,79.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,79.99*6.000,79.99*6.000*200.48 ,28.440000,28.440000*200.48 ,28.440000,28.440000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,79.99,79.99*200.48,79.99*6.000,79.99*6.000*200.48,'pll24110560388,764000009 ',79.99,79.99*6.000,79.99,79.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.7016 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.7020 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.5540.00.1'
20241108@105314.7036 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.7039 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20241108@105314.7058 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.7065 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5540.00.1' and sa.armazem = 133 
20241108@105314.7158 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.7161 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20241108@105314.7180 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5540.00.1'
20241108@105314.7340 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.7357 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.7369 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.7384 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.7393 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.5540.00.1' and lote = 'r2300830100a'
20241108@105314.7480 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105314.7493 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.7510 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.7523 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de75611672ded9ab6','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.7709 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.7727 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.7745 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de75611672ded9ab6',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,30000 ,149.99,149.99*200.48,149.99,149.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,149.99*6.000,149.99*6.000*200.48 ,36.952000,36.952000*200.48 ,36.952000,36.952000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,149.99,149.99*200.48,149.99*6.000,149.99*6.000*200.48,'pll24110560183,541000002 ',149.99,149.99*6.000,149.99,149.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.8121 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8126 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.5540.00.1'
20241108@105314.8140 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8143 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20241108@105314.8160 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8163 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5540.00.1' and sa.armazem = 133 
20241108@105314.8186 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8188 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.5540.00.1'
20241108@105314.8208 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5540.00.1'
20241108@105314.8223 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.8239 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.8253 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.8268 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.8277 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.5540.00.1' and lote = 'r2300830100a'
20241108@105314.8289 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105314.8305 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.8320 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.8332 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de42165672ded9aca','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.8484 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.8502 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.8517 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de42165672ded9aca',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,40000 ,149.99,149.99*200.48,149.99,149.99*200.48 ,0,0,'un',' ' ,bo.marcada,1 ,149.99*4.000,149.99*4.000*200.48 ,36.952000,36.952000*200.48 ,36.952000,36.952000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,149.99,149.99*200.48,149.99*4.000,149.99*4.000*200.48,'pll24110560183,541000002 ',149.99,149.99*4.000,149.99,149.99*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.8843 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8847 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.1862.00.1'
20241108@105314.8864 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8867 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1862.00.1'
20241108@105314.8883 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8886 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1862.00.1' and sa.armazem = 133 
20241108@105314.8957 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.8960 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1862.00.1'
20241108@105314.8979 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1862.00.1'
20241108@105314.9130 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.9148 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.9167 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.9183 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.9192 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.1862.00.1' and lote = 'r2400440200a'
20241108@105314.9215 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105314.9228 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.9243 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105314.9255 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de34171672ded9ae1','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.9407 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105314.9424 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105314.9441 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de34171672ded9ae1',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,50000 ,119.99,119.99*200.48,119.99,119.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,119.99*4.000,119.99*4.000*200.48 ,42.473000,42.473000*200.48 ,42.473000,42.473000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,119.99,119.99*200.48,119.99*4.000,119.99*4.000*200.48,'pll24110560212,318000003 ',119.99,119.99*4.000,119.99,119.99*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105314.9769 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.9772 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.1862.00.1'
20241108@105314.9787 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.9790 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1862.00.1'
20241108@105314.9807 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.9810 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1862.00.1' and sa.armazem = 133 
20241108@105314.9834 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105314.9837 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1862.00.1'
20241108@105314.9857 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1862.00.1'
20241108@105315.6800 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.8500 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.9900 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.1140 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.1230 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.1862.00.1' and lote = 'r2400440200a'
20241108@105315.1350 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105315.1500 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.1640 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.1760 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de17800672ded9b03','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.3310 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.3480 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.3640 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de17800672ded9b03',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 2.000, 2.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,60000 ,119.99,119.99*200.48,119.99,119.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,119.99*2.000,119.99*2.000*200.48 ,42.473000,42.473000*200.48 ,42.473000,42.473000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,119.99,119.99*200.48,119.99*2.000,119.99*2.000*200.48,'pll24110560212,318000003 ',119.99,119.99*2.000,119.99,119.99*2.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.6910 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.6960 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.5500.00.1'
20241108@105315.7100 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.7130 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.5500.00.1'
20241108@105315.7300 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.7320 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.5500.00.1' and sa.armazem = 133 
20241108@105315.8030 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.8060 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.5500.00.1'
20241108@105315.8250 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.5500.00.1'
20241108@105315.9840 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.1001 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.1013 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.1028 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.1036 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.5500.00.1' and lote = 'r2400095600a'
20241108@105315.1050 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105315.1063 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.1079 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.1090 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de90400672ded9b19','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.1265 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.1283 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.1299 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de90400672ded9b19',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 6.000, 6.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,70000 ,99.99,99.99*200.48,99.99,99.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,99.99*6.000,99.99*6.000*200.48 ,24.876000,24.876000*200.48 ,24.876000,24.876000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,99.99,99.99*200.48,99.99*6.000,99.99*6.000*200.48,'pll24110560234,728000004 ',99.99,99.99*6.000,99.99,99.99*6.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.1837 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.1841 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.2318.00.1'
20241108@105315.1856 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.1859 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.2318.00.1'
20241108@105315.1875 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.1878 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2318.00.1' and sa.armazem = 133 
20241108@105315.1946 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.1949 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.2318.00.1'
20241108@105315.1967 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2318.00.1'
20241108@105315.2114 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2129 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.2141 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2156 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.2165 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.2318.00.1' and lote = 'r2100669100a'
20241108@105315.2187 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105315.2201 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2215 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.2226 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de94579672ded9b35','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.2378 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2397 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.2412 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de94579672ded9b35',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,80000 ,66.99,66.99*200.48,66.99,66.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,66.99*4.000,66.99*4.000*200.48 ,19.608000,19.608000*200.48 ,19.608000,19.608000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,66.99,66.99*200.48,66.99*4.000,66.99*4.000*200.48,'pll24110560310,667000005 ',66.99,66.99*4.000,66.99,66.99*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.2768 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.2772 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.2318.00.1'
20241108@105315.2785 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.2788 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.2318.00.1'
20241108@105315.2804 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.2807 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.2318.00.1' and sa.armazem = 133 
20241108@105315.2829 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.2832 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.2318.00.1'
20241108@105315.2850 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.2318.00.1'
20241108@105315.2864 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2879 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.2892 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2907 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.2916 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.2318.00.1' and lote = 'r2100669100a'
20241108@105315.2929 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105315.2941 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.2957 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.2969 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de66601672ded9b47','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.3118 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.3136 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.3152 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de66601672ded9b47',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 2.000, 2.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,90000 ,66.99,66.99*200.48,66.99,66.99*200.48 ,0,0,'un ','' ,bo.marcada,1 ,66.99*2.000,66.99*2.000*200.48 ,19.608000,19.608000*200.48 ,19.608000,19.608000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,66.99,66.99*200.48,66.99*2.000,66.99*2.000*200.48,'pll24110560310,667000005 ',66.99,66.99*2.000,66.99,66.99*2.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.3633 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.3641 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.1426.00.1'
20241108@105315.3657 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.3660 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1426.00.1'
20241108@105315.3676 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.3678 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.1426.00.1' and sa.armazem = 133 
20241108@105315.3751 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.3754 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.1426.00.1'
20241108@105315.3774 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.1426.00.1'
20241108@105315.3943 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.3968 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.3980 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.3994 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.4003 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.1426.00.1' and lote = 'r2100465200a'
20241108@105315.4015 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105315.4027 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.4042 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.4056 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de45645672ded9b62','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.4220 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.4266 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.4283 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbidata (bistamp,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis ,obrano, qtt,uni2qtt ,no, estab,nmdos ,ndos, obranome,fechada, dataobra ,rdata ,dataopen, datafecho,local, morada ,codpost, nome,bostamp,lordem ,edebito,debito, epu,pu ,ivaincl,stns,unidade, unidad2 ,marcada,usalote ,ettdeb,ttdeb,epcusto, pcusto ,ecustoind,custoind ,vendedor,vendnm, ccusto,ncusto ,noserie,tabiva,iva ,ref,design,familia,desconto,desc2,desc3,desc4,eslvu,slvu,esltt,sltt,oobistamp,vumoeda,ttmoeda,slvumoeda,slttmoeda,lote,armazem,ar2mazem,obistamp ,stipo) select 'aut672de45645672ded9b62',getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut',bo.obrano, 4.000, 4.000*.0000000 ,bo.no, bo.estab,bo.nmdos ,bo.ndos, bo.obranome,bo.fechada, bo.dataobra ,bo.dataobra ,bo.dataopen,bo.datafecho,bo.local, bo.morada ,bo.codpost, bo.nome,bo.bostamp,100000 ,59.99,59.99*200.48,59.99,59.99*200.48 ,0,0,'un ',' ' ,bo.marcada,1 ,59.99*4.000,59.99*4.000*200.48 ,20.193000,20.193000*200.48 ,20.193000,20.193000*200.48 ,bo.vendedor,bo.vendnm,bo.ccusto,bo.ncusto ,0,2,23.00,?,?,?,0,0,0,0,59.99,59.99*200.48,59.99*4.000,59.99*4.000*200.48,'pll24110560336,238000006 ',59.99,59.99*4.000,59.99,59.99*4.000,?,?,?,?,4 from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.4616 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.4619 jpimak7drsp7u6hs6afhcvr6gh Query : select st.usalote valor from st where st.ref = '324.649.00.01'
20241108@105315.4635 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.4637 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.649.00.01'
20241108@105315.4681 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.4685 jpimak7drsp7u6hs6afhcvr6gh Query : select isnull(sum(stock) ,0)stock ,isnull(sum(qttrec),0) qttrec ,0 qttcat ,isnull(sum(rescli),0) rescli ,isnull(sum(resfor),0) resfor from sa where sa.ref = '324.649.00.01' and sa.armazem = 133 
20241108@105315.4769 jpimak7drsp7u6hs6afhcvr6gh Query : use flama_phc
20241108@105315.4772 jpimak7drsp7u6hs6afhcvr6gh Query : select st.stns valor from st where st.ref = '324.649.00.01'
20241108@105315.4793 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 st.tabiva ,st.ivaincl ,st.stns ,st.uni2 ,st.familia ,isnull(tx.taxa, 0) txiva ,unidade ,usalote ,epcpond ,noserie ,conversao ,st.texteis from st left join taxasiva tx on st.tabiva = tx.codigo where st.ref = '324.649.00.01'
20241108@105315.4959 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.4977 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi' and documentnumber = 5
20241108@105315.4991 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.5008 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,mandatory from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.5018 jpimak7drsp7u6hs6afhcvr6gh Query : select sestamp valor from se where ref ='324.649.00.01' and lote = 'r2400682200a'
20241108@105315.5034 jpimak7drsp7u6hs6afhcvr6gh Query : select top 1 convert(numeric(6,2),t.taxa) valor from taxasiva t where t.codigo='2'
20241108@105315.5047 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.5063 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi2' and documentnumber = 5
20241108@105315.5077 jpimak7drsp7u6hs6afhcvr6gh Query : insert into wsbi2data (bi2stamp,bostamp,morada, local,codpost ,ousrdata, ousrhora, usrdata,usrhora,ousrinis,usrinis) select 'aut672de87222672ded9b7b','aut672de32847672ded9a4f',bo.morada, bo.local,bo.codpost ,getdate(),convert(char(8),convert (time,getdate())),getdate(),convert(char(8),convert (time,getdate())),'aut','aut' from wsbodata bo where bo.bostamp = 'aut672de32847672ded9a4f'
20241108@105315.5240 jpimak7drsp7u6hs6afhcvr6gh Query : select 1 valor from information_schema.tables where table_type='base table' and table_name='wstablefields'
20241108@105315.5260 jpimak7drsp7u6hs6afhcvr6gh Query : select fieldkey,fieldname,fieldtype,calcformula from wstablefields where tablename = 'bi' and documentnumber = 5
