Revision df7c8480
Von Moritz Bunkus vor fast 2 Jahren hinzugefügt
SL/Controller/DeliveryTerm.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use parent qw(SL::Controller::Base); |
6 | 6 |
|
7 |
use SL::DB::Customer; |
|
7 | 8 |
use SL::DB::DeliveryTerm; |
8 | 9 |
use SL::DB::Language; |
10 |
use SL::DB::Vendor; |
|
9 | 11 |
use SL::Helper::Flash; |
10 | 12 |
use SL::Locale::String qw(t8); |
11 | 13 |
|
... | ... | |
110 | 112 |
$self->{delivery_term}->save_attribute_translation('description_long', $language, $::form->{"translation_" . $language->id}); |
111 | 113 |
} |
112 | 114 |
|
115 |
if ($::form->{remove_customer_delivery_terms}) { |
|
116 |
foreach my $class (qw(Customer Vendor)) { |
|
117 |
"SL::DB::Manager::${class}"->update_all( |
|
118 |
set => { delivery_term_id => undef }, |
|
119 |
where => [ delivery_term_id => $self->{delivery_term}->id ], |
|
120 |
); |
|
121 |
} |
|
122 |
} |
|
123 |
|
|
113 | 124 |
flash_later('info', $is_new ? $::locale->text('The delivery term has been created.') : $::locale->text('The delivery term has been saved.')); |
114 | 125 |
$self->redirect_to(action => 'list'); |
115 | 126 |
} |
Auch abrufbar als: Unified diff
Lieferbedingungen: optional bei Kunden/Lieferanten entfernen