0

I have face the problem,i need to calculate the final amount if there is any booking fee and we charge service tax as 15% ST. If there is no Booking Fee then no ST,and if discount is there then we minus discount(percentage field) from the ticket price. It was working fine but now we offer discount amount(currency),but is not working.

My formula is

( (Quantity* UnitPrice ) - Discount_Amount__c ) + 
Booking_Fees_Amount__c + 
((((Quantity* UnitPrice ) - Discount_Amount__c )+ Booking_Fees_Amount__c)*PG__c) + 
ST_15_on_Booking_Fees__c

Discount_Amount_c is Percentage and Discount_c is Currency.

In my case sometime we give Discount percentage as well as whole amount percentage is working fine but whole amount is not working fine

5
  • 2
    What do you mean by not working fine? Commented Mar 30, 2017 at 13:20
  • how to calculate the final amount both cases. if discount is percentage the formula is working fine but discount is whole amount not calculate. for eg, discount is 5% it was working fine and discount is 100 i need to calculate the same. i dont know how to write the formula for both condition
    – Sakthi S
    Commented Mar 30, 2017 at 13:28
  • 1
    I don't understand your formula and your requirement. Could you provide some example of the values that can be in each field? Commented Mar 30, 2017 at 13:49
  • For example My quantity is 10 and price is 500 and my booking fee is 100 (per ticket) then i charge ST as 15%.Final calculation is like 6150 (5000+1000+150 ). If my discount will 10% then final amount will 5650, now i need add discount as amount same
    – Sakthi S
    Commented Mar 30, 2017 at 14:04
  • Sakthi, please edit your post with any additional detail. Burying information in the comments does not make it very easy to find.
    – Adrian Larson
    Commented Mar 30, 2017 at 14:32

2 Answers 2

1

As per my understanding, you need to breakup the requirement in small parts like this:

Quantity 10 and price is 500 and my booking fee is 100 (per ticket) 5000+1000

(Quantity * UnitPrice) + (Booking_Fees_Amount__c *  Quantity)

I charge ST as 15%. Final calculation is like 6150 (5000+1000+150 )

((Quantity * UnitPrice) + (Booking_Fees_Amount__c *  Quantity))
* (1 + ST_15_on_Booking_Fees__c)

If my discount will 10% then final amount will 5650, now i need add discount as amount same

(((Quantity * UnitPrice) + (Booking_Fees_Amount__c *  Quantity))
 * (1 + ST_15_on_Booking_Fees__c)) 
* (1 - Discount_Amount__c)
0

Discount_Amount_c is Percentage and Discount_c is Currency.

  • Field names are sugesting it's an opposite - am I right stating Discount_Amount_c is Currency and Discount__c is Percentage?
  • Can these 2 from the above apply at the same time?

(( Quantity * ((10 *

UnitPrice * (1 - Discount__c)) <- 10% discount 10*(500 * (1-0.1)) = 4,500

- Discount_Amount__c <- $ discount any? = 4,500 - x

+ Quantity * Booking_Fees_Amount__c * (1 + ST_15_on_Booking_Fees__c) <- booking fee + 15% service tax 4,500 + 10 * 100 * 1.15 = 5,650

  • is PG__c a "whole amount percentage"?

) * (1 - PG__c) 5650 * [additional 10%] 0.9 = 5,085

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .