Koha/C4
Marcel de Rooy adfcd8d79c 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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-06-19 15:35:50 -03:00
..
AuthoritiesMarc Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Barcodes Bug 14752 - (QA followup) Remove annoying modal, use dialog box instead 2016-09-13 17:21:05 +00:00
ClassSortRoutine Bug 16011: $VERSION - Remove use vars qw(); 2016-03-24 17:20:39 +00:00
Creators Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) 2017-04-28 08:39:41 -04:00
External Bug 17189: Replace occurrences of 'use Koha::Cache' 2016-09-08 10:24:47 +00: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 17736: [Follow-up] Rename to current_holds 2017-03-31 12:02:14 +00:00
Installer Bug 17190 - Marked REST API as mandatory (require = 1) in PerlDependencies.pm 2017-05-08 09:06:30 -04:00
Labels Bug 15758: Koha::Libraries - Remove GetBranchName 2016-09-08 14:36:01 +00:00
Linker Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Members Bug 17825: (followup) Remove unused function AttributeTypeExists 2017-03-31 14:37:21 +00:00
OAI Bug 18601: OAI/Sets.t mangles data due to truncate in ModOAISetsBiblios 2017-06-13 16:18:59 -03: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-03-31 12:46:28 +00:00
Reports Bug 17898: Automagically convert SQL reports 2017-05-19 18:48:26 +00:00
Search Bug 17323: Column search_history.time cannot be null 2016-11-18 13:51:37 +00:00
Serials Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
SIP Bug 17665 - SIP2 Item Information Response returns incorrect circulation status of '08' ( waiting on hold shelf ) if record has any holds 2017-05-19 10:30:45 -04:00
Utils Bug 18094: Only search in searchable patron attributes if searching in standard fields 2017-03-22 21:12:43 +00:00
Accounts.pm Bug 18584: Fix trailing spaces in C4/Accounts.pm 2017-06-12 17:57:20 -03:00
Acquisition.pm Bug 8612: Remove warnings from tests 2017-06-05 12:36:12 -03:00
Auth.pm Bug 18314: Fix reset number of login attempts on login success 2017-05-12 10:59:00 -04:00
Auth_cas_servers.yaml.sample Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig 2016-08-08 13:16:36 +00:00
Auth_with_cas.pm Bug 17481: Fix incorrect merge of bug 11048 (logout redirection for CAS authentication) 2016-11-07 16:34:57 +00:00
Auth_with_ldap.pm Bug 14625 - LDAP: skip extended patron attributes in 'borrowers' attribute update 2017-05-19 09:52:05 -04:00
Auth_with_shibboleth.pm Bug 12026: [QA Follow-up] Fix a POD line 2017-03-31 14:28:18 +00:00
AuthoritiesMarc.pm Bug 9988: Few subtle changes for postponed merge 2017-04-13 08:53:47 -04: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 18200: Fix a potential issue with preceding space in GetMarcUrls 2017-03-31 14:15:54 +00:00
Bookseller.pm Bug 14535: Update the supplier filter too 2017-03-31 12:38:44 +00:00
Boolean.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +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-13 08:34:15 -04:00
Calendar.pm Bug 17189: Replace occurrences of 'use Koha::Cache' 2016-09-08 10:24:47 +00:00
Charset.pm Bug 18152 : fix unimarc label in SetMarcUnicodeFlag 2017-05-08 08:36:57 -04:00
Circulation.pm Bug 15582: Ability to block auto renewals if OPACFineNoRenewals is reached 2017-05-09 21:05:29 +00:00
ClassSortRoutine.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ClassSource.pm Bug 17208: Checking if classification source or filing rule already exists before adding 2016-12-23 11:33:48 +00:00
Context.pm Bug 17486: [QA Follow-up] Changes as to set_userenv 2017-01-13 12:32:20 +00: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
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-21 07:16:25 -04:00
HTML5Media.pm Bug 17501: Remove Koha::Upload::get from Koha::Upload 2017-01-20 14:20:05 +00: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-05-28 22:23:34 -04:00
ImportExportFramework.pm Bug 17389: Clear logs 2016-10-11 16:18:10 +00:00
InstallAuth.pm Bug 18578: Use subdirectory in /tmp for session storage during installation 2017-05-19 10:46:37 -04:00
Installer.pm Bug 18215: Fix another tls warning 2017-03-22 21:00:41 +00:00
ItemCirculationAlertPreference.pm Bug 15407: Koha::Patron::Categories - replace C4::Category->all 2016-09-08 13:29:03 +00:00
Items.pm Bug 18296: C4::Items - Remove GetItemInfosOf 2017-06-07 11:30:25 -03:00
Koha.pm Bug 17835: Remove the subroutine GetItemTypes 2017-04-14 10:43:51 -04: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-06-24 14:05:56 +00:00
Letters.pm Bug 17975: TT syntax for notices - Prove that HOLD_SLIP is compatible 2017-06-15 15:56:00 -03:00
Linker.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Log.pm Bug 14642: Add logging for Holds 2016-08-17 18:43:13 +00: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-06-15 15:27:46 -03:00
Members.pm Bug 18664: Make IssueSlip returns if params are not valid 2017-05-28 22:26:23 -04:00
Message.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
NewsChannels.pm Bug 17762: Fix test for NewsChannels.t 2017-05-09 20:56:42 +00:00
Output.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Overdues.pm Bug 17975: Let C4::Letters manage today param substitution 2017-06-15 15:56:00 -03: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
Record.pm Bug 17196: [QA Follow-up] Adjust some text on marcxml 2017-01-13 13:49:30 +00:00
Reports.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Reserves.pm Bug 17975: Let C4::Letters manage today param substitution 2017-06-15 15:56:00 -03:00
Ris.pm Bug 16245: [QA Follow-up] Replace typeofrecord2 by biblevel 2016-10-21 14:51:55 +00:00
RotatingCollections.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +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 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
Serials.pm Bug 18607: Fix date calculations for monthly frequencies in Serials 2017-06-19 15:35:50 -03:00
Service.pm Bug 7550: [QA Follow-up] Resolve param warning from sco-patron-image 2017-05-08 09:00:26 -04:00
ShelfBrowser.pm Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
SMS.pm Bug 18732: Noisy t/SMS.t triggered by koha_conf.xml without sms_send_config 2017-06-15 15:27:46 -03: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 17762: Send lang to GetPreparedLetter 2017-05-09 20:56:41 +00:00
Tags.pm Bug 16637: Dependency for C4::Tags not listed 2016-06-10 18:05:10 +00:00
Templates.pm Bug 18010: Remove potential exposure from gettemplate 2017-03-23 00:36:12 +00: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
TTParser.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
UsageStats.pm Bug 9988: Remove further references to dontmerge 2017-04-13 08:53:47 -04:00
XISBN.pm Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
XSLT.pm Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00