On Mon, Jan 30, 2012, at 08:35 AM, Stephen Russell wrote: > > > > > > Account | Reference | Date | Value > > --------+-----------+------------+---------- > > AB001 | Ref 1 | 30/01/2011 | 39.99 > > AB001 | Ref 1 | 30/01/2011 | 150.90 > > AB001 | Ref 1 | 30/01/2011 | -93.99 > > CD002 | Ref A | 15/09/2011 | -49.99 > > CD002 | Ref B | 15/09/2011 | 22.99 > ---------------
The first three there are three line items on one invoice, invoice reference being 'Ref 1', for account AB001 on 30/01/2011. However one value is negative which is invalid. The second two are line items for a credit note and an invoice (only one line apiece), they are separate entities because the reference is different, and they are valid because all their values are the same sign. This is data coming in from an external system that I have to sanity-check. I wouldn't design the thing this way! -- Alan Bourke alanpbourke (at) fastmail (dot) fm _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

