"field" => "id",
"fkey" => "current_copy",
"filter" => {
- "circ_lib" => $$params{org_id}, "status" => [0,7]
+ "circ_lib" => $$params{org_id}
},
"join" => {
"acn" => {
"filter" => {
"location" => {"=" => {"+acp" => "location"}}
}
+ },
+ "ccs" => {
+ "field" => "id",
+ "fkey" => "status",
+ "filter" => {
+ "holdable" => "t",
+ "is_available" => "t"
+ }
}
}
}
filter => { holdable => 't', deleted => 'f' },
fkey => 'location'
},
- ccs => {field => 'id', filter => { holdable => 't'}, fkey => 'status' }
+ ccs => {field => 'id', filter => {holdable => 't', is_available => 't'}, fkey => 'status'}
}
},
- where => {'+acp' => { circulate => 't', deleted => 'f', holdable => 't', circ_lib => $org_unit, status => [0,7]}},
+ where => {'+acp' => { circulate => 't', deleted => 'f', holdable => 't', circ_lib => $org_unit }},
limit => 1
};
my $count = 1 if ($self->api_name =~/count$/o);
my $status_filter = '';
- $status_filter = 'AND a.status IN (0,7)' if ($self->api_name =~/status_filtered/o);
+ $status_filter = 'AND a.status IN (SELECT id FROM config.copy_status WHERE holdable AND is_available)'
+ if ($self->api_name =~/status_filtered/);
my $select = <<" SQL";
SELECT h.*