Beginner [Exercise 7: Recap] (Training slides exercise)

Create a ‘Letter of Representation’ in a document that contains the following items:

  • A title header with the company name on the first line and the VAT identifier underneath.
  • Print the company address below the title as show in the image.
  • Create a dropdown menu to allow the user to select between ‘period’ or ‘year’ in the sentence ‘Financial Statements of for the period/year ended 12/2016. Also automate the date using a ‘period’ drop.
  • Create the 3 sections shown in the image automating the numbering.
  • Add a loop at the bottom so that the user can enter an unlimited amount of notes.

Hints:
- Use tables to structure the text and align accordingly.
- Use filters and markdown when needed in order to format your output.

Solution:

{% stripnewlines %}
|:---100%---:+
{% newline %}
| {::font size="l"} {{ company.name | upcase }} {:/font}
{% newline %}
| Registered in England and Wales - Company number:  {{ company.vat_identifier }}
{% endstripnewlines %}

{% stripnewlines %}
|---100%---+
{% newline %}
| {{ company.street }} 
{% newline %}
| {{ company.city }} 
{% newline %}
| {{ company.country }} 
{% endstripnewlines %}

<br>

Dear Sirs
<br>
**Financial Statements of for the {% input custom.choose.yearOrPeriod as:select options:"period|year" default:"period" %} ended {{period.year_end_date | date:"%m/%Y"}}**

We confirm to the best of our knowledge and belief the following information and opinions in the light of the _Companies Act 2006_ and the applicable accounting standards.

{% stripnewlines %}
|-5%-|--- {% newline %}
|{% assign no = 1 | integer %} **{{no}}.**
|**Responsibility for the Financial Statements** 
{% newline %}
|
|We acknowledge as directors our responsibility for the financial statements which you have prepared for the company at our request and in particular confirm that we have selected suitable accounting policies and applied them consistently and made judgements and estimates that are reasonable and prudent. 
{% newline %}
|{% assign no = no+1 | integer %} **{{no}}.**
|**Assets** 
{% newline %}
|
|All assets are included in and noted on the accounts and we have no reason to believe that any material items have been omitted.
{% newline %}
|{% assign no = no+1 | integer %} **{{no}}.**
|**Liabilities** 
{% newline %}
|
|All liabilities of the company of which we have knowledge are included in the appropriate classifications and we have no knowledge of any pending litigation or other claims against the company, or any contingent liabilities or capital commitments.
{% endstripnewlines %}
<br>

{% fori item in custom.notes %}
  {% input item.note as:text %}
{% endfori %}