Home Information PDF Documents EULANDA Handbooks Training Book's corner Download Contact us Table of Contents About us

Glossary

Password needed Newsgroup

Remote Support system

cn_stat_cnsoft_ReVkNetto (SQL API)

Back | Level back

Creates a statistic expenditure of the fields Value, Year and Day. The procedure calls, if it is called without parameters, all net sales volume of the last three years the inclusive current trunk yearly off. For each day, on which conversation were transacted, a data line is supplied.

Over the parameters a data range can be given. Additionally it is possible the statistics on certain customers call articles or representatives up as well as in combination.

This function is used for example in EULANDA® by the main statistics, which under the border of kind of snapping and the point "master data" can be achieved. In addition, various info systems use this function.

Hint

If you liked to limit the circle of users, which may call the statistics within EULANDA®, then you must extract the EXEC authorization for this procedure from the users or the roles.

Syntax

Necessary parameters can at the end be omitted, are however only parameters at the end be evaluated, then missing parameters must be indicated as NULL (see example).

cn_stat_cnsoft_ReSellingPriceNet
  @StartDate DateTime,
  @NextDate DateTime,
  @ad_id int,
  @ar_id int,
  @ve_id int

Argument

All arguments are additive. The more parameters to be indicated, the smaller will be the number of returned the delivery data record.

@StartDate DateTime

The argument @StartDate is optional. If it is not indicated, then three years are taken off from the parameters @NextDate and accepted as initial value. The statistics becomes always with the restriction calculation date >= @StartDate and calculation date < @nextdate .< />

@NextDate DateTime

The argument @NextDate is optional. If it is not indicated, then on the current date one day is added here. There the statistics as restriction up to <@nextdate checks and in the invoice data also the time is stored, became an inquiry on the current data also <="GetDate()" do not supply the desired result.< />

@ad_id int

The argument @ad_id is optional and can the ID of the address data set indicate to that a statistics to be called up is. If the parameter is not indicated, then the statistics always refers to all address data sets.

@ar_id int

The argument @ar_id is optional and can the ID of the article data set indicate to that a statistics to be called up is. If the parameter is not indicated, then the statistics always refers to all article data sets.

@ve_id int

The argument @ve_id is optional and can the ID of the representative data record indicate to that a statistics to be called up is. If the parameter is not indicated, then the statistics always refers to all representative data record.

Example

cn_stat_cnsoft_ReSellingPriceNet

The statistics of all conventions calls up independently of customers, articles or representatives.

cn_stat_cnsoft_ReSellingPriceNet'01.01.1980'

The statistics of all conversions calls up independently from  customers, articles or representatives, those after that 01.01.1980 up to the current day was transacted.

cn_stat_cnsoft_ReSellingPriceNet'01.01.1980',null,100

The statistics of all conversions calls up independently of article or representatives, which was transacted after that 01.01.1980 up to the current day off and those the customer with the ID 100 is assigned.

Data lines

The data lines supplied by the procedure have the following structure:

Value numeric
Year int
Day Int

Example of an expenditure:

Value		Year day
---------		---- ---
2030.00		2001 51
2069.00		2001 53
615.00		2001 54
2474.80		2001 57
1313.00		2001 59
1422.00		2001 60
475.00		2001 61
2120.00		2001 65
422.00		2001 66
2940.00		2001 67

The expenditure contains a data line for each day, on which in the indicated data range a net turnover is present.