Revision b19501f8
Von Tamino Steinert vor fast 2 Jahren hinzugefügt
SL/Controller/Reclamation.pm | ||
---|---|---|
629 | 629 |
sub action_customer_vendor_changed { |
630 | 630 |
my ($self) = @_; |
631 | 631 |
|
632 |
$self->setup_reclamation_from_cv($self->reclamation); |
|
633 | 632 |
$self->recalc(); |
634 | 633 |
|
635 | 634 |
my $cv_method = $self->cv; |
... | ... | |
1438 | 1437 |
my $cv_id_method = $self->cv . '_id'; |
1439 | 1438 |
if ($::form->{$cv_id_method}) { |
1440 | 1439 |
$reclamation->$cv_id_method($::form->{$cv_id_method}); |
1441 |
$self->setup_reclamation_from_cv($reclamation); |
|
1442 | 1440 |
} |
1443 | 1441 |
} |
1444 | 1442 |
|
... | ... | |
1580 | 1578 |
return $item; |
1581 | 1579 |
} |
1582 | 1580 |
|
1583 |
sub setup_reclamation_from_cv { |
|
1584 |
my ($self, $reclamation) = @_; |
|
1585 |
|
|
1586 |
$reclamation->$_($reclamation->customervendor->$_) for (qw(taxzone_id payment_id delivery_term_id currency_id)); |
|
1587 |
|
|
1588 |
$reclamation->intnotes($reclamation->customervendor->notes); |
|
1589 |
|
|
1590 |
if ($reclamation->is_sales ) { |
|
1591 |
$reclamation->salesman_id($reclamation->customer->salesman_id || SL::DB::Manager::Employee->current->id); |
|
1592 |
$reclamation->taxincluded( |
|
1593 |
defined($reclamation->customervendor->taxincluded_checked) |
|
1594 |
? $reclamation->customervendor->taxincluded_checked |
|
1595 |
: $::myconfig{taxincluded_checked} |
|
1596 |
); |
|
1597 |
} |
|
1598 |
|
|
1599 |
} |
|
1600 |
|
|
1601 | 1581 |
# setup custom shipto from form |
1602 | 1582 |
# |
1603 | 1583 |
# The dialog returns form variables starting with 'shipto' and cvars starting |
Auch abrufbar als: Unified diff
Reclamation: Controller: don't need setup_reclamation_from_cv