From: Stephan Köhler Date: Wed, 2 Aug 2006 14:46:15 +0000 (+0000) Subject: Bug 381, Auftrags-, Angebots-, Rechnungsnummern (Einkauf) wurden X-Git-Tag: release-2.4.0^2~251 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=972f67f3fe4d62126a9a5958918175b5f0b08ee6;p=kivitendo-erp.git Bug 381, Auftrags-, Angebots-, Rechnungsnummern (Einkauf) wurden beim "Neu speichern" nicht hochgezaehlt. --- diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 66e5da7ae..f7f8cdf87 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -905,6 +905,11 @@ sub post { $form->{id} = 0 if $form->{postasnew}; + # 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"); + } + $form->redirect( $locale->text('Invoice') . " $form->{invnumber} " . $locale->text('posted!')) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 6f12c94d3..7aa3f2eb2 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1754,8 +1754,10 @@ sub save { } - $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld) - unless $form->{$ordnumber}; + # get new number in sequence if no number is given or if saveasnew was requested + if (!$form->{$ordumber} || $form->{saveasnew}) { + $form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld); + } $form->redirect( $form->{label} . " $form->{$ordnumber} " . $locale->text('saved!'))