@@ -, +, @@
---
C4/Serials.pm | 11 ++++++++++-
.../prog/en/modules/serials/subscription-add.tt | 5 +++++
2 files changed, 15 insertions(+), 1 deletions(-)
--- a/C4/Serials.pm
+++ a/C4/Serials.pm
@@ -2154,7 +2154,7 @@ sub abouttoexpire {
@res=Date::Calc::Today;
}
my @endofsubscriptiondate=split(/-/,$expirationdate);
- my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 0, 0, 0);
+ my @per_list = (0, 7, 7, 14, 21, 31, 62, 93, 93, 190, 365, 730, 0, 124, 0, 0);
my @datebeforeend;
@datebeforeend = Add_Delta_Days( $endofsubscriptiondate[0],$endofsubscriptiondate[1],$endofsubscriptiondate[2],
- (3 * $per_list[$per])) if (@endofsubscriptiondate && $endofsubscriptiondate[0]*$endofsubscriptiondate[1]*$endofsubscriptiondate[2]);
@@ -2317,6 +2317,15 @@ sub GetNextDate(@) {
}
@resultdate = Add_Delta_YMD( $year, $month, $day, 0, 3, 0 );
}
+ if ( $subscription->{periodicity} == 13 ) {
+ for ( my $i = 0 ; $i < @irreg ; $i++ ) {
+ if ( $irreg[$i] == ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 ) ) {
+ ( $year, $month, $day ) = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 );
+ $tmpmonth = ( ( $tmpmonth != 8 ) ? ( $tmpmonth + 4 ) % 12 : 12 );
+ }
+ }
+ @resultdate = Add_Delta_YMD( $year, $month, $day, 0, 4, 0 );
+ }
if ( $subscription->{periodicity} == 9 ) {
for ( my $i = 0 ; $i < @irreg ; $i++ ) {
if ( $irreg[$i] == ( ( $tmpmonth != 9 ) ? ( $tmpmonth + 3 ) % 12 : 12 ) ) {
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
@@ -1215,6 +1215,11 @@ $(document).ready(function() {
[% ELSE %]
[% END %]
+ [% IF ( periodicity13 ) %]
+
+ [% ELSE %]
+
+ [% END %]
[% IF ( periodicity9 ) %]
--