|
Lines 61-67
This modules provides somes functions to deal with reservations.
Link Here
|
| 61 |
The following columns contains important values : |
61 |
The following columns contains important values : |
| 62 |
- priority >0 : then the reserve is at 1st stage, and not yet affected to any item. |
62 |
- priority >0 : then the reserve is at 1st stage, and not yet affected to any item. |
| 63 |
=0 : then the reserve is being dealed |
63 |
=0 : then the reserve is being dealed |
| 64 |
- found : NULL : means the patron requested the 1st available, and we haven't choosen the item |
64 |
- found : NULL : means the patron requested the 1st available, and we haven't chosen the item |
| 65 |
T(ransit) : the reserve is linked to an item but is in transit to the pickup branch |
65 |
T(ransit) : the reserve is linked to an item but is in transit to the pickup branch |
| 66 |
W(aiting) : the reserve is linked to an item, is at the pickup branch, and is waiting on the hold shelf |
66 |
W(aiting) : the reserve is linked to an item, is at the pickup branch, and is waiting on the hold shelf |
| 67 |
F(inished) : the reserve has been completed, and is done |
67 |
F(inished) : the reserve has been completed, and is done |
|
Lines 74-80
This modules provides somes functions to deal with reservations.
Link Here
|
| 74 |
if there is no transfer to do, the reserve waiting |
74 |
if there is no transfer to do, the reserve waiting |
| 75 |
patron can pick it up P =0, F=W, I=filled |
75 |
patron can pick it up P =0, F=W, I=filled |
| 76 |
if there is a transfer to do, write in branchtransfer P =0, F=T, I=filled |
76 |
if there is a transfer to do, write in branchtransfer P =0, F=T, I=filled |
| 77 |
The pickup library recieve the book, it check in P =0, F=W, I=filled |
77 |
The pickup library receive the book, it check in P =0, F=W, I=filled |
| 78 |
The patron borrow the book P =0, F=F, I=filled |
78 |
The patron borrow the book P =0, F=F, I=filled |
| 79 |
|
79 |
|
| 80 |
==== 2nd use case ==== |
80 |
==== 2nd use case ==== |
|
Lines 660-666
sub GetReserveCount {
Link Here
|
| 660 |
|
660 |
|
| 661 |
($messages,$nextreservinfo)=$GetOtherReserves(itemnumber); |
661 |
($messages,$nextreservinfo)=$GetOtherReserves(itemnumber); |
| 662 |
|
662 |
|
| 663 |
Check queued list of this document and check if this document must be transfered |
663 |
Check queued list of this document and check if this document must be transferred |
| 664 |
|
664 |
|
| 665 |
=cut |
665 |
=cut |
| 666 |
|
666 |
|
|
Lines 1386-1392
sub ModReserveAffect {
Link Here
|
| 1386 |
my $request = GetReserveInfo($reserve_id); |
1386 |
my $request = GetReserveInfo($reserve_id); |
| 1387 |
my $already_on_shelf = ($request && $request->{found} eq 'W') ? 1 : 0; |
1387 |
my $already_on_shelf = ($request && $request->{found} eq 'W') ? 1 : 0; |
| 1388 |
|
1388 |
|
| 1389 |
# If we affect a reserve that has to be transfered, don't set to Waiting |
1389 |
# If we affect a reserve that has to be transferred, don't set to Waiting |
| 1390 |
my $query; |
1390 |
my $query; |
| 1391 |
if ($transferToDo) { |
1391 |
if ($transferToDo) { |
| 1392 |
$query = " |
1392 |
$query = " |
|
Lines 1591-1597
sub _get_itype {
Link Here
|
| 1591 |
|
1591 |
|
| 1592 |
my $itype; |
1592 |
my $itype; |
| 1593 |
if (C4::Context->preference('item-level_itypes')) { |
1593 |
if (C4::Context->preference('item-level_itypes')) { |
| 1594 |
# We cant trust GetItem to honour the syspref, so safest to do it ourselves |
1594 |
# We can't trust GetItem to honour the syspref, so safest to do it ourselves |
| 1595 |
# When GetItem is fixed, we can remove this |
1595 |
# When GetItem is fixed, we can remove this |
| 1596 |
$itype = $item->{itype}; |
1596 |
$itype = $item->{itype}; |
| 1597 |
} |
1597 |
} |
|
Lines 1920-1926
sub _Findgroupreserve {
Link Here
|
| 1920 |
my $dbh = C4::Context->dbh; |
1920 |
my $dbh = C4::Context->dbh; |
| 1921 |
|
1921 |
|
| 1922 |
# TODO: consolidate at least the SELECT portion of the first 2 queries to a common $select var. |
1922 |
# TODO: consolidate at least the SELECT portion of the first 2 queries to a common $select var. |
| 1923 |
# check for exact targetted match |
1923 |
# check for exact targeted match |
| 1924 |
my $item_level_target_query = qq{ |
1924 |
my $item_level_target_query = qq{ |
| 1925 |
SELECT reserves.biblionumber AS biblionumber, |
1925 |
SELECT reserves.biblionumber AS biblionumber, |
| 1926 |
reserves.borrowernumber AS borrowernumber, |
1926 |
reserves.borrowernumber AS borrowernumber, |
|
Lines 1954-1960
sub _Findgroupreserve {
Link Here
|
| 1954 |
} |
1954 |
} |
| 1955 |
return @results if @results; |
1955 |
return @results if @results; |
| 1956 |
|
1956 |
|
| 1957 |
# check for title-level targetted match |
1957 |
# check for title-level targeted match |
| 1958 |
my $title_level_target_query = qq{ |
1958 |
my $title_level_target_query = qq{ |
| 1959 |
SELECT reserves.biblionumber AS biblionumber, |
1959 |
SELECT reserves.biblionumber AS biblionumber, |
| 1960 |
reserves.borrowernumber AS borrowernumber, |
1960 |
reserves.borrowernumber AS borrowernumber, |
|
Lines 2174-2180
sub OPACItemHoldsAllowed {
Link Here
|
| 2174 |
my $itype; |
2174 |
my $itype; |
| 2175 |
my $dbh = C4::Context->dbh; |
2175 |
my $dbh = C4::Context->dbh; |
| 2176 |
if (C4::Context->preference('item-level_itypes')) { |
2176 |
if (C4::Context->preference('item-level_itypes')) { |
| 2177 |
# We cant trust GetItem to honour the syspref, so safest to do it ourselves |
2177 |
# We can't trust GetItem to honour the syspref, so safest to do it ourselves |
| 2178 |
# When GetItem is fixed, we can remove this |
2178 |
# When GetItem is fixed, we can remove this |
| 2179 |
$itype = $item->{itype}; |
2179 |
$itype = $item->{itype}; |
| 2180 |
} |
2180 |
} |