Often POReference is used to store the document number of an external created document.
In case of invoice (vendor) the bill number of the vendor is stored in POReference.
But POReference should not be used for that purpose. When POReference is filled in source documents when copying lines, than POReference gets copied from that source document.
So POReference is better used for things like project numbers/names.
Long time ago, I added this column on my instances and it's very useful for vendor invoices.
2 things that can improve your patch :
I add it as virtual column on Payment and PaymentAllocate (displayed when InvoiceID > 0)
I add a column 'XXA_IsDocumentNoExtMandatory' on C_DocType ; so we can force users to fill the field (using MandatoryLogic ; ie no code needed)