## 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

Hi red1,

thanks for your gentle sharing technical experience. ｉknow where to post the thanks,  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

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 