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:
84ca5a1
)
update_defaults: Fall "Spalte noch leer" richtig behandeln
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 22 Apr 2013 11:09:01 +0000
(13:09 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 22 Apr 2013 11:09:01 +0000
(13:09 +0200)
Bei neu angelegten Datenbanken sind die Nummernkreisspalten NULL, was
SL::PrefixedNumber nicht mag. Also in solchen Fällen '0' annehmen.
Behebt #2245.
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
8859cae
..
5af4dc2
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-3190,6
+3190,7
@@
sub update_defaults {
my ($var) = $sth->fetchrow_array;
$sth->finish;
+ $var = 0 if !defined($var) || ($var eq '');
$var = SL::PrefixedNumber->new(number => $var)->get_next;
$query = qq|UPDATE defaults SET $fld = ?|;
do_query($self, $dbh, $query, $var);