liao1108
Joined: 29 Mar 2005 Posts: 1 Location: Taipei, Taiwan
|
Posted: Sat Apr 02, 2005 10:24 pm Post subject: Price list generation error |
|
|
Hi red1,
thanks for your gentle sharing technical experience. iknow 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? |
|
red1 Site Admin
Joined: 06 Jul 2004 Posts: 1756 Location: Kuala Lumpur, Malaysia
|
Posted: Sat Apr 23, 2005 10:19 am Post subject: |
|
|
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. |
|