Revision 2ef21b8f
Von Sven Schöling vor etwa 17 Jahren hinzugefügt
SL/Template/Plugin/LxERP.pm | ||
---|---|---|
1 |
package SL::Template::Plugin::LxERP; |
|
2 |
|
|
3 |
use base qw( Template::Plugin ); |
|
4 |
use Template::Plugin; |
|
5 |
|
|
6 |
sub new { |
|
7 |
my $class = shift; |
|
8 |
my $context = shift; |
|
9 |
|
|
10 |
bless { }, $class; |
|
11 |
} |
|
12 |
|
|
13 |
sub format_amount { |
|
14 |
my ($self, $var, $places, $skip_zero) = @_; |
|
15 |
|
|
16 |
return $main::form->format_amount(\%main::myconfig, $var * 1, $places) unless $skip_zero && $var == 0; |
|
17 |
return ''; |
|
18 |
} |
|
19 |
|
|
20 |
sub format_percent { |
|
21 |
my ($self, $var, $places, $skip_zero) = @_; |
|
22 |
|
|
23 |
return $self->format_amount($var * 100, $places, $skip_zero); |
|
24 |
} |
|
25 |
|
|
26 |
1; |
|
27 |
|
Auch abrufbar als: Unified diff
...und das gemoddete Templating