Interrupted update, repeated attempts, with multiple copies using different HeaderSeqNo values for the copies? No easy answer. DFDM, file by file, line by line, to remove what you need to remove. Make sure the open invoice file and transaction payment history file is linked properly to the HeaderSeqNo you keep in AP history.
Bill for time... the customer will likely want you to fix ""everything"", but if they are paying by the hour, they may not worry about obscure summary tables.