Lines 1818-1824
The following tables are availalbe witin the notice:
Link Here
|
1818 |
|
1818 |
|
1819 |
sub _koha_notify_reserve { |
1819 |
sub _koha_notify_reserve { |
1820 |
my $reserve_id = shift; |
1820 |
my $reserve_id = shift; |
1821 |
my $notify_library = shift; |
|
|
1822 |
|
1821 |
|
1823 |
my $hold = Koha::Holds->find($reserve_id); |
1822 |
my $hold = Koha::Holds->find($reserve_id); |
1824 |
my $borrowernumber = $hold->borrowernumber; |
1823 |
my $borrowernumber = $hold->borrowernumber; |
Lines 1834-1848
sub _koha_notify_reserve {
Link Here
|
1834 |
} ); |
1833 |
} ); |
1835 |
|
1834 |
|
1836 |
my $library = Koha::Libraries->find( $hold->branchcode ); |
1835 |
my $library = Koha::Libraries->find( $hold->branchcode ); |
1837 |
my $admin_email_address = $library->from_email_address; |
1836 |
my $inbound_email_address = $library->inbound_email_address; |
1838 |
$library = $library->unblessed; |
|
|
1839 |
|
1837 |
|
1840 |
my %letter_params = ( |
1838 |
my %letter_params = ( |
1841 |
module => 'reserves', |
1839 |
module => 'reserves', |
1842 |
branchcode => $hold->branchcode, |
1840 |
branchcode => $hold->branchcode, |
1843 |
lang => $patron->lang, |
1841 |
lang => $patron->lang, |
1844 |
tables => { |
1842 |
tables => { |
1845 |
'branches' => $library, |
1843 |
'branches' => $library->unblessed, |
1846 |
'borrowers' => $patron->unblessed, |
1844 |
'borrowers' => $patron->unblessed, |
1847 |
'biblio' => $hold->biblionumber, |
1845 |
'biblio' => $hold->biblionumber, |
1848 |
'biblioitems' => $hold->biblionumber, |
1846 |
'biblioitems' => $hold->biblionumber, |
Lines 1866-1872
sub _koha_notify_reserve {
Link Here
|
1866 |
C4::Letters::EnqueueLetter( { |
1864 |
C4::Letters::EnqueueLetter( { |
1867 |
letter => $letter, |
1865 |
letter => $letter, |
1868 |
borrowernumber => $borrowernumber, |
1866 |
borrowernumber => $borrowernumber, |
1869 |
from_address => $admin_email_address, |
1867 |
from_address => $inbound_email_address, |
1870 |
message_transport_type => $mtt, |
1868 |
message_transport_type => $mtt, |
1871 |
} ); |
1869 |
} ); |
1872 |
}; |
1870 |
}; |
Lines 1887-1923
sub _koha_notify_reserve {
Link Here
|
1887 |
&$send_notification('print', 'HOLD'); |
1885 |
&$send_notification('print', 'HOLD'); |
1888 |
} |
1886 |
} |
1889 |
|
1887 |
|
1890 |
if ($notify_library) { |
|
|
1891 |
my $letter = C4::Letters::GetPreparedLetter( |
1892 |
module => 'reserves', |
1893 |
letter_code => 'HOLD_CHANGED', |
1894 |
branchcode => $hold->branchcode, |
1895 |
substitute => { today => output_pref( dt_from_string ) }, |
1896 |
tables => { |
1897 |
'branches' => $library, |
1898 |
'borrowers' => $patron->unblessed, |
1899 |
'biblio' => $hold->biblionumber, |
1900 |
'biblioitems' => $hold->biblionumber, |
1901 |
'reserves' => $hold->unblessed, |
1902 |
'items' => $hold->itemnumber, |
1903 |
}, |
1904 |
); |
1905 |
|
1906 |
my $email = |
1907 |
C4::Context->preference('ExpireReservesAutoFillEmail') |
1908 |
|| $library->{branchemail} |
1909 |
|| C4::Context->preference('KohaAdminEmailAddress'); |
1910 |
|
1911 |
C4::Letters::EnqueueLetter( |
1912 |
{ |
1913 |
letter => $letter, |
1914 |
borrowernumber => $borrowernumber, |
1915 |
message_transport_type => 'email', |
1916 |
from_address => $email, |
1917 |
to_address => $email, |
1918 |
} |
1919 |
); |
1920 |
} |
1921 |
} |
1888 |
} |
1922 |
|
1889 |
|
1923 |
=head2 _koha_notify_hold_changed |
1890 |
=head2 _koha_notify_hold_changed |
Lines 1951-1958
sub _koha_notify_hold_changed {
Link Here
|
1951 |
|
1918 |
|
1952 |
my $email = |
1919 |
my $email = |
1953 |
C4::Context->preference('ExpireReservesAutoFillEmail') |
1920 |
C4::Context->preference('ExpireReservesAutoFillEmail') |
1954 |
|| $library->branchemail |
1921 |
|| $library->inbound_email_address; |
1955 |
|| C4::Context->preference('KohaAdminEmailAddress'); |
|
|
1956 |
|
1922 |
|
1957 |
C4::Letters::EnqueueLetter( |
1923 |
C4::Letters::EnqueueLetter( |
1958 |
{ |
1924 |
{ |