User Tools

Site Tools


discount_a_service

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
discount_a_service [2015/02/25 13:48]
Jaco van Wyk
discount_a_service [2015/02/25 13:49]
Jaco van Wyk
Line 13: Line 13:
  
 You will note by looking at the example rule below that we have also added three custom fields to each service requiring the discount functionality. You will note by looking at the example rule below that we have also added three custom fields to each service requiring the discount functionality.
 +
 In this case all the fields were normal text based fields which SnapBill will magically convert to a numerical (float) value. In this case all the fields were normal text based fields which SnapBill will magically convert to a numerical (float) value.
  
Line 21: Line 22:
 //​$service->​data-prorata_discount//​ //​$service->​data-prorata_discount//​
  
-We check if these are set before we proceed to add a discount line to the invoice. Discounts are set as fractions and to provide your client with 25% discount you will need to set the relevant custom field to 0.25. Discounts will take into account the special quantity field type on a service and the calculation for the discount line is based on $service->​quantity * [$service->​data-"​type"​_discount].+We check if these are set before we proceed to add a discount line to the invoice. Discounts are set as fractions and to provide your client with 25% discount you will need to set the relevant custom field to 0.25. 
 + 
 +Discounts will take into account the special quantity field type on a service and the calculation for the discount line is based on $service->​quantity * [$service->​data-"​type"​_discount].
  
 An example of this rule may be seen below: An example of this rule may be seen below:
discount_a_service.txt · Last modified: 2015/02/25 13:50 by Jaco van Wyk