From 514cf7a0f6d584afbd38c6b3272a86360aae89e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 29 Mar 2015 11:44:19 +0200 Subject: [PATCH] Bug 8796 - patron cards not starting on designated card The patron cards always printed from position 1 on the print form, because patroncards/create-pdf.pl expected start_label as parameter and got star_card instead. To verify and test: 1) Go to Home > Tools >Patron card creator >Manage batches 2) Select a batch anc click "Export" 3) Set "Enter starting card number" e.g. to 5 4) Export 5) Download PDF and view it Result: The first card is always printed on position 1 (top left) instead of position 5. Apply patch Repeat steps above Step 3) should now read "Enter starting card position" Result after step 5) The first card ist printed at the correct position on the printing form. Signed-off-by: Josef Moravec Works as expected Signed-off-by: Katrin Fischer Rebased to apply on master / MV --- koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt | 2 +- patroncards/create-pdf.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt index e8563b9..fd33c3f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/print.tt @@ -82,7 +82,7 @@
  • - +
  • diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl index 37df606..9f124a8 100755 --- a/patroncards/create-pdf.pl +++ b/patroncards/create-pdf.pl @@ -48,7 +48,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id'); my $template_id = $cgi->param('template_id') || undef; my $layout_id = $cgi->param('layout_id') || undef; -my $start_label = $cgi->param('start_label') || 1; +my $start_card = $cgi->param('start_card') || 1; my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number'); @@ -78,7 +78,7 @@ $pdf->Compress(1); # comment this out to debug pdf files, but be sure to uncomme $pdf->Mbox($lower_left_x, $lower_left_y, $upper_right_x, $upper_right_y); my ($llx, $lly) = 0,0; -(undef, undef, $llx, $lly) = $pc_template->get_label_position($start_label); +(undef, undef, $llx, $lly) = $template->get_label_position($start_card); if (@label_ids) { my $batch_items = $batch->get_attr('items'); -- 1.7.10.4