Lines 207-214
sub GetLettersAvailableForALibrary {
Link Here
|
207 |
our %letter; |
207 |
our %letter; |
208 |
sub getletter { |
208 |
sub getletter { |
209 |
my ( $module, $code, $branchcode, $message_transport_type ) = @_; |
209 |
my ( $module, $code, $branchcode, $message_transport_type ) = @_; |
210 |
$message_transport_type ||= 'email'; |
210 |
$message_transport_type //= '%'; |
211 |
|
|
|
212 |
|
211 |
|
213 |
if ( C4::Context->preference('IndependentBranches') |
212 |
if ( C4::Context->preference('IndependentBranches') |
214 |
and $branchcode |
213 |
and $branchcode |
Lines 226-233
sub getletter {
Link Here
|
226 |
my $sth = $dbh->prepare(q{ |
225 |
my $sth = $dbh->prepare(q{ |
227 |
SELECT * |
226 |
SELECT * |
228 |
FROM letter |
227 |
FROM letter |
229 |
WHERE module=? AND code=? AND (branchcode = ? OR branchcode = '') AND message_transport_type = ? |
228 |
WHERE module=? AND code=? AND (branchcode = ? OR branchcode = '') |
230 |
ORDER BY branchcode DESC LIMIT 1 |
229 |
AND message_transport_type LIKE ? |
231 |
}); |
230 |
}); |
232 |
$sth->execute( $module, $code, $branchcode, $message_transport_type ); |
231 |
$sth->execute( $module, $code, $branchcode, $message_transport_type ); |
233 |
my $line = $sth->fetchrow_hashref |
232 |
my $line = $sth->fetchrow_hashref |
Lines 237-242
sub getletter {
Link Here
|
237 |
return { %$line }; |
236 |
return { %$line }; |
238 |
} |
237 |
} |
239 |
|
238 |
|
|
|
239 |
|
240 |
=head2 DelLetter |
240 |
=head2 DelLetter |
241 |
|
241 |
|
242 |
DelLetter( |
242 |
DelLetter( |
243 |
- |
|
|