Auftrags-Controller: Zahlungsbedingungen nach flatten_to_form zurücksetzen, …
[kivitendo-erp.git] / SL / Controller / Order.pm
index 8c3ca54..b6b87a8 100644 (file)
@@ -532,6 +532,8 @@ sub _create_pdf {
   $print_form->{media}    = $params->{media}  || 'file';
 
   $order->flatten_to_form($print_form, format_amounts => 1);
+  # flatten_to_form sets payment_terms from customer/vendor - we do not want that here
+  delete $print_form->{payment_terms} if !$print_form->{payment_id};
 
   my @errors = ();
   $print_form->throw_on_error(sub {