Scenario
Multiple invoices are dispatched to multiple departments within a client company. That company has its own internal processes and approval processes and payment schedules. They occasionally pay exactly the amount invoiced, but often they pay it in installments, or with they will amalgamate a number of demands into a single payment.
Implement a general ledger reconciliation in PhixFlow, matching amounts from two source streams (a Bank statement and a general ledger). Implement the reconciliation using a number of rules e.g. favour the least number of records in each set when making a reconciliation, allow more than 2 x 2 or 3 x 3 matches, consume matched records such that they cannot be part of more than one match.
Solution:
- Create a Stream to merge input from 2 sources (other streams / DB collectors / file collectors)
- For each element, or group of elements in the first stream, try to match the element, or elements in the 2nd stream that match the amount in the first stream.
- Repeat for all elements and groups of elements
- Mark those elements matched where amounts and totals agree