From cddf2fdb5d7352fdbce356e90895ab756a569c21 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 13 Nov 2015 11:53:57 +0100 Subject: [PATCH] Auftrags-Controller: Zahlungs- und Lieferbed. von Kunden/Lieferanten vorbelegen. --- SL/Controller/Order.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; -- 2.20.1