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