Price list generation error

To err is to be human, to help each other is joy. Tell your Compiere needs in your own words. Let's figure out together.

Moderator: azaharizaman

Price list generation error

Postby liao1108 » Sat Apr 02, 2005 10:24 pm

Hi red1,

thanks for your gentle sharing technical experience. iknow where to post the thanks, :D :D

i try price list generation from compiere offical web site saying the logical as following

-------------------------------------------------------------------------------------
The Formula is :

NewPrice = (Convert(BasePrice) + Surcharge) * (100-Discount) / 100;
if MinMargin <> 0 then NewPrice = Max (NewPrice, Convert(OrigLimitPrice) + MinMargin);
if MaxMargin <> 0 then NewPrice = Min (NewPrice, Convert(OrigLimitPrice) + MaxMargin);

Example (assuming same currency)

Original Prices: List=300, Standard=250, Limit=200;
New List Price: Base=List, Surcharge=0, Discount=0, Rounding=.10, Min Margin=0, Max Margin=0
=> 300
New Standard Price: Base=List, Surcharge=10, Discount=20, Rounding=.10, Min Margin=10, Max Margin=30
=> 230 == (300+10)*0.8=248, Max(248,200+10)=248, Min(248,200+30)=230
New Limit Price: Base=Limit, Surcharge=1, Discount=-11, Rounding=1.00, Min Margin=10, Max Margin=0
=> 223 == (200+1)*1.11=223.11, Max(223.11,200+10)=223.11 == 223.00
-------------------------------------------------------------------------------------

but if you follow the exactly way and same figures, you would get the New Standard Price 248, not 230, is it a bug?
liao1108
 
Posts: 1
Joined: Tue Mar 29, 2005 9:18 pm
Location: Taipei, Taiwan

Postby red1 » Sat Apr 23, 2005 10:19 am

Hi liao,
Such matters are business logic that is subjective to Compiere. U may post this at the Bugs section of sf.net/projects/compiere. Or safer still under the support request section.
If i come across in my work, and solve the mystery i will update.
red1
Site Admin
 
Posts: 2762
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to Ask RED1 personally

Who is online

Users browsing this forum: No registered users and 4 guests

cron