From: Bernd Bleßmann Date: Fri, 13 Nov 2015 10:53:57 +0000 (+0100) Subject: Auftrags-Controller: Zahlungs- und Lieferbed. von Kunden/Lieferanten vorbelegen. X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cddf2fdb5d7352fdbce356e90895ab756a569c21;p=kivitendo-erp.git Auftrags-Controller: Zahlungs- und Lieferbed. von Kunden/Lieferanten vorbelegen. --- diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 3203485fa..968367637 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -295,13 +295,18 @@ sub action_customer_vendor_changed { : $::myconfig{taxincluded_checked}); } + $self->order->payment_id($self->order->$cv_method->payment_id); + $self->order->delivery_term_id($self->order->$cv_method->delivery_term_id); + $self->_recalc(); $self->js - ->replaceWith('#order_cp_id', $self->build_contact_select) - ->replaceWith('#order_shipto_id', $self->build_shipto_select) - ->val( '#order_taxzone_id', $self->order->taxzone_id) - ->val( '#order_taxincluded', $self->order->taxincluded) + ->replaceWith('#order_cp_id', $self->build_contact_select) + ->replaceWith('#order_shipto_id', $self->build_shipto_select) + ->val( '#order_taxzone_id', $self->order->taxzone_id) + ->val( '#order_taxincluded', $self->order->taxincluded) + ->val( '#order_payment_id', $self->order->payment_id) + ->val( '#order_delivery_term_id', $self->order->delivery_term_id) ->focus( '#order_' . $self->cv . '_id'); $self->_js_redisplay_amounts_and_taxes;