Koha-clms/C4
Marcel de Rooy 6ab7280ba2 Bug 18607: Fix date calculations for monthly frequencies in Serials
Similarly to the solution of bug 18356, this patch fixes the date
calculation for monthly frequencies.

The calculation in GetFictiveIssueNumber now makes use of the new
_delta_units sub introduced on bug 18356.

The calculation in _get_next_date_month is also very similar to the one
in _get_next_date_year. I do not merge them here, but this could still
be considered later on. At least consistency is achieved now between
both routines. The connection with firstacquidate has been cut thru
just like for year units.

Test plan:
[1] Without this patch, look at the prediction pattern for a
    subscription with first issue on Feb 21 and 5 per month. The first
    issues will be 21, 22, 23, 24, 25. Then jumping to 21, 23, 25, etc.
[2] Apply the patch. Look at the same prediction pattern. You will now
    see 6 day intervals and a new cycle starting on the 21st.
    So Feb 21, 27, Mar 5, 11, 17 and Mar 21, 27, etc.
[3] Edit an subscription. Try a few other monthly frequencies.
[4] The next patch adjusts related unit tests.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
2017-07-31 01:02:06 +12:00
..
AuthoritiesMarc Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Barcodes Bug 16635: [QA Follow-up] Eliminate some global package vars 2016-06-15 09:07:46 +02:00
Bookseller Bug 10402 follow-up: choose contacts for claims 2014-08-26 11:45:59 -03:00
ClassSortRoutine Bug 16011: $VERSION - Remove use vars qw(); 2016-03-24 17:20:39 +00:00
Creators Bug 18044: Label Batches not displaying 2017-02-16 07:23:50 +13:00
External Bug 16636: [QA Follow-up] Make BakerTaylor plack safe 2016-06-15 09:08:11 +02:00
Form Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-16 17:28:06 +00:00
Heading Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
ILSDI Bug 16864: Silence warnings in t/db_dependent/ILSDI_Services.t 2016-08-05 09:01:39 +02:00
Installer Bug 18373: Re-add UpgradeBackup.pm 2017-04-30 23:19:56 +12:00
Labels Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Linker Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Members Bug 16443: Make C4::Members::Statistics plack safe 2016-06-15 08:17:23 +02:00
OAI Bug 18601: OAI/Sets.t mangles data due to truncate in ModOAISetsBiblios 2017-07-31 01:02:04 +12:00
Output Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Patroncards Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.) 2017-04-24 11:08:15 +12:00
Reports Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
SIP Bug 12021 - SIP2 checkin should alert on transfer and use CT for return branch 2017-04-30 23:19:59 +12:00
Search Bug 17323: Column search_history.time cannot be null 2016-12-31 15:19:46 +13:00
Serials Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Utils Bug 18094: Only search in searchable patron attributes if searching in standard fields 2017-05-04 02:52:33 +12:00
Accounts.pm Bug 18584: Fix trailing spaces in C4/Accounts.pm 2017-07-31 01:02:04 +12:00
Acquisition.pm Revert "Bug 11122 - publisher code and publication year not fetched in acq orders" 2017-07-31 00:41:23 +12:00
Auth.pm Bug 18442: Add a test 2017-05-24 13:45:02 +12:00
Auth_cas_servers.yaml.sample Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig 2016-08-08 16:43:22 +02:00
Auth_with_cas.pm Bug 17481: Fix incorrect merge of bug 11048 (logout redirection for CAS authentication) 2016-12-12 14:54:08 +13:00
Auth_with_ldap.pm Bug 17775 - Add new user with LDAP not works under Plack 2017-02-22 22:12:11 +13:00
Auth_with_shibboleth.pm Bug 16818: External auth redirect broken under Plack 2016-08-05 08:51:45 +02:00
AuthoritiesMarc.pm Bug 17913: [16.11.x] followup 2017-02-24 10:12:30 +13:00
BackgroundJob.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Barcodes.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Biblio.pm Bug 17372: Standardize Elasticsearch paths 2016-10-22 13:56:11 +02:00
Bookseller.pm Bug 14535: Update the supplier filter too 2017-04-24 11:08:08 +12:00
Boolean.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Branch.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Breeding.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Budgets.pm Bug 17872: Fix small error in GetBudgetHierarchy and one of its calls 2017-04-30 23:19:55 +12:00
Calendar.pm Bug 15333: Use Koha::Cache to cache exception_holidays instead of a package variable 2016-05-25 22:18:27 +00:00
Category.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Charset.pm Bug 18910: Revert "Bug 18152 : fix unimarc label in SetMarcUnicodeFlag" 2017-07-27 21:02:39 +12:00
Circulation.pm [16.05.x] Bug 18966: fix unneeded INSERT in AddReturn() 2017-07-28 01:28:00 +12:00
ClassSortRoutine.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ClassSource.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Context.pm Bug 16813: Allow empty string for OPACBaseURL 2016-08-01 13:31:21 +02:00
Contract.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
CourseReserves.pm Bug 16011: $VERSION - remove use vars $VERSION 2016-03-24 17:20:26 +00:00
Creators.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Debug.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
HTML5Media.pm Bug 17231 - (QA Followup) 2016-09-08 22:21:35 +02:00
Heading.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
HoldsQueue.pm Bug 18001 - LocalHoldsPriority can cause multiple holds queue lines for same hold request 2017-04-30 23:19:57 +12:00
Images.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ImportBatch.pm Bug 18611: [QA Follow-up] Make SQL query more readable 2017-07-30 06:43:18 +12:00
ImportExportFramework.pm Bug 17389: Clear logs 2016-10-22 14:37:09 +02:00
InstallAuth.pm Bug 18578: Use subdirectory in /tmp for session storage during installation 2017-05-24 15:44:13 +12:00
Installer.pm Bug 17234: Need to separate KEY and FOREIGN KEY checks 2017-01-25 13:19:12 +13:00
ItemCirculationAlertPreference.pm Bug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used 2016-01-27 20:46:58 +00:00
Items.pm Bug 17512: Improve handling dates in C4::Items 2017-02-23 09:36:21 +13:00
Koha.pm Bug 16716: Replaced wrong GROUP BY with DISTINCT 2016-08-01 13:31:23 +02:00
Labels.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Languages.pm Bug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages 2016-08-01 10:19:58 +02:00
Letters.pm Bug 18478 - QA Followup 2017-07-30 07:04:14 +12:00
Linker.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Log.pm Bug 16436 [QA Followup] - Use debug instead of info 2016-08-05 07:50:00 +02:00
MarcModificationTemplates.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Matcher.pm Bug 17710 - C4::Matcher::get_matches and C4::ImportBatch::GetBestRecordMatch should use same logic 2017-07-31 01:02:04 +12:00
Members.pm Bug 17257: Fix add/edit patrons under MySQL 5.7 2017-05-24 14:26:24 +12:00
Message.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
NewsChannels.pm Bug 16550: Can't set opac news expiration date to NULL, it reverts to today 2016-05-23 17:37:48 +00:00
Output.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Overdues.pm Bug 14390: [Follow-up] Only update FU record in UpdateFine 2016-09-08 20:30:12 +02:00
Patroncards.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Print.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Ratings.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Record.pm Bug 15451: Koha::CsvProfiles - Remove the residue 2017-04-30 23:20:01 +12:00
Reports.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Reserves.pm Bug 17995 - HOLDPLACED notice should have access to the reserves table 2017-04-24 11:07:24 +12:00
Review.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Ris.pm Bug 16245: [QA Follow-up] Replace typeofrecord2 by biblevel 2016-10-22 15:14:49 +02:00
RotatingCollections.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
SMS.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Scheduler.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Scrubber.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Search.pm Bug 17821 - due date in intranet search results should use TT date plugin 2017-04-30 23:19:56 +12:00
Serials.pm Bug 18607: Fix date calculations for monthly frequencies in Serials 2017-07-31 01:02:06 +12:00
Service.pm Bug 7550: [QA Follow-up] Resolve param warning from sco-patron-image 2017-05-24 13:45:03 +12:00
ShelfBrowser.pm Bug 16315 - OPAC Shelfbrowser doesn't display the full title 2016-05-05 18:28:16 +00:00
SocialData.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Stats.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Suggestions.pm Bug 16325: Do not return all suggestions if search for STATUS='' 2016-05-05 20:46:02 +00:00
TTParser.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
Tags.pm Bug 16637: Dependency for C4::Tags not listed 2016-06-15 09:09:11 +02:00
Templates.pm Bug 18010: Remove potential exposure from gettemplate 2017-04-04 03:45:23 +12:00
TmplToken.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TmplTokenType.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
UsageStats.pm Bug 18066: Hea V2 [squashed] 2017-05-24 13:44:59 +12:00
XISBN.pm Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
XSLT.pm Bug 18089 - All XSLT testing singleBranchMode = 0 fails to show even if install has only 1 branch 2017-02-23 09:36:22 +13:00