From: Stephan Köhler Date: Thu, 19 Jan 2006 13:33:23 +0000 (+0000) Subject: Merge von 798 aus unstable: Bugfix 252 X-Git-Tag: release-2.2.0~22 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6dce043fdd2d1f8104dbfb11b55823aab499fe01;p=kivitendo-erp.git Merge von 798 aus unstable: Bugfix 252 Fix zu Bug 252: Rechnungsnummern wurden nicht hochgezaehlt bei neu buchen (post as new) --- diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 2baf7ec06..314f68bc1 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1071,8 +1071,10 @@ sub post { $form->{id} = 0 if $form->{postasnew}; - $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber") - unless $form->{invnumber}; + # get new invnumber in sequence if no invnumber is given or if posasnew was requested + if (!$form->{invnumber} || $form->{postasnew}) { + $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber") + } if ($print_post) { if (!(IS->post_invoice(\%myconfig, \%$form))) { $form->error($locale->text('Cannot post invoice!'));