From 043aefd5e1013d71e861011c3f4132bf84643509 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 17 Jan 2006 13:56:25 +0000 Subject: [PATCH] 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