From: Katrin Fischer <[email protected]> - Manage Batch had no branch set - New Batch had no branch set - Add link on item result list was broken, missing the batchid
To test: Create a new batch and add items one by one. Look at 'Manage batches'. Check that the branch in the top right corner is always correctly shown and set. Signed-off-by: Chris Cormack <[email protected]> --- .../intranet-tmpl/prog/en/modules/labels/result.tt | 2 +- labels/label-edit-batch.pl | 2 +- labels/label-manage.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt index 16bbf25..4513a25 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt @@ -93,7 +93,7 @@ <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]"></td> [% ELSIF ( text_field.link_field ) %] <td align="center"> - <a onclick="add_item('[% text_field.field_value %]',[% text_field.batch_id %], '[% text_field.type %]'); return false" href="/cgi-bin/koha/barcodes/label-edit-batch.pl?op=add&batch_id=[% text_field.batch_id %]&item_number=[% text_field.field_value %]">Add</a> + <a onclick="add_item('[% text_field.field_value %]',[% batch_id %], '[% text_field.type %]'); return false" href="/cgi-bin/koha/barcodes/label-edit-batch.pl?op=add&batch_id=[% batch_id %]&item_number=[% text_field.field_value %]">Add</a> </td> [% ELSE %] <td align="center">[% text_field.field_value %]</td> diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 8f89597..29d2dd3 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -61,7 +61,7 @@ my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my $barcode = $cgi->param('barcode') if $cgi->param('barcode'); -my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); +my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}); if ($op eq 'remove') { $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); diff --git a/labels/label-manage.pl b/labels/label-manage.pl index 197c8d4..70302e8 100755 --- a/labels/label-manage.pl +++ b/labels/label-manage.pl @@ -74,7 +74,7 @@ my $op = $cgi->param('op') || 'none'; my $element_id = $cgi->param('element_id') || undef; my $error = $cgi->param('error') || 0; -my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->param('LoginBranchname')) : ''); +my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : ''); if ($op eq 'delete') { if ($label_element eq 'layout') {$error = C4::Labels::Layout::delete(layout_id => $element_id);} -- 1.7.2.2 _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
