Allow to extend the invoices list to compute invoice state of sale and purchase
So advance payment invoices can be included in the original computation instead of duplicating the computation since changeset 1a763ffe4a66 renamed waiting into pending and add more states.