From 972f67f3fe4d62126a9a5958918175b5f0b08ee6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Wed, 2 Aug 2006 14:46:15 +0000 Subject: [PATCH] Bug 381, Auftrags-, Angebots-, Rechnungsnummern (Einkauf) wurden beim "Neu speichern" nicht hochgezaehlt. --- bin/mozilla/ir.pl | 5 +++++ bin/mozilla/oe.pl | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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!')) -- 2.20.1