PO is not showing if we create a payment entry from different company

Hi,
we created a PO with ABC company, but when we are creating a new payment entry with XYZ company, the Purchase Order is not showing.
And when we select the ABC company to add a new payment entry, that particular PO shows up.
How can we create a payment entry with different companies against the PO?