Lieferbedingungen haben kein Attribut description_long_invoice
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 12 Jul 2016 13:51:16 +0000 (15:51 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 12 Jul 2016 13:54:02 +0000 (15:54 +0200)
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
SL/IS.pm
SL/OE.pm

index c066f99..4ef2854 100644 (file)
--- 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};
 
index c579aad..57b1f9e 100644 (file)
--- 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};
 
index 31b3067..b1a3f59 100644 (file)
--- 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};