Revision 3be524bf
Von Werner Hahn vor fast 2 Jahren hinzugefügt
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') |
... | ... | |
2082 | 2081 |
delete_custom_shipto => $self->is_custom_shipto_to_delete || $self->order->custom_shipto->is_empty, |
2083 | 2082 |
items_to_delete => $items_to_delete, |
2084 | 2083 |
objects_to_close => $objects_to_close, |
2085 |
history => { snumbers => $self->get_history_snumbers() }, |
|
2086 | 2084 |
link_requirement_specs_linking_to_created_from_objects => \@converted_from_oe_ids, |
2087 | 2085 |
set_project_in_linked_requirement_specs => 1, |
2088 | 2086 |
); |
... | ... | |
2684 | 2682 |
$self->redirect_to(%params, id => $self->order->id); |
2685 | 2683 |
} |
2686 | 2684 |
|
2687 |
sub get_history_snumbers { |
|
2688 |
my ($self) = @_; |
|
2689 |
|
|
2690 |
my $number_type = $self->order->type =~ m{order} ? 'ordnumber' : 'quonumber'; |
|
2691 |
my $snumbers = $number_type . '_' . $self->order->$number_type; |
|
2692 |
|
|
2693 |
return $snumbers; |
|
2694 |
} |
|
2695 |
|
|
2696 | 2685 |
sub save_history { |
2697 | 2686 |
my ($self, $addition) = @_; |
2698 | 2687 |
|
Auch abrufbar als: Unified diff
_get_snumber in S7C/ DeliveryOrder, Order und Reclamation eingebunden