skip to Main Content

xplan xmerge

Search
Generic filters
Exact matches only
Filter by Custom Post Type

Try these: client detailstasks syntaxsuperannuation

Pensions (Retirement Income)

Syntax to merge details of pension (retirement income) plans:

Setec Astronomy

<:for item in $client.retirement_income:>
Plan: <:=item.plan_provider:>
Pension Balance: <:=item.pension_balance:>
<:end:>

Fields

All the fields below can be used in the loop above:

Field

Type

Syntax

Type type <:=item.type:>
Plan Selection provider <:=item.provider:>
Retirement Plan Name provider_name <:=item.provider_name:>
Reference Number account_num <:=item.account_num:>
Total Balance ($) market_value <:=item.market_value:>
Date of Balance values_last_updated <:=item.values_last_updated:>
Status pension_status <:=item.pension_status:>
Values    
Purchase Price purchase_price <:=item.purchase_price:>
Term at Purchase term_at_purchase <:=item.term_at_purchase:>
Tax Free (%) pension_tax_free_percentage <:=item.pension_tax_free_percentage:>
Pension Balance ($) pension_balance <:=item.pension_balance:>
Details    
Linked Portfolio linked_portfolio_accounts <:=item.linked_portfolio_accounts:>
Description desc <:=item.desc:>
Transition to Retirement tran_to_retirement <:=item.tran_to_retirement:>
Reversionary Pension is_reversionary_pens <:=item.is_reversionary_pens:>
Date Submitted inception_date <:=item.inception_date:>
Purchase Date puchase_date <:=item.puchase_date:>
Payments    
Next Payment Date next_payment_date <:=item.next_payment_date:>
Payment Type payment_type <:=item.payment_type:>
Payment ($) payment <:=item.payment:>
Frequency frequency <:=item.frequency:>
Tax Deductible % tax_deductible_percentage <:=item.tax_deductible_percentage:>
Centrelink Deductible ctrlnk_deductible_amt <:=item.ctrlnk_deductible_amt:>
Deemed deemed <:=item.deemed:>
Payment Indexation annual_payment_indexation_type <:=item.annual_payment_indexation_type:>
Indexation Value annual_payment_indexation_value <:=item.annual_payment_indexation_value:>
Comments    
Comments reversionary_comments <:=item.reversionary_comments:>
Linked items    
Linked Objective reversionary_comments <:=item.reversionary_comments:>
Linked Thread reversionary_comments <:=item.reversionary_comments:>
Linked Notes see below see below

Checking for Pension Plans

Using the len() function is the simplest way to see if any pensions exists:

Setec Astronomy

<:if len($client.retirement_income):>
<:for item in $client.retirement_income:>
Type <:=item.type:>
Plan Name: <:=item.provider_name:>
<:end:>
<:else:>
No Pensions exist
<:end:>

An alternative way which is good for when you want to check multiple conditions :

Setec Astronomy

<:if len([x for x in $client.retirement_income if float(x.pension_balance.value)>0]):>
<:for item in [x for x in $client.retirement_income if float(x.pension_balance.value)>0]:>
Type <:=item.type:>
Balance: $<:=currency(item.pension_balance.value, 0):>
<:end:>
<:else:>
No pension accounts with a balance greater than zero found.
<:end:>

Pension Plan: Filtering and Sorting

Filter to Type

Setec Astronomy

<:if len($client.fund.filter(‘fund_type=alloc_pens’)):>
<:for item in $client.fund.filter(‘fund_type=alloc_pens’):>
Name: <:=item.provider_name:>
Pension Balance: <:=item.pension_balance:>
<:end:>
<:else:>
<:end:>

Multi Filtering with Type and Status

Setec Astronomy

<:for item in $client.fund.filter(‘fund_type=alloc_pens’).filter(‘pension_status=Active’):>
Name: <:=item.provider_name:>
Pension Balance: <:=item.pension_balance:>
<:end:>

Alternative multi conditional filter

This style syntax construction can be useful for when you have multiple conditions or other complex patterns you need to include in your conditioning:

Setec Astronomy

<:for item in [x for x in $client.retirement_income if str(x.type) == “Allocated Pension” and float(x.pension_balance.value)>0]:>
Plan Name <:=item.provider_name:>
Balance: $<:=currency(item.pension_balance.value, 0):>
<:end:>

Sorting

Setec Astronomy

<:for item in $client.fund.filter(‘fund_status=Active’).sort(‘pension_balance’):>
Name: <:=item.provider_name:>
Pension Balance: <:=item.pension_balance:>
<:end:>

See also

Back To Top