[Completed]="Y" and days([Invoice_Date]) <= days(rel_date) and [Inv_Nr]<>blank and [Posted] = blank