Bug 8700 - RESERVESLIP fields not being replaced correctly

The slip RESERVESLIP is not replacing fields correctly.
C4::Reserves::ReserveSlip calls C4::Letters::GetPreparedLetter,
and passes the $reserve hashref to it for each table except branches
( which is passed the branchcode ). The problem is, if you pass a
hashref for a table, it uses that hashref for the replacing, rather
than looking up the data from the database.

Fixed by passing the correct keys for each of the tables requested.

Signed-off-by: Marc Veron <veron@veron.ch>

Tested following the test plan.
Could reproduce the bug.
After applying the patch slip printed as expected.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Kyle M Hall 2012-08-29 08:44:26 -04:00 committed by Paul Poulain
parent d51f822a5b
commit a7ef547ec9
1 changed files with 3 additions and 3 deletions

View File

@ -2081,9 +2081,9 @@ sub ReserveSlip {
tables => {
'reserves' => $reserve,
'branches' => $reserve->{branchcode},
'borrowers' => $reserve,
'biblio' => $reserve,
'items' => $reserve,
'borrowers' => $reserve->{borrowernumber},
'biblio' => $reserve->{biblionumber},
'items' => $reserve->{itemnumber},
},
);
}