cancel
Showing results for 
Search instead for 
Did you mean: 

Sales By Contact

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

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]'

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

Suda -- yes, that's what I am talking about.

Gordon - the Sales Employee tab is for our sales people but I'm actually referring to our customer's sales people.

Thanks!!

Mike

former_member583013
Active Contributor
0 Kudos

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

jitin_chawla
Product and Topic Expert
Product and Topic Expert
0 Kudos

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