Fix format_number function.
This commit refs #19250
(cherry picked from commit 0b94c12ab1
)
This commit is contained in:
parent
f5566d14bf
commit
24047f2c5c
|
@ -1,6 +1,6 @@
|
|||
{% include ${group._get_confirming_template_paths()['base'] + '/base.txt'} %}\
|
||||
{% def format_number(value, length_, precision) %}\
|
||||
${'%s%s' % (str(int(divmod(abs(value), 1)[0]))[:length_].zfill(length_), str(divmod(abs(value), 1)[1])[2:precision + 2].zfill(precision))}\
|
||||
${'%s%s' % (str(int(divmod(abs(value), 1)[0]))[:length_].zfill(length_), str(divmod(abs(value), 1)[1])[2:precision + 2].ljust(precision, '0'))}\
|
||||
{% end %}\
|
||||
{% def invoice_type(payment) %}\
|
||||
${'credit_note' if payment.line.origin.total_amount < 0 else 'invoice'}\
|
||||
|
|
Loading…
Reference in New Issue