skip to Main Content

xplan xmerge

Search
Generic filters
Exact matches only
Filter by Custom Post Type

Try these: client detailstasks syntaxsuperannuation

Superannuation (Existing Funds)

The Superannuation element* is best practice place to store all things related to the clients super.  Use the syntax below to output all the details from this area:

Setec Astronomy

<:for item in $client.fund:>
Name: <:=item.fund_name:>
Status: <:=item.fund_status:>
Balance: <:=item.fund_total_balance:>
<:end:>

Fields

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

Field

Path

Syntax

Type fund_type <:=item.fund_type:>
Super Selection fund_super_plan <:=item.fund_super_plan:>
Super Plan fund_name <:=item.fund_name:>
Reference Number fund_refnum <:=item.fund_refnum:>
Eligible Service Date e_serv_date <:=item.e_serv_date:>
Total Balance fund_total_balance <:=item.fund_total_balance:>
Date of Balance date_of_balance <:=item.date_of_balance:>
Status fund_status <:=item.fund_status:>
Balances    
Taxable – Taxed fund_taxable <:=item.fund_taxable:>
Taxable – Untaxed fund_taxable_untaxed <:=item.fund_taxable_untaxed:>
Tax Free fund_tax_free <:=item.fund_tax_free:>
Preserved Amount preserved_amt <:=item.preserved_amt:>
Restricted Non Preserved restricted_non_preserved <:=item.restricted_non_preserved:>
Unrestricted Non-Preserved unrestricted_non_preserved <:=item.unrestricted_non_preserved:>
Total Balance fund_total_balance <:=item.fund_total_balance:>
Details    
Linked Portfolio linked_portfolio_accounts <:=item.linked_portfolio_accounts:>
Linked Objective linked_objective_desc <:=item.linked_objective_desc:>
Superannuation Salary superannuation_salary <:=item.superannuation_salary:>
Provider supplier <:=item.supplier:>
Date Submitted date_submitted <:=item.date_submitted:>
Date Commenced date_commenced <:=item.date_commenced:>
Values Last Updated values_last_updated <:=item.values_last_updated:>
Under Advice under_advice <:=item.under_advice:>
Comments adviser_comments <:=item.adviser_comments:>

* The Xplan Element (XE) for all this Superannuation information is called “Existing Funds” and the field definitions Group for this data is named “Superannuation-Plans“.

Checking for superannuation

Using the len() function is the simplest way to see if a fund exists:

Setec Astronomy

<:if len($client.fund):>
<:for item in $client.fund:>
Type <:=item.fund_type:>
Super Plan: <:=item.fund_name:>
<:end:>
<:else:>
No Super accounts found
<:end:>

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

Setec Astronomy

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

Filtering Superannuation

Filter to Type & Status

Setec Astronomy

<:if len($client.fund.filter(‘fund_type=Accumulation’).filter(‘fund_status=Active’)):>
<:for item in $client.fund.filter(‘fund_type=Accumulation’).filter(‘fund_status=Active’):>
Type: <:=item.fund_type:>
Super Plan: <:=item.fund_name:>
<:end:>
<:else:>
<: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.fund if str(x.fund_type) == “Accumulation” and str(x.fund_status.text) == “Active” and float(x.fund_total_balance.value)>0]:>
Plan Name: <:=item.fund_name:>
Balance: $<:=currency(item.fund_total_balance.value, 0):>
<:end:>

Sorting Superannuation

Setec Astronomy

<:for item in $client.fund.sort(‘fund_total_balance’):>
Type: <:=item.fund_type:>
Super Plan: <:=item.fund_name:>
<:end:>

Reverse Sort

Setec Astronomy

<:for item in $client.fund.sort(‘-fund_total_balance’):>
Type: <:=item.fund_type:>
Super Plan: <:=item.fund_name:>
<:end:>

Totals

Simple Sum method (Super balance)

Setec Astronomy

Raw: <:=$client.fund.filter(‘fund_status=Active’).sum(‘fund_total_balance’)>
$<:=currency($client.fund.filter(‘fund_status=Active’).sum(‘fund_total_balance’),0):>

Entity Sum Function (Super balance)

Setec Astronomy

Raw: <:=sum([floatify(plan.fund_total_balance) for plan in $client.fund]):>
$<:=currency(sum([floatify(plan.fund_total_balance) for plan in $client.fund]),0):>

Entity Sum Function with conditions (Super balance)

Setec Astronomy

Raw: <:=sum([floatify(plan.fund_total_balance) for plan in $client.fund.filter(‘fund_status=Active’)]):>
$<:=currency(sum([floatify(plan.fund_total_balance) for plan in $client.fund if str(plan.fund_status) == ‘Active’]),0):>

See also

Back To Top