From 2134f89abb07c18b07b3121e80d243af03ede0e0 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 12 Jul 2016 15:51:16 +0200 Subject: [PATCH] Lieferbedingungen haben kein Attribut description_long_invoice MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Im Commit de009a3fee7e0471c3e095ce92d8708ff2b42597 »Zahlungsbedingungen: Unterscheidung zwischen Angeboten/Aufträgen und Rechnungen« wurden in den Druckroutinen fälschlicherweise auch für die Lieferbedingungen das Setzen von »description_long_invoice« implementiert, obwohl die Lieferbedingungen keine Unterscheidung zwischen Angeboten/Aufträgen und Rechnungen bekommen haben. Daher revertet der jetzige Commit diejenigen Hunks aus de009a3fee7e0471c3e095ce92d8708ff2b42597, die die Lieferbedigungen angefasst haben. --- SL/DO.pm | 8 ++------ SL/IS.pm | 8 ++------ SL/OE.pm | 5 +---- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/SL/DO.pm b/SL/DO.pm index c066f99be..4ef285461 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -1055,13 +1055,9 @@ sub order_details { $h_pg->finish(); $h_bin_wh->finish(); - $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); - if ($form->{delivery_term} && $form->{language_id}) { - $form->{delivery_term}->description_long( $form->{delivery_term}->translated_attribute('description_long', $form->{language_id})); - $form->{delivery_term}->description_long_invoice($form->{delivery_term}->translated_attribute('description_long_invoice', $form->{language_id})); - } - $form->{department} = SL::DB::Manager::Department->find_by(id => $form->{department_id})->description if $form->{department_id}; + $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); + $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; $form->{username} = $myconfig->{name}; diff --git a/SL/IS.pm b/SL/IS.pm index c579aad8d..57b1f9eb4 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -533,13 +533,9 @@ sub invoice_details { $form->set_payment_options($myconfig, $form->{invdate}, 'sales_invoice'); - $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); - if ($form->{delivery_term} && $form->{language_id}) { - $form->{delivery_term}->description_long( $form->{delivery_term}->translated_attribute('description_long', $form->{language_id})); - $form->{delivery_term}->description_long_invoice($form->{delivery_term}->translated_attribute('description_long_invoice', $form->{language_id})); - } - $form->{department} = SL::DB::Manager::Department->find_by(id => $form->{department_id})->description if $form->{department_id}; + $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); + $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; $form->{username} = $myconfig->{name}; diff --git a/SL/OE.pm b/SL/OE.pm index 31b3067f5..b1a3f5997 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1594,10 +1594,7 @@ sub order_details { $dbh->disconnect; $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); - if ($form->{delivery_term} && $form->{language_id}) { - $form->{delivery_term}->description_long( $form->{delivery_term}->translated_attribute('description_long', $form->{language_id})); - $form->{delivery_term}->description_long_invoice($form->{delivery_term}->translated_attribute('description_long_invoice', $form->{language_id})); - } + $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id}; $form->{order} = SL::DB::Manager::Order->find_by(id => $form->{id}) if $form->{id}; -- 2.20.1