MPaySelectionCheck.confirmPrint(MPaySelectionCheck, MPaymentBatch, boolean) will, if the last parameter is true, generate a C_DepositBatch record when you confirm your Payment Print/Export. This is desired behaviour.
If you go back to Payment Print/Export and re-run it for the same C_PaymentSelection, it will not re-create C_Payment records for the C_PaySelectionCheck lines. This is also desired behaviour. However, it will create a new (duplicate) C_DepositBatch record and a new C_DepositBatchLine record for each line. This is not desirable behaviour.
It should not be too hard to fix this, by moving the code that creates the header (C_DepositBatch) record until after the call that creates the payment (the call to confirmPrint(MPaySelectionCheck, MPaymentBatch)). The code can the inspect the created payment, see if it already belongs to a deposit batch, and only create a deposit batch if it isn't already allocated to one.
Not OS specific. Working with mercurial repository changeset# 12212:3bf205c237a3
Sorry, I meant to flag this is a minor, not a major issue. I think it should be considered minor because there is an easy workaround (ie, don't run Payment Print/Export twice for the same PaySelection). On the other hand, perhaps it should be considered major because of the potential headaches it could cause to the organisation that inadvertently stumbles upon this bug.
Triaged by Andres Lopez
Still reproducible on 7.1z