Repeating section tax

  • 15 October 2015
  • 6 replies
  • 1 view

Badge +3

I have a repeating section for equipment ordering,

Currently the setup is:

Drop Down List: New/Replacement

Drop Down List: Item

Text Field: Quantity

Text Field: Cost

Drop Down: Currency:

Calculated Value: Canadian Currency (If(equals(Currency,'CAD'),Quantity*EquipmentCost,0))

Calculated Value: USD Currency (If(equals(Currency,'USD'),Quantity*EquipmentCost,0))

What has come up now is that they want the calculated values to have the ability to include taxes, since I am in Canada the item has 3 options, No Taxes, PST 5% and GST 5%.. how would I modify the value calculated value to capture this information. If PST is selected take Quanty*EquipmentCost*1.05, if PST and GST is Selected take Quantity*EquipmentCost*.05 (for the PST) then do it again Quantity*EquipmentCost*.05 (for the GST) then add both GST&PST values to the Total of Quantity*EquipmentCost

Thankyou,


6 replies

Badge +7

Hi,

Do the different tax are selected once for the entire form?

Or do they are line by line?

Badge +7

If it's line by line, as below :

sample 1.png

You could use a such formula :

Quantity*EquipmentCost*(1+(If(inArray(Tax,"PST"),0.05,0))+(If(inArray(Tax,"GST"),0.05,0)))

Badge +3

Thank you Pierre,

each line will have it's own tax, I have calculated value outside of the for the sum of all lines either Canadian or US. I will give this a try right away and report back.

Just to make sure that I am doing this correctly as I am still pretty new to development, I am guessing that you created a multiple choice box with the 2 values of GST and PST, called Tax?

Badge +3

129895_pastedImage_1.png

This is the formulate that I have;  If(equals(Currency,'CAD'),Quantity*EquipmentCost*(1+If(inArray(Tax,"PST"),0.05,0))+If(inArray(Tax,"GST"),0.05,0))

Not good with Formula's yet,,, PST is correct with the 5% being added, but when GST is selected it is only 5 cents not 5% of the 5000 which would be another $250 dollars so the total cost with GST and PST should come to $5500

Badge +7

This is a parenthesis mistake happy.png

Delete one of those that are after your first IF clause to re-add it at the end.

sample 1.png

Badge +3

Thank you, this worked great

Reply