The invoice due days should be set at the Account level.
To configure this:
Go to the Accounts view page.
Enter the value in the "Due by Days" field and save it.
When an invoice is generated, the due date will be automatically set based on the number of days specified for the account.