View | Details | Raw Unified | Return to bug 6819
Collapse All | Expand All

(-)a/Koha/Acquisition/Order.pm (-7 / +3 lines)
Lines 127-141 sub cancel { Link Here
127
    # Delete the related items
127
    # Delete the related items
128
    my $items = $self->items;
128
    my $items = $self->items;
129
    while ( my $item = $items->next ) {
129
    while ( my $item = $items->next ) {
130
        my $safe_to_delete = $item->safe_to_delete;
130
        my $deleted = $item->safe_delete;
131
        if ( $safe_to_delete eq '1' ) {
131
        unless ( ref($deleted) eq 'Koha::Item' ) {
132
            $item->safe_delete;
133
        }
134
        else {
135
            $self->add_message(
132
            $self->add_message(
136
                {
133
                {
137
                    message => 'error_delitem',
134
                    message => 'error_delitem',
138
                    payload => { item => $item, reason => $safe_to_delete }
135
                    payload => { item => $item, reason => $deleted }
139
                }
136
                }
140
            );
137
            );
141
        }
138
        }
142
- 

Return to bug 6819