Revision 4ce9a4ca
Von Werner Hahn vor mehr als 1 Jahr hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
192 | 192 |
sub action_delete { |
193 | 193 |
my ($self) = @_; |
194 | 194 |
|
195 |
my %history = (snumbers => $self->type . '_' . $self->order->number); |
|
196 |
my %params = (history => \%history); |
|
197 |
SL::Model::Record->delete($self->order,%params); |
|
195 |
SL::Model::Record->delete($self->order); |
|
198 | 196 |
flash_later('info', $self->type_data->text("delete")); |
199 | 197 |
|
200 | 198 |
my @redirect_params = ( |
SL/Controller/Order.pm | ||
---|---|---|
188 | 188 |
sub action_delete { |
189 | 189 |
my ($self) = @_; |
190 | 190 |
|
191 |
my %params = (history => { snumbers => $self->get_history_snumbers() }); |
|
192 |
SL::Model::Record->delete($self->order, %params); |
|
191 |
SL::Model::Record->delete($self->order); |
|
193 | 192 |
my $text = $self->type eq sales_order_type() ? $::locale->text('The order has been deleted') |
194 | 193 |
: $self->type eq purchase_order_type() ? $::locale->text('The order has been deleted') |
195 | 194 |
: $self->type eq sales_quotation_type() ? $::locale->text('The quotation has been deleted') |
... | ... | |
2122 | 2121 |
delete_custom_shipto => $self->is_custom_shipto_to_delete || $self->order->custom_shipto->is_empty, |
2123 | 2122 |
items_to_delete => $items_to_delete, |
2124 | 2123 |
objects_to_close => $objects_to_close, |
2125 |
history => { snumbers => $self->get_history_snumbers() }, |
|
2126 | 2124 |
link_requirement_specs_linking_to_created_from_objects => \@converted_from_oe_ids, |
2127 | 2125 |
set_project_in_linked_requirement_specs => 1, |
2128 | 2126 |
); |
... | ... | |
2735 | 2733 |
$self->redirect_to(%params, id => $self->order->id); |
2736 | 2734 |
} |
2737 | 2735 |
|
2738 |
sub get_history_snumbers { |
|
2739 |
my ($self) = @_; |
|
2740 |
|
|
2741 |
my $number_type = $self->order->type =~ m{order} ? 'ordnumber' : 'quonumber'; |
|
2742 |
my $snumbers = $number_type . '_' . $self->order->$number_type; |
|
2743 |
|
|
2744 |
return $snumbers; |
|
2745 |
} |
|
2746 |
|
|
2747 | 2736 |
sub save_history { |
2748 | 2737 |
my ($self, $addition) = @_; |
2749 | 2738 |
|
SL/Controller/Reclamation.pm | ||
---|---|---|
252 | 252 |
my ($self) = @_; |
253 | 253 |
|
254 | 254 |
|
255 |
my %history = (snumbers => 'record_number_' . $self->reclamation->record_number); |
|
256 |
my %params = (history => \%history); |
|
257 |
SL::Model::Record->delete($self->reclamation, %params); |
|
255 |
SL::Model::Record->delete($self->reclamation); |
|
258 | 256 |
flash_later('info', t8('The reclamation has been deleted')); |
259 | 257 |
|
260 | 258 |
my @redirect_params = ( |
Auch abrufbar als: Unified diff
_get_snumber in S7C/ DeliveryOrder, Order und Reclamation eingebunden