MT#8353 Give possibility to manage money signs after comma in template.

(cherry picked from commit 92706efe775e55494a92e3b384776bcf5539b6d4)
agranig/pbx-dev-map
Irka 11 years ago
parent 361fb2377d
commit c66c0a06a7

@ -130,7 +130,10 @@
amount = amount ? amount : 0 ;
full = Math.int(amount / 100);
cent = Math.int(amount % 100);
cents = String.new(cent); cents = cents.format("%02d");
cents = String.new(cent);
money_signs = money_signs || '2';
money_format_string = money_format_string || "%0" _ money_signs _ "d";
cents = cents.format(money_format_string);
aux.val = full _ comma _ cents;
END;

@ -2,6 +2,8 @@
[%
pagewidth = 210;
pageheight = 297;
server_process_units = 'none';
money_signs = 3;
PROCESS "invoice/default/invoice_template_aux.tt";
money_format(amount=(billprof.interval_charge * 100), comma='.'); fixfee = aux.val;
@ -12,7 +14,6 @@
cur = billprof.currency;
p_start = date_format(thedate=invoice.period_start, format='%Y-%m-%d');
p_end = date_format(thedate=invoice.period_end, format='%Y-%m-%d');
server_process_units = 'none';
-%]
}-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="210mm" height="297mm" viewBox="0 0 595 842" server-process-units="none">

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Loading…
Cancel
Save