Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Challange in SUM Grid Line
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00343577
Message ID:
00343905
Views:
16
João,
What you're trying to do is to find a the discount that would result if you first apply Discount1 and then apply Discount2 ? On 1000, with discount1 = 10% and discount2 = 5% that would be:
0.95 * (0.90*1000)  = 855, or 14.5% total discount.

You can use a function in your view:
FinalDiscount = 100 - (  (100-D2) * (100-D1) * 100  )
 
HTH
Barbara


>Hi all,
>
>I have this problem, i have one view like that
><pre>
>|ref|Descriptiom|Qt.Ut|Unit.Pri|Dis(1)|Dis(2)|
>|001|Teste111111|100.0|1,200.00|10.00%|05.00%|
>|002|Teste222222|150.0|1,300.00|10.00%|03.00%|
>
>Dis(1)=Discount one
>Dis(2)=Discount two
>
>10%+5%=14.50%, what's the way to calculate that and them sum the total Discounts.
>
>Thanks in Advance
>
>Joao Batista
>(jbinf@mail.telepac.pt)
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform