Bug 18697: Fix date calculation for dayly frequencies in Serials
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 30 May 2017 14:44:46 +0000 (16:44 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 19 Jun 2017 18:35:51 +0000 (15:35 -0300)
commitf65ca90b0f3d12a22c02918a37131b0c1ff8bd5e
tree9abaff4f3dd1385d36bac25ecb8fd82e6215e3cd
parente25f4670f36e53db44931cbbcfb3c5df2125c71a
Bug 18697: Fix date calculation for dayly frequencies in Serials

The changes in _get_next_date_day are actually only cosmetic. The sub
now reads exactly the same as its counterparts for other units, but
the results are exactly the same as before.

In GetFictiveIssueNumber we now call _delta_units for each type of unit.
The two Delta_Days calls are moved to _delta_units. Note that this also
is a cosmetic change; results should be exactly the same.

Test plan:
[1] Edit a subscription. Test predication pattern for some daily freq.
[2] Run t/db_dependent/GetNextDate.t

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>
C4/Serials.pm