Bugzilla – Attachment 4054 Details for
Bug 6321
Add a 1/4 month frequency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0002-Bug-6321-Add-a-1-4-month-frequency.patch (text/plain), 2.83 KB, created by
Frédéric Demians
on 2011-05-07 06:26:48 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2011-05-07 06:26:48 UTC
Size:
2.83 KB
patch
obsolete
>From 80923b3528fd5bff73e7443c892c9ea636cafc92 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= <f.demians@tamil.fr> >Date: Sat, 7 May 2011 08:31:07 +0200 >Subject: [PATCH] Bug 6321 Add a 1/4 month frequency > >--- > C4/Serials.pm | 11 ++++++++++- > .../prog/en/modules/serials/subscription-add.tt | 5 +++++ > 2 files changed, 15 insertions(+), 1 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 20ae7a3..9726971 100644 >--- a/C4/Serials.pm >+++ b/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 ) ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index b20ced4..6318930 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -1215,6 +1215,11 @@ $(document).ready(function() { > [% ELSE %] > <option value="8">1/quarter (seasonal)</option> > [% END %] >+ [% IF ( periodicity13 ) %] >+ <option value="13" selected="selected">1/4 month (3/year)</option> >+ [% ELSE %] >+ <option value="13">1/4 month (3/year)</option> >+ [% END %] > > [% IF ( periodicity9 ) %] > <option value="9" selected="selected">2/years</option> >-- >1.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6321
:
4054
|
4101
|
4492
|
5444
|
5830
|
5834
|
5835