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

(-)a/C4/Serials.pm (-1 / +1 lines)
Lines 1034-1040 sub GetExpirationDate { Link Here
1034
    return if ( scalar(@date) != 3 || not check_date(@date) );
1034
    return if ( scalar(@date) != 3 || not check_date(@date) );
1035
    my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});
1035
    my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});
1036
    if ( $frequency and $frequency->{unit} ) {
1036
    if ( $frequency and $frequency->{unit} ) {
1037
 
1037
1038
        # If Not Irregular
1038
        # If Not Irregular
1039
        if ( my $length = $subscription->{numberlength} ) {
1039
        if ( my $length = $subscription->{numberlength} ) {
1040
1040
(-)a/C4/Serials/Frequency.pm (-2 / +2 lines)
Lines 129-135 sub AddSubscriptionFrequency { Link Here
129
    my $frequency = shift;
129
    my $frequency = shift;
130
130
131
    unless(ref($frequency) eq 'HASH' && defined $frequency->{'description'} && $frequency->{'description'} ne '') {
131
    unless(ref($frequency) eq 'HASH' && defined $frequency->{'description'} && $frequency->{'description'} ne '') {
132
        return undef;
132
        return;
133
    }
133
    }
134
134
135
    my @keys;
135
    my @keys;
Lines 201-207 sub ModSubscriptionFrequency { Link Here
201
        || !defined $frequency->{'description'}
201
        || !defined $frequency->{'description'}
202
      )
202
      )
203
    ) {
203
    ) {
204
        return undef;
204
        return;
205
    }
205
    }
206
206
207
    my @keys;
207
    my @keys;
(-)a/C4/Serials/Numberpattern.pm (-2 / +2 lines)
Lines 143-149 sub AddSubscriptionNumberpattern { Link Here
143
      && defined $numberpattern->{'numberingmethod'}
143
      && defined $numberpattern->{'numberingmethod'}
144
      && $numberpattern->{'numberingmethod'} ne ''
144
      && $numberpattern->{'numberingmethod'} ne ''
145
    ) {
145
    ) {
146
        return undef;
146
        return;
147
    }
147
    }
148
148
149
    my @keys;
149
    my @keys;
Lines 206-212 sub ModSubscriptionNumberpattern { Link Here
206
        || !defined $numberpattern->{'numberingmethod'}
206
        || !defined $numberpattern->{'numberingmethod'}
207
      )
207
      )
208
    ) {
208
    ) {
209
        return undef;
209
        return;
210
    }
210
    }
211
211
212
    my @keys;
212
    my @keys;
(-)a/serials/create-numberpattern.pl (-1 / +1 lines)
Lines 37-42 if($rv == 0) { Link Here
37
    ModSubscriptionNumberpattern($numberpattern);
37
    ModSubscriptionNumberpattern($numberpattern);
38
}
38
}
39
39
40
binmode STDOUT, ":utf8";
40
binmode STDOUT, ":encoding(UTF-8)";
41
print $input->header(-type => 'text/plain', -charset => 'UTF-8');
41
print $input->header(-type => 'text/plain', -charset => 'UTF-8');
42
print "{\"numberpatternid\":\"$numberpatternid\"}";
42
print "{\"numberpatternid\":\"$numberpatternid\"}";
(-)a/serials/subscription-add.pl (-7 / +7 lines)
Lines 92-104 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
92
    $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate} eq $firstissuedate ;
92
    $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate} eq $firstissuedate ;
93
    $subs->{nextacquidate} = $nextexpected->{planneddate}  if($op eq 'modify');
93
    $subs->{nextacquidate} = $nextexpected->{planneddate}  if($op eq 'modify');
94
    unless($op eq 'modsubscription') {
94
    unless($op eq 'modsubscription') {
95
		foreach my $length_unit (qw(numberlength weeklength monthlength)){
95
        foreach my $length_unit (qw(numberlength weeklength monthlength)){
96
			if ($subs->{$length_unit}){
96
            if ($subs->{$length_unit}){
97
				$sub_length=$subs->{$length_unit};
97
                $sub_length=$subs->{$length_unit};
98
				$sub_on=$length_unit;
98
                $sub_on=$length_unit;
99
				last;
99
                last;
100
			}
100
            }
101
		}
101
        }
102
102
103
        $template->param( %{$subs} );
103
        $template->param( %{$subs} );
104
        $template->param(
104
        $template->param(
(-)a/serials/subscription-frequency.pl (-1 / +1 lines)
Lines 14-19 if ($auth_status ne "ok") { Link Here
14
    exit 0;
14
    exit 0;
15
}
15
}
16
my $frequencyrecord=GetSubscriptionFrequency($frqid);
16
my $frequencyrecord=GetSubscriptionFrequency($frqid);
17
binmode STDOUT, ":utf8";
17
binmode STDOUT, ":encoding(UTF-8)";
18
print $input->header(-type => 'text/plain', -charset => 'UTF-8');
18
print $input->header(-type => 'text/plain', -charset => 'UTF-8');
19
print "{".join (",",map { "\"$_\":\"".uri_escape($frequencyrecord->{$_})."\"" }sort keys %$frequencyrecord)."}";
19
print "{".join (",",map { "\"$_\":\"".uri_escape($frequencyrecord->{$_})."\"" }sort keys %$frequencyrecord)."}";
(-)a/serials/subscription-numberpattern.pl (-2 / +1 lines)
Lines 10-15 my $input=new CGI; Link Here
10
my $numpatternid=$input->param("numberpattern_id");
10
my $numpatternid=$input->param("numberpattern_id");
11
11
12
my $numberpatternrecord=GetSubscriptionNumberpattern($numpatternid);
12
my $numberpatternrecord=GetSubscriptionNumberpattern($numpatternid);
13
binmode STDOUT, ":utf8";
13
binmode STDOUT, ":encoding(UTF-8)";
14
print $input->header(-type => 'text/plain', -charset => 'UTF-8');
14
print $input->header(-type => 'text/plain', -charset => 'UTF-8');
15
print "{",join (",",map {"\"$_\":\"".(uri_escape($numberpatternrecord->{$_}) // '')."\"" }sort keys %$numberpatternrecord),"}";
15
print "{",join (",",map {"\"$_\":\"".(uri_escape($numberpatternrecord->{$_}) // '')."\"" }sort keys %$numberpatternrecord),"}";
16
- 

Return to bug 7688