Merge remote-tracking branch 'origin/new/bug_8606'
This commit is contained in:
commit
050f932b3b
2 changed files with 13 additions and 13 deletions
|
@ -148,9 +148,12 @@ my %letter;
|
||||||
sub getletter {
|
sub getletter {
|
||||||
my ( $module, $code, $branchcode ) = @_;
|
my ( $module, $code, $branchcode ) = @_;
|
||||||
|
|
||||||
|
$branchcode ||= '';
|
||||||
|
|
||||||
if ( C4::Context->preference('IndependantBranches')
|
if ( C4::Context->preference('IndependantBranches')
|
||||||
and $branchcode
|
and $branchcode
|
||||||
and C4::Context->userenv ) {
|
and C4::Context->userenv ) {
|
||||||
|
|
||||||
$branchcode = C4::Context->userenv->{'branch'};
|
$branchcode = C4::Context->userenv->{'branch'};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,20 +127,17 @@ foreach my $type (@types) {
|
||||||
my $date = C4::Dates->new( $issues->{'date_due'}, 'iso' );
|
my $date = C4::Dates->new( $issues->{'date_due'}, 'iso' );
|
||||||
my $due_date = $date->output('metric');
|
my $due_date = $date->output('metric');
|
||||||
|
|
||||||
# gets the placeholder message, and enqueues the letter
|
my $letter = C4::Letters::GetPreparedLetter(
|
||||||
my $letter = getletter( $module, $code );
|
module => $module,
|
||||||
die "No letter found for type $type!... dying\n" unless $letter;
|
letter_code => $code,
|
||||||
|
tables => {
|
||||||
|
borrowers => $issues->{'borrowernumber'},
|
||||||
|
biblio => $issues->{'biblionumber'},
|
||||||
|
biblioitems => $issues->{'biblionumber'}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
# covers basic variable parsing in letter
|
die "No letter found for type $type!... dying\n" unless $letter;
|
||||||
$letter =
|
|
||||||
C4::Letters::parseletter( $letter, 'borrowers',
|
|
||||||
$issues->{'borrowernumber'} );
|
|
||||||
$letter =
|
|
||||||
C4::Letters::parseletter( $letter, 'biblio',
|
|
||||||
$issues->{'biblionumber'} );
|
|
||||||
$letter =
|
|
||||||
C4::Letters::parseletter( $letter, 'biblioitems',
|
|
||||||
$issues->{'biblionumber'} );
|
|
||||||
|
|
||||||
my $message_id = 0;
|
my $message_id = 0;
|
||||||
if ($outfile) {
|
if ($outfile) {
|
||||||
|
|
Loading…
Reference in a new issue