get flat tenants
This commit is contained in:
parent
006b488c63
commit
422a8d37ab
@ -1,3 +1,4 @@
|
|||||||
|
import typing_extensions
|
||||||
from db import dbGetMany
|
from db import dbGetMany
|
||||||
import datetime
|
import datetime
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
@ -13,6 +14,24 @@ def perform(dbh, params):
|
|||||||
|
|
||||||
|
|
||||||
# get flat tenants by object and timespan with paid overhead and due overhead
|
# get flat tenants by object and timespan with paid overhead and due overhead
|
||||||
|
select t.id as tenant_id,
|
||||||
|
t.firstname as tenant_firstname,
|
||||||
|
t.lastname as tenant_lastname,
|
||||||
|
f.id as flat_id,
|
||||||
|
f.description as flat,
|
||||||
|
p.id as house_id,
|
||||||
|
p.description as house,
|
||||||
|
ty.startdate as startdate,
|
||||||
|
ty.enddate as enddate
|
||||||
|
from tenant_t t,
|
||||||
|
premise_t p,
|
||||||
|
flat_t f,
|
||||||
|
tenancy_t ty
|
||||||
|
where ty.tenant = t.id and
|
||||||
|
ty.flat = f.id and
|
||||||
|
f.premise = p.id
|
||||||
|
order by house_id, tenant_id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# get overhead sums by object, category and timespan
|
# get overhead sums by object, category and timespan
|
||||||
|
Loading…
x
Reference in New Issue
Block a user