User Tools

Site Tools


adding_an_expiry_date_service_rule

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
adding_an_expiry_date_service_rule [2014/11/07 18:38]
Jaco van Wyk [Activate the rule on your account]
adding_an_expiry_date_service_rule [2014/11/07 18:40]
Jaco van Wyk [After adding the custom field, you now need to adjust the rule:]
Line 8: Line 8:
  
   - Log into your account and go to [[https://​billing.snapbill.com/​setup/​service|Setup > Services]].   - Log into your account and go to [[https://​billing.snapbill.com/​setup/​service|Setup > Services]].
-  -  
   - Select the service that you wish to have expiry dates available, in the left menu select “custom fields”.   - Select the service that you wish to have expiry dates available, in the left menu select “custom fields”.
-  -  
   - Add a custom field for the dates, by clicking on “Add Field” in the bottom right side.   - Add a custom field for the dates, by clicking on “Add Field” in the bottom right side.
-  -  
   - Click on the new custom field and rename it in the Field Title to “Expiry date”   - Click on the new custom field and rename it in the Field Title to “Expiry date”
-  -  
   - Under the Type drop-down select “Date Picker”.   - Under the Type drop-down select “Date Picker”.
  
Line 26: Line 22:
 It should read as below: It should read as below:
  
-{{:​snapbill_expiry-date-rule.png?600|}}+<​code>​ 
 +Run the code on the condition that the custom field $service->data-expiry_date is set 
 + 
 +    If $today is after as $service->​data-expiry_date 
 +        Set the state of the service to suspended 
 +        End execution of this rule at this point. 
 +</​code>​
  
 You have now enabled the expiry date feature on this particular service. You have now enabled the expiry date feature on this particular service.
adding_an_expiry_date_service_rule.txt · Last modified: 2014/11/07 18:40 by Jaco van Wyk