Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sales Last Year

Status
Not open for further replies.

katididdy

Technical User
Mar 13, 2006
70
US
Can anyone tell me how macola figures sls_last_year? When I look at the arcusfil I get one amount. The amount is different in oehdrhst and oelinhst. I can't use the total sales last year for my reporting.... I need it for a little more than 6 months. I was using the last year sale's amount to verify my math. It doesn't come up right! Any thoughts or suggestions?
 
Katiddy:

How did you handle any credits in the oelinhst file? Stupid question, but, did you know they are stored as positive numbers?

That might account for the difference.
 
the arcusfil.sls_last_year is an accumulator field. If you do not clear ytd accumulators this field will NEVER have a value.

I am guessing this has happened to you or else the last time ytd accumulators were reset was several years ago, so you just have bad data in there.

The best way to do this is to query the oelinhst table as randva suggested.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
We cleared the accumulators, and I have the value for all of last year, but I need the amount from 6/25 to 12/31. When I add up all the sales for each from oelinhst or oehdrhst the amount isn't the same as in sls_last_yr. I added the credits in, and that didn't work either. I know the answer is probably looking right at me, but I can't see it!
 
The sales last year field will NEVER equal the report value unless:

1) you cleared accumulators on 12/31/07
2) did it AGAIN on 12/31/08

You cannot retroactively run this today for 12/31/08. You'll get all the sales since the last time you cleared accumulators, could be 1 day, 4 years, 1 years and 3 weeks, etc.

Go with the report from oelinhst, the field is sls_amt, you need to multiply that by -1 if it was a credit memo.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
I dont believe credits are stored as positive values in the line sales amount field in Macola ES.

Because the oelinhst_sql.sls_amt field holds negative and positive values, you should not have to perform any calculations on this field to account for credits.

I believe the sales amount field does not include discounts so if you use discounts, you'll need to take those into account i.e.

(1 - oelinhst_sql.discount_pct / 100) * oelinhst_sql.sls_amt


Peter Shirley
Macola Consultant, PA and surrounding states.
 
I am pretty sure they are on Progression since the arcusfil_sql table is mentioned. ES does have that as a view, but sls_last_year is not in the view.

Both Progression and ES, for the record, store all the sls_amt values as the proper sign and you do not need to use Peter's formula for discounts.

This is true of the OELINHST_SQL table only, not the OEORDLIN_SQL.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Thank you every one for your input. I finally got the numbers to add up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top