I am trying to create an invoice using a dynamic table where the footers contain the total or subtotal for a table that is split across multiple pages.
I am using the following HTML code:
linked to a CSS with:
Unfortunately the footer always shows "Total" and "205000". Using the same strings in the page header reveals the correct values for each page. To get the correct values in the page header I need to set the display property to a value other than "none" for the td.subtotal elements.
Any ideas on why this does not work?
I am using the following HTML code:
<table>
<thead>
<tr><td>Part No.</td><td>Price</td><td class="subtotal"></td></tr>
</thead>
<tbody>
<tr><td>10001</td><td>$3750</td><td class="subtotal">3750</td></tr>
:
<tr><td>10005</td><td>$1250</td><td class="subtotal">205000</td></tr>
</tbody>
<tfoot>
<tr><td id="footer"></td><td id="total"></td><td class="subtotal"><td></tr>
</tfoot>
</table>
linked to a CSS with:
td.subtotal {
display: none;
string-set: total content();
}
#footer {
content: string(footer,last);
}
#total {
content: string(total,last);
}
tbody tr:last-child {
string-set: footer "Total";
}
tbody tr {
string-set: footer "Subtotal";
}
Unfortunately the footer always shows "Total" and "205000". Using the same strings in the page header reveals the correct values for each page. To get the correct values in the page header I need to set the display property to a value other than "none" for the td.subtotal elements.
Any ideas on why this does not work?