From 5902705e1674deb4a4e62c360f9d7d05be3110bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 12 Feb 2016 11:11:57 +0100 Subject: [PATCH] =?utf8?q?Verkaufsrechnungen:=20Beim=20=C3=96ffnen=20indiv?= =?utf8?q?iduelle=20Lieferadresse=20laden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IS.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SL/IS.pm b/SL/IS.pm index 7705a11e6..19c41886b 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -1932,6 +1932,12 @@ sub retrieve_invoice { ($form->{"delivery_${vc}_string"}) = selectrow_query($form, $dbh, qq|SELECT name FROM customer WHERE id = ?|, $id); } + # get shipto + $query = qq|SELECT * FROM shipto WHERE (trans_id = ?) AND (module = 'AR')|; + $ref = selectfirst_hashref_query($form, $dbh, $query, $id); + delete($ref->{id}); + map { $form->{$_} = $ref->{$_} } keys %$ref; + # get printed, emailed $query = qq|SELECT printed, emailed, spoolfile, formname FROM status WHERE trans_id = ?|; $sth = prepare_execute_query($form, $dbh, $query, $id); -- 2.20.1