UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Query Filter issue    
 
   
cfd
post Jun 20 2008, 06:45 PM
Post #1

UtterAccess Member
Posts: 29



On the attached file are examples of 2 invoice transactions. Each row is a transaction for an invoice (inv # in column ESCINO). You'll see that inv 1010237 has 4 transactions and inv 1010398 has 3.

Inv 1010237: In column ESSEXN you'll see 206, 231 and 214 listed twice. The two 214 rows are info that I need. Of the 206 and the 231 rows I only need 1 row, the 231 row.

If an inv has both the 206 and the 231, I only need the 231 row.

If an invoice has only one or the other (206 or 231 or 214), I need one or the other.

I hope I explained myself well enough. If not please respond with any questions you my have.

Thanks,
Chris
Attached File(s)
Attached File  PartsPastDue.JPG ( 76.74K ) Number of downloads: 4
 
Go to the top of the page
 
+
DougY
post Jun 20 2008, 08:49 PM
Post #2

Utterly Abby-Normal
Posts: 9,754
From: Seattle, WA [USA]



Hi Chris,

Let's see if I got it right:

- Check the invoices for transaction 214
- If not found, check for transaction 231
- If not found, check for transaction 206

Are you looking into returning only one transaction per invoice?
Go to the top of the page
 
+
cfd
post Jun 23 2008, 04:36 PM
Post #3

UtterAccess Member
Posts: 29



Doug,

There could be 1 trans for an invoice or there could even be up to 5 trans for an invoice. It just depends on the invoice and its activity (orig inv, less payments, adjustments,ect). The net of all transactions will be the balance owed on the invoice.

I need all 214 trans that there are for invoices.

In the example for invoice 1010237 there a 4 transactions. I need the two 214 trans. The 206 and the 231 have the same $ amount of $517.61. I only need one or the other (206 or 231) if they are the same amount. This invoice should net to $37.91 which is the 231 trans and the two 214 trans. When there are 2 trans with the same $ amount I only need 1 of those trans, its the 231 and the 206 normally.

In some cases and invoice will only have 1 transaction. Either the 214, 206 or the 214. I need this one trans.

I hope this helps. Reply with more questions if needed.

Thanks,
Chris
Go to the top of the page
 
+
DougY
post Jun 23 2008, 11:04 PM
Post #4

Utterly Abby-Normal
Posts: 9,754
From: Seattle, WA [USA]



OK... I think I got it... at least enough to ask a couple of questions...

For each invoice:
Is trans 231 amount <> trans 206 amount do you want to grab both transactions?
If there are two 241 transaction with the same amount, do you want both or just one?

If there is Trans 241 with any other trans (206 or 361) grab both 241 and the additional transaction.

Am I on the right track?
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th May 2013 - 07:42 AM