From: Moritz Bunkus Date: Tue, 24 Apr 2007 10:58:04 +0000 (+0000) Subject: Kosmetik: Formatoptionen nutzen, anstatt den Formatstring extra zusammenzusetzen. X-Git-Tag: release-2.4.3^2~466 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=36c54ad253745c4223948cb00f6535efafc85bd5;p=kivitendo-erp.git Kosmetik: Formatoptionen nutzen, anstatt den Formatstring extra zusammenzusetzen. --- diff --git a/SL/Form.pm b/SL/Form.pm index 98b2a4e4d..45fd48ed2 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2358,7 +2358,7 @@ sub update_defaults { $sth->finish; if ($var =~ /^(.*?)(\d+)$/) { - my $new_num = sprintf '%0' . length($2) . 'd', $2 + 1; + my $new_num = sprintf '%0*d', length($2), $2 + 1; $var = "${1}${new_num}"; } else { $var++; @@ -2395,7 +2395,7 @@ sub update_business { if ($var ne "") { if ($var =~ /^(.*?)(\d+)$/) { - my $new_num = sprintf '%0' . length($2) . 'd', $2 + 1; + my $new_num = sprintf '%0*d', length($2), $2 + 1; $var = "${1}${new_num}"; } else { $var++;