Revision de5824b8
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
565 | 565 |
sub action_customer_vendor_changed { |
566 | 566 |
my ($self) = @_; |
567 | 567 |
|
568 |
setup_order_from_cv($self->order);
|
|
568 |
$self->order(SL::Model::Record->update_after_customer_vendor_change($self->order));
|
|
569 | 569 |
|
570 | 570 |
my $cv_method = $self->cv; |
571 | 571 |
|
... | ... | |
1375 | 1375 |
my $cv_id_method = $self->cv . '_id'; |
1376 | 1376 |
if (!$::form->{id} && $::form->{$cv_id_method}) { |
1377 | 1377 |
$order->$cv_id_method($::form->{$cv_id_method}); |
1378 |
setup_order_from_cv($order);
|
|
1378 |
$order = SL::Model::Record->update_after_customer_vendor_change($order);
|
|
1379 | 1379 |
} |
1380 | 1380 |
|
1381 | 1381 |
my $form_orderitems = delete $::form->{order}->{orderitems}; |
... | ... | |
1530 | 1530 |
return $item; |
1531 | 1531 |
} |
1532 | 1532 |
|
1533 |
sub setup_order_from_cv { |
|
1534 |
my ($order) = @_; |
|
1535 |
|
|
1536 |
$order->$_($order->customervendor->$_) for (qw(taxzone_id payment_id delivery_term_id currency_id)); |
|
1537 |
|
|
1538 |
$order->intnotes($order->customervendor->notes); |
|
1539 |
|
|
1540 |
if ($order->is_sales) { |
|
1541 |
$order->salesman_id($order->customer->salesman_id || SL::DB::Manager::Employee->current->id); |
|
1542 |
$order->taxincluded(defined($order->customer->taxincluded_checked) |
|
1543 |
? $order->customer->taxincluded_checked |
|
1544 |
: $::myconfig{taxincluded_checked}); |
|
1545 |
} |
|
1546 |
|
|
1547 |
} |
|
1548 |
|
|
1549 | 1533 |
# setup custom shipto from form |
1550 | 1534 |
# |
1551 | 1535 |
# The dialog returns form variables starting with 'shipto' and cvars starting |
Auch abrufbar als: Unified diff
Model::Record: Anpassen nach Kunden/Lieferanten-Änderung