X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=labels%2Flabel-edit-batch.pl;h=aea4742034ea461c3c0f6970d22ea328faf91686;hb=5d6c092921919526ade501facb1220f8a108a08f;hp=370807ca6f31c63a14b4af6c0f804c87e5a2ac2b;hpb=f0fc240e91634bc538a527b79d0fae4af96abaa0;p=koha_fer diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 370807ca6f..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') || (); -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);