I tried to design such solution but I faced an issue. I could not know when processing the purchase which draft invoice line must be deleted. So the risk is to delete the invoice line created by document incoming instead of the one created automatically.
So instead I think the best option is that user who plan to use document incoming for supplier invoice should set the invoice method to manual.
But in order to provide users with way to fix mistakes, I think we should have a button to force the creation of the invoice from a purchase with manual method. In this case the manual method will work like the âOn Orderâ method.
And for the case where an invoice method was set on purchase and the supplier invoice is imported by document incoming, if the lines are correctly linked to the purchase lines, a credit note will be created. So the user will have a draft supplier invoice and a draft supplier credit note that cancel each other. The user may want to delete them. But if he does not, this will not corrupt any forecast any way.