Třídová akce

Kód:
11
Tělo:
select
  (DQ.Code || '-' || CAST(a.OrdNumber AS VARCHAR(10)) ||'/' ||  P.Code) as DisplayName,
  FO.Name as FirmOfficeName,
  A.DocDate$Date as DocDate$Date,
  A.Duedate$Date as DueDate$Date,
  A.LocalAmount,
  A.LocalPaidAmount,
  A.LocalUsedAmount,
  DQ.Code,
  A.ID as ID
from IssuedDInvoices A
join DocQueues DQ on DQ.ID = A.Docqueue_Id and DQ.Documenttype = '10'
join Periods P on P.ID = A.Period_Id
join FirmOffices FO on FO.ID = A.Firmoffice_Id
where
((A.PaidAmount - A.UsedAmount) > 0 )
and (A.Firm_ID IN (SELECT x.ID FROM Firms x WHERE x.ID = :FirmOID OR x.Firm_ID = :FirmOID)) 

Generated by ABRA Software a.s. 27.10.2021 16:34:09