Revision cbcbf5fa
Von Sven Schöling vor fast 16 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
return $var;
|
||
}
|
||
|
||
=item update_business
|
||
|
||
PARAMS (not named):
|
||
\%config, - config hashref
|
||
$business_id, - business id
|
||
$dbh - optional database handle
|
||
|
||
handles business (thats customer/vendor types) sequences.
|
||
|
||
special behaviour for empty strings in customerinitnumber field:
|
||
will in this case not increase the value, and return undef.
|
||
|
||
=cut
|
||
sub update_business {
|
||
$main::lxdebug->enter_sub();
|
||
|
||
... | ... | |
WHERE id = ? FOR UPDATE|;
|
||
my ($var) = selectrow_query($self, $dbh, $query, $business_id);
|
||
|
||
return undef unless $var;
|
||
|
||
if ($var =~ m/\d+$/) {
|
||
my $new_var = (substr $var, $-[0]) * 1 + 1;
|
||
my $len_diff = length($var) - $-[0] - length($new_var);
|
Auch abrufbar als: Unified diff
Überraschend einfacher Fix für Numemrnkreisproblem in Kunden/Lieferantentypen.
Wenn ein Nummernkreis eines Kunden/Lieferantentyps leer ist, wird jetzt auf den STandardkreis ausgewichen.
Fix für Bug: 906