Hi,
Do you have blocked indicator Q in your system?
Generally blocked indicators are as *, A,B,I,N, P, R and V.
I believe development already considered to block invoice posting if material is in quality inspection by showing an error message during invoice posting for your purchase order in MIRO- now what is your new expectation. Just cross check requirement and look system design possibility for your expectation.
Regards,
Biju K