X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=labels%2Flabel-edit-batch.pl;h=aea4742034ea461c3c0f6970d22ea328faf91686;hb=8e442955247e925dacf303455f40522a89a349b2;hp=8f8959760a5cbcede1b5f1828209f6cce702ecd1;hpb=a8222aeeb1169d7b1939d1e64c319a16e3846e8c;p=koha_fer diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 8f8959760a..aea4742034 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -26,10 +26,9 @@ use CGI; use C4::Auth qw(get_template_and_user); use C4::Output qw(output_html_with_http_headers); -use C4::Branch qw(get_branch_code_from_name); use C4::Items qw(GetItemnumberFromBarcode); -use C4::Creators 1.000000; -use C4::Labels 1.000000; +use C4::Creators; +use C4::Labels; my $cgi = new CGI; my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -56,12 +55,15 @@ my $display_columns = [ {_label_number => {label => 'Label Number', link_field {select => {label => 'Select', value => '_label_id'}}, ]; my $op = $cgi->param('op') || 'edit'; +my @label_ids; +my @item_numbers; +my $barcode; my $batch_id = $cgi->param('element_id') || $cgi->param('batch_id') || undef; -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'); +@label_ids = $cgi->param('label_id') if $cgi->param('label_id'); +@item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); +$barcode = $cgi->param('barcode') if $cgi->param('barcode'); -my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); +my $branch_code = C4::Context->userenv->{'branch'}; if ($op eq 'remove') { $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);