I don't think the revert command will work after interacting with the portal either. You can try it and see for your self if you want:
Give the payment detial portal a unique object name (Name box at top of position tab in Inspector). I'll assume you have named it "PaymentDetail".
Set variable [Data$ ; value: AR_Invoice::Data ] //don't know exactly what data you need to copy from one invoice to the other here
Go To Object ["PaymentDetail"]
Go To Portal Row [Last] //must have "allow creation of records..." enabled for AR_ARDetail in AR_AR to AR_ARDetail relationship
Set Field [AR_ARDetail::Data ; $Data ]
I predict that you will have trouble here with Revert as well. You may need instead to have a "delete" button in the portal row that is used to delete the portal row.