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

(-)a/Koha/Item.pm (-4 / +4 lines)
Lines 1173-1187 sub itemtype { Link Here
1173
    return Koha::ItemTypes->find( $self->effective_itemtype );
1173
    return Koha::ItemTypes->find( $self->effective_itemtype );
1174
}
1174
}
1175
1175
1176
=head3 item_orders
1176
=head3 orders
1177
1177
1178
my $orders = $item->item_orders();
1178
  my $orders = $item->orders();
1179
1179
1180
Returns a Koha::Acquisition::Orders object
1180
Returns a Koha::Acquisition::Orders object
1181
1181
1182
=cut
1182
=cut
1183
1183
1184
sub item_orders {
1184
sub orders {
1185
    my ( $self ) = @_;
1185
    my ( $self ) = @_;
1186
1186
1187
    my $orders = $self->_result->item_orders;
1187
    my $orders = $self->_result->item_orders;
Lines 1230-1236 sub move_to_biblio { Link Here
1230
    }
1230
    }
1231
1231
1232
    # Acquisition orders
1232
    # Acquisition orders
1233
    my $orders = $self->item_orders;
1233
    my $orders = $self->orders;
1234
    if ($orders) {
1234
    if ($orders) {
1235
        $orders->update({ biblionumber => $to_biblionumber }, { no_triggers => 1 });
1235
        $orders->update({ biblionumber => $to_biblionumber }, { no_triggers => 1 });
1236
    }
1236
    }
(-)a/t/db_dependent/Koha/Item.t (-2 / +1 lines)
Lines 856-862 subtest 'Tests for relationship between item and item_orders via aqorders_item' Link Here
856
        },
856
        },
857
    });
857
    });
858
858
859
    my $orders = $item->item_orders;
859
    my $orders = $item->orders;
860
    is ($orders->count, 1, 'One order found by item with the relationship');
860
    is ($orders->count, 1, 'One order found by item with the relationship');
861
    is ($orders->next->order_internalnote, $order_note, 'Correct order found by item with the relationship');
861
    is ($orders->next->order_internalnote, $order_note, 'Correct order found by item with the relationship');
862
};
862
};
863
- 

Return to bug 22690