on 10-07-2008 7:37 PM
What is the best way to look up sales by each contact for a specific account. For example, one of our customers has 10 sales reps. We want to see how much each individual sales rep has purchased from us during a specified period of time. We then offer a commission to these sales rep based on what they have purchased during this time.
Is there any report that can do this already or is it better to write a Query for this?
Thanks!!
Mike
Mike,
Are you talking about using the Contact Person on the AR Invoice for these calculations?
Sample Query to display Sales by Selected Contact Person
SELECT T1.DocNum AS 'Document Number', T1.DocDate AS 'Posting Date', T1.DocTotal,
T0.Name AS 'Contact Person Name'
FROM [dbo].[OCPR] T0 INNER JOIN [dbo].[OINV] T1 ON T1.CntctCode = T0.CntctCode
WHERE T0.Name = '[%0]'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mike,
You should check B1 report first:
From Sales A/R - Sales Reports - Sales Analysis
Under Sales Employee tab, test few selections to see what gaps do you have to meet your requiements. We can go from there.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case if this might help
Total Sales by Customer and Customer Sales Rep
SELECT T0.CardCode, T0.Name AS 'Customer Rep', SUM(T1.DocTotal) [Total Sales] FROM [dbo].[OCPR] T0 INNER JOIN [dbo].[OINV] T1 ON T1.CntctCode = T0.CntctCode
WHERE T1.DocDate BETWEEN '[%0]' AND '[%1]'
GROUP BY T0.CardCode, T0.Name
Hi Mike,
Are you looking for the Report which is available at the following path
Sales Module > Sales Reports > Sales Analysis > Sales Employee tab.
If this is not then probably one needs to write a query to get the report.
Something as follows :
SELECT T0.[CardCode], T0.[Name],* FROM OCPR T0 INNER JOIN OINV T1 ON T0.CntctCode = T1.CntctCode WHERE T1.[CntctCode] =[%0]
You can take the relevant fields from OCPR and OINV
Regards,
Jitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
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.