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

(-)a/C4/Reserves.pm (-10 / +51 lines)
Lines 148-153 BEGIN { Link Here
148
148
149
    AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found)
149
    AddReserve($branch,$borrowernumber,$biblionumber,$constraint,$bibitems,$priority,$resdate,$expdate,$notes,$title,$checkitem,$found)
150
150
151
Adds reserve and generates HOLDPLACED message.
152
153
The following tables are available witin the HOLDPLACED message:
154
155
    branches
156
    borrowers
157
    biblio
158
    biblioitems
159
    items
160
151
=cut
161
=cut
152
162
153
sub AddReserve {
163
sub AddReserve {
Lines 220-229 sub AddReserve { Link Here
220
            letter_code => 'HOLDPLACED',
230
            letter_code => 'HOLDPLACED',
221
            branchcode => $branch,
231
            branchcode => $branch,
222
            tables => {
232
            tables => {
223
                'branches'  => $branch_details,
233
                'branches'    => $branch_details,
224
                'borrowers' => $borrower,
234
                'borrowers'   => $borrower,
225
                'biblio'    => $biblionumber,
235
                'biblio'      => $biblionumber,
226
                'items'     => $checkitem,
236
                'biblioitems' => $biblionumber,
237
                'items'       => $checkitem,
227
            },
238
            },
228
        ) ) {
239
        ) ) {
229
240
Lines 2031-2036 sub _Findgroupreserve { Link Here
2031
Sends a notification to the patron that their hold has been filled (through
2042
Sends a notification to the patron that their hold has been filled (through
2032
ModReserveAffect, _not_ ModReserveFill)
2043
ModReserveAffect, _not_ ModReserveFill)
2033
2044
2045
The letter code for this notice may be found using the following query:
2046
2047
    select distinct letter_code 
2048
    from message_transports 
2049
    inner join message_attributes using (message_attribute_id) 
2050
    where message_name = 'Hold_Filled'
2051
2052
This will probably sipmly be 'HOLD', but because it is defined in the database, 
2053
it is subject to addition or change.
2054
2055
The following tables are availalbe witin the notice:
2056
2057
    branches
2058
    borrowers
2059
    biblio
2060
    biblioitems
2061
    reserves
2062
    items
2063
2034
=cut
2064
=cut
2035
2065
2036
sub _koha_notify_reserve {
2066
sub _koha_notify_reserve {
Lines 2063-2072 sub _koha_notify_reserve { Link Here
2063
        module => 'reserves',
2093
        module => 'reserves',
2064
        branchcode => $reserve->{branchcode},
2094
        branchcode => $reserve->{branchcode},
2065
        tables => {
2095
        tables => {
2066
            'branches'  => $branch_details,
2096
            'branches'       => $branch_details,
2067
            'borrowers' => $borrower,
2097
            'borrowers'      => $borrower,
2068
            'biblio'    => $biblionumber,
2098
            'biblio'         => $biblionumber,
2069
            'reserves'  => $reserve,
2099
            'biblioitems'    => $biblionumber,
2100
            'reserves'       => $reserve,
2070
            'items', $reserve->{'itemnumber'},
2101
            'items', $reserve->{'itemnumber'},
2071
        },
2102
        },
2072
        substitute => { today => C4::Dates->new()->output() },
2103
        substitute => { today => C4::Dates->new()->output() },
Lines 2403-2409 sub GetReserveId { Link Here
2403
2434
2404
  ReserveSlip($branchcode, $borrowernumber, $biblionumber)
2435
  ReserveSlip($branchcode, $borrowernumber, $biblionumber)
2405
2436
2406
  Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef
2437
Returns letter hash ( see C4::Letters::GetPreparedLetter ) or undef
2438
2439
The letter code will be RESERVESLIP, and the following tables are 
2440
available within the slip:
2441
2442
    reserves
2443
    branches
2444
    borrowers
2445
    biblio
2446
    biblioitems
2447
    items
2407
2448
2408
=cut
2449
=cut
2409
2450
Lines 2427-2432 sub ReserveSlip { Link Here
2427
            'branches'    => $reserve->{branchcode},
2468
            'branches'    => $reserve->{branchcode},
2428
            'borrowers'   => $reserve->{borrowernumber},
2469
            'borrowers'   => $reserve->{borrowernumber},
2429
            'biblio'      => $reserve->{biblionumber},
2470
            'biblio'      => $reserve->{biblionumber},
2471
            'biblioitems' => $reserve->{biblionumber},
2430
            'items'       => $reserve->{itemnumber},
2472
            'items'       => $reserve->{itemnumber},
2431
        },
2473
        },
2432
    );
2474
    );
2433
- 

Return to bug 14515