projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddbe3ea
)
Kosmetik: Formatoptionen nutzen, anstatt den Formatstring extra zusammenzusetzen.
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 24 Apr 2007 10:58:04 +0000
(10:58 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Tue, 24 Apr 2007 10:58:04 +0000
(10:58 +0000)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
98b2a4e
..
45fd48e
100644
(file)
--- 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++;