Advanced payment terms calculation

Is there a way to calculate payment terms for one vendor where:

If the document date falls on day 1 through day 15, the vendor invoice is due the 25th of the current month and if the document date falls after day 15 it is due the 10th of the following month? Ignore work days and holidays.

Any help greatly appreciated!!


This is not possible without coding but not difficult code.