Narendra,
When you come to Proforma Invoice ,it doesnt have accounting part so,there is some inconsistency will be happen if use any user exit or enhancement on your requirement .
(For this enhancement) The code can be written to exclude certain billing document types (e.g. F5, F8).
In other words, for all billing documents of billing types other than F5 and F8; an accounting document is mandatory.
Side comment - OP can confirm whether the business uses proforma invoices.