While bills are not processed by the DIRF routine, the field E2_DTDIRF is blank. After the processing, bills valid for DIRF (according to E2_DIRF and E2_CODRET) have this field filled out with the processing date:
If the Posting option is selected for the question Consider Date, bills with the field E2_BAIXA are filtered first in the period entered in the fields Date from - Date to. For bills not posted (blank E2_BAIXA), this same period is considered. However, it is applied to the issue date (E2_EMIS1) in order not to discard any mandatory information for DIRF.
According to our legal advice, all bills must be considered, even if they have not been posted.