Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Advance Amount for a Particular Customer 1

Status
Not open for further replies.

PrisWine

Programmer
Oct 29, 2012
11
LK
I'm creating a csharp application to input Customer number and get the Advance Payment Amount from Sage ACCPAC 6.0

I'm referring the below SQL for getting the value

SELECT SUM(AMTEXTNDHC) AS AMTEXTNDHC, IDCUST, IDRMIT
FROM ARPJD
WHERE (ACCTTYPE = 1) AND (IDCUST = '???')
GROUP BY IDCUST, IDRMIT

BUT THE CUSTOMER INQUIRY SCREEN VALUES AND THE QUERY RETURNED VALUES NOT MATCHING , so how will I able to compare to make to correct

Please help me on the SQL Query
 
You need to select the IDRMIT value, too if you want to see one payment.
 
@ettienne

I have included the screen in ACCPAC 6.0 , the values are not matching with the above mentioned query I need a help on the SQL Query , may be I'm referring to wrong table

Inqury_a5jk9i.gif
 
this was my final solution and working fine
SELECT SUM(AMTPAYMTC) AS AMTPAYMTC, IDCUST, IDRMIT FROM AROBP
WHERE TRANSTYPE = 11 AND IDINVC LIKE 'PY%'
 
Just to add to this, reporting off of ARPJD is risky because posting journals can be cleared. Most companies don't because hard drive space is cheap but sometimes people invoke functions that they shouldn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top