Конструктор отчетов

Ключ
Эта строка удалена.
Это слово было удалено. Это слово было добавлено.
Эта строка добавлена.

Изменения (2)

просмотр истории страницы
and urt.id = ':Линейка услуг|select[UslugaRangeTypes]$'
{code}
#h5. Отчет по абонентам у которых не был выставлен акт за период.
{code}select a.id
from abonents a
where a.is_folder=0
and a.deleted = 0
and a.id > 0
and a.parent_id not in (2, 244)
and a.id not in (select abonent_id aid
from finance_operations fost
where fost.storno = 0
and fost.op_type = 1
and (extract(year from fost.period_end_date) = extract(year from cast(':Расчетный период|monthchoice|period_end_date|select[financeoperations]$' as date)) and
extract(month from fost.period_end_date) = extract(month from cast(':Расчетный период|monthchoice|period_end_date|select[financeoperations]$' as date)))
order by fost.op_date)

{code}




h1. Решение проблем