Bug 11760: In notices, output road type description rather than code
Test plan :
- Define a notice containing <<borrowers.streettype>>
- Trigger an event that generate this notice
Without patch <<borrowers.streettype>> is replaced by ROADTYPE
authorised value code. With the patch it is resplaced by its
description
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described, passes tests and QA script.
Note: it seems it's not possible currently to use B_streettype from
the interface, but it might be worth adding it as a follow up for later
use.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b5d85741a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
b612cbfc9c
commit
7fbdda3e04
|
|
@ -23,6 +23,7 @@ use warnings;
|
|||
use MIME::Lite;
|
||||
use Mail::Sendmail;
|
||||
|
||||
use C4::Koha qw(GetAuthorisedValueByCode);
|
||||
use C4::Members;
|
||||
use C4::Members::Attributes qw(GetBorrowerAttributes);
|
||||
use C4::Branch;
|
||||
|
|
@ -637,6 +638,7 @@ sub _parseletter {
|
|||
#Therefore adding the test on biblio. This includes biblioitems,
|
||||
#but excludes items. Removed unneeded global and lookahead.
|
||||
|
||||
$val = GetAuthorisedValueByCode ('ROADTYPE', $val, 0) if $table=~/^borrowers$/ && $field=~/^streettype$/;
|
||||
my $replacedby = defined ($val) ? $val : '';
|
||||
($letter->{title} ) and do {
|
||||
$letter->{title} =~ s/$replacetablefield/$replacedby/g;
|
||||
|
|
|
|||
Loading…
Reference in New Issue