@ -1,5 +1,6 @@
<!--{[%PROCESS 'customer/calls_template.tt' -%]}-->
<!--{[%row_vertical_interval = 10 -%]}-->
<!--{[%MACRO document_header BLOCK-%]}-->
<svg width="215mm" height="297mm" viewBox="0 0 215 297" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" stroke-width="0" stroke="#000000" fill="#000000" font-size="4pt" font-family="HelveticaNeue-Light" xml:space="preserve" text-anchor="start">
<style>
@ -39,11 +40,11 @@ g, text, tspan {
}
]]>
</style>
<!--pageSet>
<page-->
<!--pageSet-->
<!--{[%END-%]}-->
<!--{[%MACRO titlepage(callsdata) BLOCK-%]}-->
<!--page-->
<g y="0" x="0" width="215" height="297" id="titlepage">
<title>TitlePage</title>
@ -92,7 +93,9 @@ g, text, tspan {
<!--{[%END-%]}-->
<!--{[%MACRO datarow(call) BLOCK-%]}-->
<text y="10" text-anchor="end" id="calls[%loop.count-%]" class="datarow">
<tspan x="5" id="calls_zone[%loop.count-%]" text-anchor="start"><!--{[% call.get_column('zone') %]}--><!--{[%#}-->Example zone<!--{%]}--></tspan>
<tspan x="5" id="calls_number[%loop.count-%]" text-anchor="start"><!--{[% call.0 %]}--><!--{[%#}-->1<!--{%]}--></tspan>
<!--{[%IF call.1; call = call.1; END%]}-->
<tspan x="15" id="calls_zone[%loop.count-%]" text-anchor="start"><!--{[% call.get_column('zone') %]}--><!--{[%#}-->Example zone<!--{%]}--></tspan>
<tspan x="95" id="calls_number[%loop.count-%]"><!--{[% call.get_column('number') %]}--><!--{[%#}-->0<!--{%]}--></tspan>
<tspan x="130" id="calls_duration[%loop.count-%]"><!--{[% call.get_column('duration')|format('%.3f') %]}--><!--{[%#}-->0.000<!--{%]}--></tspan>
<tspan x="160" id="calls_freetime[%loop.count-%]"><!--{[% call.get_column('free_time')|format('%d') %]}--><!--{[%#}-->0.0<!--{%]}--></tspan>
@ -108,6 +111,7 @@ g, text, tspan {
<tspan x="190" id="calls_total_cost"><!--{[% ( total_cost / 100 )|format('%.2f') %]}--><!--{[%#}-->0.00<!--{%]}--></tspan>
</text>
<!--{[%END-%]}-->
<!--{[% titlerow -%]}-->
<!--{[% total = {} -%]}-->
<!--{[% list_calls(callsdata, 'datarow', total, 'svg', row_vertical_interval) -%]}-->
@ -116,30 +120,106 @@ g, text, tspan {
</g>
</g>
<!--/page-->
<!--{[%END-%]}-->
<!--/page>
<page-->
<!--{[%MACRO mid page BLOCK-%]} -->
<!--{[%MACRO mid page(callsdata) BLOCK-%]} -->
<!--page-->
<g id="midpage">
<title>MidPage</title>
<g y="15" x="10" width="195" height="150" id="midpage_invoicedetails" transform="translate(10, 15)" rows="15">
<g y="15" x="10" width="195" height="150" id="midpage_invoicedetails" transform="translate(10, 15)" rows="3">
<!--{[%MACRO titlerow BLOCK-%]}-->
<text id="midpage_calls_title" text-anchor="end">
<tspan x="5" id="midpage_calls_number" text-anchor="start">#</tspan>
<tspan x="15" id="midpage_calls_zone" text-anchor="start">Zone</tspan>
<tspan x="95" id="midpage_calls_number">Number</tspan>
<tspan x="130" id="midpage_calls_duration">Duration</tspan>
<tspan x="160" id="midpage_calls_freetime">Free time</tspan>
<tspan x="190" id="midpage_calls_cost">Cost</tspan>
</text>
<!--{[%END-%]}-->
<!--{[%MACRO datarow(call) BLOCK-%]}-->
<text y="10" text-anchor="end" id="midpage_calls[%loop.count-%]" class="datarow">
<tspan x="5" id="midpage_calls_number[%loop.count-%]" text-anchor="start"><!--{[% call.0 %]}--><!--{[%#}-->1<!--{%]}--></tspan>
<!--{[%IF call.1; call = call.1; END%]}-->
<tspan x="15" id="midpage_calls_zone[%loop.count-%]" text-anchor="start"><!--{[% call.get_column('zone') %]}--><!--{[%#}-->Example zone<!--{%]}--></tspan>
<tspan x="95" id="midpage_calls_number[%loop.count-%]"><!--{[% call.get_column('number') %]}--><!--{[%#}-->0<!--{%]}--></tspan>
<tspan x="130" id="midpage_calls_duration[%loop.count-%]"><!--{[% call.get_column('duration')|format('%.3f') %]}--><!--{[%#}-->0.000<!--{%]}--></tspan>
<tspan x="160" id="midpage_calls_freetime[%loop.count-%]"><!--{[% call.get_column('free_time')|format('%d') %]}--><!--{[%#}-->0.0<!--{%]}--></tspan>
<tspan x="190" id="midpage_calls_cost[%loop.count-%]"><!--{[% ( call.get_column('cost') / 100 ) |format('%.2f') %]}--><!--{[%#}-->0.00<!--{%]}--></tspan>
</text>
<!--{[%END-%]}-->
<!--{[%MACRO totalrow BLOCK-%]}-->
<text y="20" text-anchor="end" id="midpage_calls_total" class="datarow">
<tspan x="5" id="midpage_calls_total_title" text-anchor="start">Total:</tspan>
<tspan x="95" id="midpage_calls_total_number"><!--{[% total_number %]}--><!--{[%#}-->0<!--{%]}--></tspan>
<tspan x="130" id="midpage_calls_total_duration"><!--{[% total_duration|format('%.3f') %]}--><!--{[%#}-->0.000<!--{%]}--></tspan>
<tspan x="160" id="midpage_calls_total_freetime"><!--{[% total_free_time|format('%d') %]}--><!--{[%#}-->0.0<!--{%]}--></tspan>
<tspan x="190" id="midpage_calls_total_cost"><!--{[% ( total_cost / 100 )|format('%.2f') %]}--><!--{[%#}-->0.00<!--{%]}--></tspan>
</text>
<!--{[%END-%]}-->
<!--{[% titlerow -%]}-->
<!--{[% list_calls(zonecalls_rs, 'datarow', total, 'svg', row_vertical_interval) -%]}-->
<!--{[% total = {} -%]}-->
<!--{[% list_calls(callsdata, 'datarow', total, 'svg', row_vertical_interval) -%]}-->
<!--{[% adjustrow (total, 'totalrow', 'svg', row_vertical_interval, zonecalls_rs.size) -%]}-->
</g>
</g>
<!--/page-->
<!--{[%END-%]}-->
<!--{[%MACRO lastpage BLOCK-%]}-->
<!--{[%MACRO lastpage(callsdata) BLOCK-%]}-->
<!--page-->
<g id="lastpage">
<title>LastPage</title>
<g y="15" x="10" width="195" height="150" id="lastpage_invoicedetails" transform="translate(10, 15)" rows="10">
<g y="15" x="10" width="195" height="150" id="lastpage_invoicedetails" transform="translate(10, 15)">
<!--{[%MACRO titlerow BLOCK-%]}-->
<text id="lastpage_calls_title" text-anchor="end">
<tspan x="5" id="lastpage_calls_number" text-anchor="start">#</tspan>
<tspan x="15" id="lastpage_calls_zone" text-anchor="start">Zone</tspan>
<tspan x="95" id="lastpage_calls_number">Number</tspan>
<tspan x="130" id="lastpage_calls_duration">Duration</tspan>
<tspan x="160" id="lastpage_calls_freetime">Free time</tspan>
<tspan x="190" id="lastpage_calls_cost">Cost</tspan>
</text>
<!--{[%END-%]}-->
<!--{[%MACRO datarow(call) BLOCK-%]}-->
<text y="10" text-anchor="end" id="lastpage_calls[%loop.count-%]" class="datarow">
<tspan x="5" id="lastpage_calls_number[%loop.count-%]" text-anchor="start"><!--{[% call.0 %]}--><!--{[%#}-->1<!--{%]}--></tspan>
<!--{[%IF call.1; call = call.1; END%]}-->
<tspan x="15" id="lastpage_calls_zone[%loop.count-%]" text-anchor="start"><!--{[% call.get_column('zone') %]}--><!--{[%#}-->Example zone<!--{%]}--></tspan>
<tspan x="95" id="lastpage_calls_number[%loop.count-%]"><!--{[% call.get_column('number') %]}--><!--{[%#}-->0<!--{%]}--></tspan>
<tspan x="130" id="lastpage_calls_duration[%loop.count-%]"><!--{[% call.get_column('duration')|format('%.3f') %]}--><!--{[%#}-->0.000<!--{%]}--></tspan>
<tspan x="160" id="lastpage_calls_freetime[%loop.count-%]"><!--{[% call.get_column('free_time')|format('%d') %]}--><!--{[%#}-->0.0<!--{%]}--></tspan>
<tspan x="190" id="lastpage_calls_cost[%loop.count-%]"><!--{[% ( call.get_column('cost') / 100 ) |format('%.2f') %]}--><!--{[%#}-->0.00<!--{%]}--></tspan>
</text>
<!--{[%END-%]}-->
<!--{[%MACRO totalrow BLOCK-%]}-->
<text y="20" text-anchor="end" id="lastpage_calls_total" class="datarow">
<tspan x="5" id="lastpage_calls_total_title" text-anchor="start">Total:</tspan>
<tspan x="95" id="lastpage_calls_total_number"><!--{[% total_number %]}--><!--{[%#}-->0<!--{%]}--></tspan>
<tspan x="130" id="lastpage_calls_total_duration"><!--{[% total_duration|format('%.3f') %]}--><!--{[%#}-->0.000<!--{%]}--></tspan>
<tspan x="160" id="lastpage_calls_total_freetime"><!--{[% total_free_time|format('%d') %]}--><!--{[%#}-->0.0<!--{%]}--></tspan>
<tspan x="190" id="lastpage_calls_total_cost"><!--{[% ( total_cost / 100 )|format('%.2f') %]}--><!--{[%#}-->0.00<!--{%]}--></tspan>
</text>
<!--{[%END-%]}-->
<!--{[% titlerow -%]}-->
<!--{[% list_calls(zonecalls_rs, 'datarow', total, 'svg', row_vertical_interval) -%]}-->
<!--{[% list_calls(callsdata , 'datarow', total, 'svg', row_vertical_interval) -%]}-->
<!--{[% adjustrow (total, 'totalrow', 'svg', row_vertical_interval, zonecalls_rs.size) -%]}-->
</g>
</g>
<!--/page-->
<!--{[%END-%]}-->
<!--{[%MACRO bgpage BLOCK-%]}-->
<!--page-->
<g id="bgpage">
<title>Background</title>
<g y="270" x="5" width="205" height="18" transform="translate(5, 270)" class="address" font-size="2pt" id="bgpage_companyaddress_sipwise">
@ -151,14 +231,17 @@ g, text, tspan {
<text x="203" y="15" id="bgpage_companyaddress_sipwise__page_num" text-anchor="end" >{<!--{[%}-->page<!--{%]}-->}</text>
</g>
</g>
<!--/page-->
<!--{[%END-%]}-->
<!--{[%MACRO document_footer BLOCK-%]}-->
<!--/page>
</pageSet-->
<!--/pageSet-->
</svg>
<!--{[%END-%]}-->
<!--{[% show_pages(zonecalls_rs,'title')-%]}-->
<!--{[%# show_pages(zonecalls_rs,'title')-%]}-->
<!--{[%# show_pages('mid')-%]}-->
<!--{[%# show_pages('last')-%]}-->
<!--{[%# show_pages('all')-%]}-->
<!--{[% show_pages( zonecalls_rs, 'all' )-%]}-->