From 6dce043fdd2d1f8104dbfb11b55823aab499fe01 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Thu, 19 Jan 2006 13:33:23 +0000 Subject: [PATCH] Merge von 798 aus unstable: Bugfix 252 Fix zu Bug 252: Rechnungsnummern wurden nicht hochgezaehlt bei neu buchen (post as new) --- bin/mozilla/is.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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!')); -- 2.20.1