Generate a new source reference after cloning a payment transaction group
This is a fix for this issue:
Create a payment transaction group, a source reference will be generated (something like PTG0123
. The field is read only on the form, so it's clearly not something we expect user to edit, but a kind of unique generated reference.
Clone that payment transaction group, on the cloned payment transaction group, source reference is empty.
The fix here is to generate a new source reference.
A side effect of these changes is that destination reference is no longer reset after clone, because before this Delivery_afterClone
was used and this script reset both source and destination reference.