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

(-)a/C4/Koha.pm (+22 lines)
Lines 55-60 BEGIN { Link Here
55
		&GetAuthorisedValueCategories
55
		&GetAuthorisedValueCategories
56
		&GetKohaAuthorisedValues
56
		&GetKohaAuthorisedValues
57
		&GetKohaAuthorisedValuesFromField
57
		&GetKohaAuthorisedValuesFromField
58
    &GetKohaAuthorisedValueLib
58
		&GetAuthValCode
59
		&GetAuthValCode
59
		&GetNormalizedUPC
60
		&GetNormalizedUPC
60
		&GetNormalizedISBN
61
		&GetNormalizedISBN
Lines 1188-1193 sub GetKohaAuthorisedValuesFromField { Link Here
1188
  }
1189
  }
1189
}
1190
}
1190
1191
1192
=head2 GetKohaAuthorisedValueLib
1193
1194
Takes $category, $authorised_value as parameters.
1195
1196
If $opac parameter is set to a true value, displays OPAC descriptions rather than normal ones when they exist.
1197
1198
Returns authorised value description
1199
1200
=cut
1201
1202
sub GetKohaAuthorisedValueLib {
1203
  my ($category,$authorised_value,$opac) = @_;
1204
  my $value;
1205
  my $dbh = C4::Context->dbh;
1206
  my $sth = $dbh->prepare("select lib, lib_opac from authorised_values where category=? and authorised_value=?");
1207
  $sth->execute($category,$authorised_value);
1208
  my $data = $sth->fetchrow_hashref;
1209
  $value = ($opac && $$data{'lib_opac'}) ? $$data{'lib_opac'} : $$data{'lib'};
1210
  return $value;
1211
}
1212
1191
=head2 display_marc_indicators
1213
=head2 display_marc_indicators
1192
1214
1193
  my $display_form = C4::Koha::display_marc_indicators($field);
1215
  my $display_form = C4::Koha::display_marc_indicators($field);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tmpl (-1 / +4 lines)
Lines 1007-1013 $(document).ready(function() { Link Here
1007
        </li>
1007
        </li>
1008
        <li>
1008
        <li>
1009
            <label for="location">Location:</label>
1009
            <label for="location">Location:</label>
1010
            <input type="text" name="location" id="location" value="<!-- TMPL_VAR name="location" -->" size="30" />
1010
            <select name="location" id="location">
1011
                <option value="">None</option>
1012
                <!-- TMPL_LOOP NAME="locations_loop" --><!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="authorised_value" -->" selected="selected"><!-- TMPL_VAR NAME="lib" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="authorised_value" -->"><!-- TMPL_VAR NAME="lib" --></option><!-- /TMPL_IF --><!-- /TMPL_LOOP -->
1013
            </select>
1011
        </li>
1014
        </li>
1012
         <li>
1015
         <li>
1013
            <label for="callnumber">Call Number:</label>
1016
            <label for="callnumber">Call Number:</label>
(-)a/serials/subscription-add.pl (+4 lines)
Lines 128-135 for my $thisbranch (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{b Link Here
128
        branchname => $branches->{$thisbranch}->{'branchname'},
128
        branchname => $branches->{$thisbranch}->{'branchname'},
129
    };
129
    };
130
}
130
}
131
132
my $locations_loop = GetAuthorisedValues("LOC",$subs->{'location'});
133
131
$template->param(branchloop => $branchloop,
134
$template->param(branchloop => $branchloop,
132
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
135
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
136
    locations_loop=>$locations_loop,
133
);
137
);
134
my $count = 0;
138
my $count = 0;
135
# prepare template variables common to all $op conditions:
139
# prepare template variables common to all $op conditions:
(-)a/serials/subscription-detail.pl (-3 / +1 lines)
Lines 93-99 if ($op eq 'del') { Link Here
93
    }
93
    }
94
}
94
}
95
my $hasRouting = check_routing($subscriptionid);
95
my $hasRouting = check_routing($subscriptionid);
96
my ($totalissues,@serialslist) = GetSerials($subscriptionid);
97
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
96
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
98
# the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...)
97
# the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...)
99
98
Lines 106-113 my ($user, $sessionID, $flags); Link Here
106
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){
105
for my $date qw(startdate enddate firstacquidate histstartdate histenddate){
107
    $$subs{$date}      = format_date($$subs{$date}) if $date && $$subs{$date};
106
    $$subs{$date}      = format_date($$subs{$date}) if $date && $$subs{$date};
108
}
107
}
108
$subs->{location} = GetKohaAuthorisedValueLib("LOC",$subs->{location});
109
$subs->{abouttoexpire}  = abouttoexpire($subs->{subscriptionid});
109
$subs->{abouttoexpire}  = abouttoexpire($subs->{subscriptionid});
110
111
$template->param($subs);
110
$template->param($subs);
112
$template->param(biblionumber_for_new_subscription => $subs->{bibnum});
111
$template->param(biblionumber_for_new_subscription => $subs->{bibnum});
113
my @irregular_issues = split /,/, $subs->{irregularity};
112
my @irregular_issues = split /,/, $subs->{irregularity};
114
- 

Return to bug 3285