X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=97a0a529c2fa89d91e81eff0db719ace9c548e1c;hb=c184bce36ecd18049541dccaaa38d212fb6170cf;hp=d2f8cb2e7113c2263006811af299ae3f1d746dce;hpb=3aae3709a67da5479454dc46bd1d88a17b17b8b5;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index d2f8cb2e7..97a0a529c 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -263,7 +263,7 @@ sub new { $self->{action} = lc $self->{action}; $self->{action} =~ s/( |-|,|\#)/_/g; - $self->{version} = "2.6.0 beta 2"; + $self->{version} = "2.6.0 RC 1"; $main::lxdebug->leave_sub(); @@ -2829,7 +2829,7 @@ sub create_links { (startdate <= a.transdate) ORDER BY startdate DESC LIMIT 1)) WHERE a.trans_id = ? AND a.fx_transaction = '0' - ORDER BY a.oid, a.transdate|; + ORDER BY a.acc_trans_id, a.transdate|; $sth = $dbh->prepare($query); do_statement($self, $sth, $query, $self->{id}); @@ -3245,6 +3245,19 @@ sub update_defaults { 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(); @@ -3261,6 +3274,8 @@ sub update_business { 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);