From 61824c4571db7e870e7c9cdc03e4af408fd27702 Mon Sep 17 00:00:00 2001 From: Thomas Kasulke Date: Mon, 23 Apr 2007 12:13:53 +0000 Subject: [PATCH] Anpassung der Historienfunktion --- SL/CP.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SL/CP.pm b/SL/CP.pm index 9b37bd7c4..56f579543 100644 --- a/SL/CP.pm +++ b/SL/CP.pm @@ -332,7 +332,6 @@ sub process_payment { $form->{"paid_$i"} = $form->round_amount($form->{"paid_$i"} * $exchangerate, 2); - $pth->execute($form->{"id_$i"}) || $form->dberror; ($amount) = $pth->fetchrow_array; $pth->finish; @@ -350,6 +349,14 @@ sub process_payment { $query = qq|UPDATE $arap SET $paid, datepaid = ? WHERE id = ?|; @values = (conv_date($form->{datepaid}), conv_i($form->{"id_$i"})); do_query($form, $dbh, $query, @values); + # saving the history + $form->{id} = $form->{"id_$i"}; + if(!exists $form->{addition}) { + $form->{snumbers} = qq|invnumber_| . $form->{"invnumber_$i"}; + $form->{addition} = "POSTED"; + $form->save_history($form->dbconnect($myconfig)); + } + # /saving the history } } -- 2.20.1