From: Moritz Bunkus Date: Wed, 22 Nov 2006 16:47:00 +0000 (+0000) Subject: Recommit von r1202 von skoehler: Bug 381, Auftrags-, Angebots-, Rechnungsnummern... X-Git-Tag: release-2.4.0^2~198 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5f760f3059427a692faf14c6670f0539e95aab8a;p=kivitendo-erp.git Recommit von r1202 von skoehler: 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 c3374b6af..75b44c1e4 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -993,6 +993,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 67c99bdfe..410a06eeb 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1943,8 +1943,10 @@ sub save_and_close { } - $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!'))