Lines 1875-1881
The following tables are availalbe witin the notice:
Link Here
|
1875 |
|
1875 |
|
1876 |
sub _koha_notify_reserve { |
1876 |
sub _koha_notify_reserve { |
1877 |
my $reserve_id = shift; |
1877 |
my $reserve_id = shift; |
1878 |
my $notify_library = shift; |
|
|
1879 |
|
1878 |
|
1880 |
my $hold = Koha::Holds->find($reserve_id); |
1879 |
my $hold = Koha::Holds->find($reserve_id); |
1881 |
my $borrowernumber = $hold->borrowernumber; |
1880 |
my $borrowernumber = $hold->borrowernumber; |
Lines 1891-1905
sub _koha_notify_reserve {
Link Here
|
1891 |
} ); |
1890 |
} ); |
1892 |
|
1891 |
|
1893 |
my $library = Koha::Libraries->find( $hold->branchcode ); |
1892 |
my $library = Koha::Libraries->find( $hold->branchcode ); |
1894 |
my $admin_email_address = $library->from_email_address; |
1893 |
my $inbound_email_address = $library->inbound_email_address; |
1895 |
$library = $library->unblessed; |
|
|
1896 |
|
1894 |
|
1897 |
my %letter_params = ( |
1895 |
my %letter_params = ( |
1898 |
module => 'reserves', |
1896 |
module => 'reserves', |
1899 |
branchcode => $hold->branchcode, |
1897 |
branchcode => $hold->branchcode, |
1900 |
lang => $patron->lang, |
1898 |
lang => $patron->lang, |
1901 |
tables => { |
1899 |
tables => { |
1902 |
'branches' => $library, |
1900 |
'branches' => $library->unblessed, |
1903 |
'borrowers' => $patron->unblessed, |
1901 |
'borrowers' => $patron->unblessed, |
1904 |
'biblio' => $hold->biblionumber, |
1902 |
'biblio' => $hold->biblionumber, |
1905 |
'biblioitems' => $hold->biblionumber, |
1903 |
'biblioitems' => $hold->biblionumber, |
Lines 1923-1929
sub _koha_notify_reserve {
Link Here
|
1923 |
C4::Letters::EnqueueLetter( { |
1921 |
C4::Letters::EnqueueLetter( { |
1924 |
letter => $letter, |
1922 |
letter => $letter, |
1925 |
borrowernumber => $borrowernumber, |
1923 |
borrowernumber => $borrowernumber, |
1926 |
from_address => $admin_email_address, |
1924 |
from_address => $inbound_email_address, |
1927 |
message_transport_type => $mtt, |
1925 |
message_transport_type => $mtt, |
1928 |
} ); |
1926 |
} ); |
1929 |
}; |
1927 |
}; |
Lines 1944-1980
sub _koha_notify_reserve {
Link Here
|
1944 |
&$send_notification('print', 'HOLD'); |
1942 |
&$send_notification('print', 'HOLD'); |
1945 |
} |
1943 |
} |
1946 |
|
1944 |
|
1947 |
if ($notify_library) { |
|
|
1948 |
my $letter = C4::Letters::GetPreparedLetter( |
1949 |
module => 'reserves', |
1950 |
letter_code => 'HOLD_CHANGED', |
1951 |
branchcode => $hold->branchcode, |
1952 |
substitute => { today => output_pref( dt_from_string ) }, |
1953 |
tables => { |
1954 |
'branches' => $library, |
1955 |
'borrowers' => $patron->unblessed, |
1956 |
'biblio' => $hold->biblionumber, |
1957 |
'biblioitems' => $hold->biblionumber, |
1958 |
'reserves' => $hold->unblessed, |
1959 |
'items' => $hold->itemnumber, |
1960 |
}, |
1961 |
); |
1962 |
|
1963 |
my $email = |
1964 |
C4::Context->preference('ExpireReservesAutoFillEmail') |
1965 |
|| $library->{branchemail} |
1966 |
|| C4::Context->preference('KohaAdminEmailAddress'); |
1967 |
|
1968 |
C4::Letters::EnqueueLetter( |
1969 |
{ |
1970 |
letter => $letter, |
1971 |
borrowernumber => $borrowernumber, |
1972 |
message_transport_type => 'email', |
1973 |
from_address => $email, |
1974 |
to_address => $email, |
1975 |
} |
1976 |
); |
1977 |
} |
1978 |
} |
1945 |
} |
1979 |
|
1946 |
|
1980 |
=head2 _koha_notify_hold_changed |
1947 |
=head2 _koha_notify_hold_changed |
Lines 2008-2015
sub _koha_notify_hold_changed {
Link Here
|
2008 |
|
1975 |
|
2009 |
my $email = |
1976 |
my $email = |
2010 |
C4::Context->preference('ExpireReservesAutoFillEmail') |
1977 |
C4::Context->preference('ExpireReservesAutoFillEmail') |
2011 |
|| $library->branchemail |
1978 |
|| $library->inbound_email_address; |
2012 |
|| C4::Context->preference('KohaAdminEmailAddress'); |
|
|
2013 |
|
1979 |
|
2014 |
C4::Letters::EnqueueLetter( |
1980 |
C4::Letters::EnqueueLetter( |
2015 |
{ |
1981 |
{ |