Bug 6343: TT issues in label creator

- 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 <chris@bigballofwax.co.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
This commit is contained in:
Katrin Fischer 2011-05-20 21:14:56 +02:00 committed by Chris Cormack
parent fafbff9018
commit f515052d6e
3 changed files with 3 additions and 3 deletions

View file

@ -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&amp;batch_id=[% text_field.batch_id %]&amp;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&amp;batch_id=[% batch_id %]&amp;item_number=[% text_field.field_value %]">Add</a>
</td>
[% ELSE %]
<td align="center">[% text_field.field_value %]</td>

View file

@ -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);

View file

@ -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);}