Back to the original post, there’s a part that could be answered, namely:
1. Aged receivable schedule
You can simply copy the following code from the Plain theme lines 58 to 63 and put them inside a <table>
tag:
<table>
<!-- Plain theme fragement starts -->
{% for total in table.totals %}
<tr>
<td colspan="{{ table.columns | size | minus:1 }}" style="text-align: end; padding: 5px 10px{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
<td style="border-left-width: 1px; border-left-style: solid; border-left-color: #000; border-right-width: 1px; border-right-style: solid; border-right-color: #000; text-align: right; white-space: nowrap; border-bottom-width: 1px; border-bottom-color: #000000; border-bottom-style: solid; padding: 5px 10px{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
</tr>
{% endfor %}
<!-- Plain theme fragement ends -->
</table>
You can reformat the table to your liking using HTML.
2. Amount due
Use the following code fragment
{% for total in table.totals %}
{% if total.label == 'Total' %}
{{ total.text }}
{% endif %}
{% endfor %}