From: Moritz Bunkus Date: Tue, 12 Jul 2016 13:51:16 +0000 (+0200) Subject: Lieferbedingungen haben kein Attribut description_long_invoice X-Git-Tag: release-3.5.4~2219 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2134f89abb07c18b07b3121e80d243af03ede0e0;p=kivitendo-erp.git Lieferbedingungen haben kein Attribut description_long_invoice 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. --- 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};