View nejstarsi_zbytek_podle_fifo.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from (select row_number () over (partition by p.kod order by p.datvyst, sum(p.mnozmj) - sum(coalesce(s.kusu,0))) as rk, | |
p.kod, p.datvyst, p.idpolsklad, p.iddoklsklad, sum(p.mnozmj) - sum(coalesce(s.kusu,0)) zbyva | |
from dpolsklad p | |
LEFT JOIN ddoklsklad d ON (d.iddoklsklad = p.iddoklsklad) | |
left join sfifovazby s on (p.idpolsklad = s.idpolskladprijem) | |
WHERE d.typpohybuk = 'typPohybu.prijem' | |
group by p.kod, p.datvyst, p.idpolsklad | |
having sum(p.mnozmj) <> sum(s.kusu) or sum(s.kusu) is null) as t | |
where rk <= 10 |
View VATRETURNLASTREG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<winstrom version="1.0" source="FlexiBee"> | |
<!-- Uživatelské dotazy --> | |
<uzivatelsky-dotaz> | |
<!-- Zkratka (řetězec) - max. délka: 20 --> | |
<kod>VATRETURNLASTREG</kod> | |
<!-- Název (řetězec) - max. délka: 255 --> | |
<nazev>vatreturnlastreg</nazev> | |
<!-- Název EN (řetězec) - max. délka: 255 --> |
View VATRETURNLASTADD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<winstrom version="1.0" source="FlexiBee"> | |
<!-- Uživatelské dotazy --> | |
<uzivatelsky-dotaz> | |
<!-- Zkratka (řetězec) - max. délka: 20 --> | |
<kod>VATRETURNLASTADD</kod> | |
<!-- Název (řetězec) - max. délka: 255 --> | |
<nazev>vatreturnlastadd</nazev> | |
<!-- Název EN (řetězec) - max. délka: 255 --> |
View flexibee-evidencies.sql
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################ analyza-nakupu ########################################################### | |
/* centralServer LOG*/ select hodnota from cssetting where klic = $1 | |
/* centralServer DETAIL*/ parameters: $1 = 'ACCESS_CONTROL_ALLOW_ORIGIN' | |
/* centralServer LOG*/ select a.attname from pg_class c join pg_attribute a on a.attrelid = c.oid join pg_type t on t.oid = a.atttypid where relname = 'csuzivatel' and a.attnum > 0 and not a.attisdropped order by a.attnum | |
/* centralServer LOG*/ SELECT max(dbversion) FROM dbversion WHERE needreimport = 't' | |
/* centralServer LOG*/ select u.idcsuzivatel, u.jmeno, u.create_company, u.manage_all, u.create_user, u.change_password, u.delete_company, u.grant_permission, u.license_mgmt, u.deleted, u.blocked, u.blocked_text, u.create_dt, u.idcsskupina, u.sso_identifier, u.dbusername, u.default_role, u.given_name, u.family_name, u.email, u.mobile, u.system_user, u.last_dt, u.user_type from csuzivatel u where lower(u.jmeno) = lower($1) and not u.delet |