on 01-08-2015 12:32 AM
Hi,
I was requested to obtain a query that retrieves the sellers and originators for all invoices, I have tried looking into OINV but no luck yet.
Can someone tell me or suggest what table(s) should I look for?
Thanks.
Hi Jose,
Not sure what you refers as Sellers and Originators.. maybe different localization.
But if you are referring to
Sales Person = OINV.SlpCode Join to the OSLP table
Owner = OINV.OwnerCode Join to the OHEM table.
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have done this query to get both but it is not giving the exact result, it is providing multiple creators (don't make sense):
SELECT T0.DocNum as "Invoice Number", T0.CardCode as "Customer Code", T0.CardName as "Name", T0.NumAtCard as "Ref / PO No.", (T0.DocTotal-T0.VatSum) as "Invoice Ammount",
T1.SlpName as "Vendedor", T2.U_NAME as "Originator"
FROM OINV T0
INNER JOIN dbo.OSLP T1 ON T1.SlpCode=T0.SlpCode
INNER JOIN OUSR T2 on T0.UserSign=T2.userSign
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.