Hi,
Your thread subject and thread texts contain, both are different!
If main vendor number in PO(ME23N) is differs from vendor number in Invoice, then cross check different vendor number available in Partner functions view in vendor master!
Use t.code:XK03, enter main vendor master, company code & purchase organisation and now select Partner functions view in Purchase organisation data segment to find your invoice vendor assigned to Partner function PI(Invoicing Party) which cause your concern!
NOTE:
If main vendor number in PO(ME23N) is differs from vendor number in Invoice- you may be doing invoice verification for Transport Vendor for delivery charge and cross check Transport Vendor available in delivery cost condition type in Purchase Order(ME23N) - go to details of delivery cost condition type.
Regards,
Biju K