Karen and I have discussed this but I'll clarify here for others.
The original invoice was created correctly. In the Job Cost billing and payments batch there are two entries, which is correct. One is for the invoice and the other records the retained amount.
The due date for retainage becomes the "date" for the retainage transaction and shows up on the retainage report. However, the system creates an error batch with the second entry because the date is beyond the current fiscal year. So changing to a 12/31/05 date as the "date" of the retainage transaction did allow it to be posted.
However, this is a program problem. The retainage due date should not be checked by the program to make sure it is in the current fiscal year. Often retainage is not due until much later, and should be able to be in the following fiscal year.