Revision d729e328
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/CVar.pm | ||
---|---|---|
return $value;
|
||
}
|
||
|
||
sub format_to_template {
|
||
my ($self, $value, $config) = @_;
|
||
# stupid template expects everything formated. except objects
|
||
# do not use outside of print routines for legacy templates
|
||
|
||
return $::form->parse_amount(\%::myconfig, $value) if $config->{type} eq 'number';
|
||
return $value->to_lxoffice if $config->{type} eq 'date' && blessed $value && $value->can('to_lxoffice');
|
||
return $value;
|
||
}
|
||
|
||
1;
|
||
|
||
__END__
|
SL/DO.pm | ||
---|---|---|
}
|
||
}
|
||
|
||
map { push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, $form->{"ic_cvar_$_->{name}_$i"} } @{ $ic_cvar_configs };
|
||
push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
|
||
CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
|
||
for @{ $ic_cvar_configs };
|
||
}
|
||
|
||
$h_pg->finish();
|
SL/IS.pm | ||
---|---|---|
$sth->finish;
|
||
}
|
||
|
||
map { push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, $form->{"ic_cvar_$_->{name}_$i"} } @{ $ic_cvar_configs };
|
||
push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
|
||
CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
|
||
for @{ $ic_cvar_configs };
|
||
}
|
||
}
|
||
|
||
... | ... | |
# record payments and offsetting AR
|
||
if (!$form->{storno}) {
|
||
for my $i (1 .. $form->{paidaccounts}) {
|
||
|
||
|
||
if ($form->{"acc_trans_id_$i"}
|
||
&& $payments_only
|
||
&& ($::lx_office_conf{features}->{payments_changeable} == 0)) {
|
SL/OE.pm | ||
---|---|---|
$sth->finish;
|
||
}
|
||
|
||
map { push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, $form->{"ic_cvar_$_->{name}_$i"} } @{ $ic_cvar_configs };
|
||
push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} },
|
||
CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_)
|
||
for @{ $ic_cvar_configs };
|
||
}
|
||
}
|
||
|
Auch abrufbar als: Unified diff
typ customer korrekt ans template system übergeben