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

(-)a/admin/aqbudgets.pl (-1 / +5 lines)
Lines 323-329 if ($op eq 'add_form') { Link Here
323
        );
323
        );
324
    }
324
    }
325
325
326
    my $budget_period_total = $num->format_price($$period{budget_period_total}) if $$period{budget_period_total};
326
    my $budget_period_total;
327
    if ( $period->{budget_period_total} ) {
328
        $budget_period_total =
329
          $num->format_price( $period->{budget_period_total} );
330
    }
327
    $template->param(
331
    $template->param(
328
        else                   => 1,
332
        else                   => 1,
329
        budget                 => \@loop,
333
        budget                 => \@loop,
(-)a/admin/aqcontract.pl (-11 / +23 lines)
Lines 59-75 $template->param( Link Here
59
if ( $op eq 'add_form' ) {
59
if ( $op eq 'add_form' ) {
60
    $template->param( add_form => 1 );
60
    $template->param( add_form => 1 );
61
61
62
    # if contractnumber exists, it's a modify action, so read values to modify...
62
   # if contractnumber exists, it's a modify action, so read values to modify...
63
    my $contract = @{GetContract( { contractnumber => $contractnumber } )}[0] if $contractnumber;
63
    if ($contractnumber) {
64
64
        my $contract =
65
    $template->param(
65
          @{ GetContract( { contractnumber => $contractnumber } ) }[0];
66
        contractnumber           => $$contract{contractnumber},
66
67
        contractname             => $$contract{contractname},
67
        $template->param(
68
        contractdescription      => $$contract{contractdescription},
68
            contractnumber      => $contract->{contractnumber},
69
        contractstartdate        => format_date( $$contract{contractstartdate} ),
69
            contractname        => $contract->{contractname},
70
        contractenddate          => format_date( $$contract{contractenddate} ),
70
            contractdescription => $contract->{contractdescription},
71
        DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar,
71
            contractstartdate => format_date( $contract->{contractstartdate} ),
72
    );
72
            contractenddate   => format_date( $contract->{contractenddate} ),
73
            DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar,
74
        );
75
    } else {
76
        $template->param(
77
            contractnumber           => undef,
78
            contractname             => undef,
79
            contractdescription      => undef,
80
            contractstartdate        => undef,
81
            contractenddate          => undef,
82
            DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar,
83
        );
84
    }
73
85
74
    # END $OP eq ADD_FORM
86
    # END $OP eq ADD_FORM
75
}
87
}
(-)a/admin/auth_tag_structure.pl (-9 / +8 lines)
Lines 55-69 my ($template, $loggedinuser, $cookie) Link Here
55
			     });
55
			     });
56
56
57
# get authtype list
57
# get authtype list
58
my $authtypes = getauthtypes;
58
my $authtypes     = getauthtypes;
59
my @authtypesloop;
59
my @authtypesloop = ();
60
foreach my $thisauthtype (keys %$authtypes) {
60
foreach my $thisauthtype ( keys %{$authtypes} ) {
61
	my $selected = 1 if $thisauthtype eq $authtypecode;
61
    push @authtypesloop,
62
	my %row =(value => $thisauthtype,
62
      { value        => $thisauthtype,
63
				selected => $selected,
63
        selected     => $thisauthtype eq $authtypecode,
64
				authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'},
64
        authtypetext => $authtypes->{$thisauthtype}->{'authtypetext'},
65
			);
65
      };
66
	push @authtypesloop, \%row;
67
}
66
}
68
67
69
my $sth;
68
my $sth;
(-)a/admin/branches.pl (-5 / +3 lines)
Lines 189-200 elsif ( $op eq 'addcategory_validate' ) { Link Here
189
elsif ( $op eq 'delete_category' ) {
189
elsif ( $op eq 'delete_category' ) {
190
190
191
    # if the user has pressed the "delete branch" button.
191
    # if the user has pressed the "delete branch" button.
192
    my $message = "MESSAGE8" if CheckBranchCategorycode($categorycode);
192
    if ( CheckBranchCategorycode($categorycode) ) {
193
    if ($message) {
194
        $template->param( else => 1 );
193
        $template->param( else => 1 );
195
        default($message,$template);
194
        default( 'MESSAGE8', $template );
196
    }
195
    } else {
197
    else {
198
        $template->param( delete_category => 1 );
196
        $template->param( delete_category => 1 );
199
        $template->param( categorycode    => $categorycode );
197
        $template->param( categorycode    => $categorycode );
200
    }
198
    }
(-)a/admin/smart-rules.pl (-8 / +6 lines)
Lines 339-350 elsif ($op eq "add-branch-item") { Link Here
339
my $branches = GetBranches();
339
my $branches = GetBranches();
340
my @branchloop;
340
my @branchloop;
341
for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
341
for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
342
    my $selected = 1 if $thisbranch eq $branch;
342
    push @branchloop, {
343
    my %row =(value => $thisbranch,
343
        value      => $thisbranch,
344
                selected => $selected,
344
        selected   => $thisbranch eq $branch,
345
                branchname => $branches->{$thisbranch}->{'branchname'},
345
        branchname => $branches->{$thisbranch}->{'branchname'},
346
            );
346
    };
347
    push @branchloop, \%row;
348
}
347
}
349
348
350
my $sth=$dbh->prepare("SELECT description,categorycode FROM categories ORDER BY description");
349
my $sth=$dbh->prepare("SELECT description,categorycode FROM categories ORDER BY description");
Lines 426-432 foreach my $entry (@sorted_branch_cat_rules, @sorted_row_loop) { Link Here
426
    $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty});
425
    $entry->{unlimited_maxissueqty} = 1 unless defined($entry->{maxissueqty});
427
}
426
}
428
427
429
my @sorted_row_loop = sort by_category_and_itemtype @row_loop;
428
@sorted_row_loop = sort by_category_and_itemtype @row_loop;
430
429
431
my $sth_branch_item;
430
my $sth_branch_item;
432
if ($branch eq "*") {
431
if ($branch eq "*") {
433
- 

Return to bug 5453