A
Anverion
Guest
Hello-- I have a task where I need to iterate through a collection to determine if an amount is a credit (negative) and then, compare elements within that collection to those amongst that collection to determine if: We get a collection of earning file details. Within these details, we have the fields: Detail_id Person_id Company_id Amount I iterate though these records to see if there’s one with a credit (negative amount) I label that record as a credit and now, I need to iterate through the rest of the records to see if the following is true: Credit person_id matches non-credit person_id Credit company_id matches non-credit company_id Credit amount matches non-credit amount (*-1) I think I’m over thinking this. Realistically, we could have one or more credits. So, for every credit, I would need to loop through the details to see if I can find a non-credit match. Thank you, Branden
Continue reading...
Continue reading...