[% SET container = report.get_extra_field_value('Paid_Collection_Container_Type'); SET sacks = (container == 2); SET quantity = report.get_extra_field_value('Paid_Collection_Container_Quantity'); SET new_bins = report.get_extra_field_value('new_containers') || 0; SET pro_rata = report.get_extra_field_value('pro_rata'); SET payment = report.get_extra_field_value('payment'); SET total = 0; IF pro_rata; SET total = pro_rata; ELSIF payment; SET total = payment; END; IF report.title == 'Garden Subscription - Renew'; SET type = 'renew'; ELSIF report.title == 'Garden Subscription - New'; SET type = 'new'; ELSIF report.title == 'Garden Subscription - Amend'; SET type = 'amend'; ELSIF report.title == 'Garden Subscription - Cancel'; SET type = 'cancel'; END; IF type == 'renew'; SET email_summary = "Thank you for renewing your subscription to Brent’s garden waste collection service."; ELSIF type == 'cancel'; SET email_summary = "You have cancelled your garden waste collection service."; ELSIF type == 'amend'; SET email_summary = "You have amended your garden waste collection service."; ELSE; SET email_summary = "Welcome to Brent's garden waste collection service."; END; ~%]