Lines 1013-1031
__PACKAGE__->many_to_many(
Link Here
|
1013 |
"ordernumber", |
1013 |
"ordernumber", |
1014 |
); |
1014 |
); |
1015 |
|
1015 |
|
|
|
1016 |
#__PACKAGE__->has_many( |
1017 |
# "current_branchtransfers", |
1018 |
# "Koha::Schema::Result::Branchtransfer", |
1019 |
# sub { |
1020 |
# my $args = shift; |
1021 |
# |
1022 |
# return { |
1023 |
# "$args->{foreign_alias}.itemnumber" => { -ident => "$args->{self_alias}.itemnumber" }, |
1024 |
# "$args->{foreign_alias}.datearrived" => undef, |
1025 |
# "$args->{foreign_alias}.datecancelled" => undef, |
1026 |
# }; |
1027 |
# }, |
1028 |
# { order_by => [ { -desc => 'datesent' }, { -asc => 'daterequested' } ] } |
1029 |
#); |
1030 |
|
1016 |
__PACKAGE__->has_many( |
1031 |
__PACKAGE__->has_many( |
1017 |
"current_branchtransfers", |
1032 |
"current_branchtransfers", |
1018 |
"Koha::Schema::Result::Branchtransfer", |
1033 |
"Koha::Schema::Result::Branchtransfer", |
1019 |
sub { |
1034 |
{ "foreign.itemnumber" => "self.itemnumber" }, |
1020 |
my $args = shift; |
1035 |
{ |
1021 |
|
1036 |
where => { 'datearrived' => undef, 'datecancelled' => undef }, |
1022 |
return { |
1037 |
order_by => [ { -desc => 'datesent' }, { -asc => 'daterequested' } ] |
1023 |
"$args->{foreign_alias}.itemnumber" => { -ident => "$args->{self_alias}.itemnumber" }, |
1038 |
} |
1024 |
"$args->{foreign_alias}.datearrived" => undef, |
|
|
1025 |
"$args->{foreign_alias}.datecancelled" => undef, |
1026 |
}; |
1027 |
}, |
1028 |
{ order_by => [ { -desc => 'datesent' }, { -asc => 'daterequested' } ] } |
1029 |
); |
1039 |
); |
1030 |
|
1040 |
|
1031 |
# Relationship with bundled items |
1041 |
# Relationship with bundled items |