From 077ebb6c7e6b6ba243da85dbede70ff57927db01 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 3 Jul 2007 15:45:33 +0000 Subject: [PATCH] =?utf8?q?Beim=20Stornieren=20von=20Einkaufs-=20und=20Verk?= =?utf8?q?aufsrechnung=20auch=20die=20storno=5Fid=20mit=20speichern=20(ana?= =?utf8?q?log=20zu=20AR.pm/AP.pm),=20damit=20sp=C3=A4ter=20eine=20Untersch?= =?utf8?q?eidung=20zwischen=20Stornorechnung=20und=20stornierter=20Rechnun?= =?utf8?q?g=20m=C3=B6glich=20ist.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IR.pm | 3 ++- SL/IS.pm | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SL/IR.pm b/SL/IR.pm index 22c1a2866..690c20d84 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -553,6 +553,7 @@ sub post_invoice { curr = ?, department_id = ?, storno = ?, + storno_id = ?, globalproject_id = ?, cp_id = ?, employee_id = ? @@ -564,7 +565,7 @@ sub post_invoice { conv_date($form->{duedate}), $taxzone_id, $form->{taxincluded} ? 't' : 'f', $form->{notes}, $form->{intnotes}, $form->{currency}, conv_i($form->{department_id}), - $form->{storno} ? 't' : 'f', + $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), conv_i($form->{globalproject_id}), conv_i($form->{cp_id}), conv_i($form->{employee_id}), conv_i($form->{id})); diff --git a/SL/IS.pm b/SL/IS.pm index 34015e03e..3cae60e67 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -992,6 +992,7 @@ Message: $form->{message}\r| if $form->{message}; employee_id = ?, salesman_id = ?, storno = ?, + storno_id = ?, globalproject_id = ?, cp_id = ?, transaction_description = ?, @@ -1009,7 +1010,7 @@ Message: $form->{message}\r| if $form->{message}; conv_i($form->{"shipto_id"}), conv_i($form->{"delivery_customer_id"}), conv_i($form->{"delivery_vendor_id"}), conv_i($form->{"employee_id"}), conv_i($form->{"salesman_id"}), - $form->{"storno"} ? 't' : 'f', conv_i($form->{"globalproject_id"}), + $form->{"storno"} ? 't' : 'f', conv_i($form->{storno_id}), conv_i($form->{"globalproject_id"}), conv_i($form->{"cp_id"}), $form->{transaction_description}, $form->{marge_total}, $form->{marge_percent}, conv_i($form->{"id"})); @@ -2162,9 +2163,9 @@ sub has_storno { sub is_storno { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $form, $table) = @_; + my ($self, $myconfig, $form, $table, $id) = @_; - $main::lxdebug->leave_sub() and return 0 unless ($form->{id}); + $main::lxdebug->leave_sub() and return 0 unless ($id); # make sure there's no funny stuff in $table # ToDO: die when this happens and throw an error @@ -2173,7 +2174,7 @@ sub is_storno { my $dbh = $form->dbconnect($myconfig); my $query = qq|SELECT storno FROM $table WHERE id = ?|; - my ($result) = selectrow_query($form, $dbh, $query, $form->{id}); + my ($result) = selectrow_query($form, $dbh, $query, $id); $dbh->disconnect(); -- 2.20.1