Only one alternative payee is permitted on draft invoice so we can copy it
only if there is only one and it is the one that was already set when posting
the invoice (only party that appears in the lines to pay).
Closes#12528
The fiscal years are created centered on the passed date such that if the
current day change during the execution, the fiscal year is still usable.
Also fiscal year can be created for a range of dates such that it is guarantee
that the dates are in the fiscal year.
And finally remove datetime and dateutil import when they are not used.
Closes#9977
When paying the exact remaining amount of an invoice with different currency,
it should normally be a payment with write-off for exchange rate.
Closes#11821