I have a set of data, coming in from an sql database. I have a tester that then splits this into two streams - one stream contains details of all positive value transactions and the other contains details of all negative value transactions. Each transaction has a unique reference.
I need to be able to say which DR transaction a CR transaction has been applied to but the kicker is that the CR transaction might not be for the full amount of a transaction and a later CR transaction might apply to the same DR transaction ie multiple CR transactions apply to same DR transaction. I also need to be able to assign a balance to both transactions but this needs to be the balance at the end of the transformation. The attached excel document might explain it better