View | Details | Raw Unified | Return to bug 6673
Collapse All | Expand All

(-)a/labels/label-edit-batch.pl (-1 / +1 lines)
Lines 61-67 my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); Link Here
61
my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
61
my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number');
62
my $barcode = $cgi->param('barcode') if $cgi->param('barcode');
62
my $barcode = $cgi->param('barcode') if $cgi->param('barcode');
63
63
64
my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'});
64
my $branch_code = C4::Context->userenv->{'branch'};
65
65
66
if ($op eq 'remove') {
66
if ($op eq 'remove') {
67
    $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
67
    $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id);
(-)a/labels/label-manage.pl (-1 / +1 lines)
Lines 74-80 my $op = $cgi->param('op') || 'none'; Link Here
74
my $element_id = $cgi->param('element_id') || undef;
74
my $element_id = $cgi->param('element_id') || undef;
75
my $error = $cgi->param('error') || 0;
75
my $error = $cgi->param('error') || 0;
76
76
77
my $branch_code = ($label_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : '');
77
my $branch_code = ($label_element eq 'batch' ? C4::Context->userenv->{'branch'} : '');
78
78
79
if ($op eq 'delete') {
79
if ($op eq 'delete') {
80
    if          ($label_element eq 'layout')    {$error = C4::Labels::Layout::delete(layout_id => $element_id);}
80
    if          ($label_element eq 'layout')    {$error = C4::Labels::Layout::delete(layout_id => $element_id);}
(-)a/patroncards/edit-batch.pl (-1 / +1 lines)
Lines 60-66 my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); Link Here
60
my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number');
60
my @borrower_numbers = $cgi->param('borrower_number') if $cgi->param('borrower_number');
61
my $errstr = $cgi->param('error') || '';
61
my $errstr = $cgi->param('error') || '';
62
62
63
my $branch_code = get_branch_code_from_name($template->{VARS}->{'LoginBranchname'});
63
my $branch_code = C4::Context->userenv->{'branch'};
64
64
65
if ($op eq 'remove') {
65
if ($op eq 'remove') {
66
    $batch = C4::Patroncards::Batch->retrieve(batch_id => $batch_id);
66
    $batch = C4::Patroncards::Batch->retrieve(batch_id => $batch_id);
(-)a/patroncards/manage.pl (-1 / +1 lines)
Lines 73-79 my $display_columns = { layout => [ # db column => {col label Link Here
73
};
73
};
74
74
75
my $errstr = ($cgi->param('error') ? $cgi->param('error') : '');
75
my $errstr = ($cgi->param('error') ? $cgi->param('error') : '');
76
my $branch_code = ($card_element eq 'batch' ? get_branch_code_from_name($template->{VARS}->{'LoginBranchname'}) : '');
76
my $branch_code = ($card_element eq 'batch' ? C4::Context->userenv->{'branch'} : '');
77
77
78
if ($op eq 'delete') {
78
if ($op eq 'delete') {
79
    my $err = 0;
79
    my $err = 0;
(-)a/tools/manage-marc-import.pl (-2 / +1 lines)
Lines 189-195 sub redo_matching { Link Here
189
sub create_labelbatch_from_importbatch {
189
sub create_labelbatch_from_importbatch {
190
	my ($batch_id) = @_;
190
	my ($batch_id) = @_;
191
        my $err = undef;
191
        my $err = undef;
192
        my $branch_code = get_branch_code_from_name($template->param('LoginBranchname'));
192
        my $branch_code = C4::Context->userenv->{'branch'};
193
        my $batch = C4::Labels::Batch->new(branch_code => $branch_code);
193
        my $batch = C4::Labels::Batch->new(branch_code => $branch_code);
194
	my @items = GetItemNumbersFromImportBatch($batch_id);
194
	my @items = GetItemNumbersFromImportBatch($batch_id);
195
        if (grep{$_ == 0} @items) {
195
        if (grep{$_ == 0} @items) {
196
- 

Return to bug 6673