This followup fixes duplex printing with patron lists.
Additionaly, it uses simple copy instead of clone and removes a
superfluous line, see comments #15 - #17
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
[% ELSIF ( patronlist_id && template_id && layout_id ) %]
<h3>Click on the link to download the patron cards from the patron list.</h3>
<p>
- <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id %]&template_id=[% template_id %]&layout_id=[% layout_id %]&start_card=[% start_card %]">label_patronlist_[% patronlist_id %].pdf</a>
+ <a class="document pdf" href="/cgi-bin/koha/patroncards/create-pdf.pl?patronlist_id=[% patronlist_id %]&template_id=[% template_id %]&layout_id=[% layout_id %]&layout_back_id=[% layout_back_id %]&start_card=[% start_card %]">label_patronlist_[% patronlist_id %].pdf</a>
</p>
[% ELSE %]
<h3>
use XML::Simple;
use POSIX qw(ceil);
use autouse 'Data::Dumper' => qw(Dumper);
-use Clone qw(clone);
use C4::Debug;
use C4::Context;
CARD_ITEMS:
foreach my $item (@{$items}) {
if ($item) {
-
-#my $print_layout_xml = $layout_back_xml;
my $print_layout_xml = (( ($cardscount % 2 == 1) && ( $layout_back_id ) ) ?
- clone($layout_back_xml) : clone($layout_xml) );
+ $layout_back_xml : $layout_xml );
$cardscount ++;
my $borrower_number = $item->{'borrower_number'};