on 01-21-2011 2:21 PM
This script is giving me a figure that does not always match the 'Total AR Invoice' against a customer in SAP Sales Analysis, as far as I can see the reported figure is greater than the SAP figure - can nayone help me put this right please?
SELECT
t0.cardcode as 'Customer Code',
t0.cardname as 'Customer name',
t2.slpname as 'Sales Person',
sum(t0.doctotal-t0.vatsum) as 'Invoiced Value'
FROM
oinv t0
inner join ocrd t1 on t0.cardcode = t1.cardcode
inner join oslp t2 on t1.slpcode = t2.slpcode
WHERE
t0.docdate between [%1] and [%2]
GROUP BY
t0.cardcode,
t0.cardname,
t2.slpname
HAVING
sum(t0.doctotal-t0.vatsum) > 0
ORDER BY
t2.slpname,
t0.cardcode
Thanks,
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.