Revision 3be524bf
Von Werner Hahn vor fast 2 Jahren 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') |
... | ... | |
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 |
|
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