From: Sven Schöling Date: Tue, 17 Jan 2006 16:27:14 +0000 (+0000) Subject: Bugfix 245: IS::customer_details und IR::vendor_details ueberschreiben $form->{id... X-Git-Tag: release-2.4.0^2~373 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/commitdiff_plain/79a9b990776054ebfcaa09cd1ccb110428eb5dd4 Bugfix 245: IS::customer_details und IR::vendor_details ueberschreiben $form->{id}, was den Workflowstatus verfaelscht. Backup von taxincluded ersetzt durch ein Cleanup der SQL Rueckgabe. --- diff --git a/SL/IR.pm b/SL/IR.pm index f6cf8b6a0..0d23b45ef 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -1135,8 +1135,6 @@ sub vendor_details { $contact = "and cp.cp_id = $form->{cp_id}"; } - $taxincluded = $form->{taxincluded}; - # get rest for the vendor # fax and phone and email as vendor* my $query = @@ -1148,9 +1146,10 @@ sub vendor_details { $sth->execute || $form->dberror($query); $ref = $sth->fetchrow_hashref(NAME_lc); - map { $form->{$_} = $ref->{$_} } keys %$ref; - $form->{taxincluded} = $taxincluded; + # remove id and taxincluded before copy back + delete @$ref{qw(id taxincluded)}; + map { $form->{$_} = $ref->{$_} } keys %$ref; $sth->finish; $dbh->disconnect; diff --git a/SL/IS.pm b/SL/IS.pm index 484dcb9d0..9c4f50b1a 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -348,8 +348,6 @@ sub customer_details { $contact = "and cp.cp_id = $form->{cp_id}"; } - $taxincluded = $form->{taxincluded}; - # get rest for the customer my $query = qq|SELECT ct.*, cp.*, ct.notes as customernotes FROM customer ct @@ -359,9 +357,10 @@ sub customer_details { $sth->execute || $form->dberror($query); $ref = $sth->fetchrow_hashref(NAME_lc); - map { $form->{$_} = $ref->{$_} } keys %$ref; - $form->{taxincluded} = $taxincluded; + # remove id and taxincluded before copy back + delete @$ref{qw(id taxincluded)}; + map { $form->{$_} = $ref->{$_} } keys %$ref; $sth->finish; $dbh->disconnect;