Bug fix on next_invoice_date calculation.