Koha/t
Jonathan Druart 110c665a4b Bug 12164: Close a budget period (budget)
This is the main patch.

On closing a budget period, all unreceived orders are moved from the
old/previous fiscal year into the new fiscal year.

You can rollover funds unused in the previous fiscal year to the new
fiscal year.

This patch set is based on bug 12168 (bugfix) and can be tested on top
of bug 11578 (easier to see the fund structure).

The patch set is cut in 6 main patches:

- Move the budget period clone logic into C4::Budgets
  The code is moved from the pl to Budgets.pm and unit tests are provided.
  The original code should certainly be buggy since a typo existed.
- On cloning budget period, mark original budget as inactive
  Cloning a budget period is already possible in Koha, this patch adds a
  checkbox to mark as inactive the original budget. That avoids to edit
  the budget and click the "inactive" checkbox. Both do the same action.
- On cloning budget periods, add a "reset all funds" option
  Same as before, a new checkbox is added on cloning a budget period. If
  you check it, all fund amounts will be set to 0. Otherwise, no change
  compared to the existing behavior.
- Close a budget period (budget)
  The goal of this patch set is to move unreceived orders from a budget to
  another. This patch adds a C4::Budgets::MoveOrders routine which does
  this job.
  This action is only possible if the fund structure is the same for both
  budgets, the budget_code field should be the same.
- On closing budget period, move unspent amount
  Unspent amount will be move from the previous budget structure to the
  new one.
- Add UI report
  This patch only adds a report when closing a budget is done.

Test plan:
Wording: below, budget is a "budget period" and fund is a "budget".
Prerequisite: Having 1 active budget with some funds (with different
levels and different amounts). Order and receive some orders (not all).
1/ Go on the budgets administration page (admin/aqbudgetperiods.pl) and
duplicate the structure of this budget ("Duplicate" link in the
"Actions" column).
2/ Enter start and end date for this budget and mark the original budget
as inactive.
3/ Note that a new budget is created, with the same fund structures (and
same value) and that the old one is marked as inactive (see
admin/aqbudgets.pl page with patches from bug 11578).
4/ Try to close the new budget: it is not possible, there is no
unreceived orders for this budget.
5/ You can close the inactive budget ("Close" link in the "Actions"
column).
6/ Verify the number of "Unreceived orders" is correct and select the
new budget in the budget list. Click on the "Move remaining unspent
funds" if you want to move unspent amounts.
7/ A report view is displayed and show you the ordernumber which have
been impacted (grouped by fund).
8/ Try different configuration, depending on the selected checkboxes.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-24 14:17:15 -03:00
..
Acquisition bug 8854: fix some invoice search filters 2013-11-19 16:12:31 +00:00
Biblio Bug 12343: Add regression test for TransformKohaToMarc 2014-06-15 11:27:20 -03:00
Budgets Bug 12019: ensure that it is optional to define an owner if a fund is restricted 2014-05-03 19:00:08 +00:00
Circulation Bug 11630: (follow-up) unit tests can be independent of DB 2014-04-16 14:55:39 +00:00
DataTables Bug 9811: Patron search improvement 2014-07-01 09:57:09 -03:00
db_dependent Bug 12164: Close a budget period (budget) 2014-07-24 14:17:15 -03:00
Koha/Plugin
lib
Members Bug 108661: (follow-up) enshrine letting CardnumberLength specify just a maximum 2014-03-12 04:07:03 +00:00
Search Bug 10807: Add an authority search history for the OPAC 2014-05-05 02:32:27 +00:00
searchengine
Serials Bug 7688: (follow-up) rewrite 'for' loop in unit tests 2013-10-30 00:38:52 +00:00
00-checkdatabase-version.t
00-deprecated.t
00-load.t Bug 10807: (follow-up) exclude C4::Search::History from t/00-load.t 2014-05-05 21:59:50 +00:00
00-merge-conflict-markers.t
00-testcritic.t Bug 8798: (follow-up) remove DBIC_DONT_VALIDATE_RELS 2013-10-14 22:51:44 +00:00
00-valid-xml.t
AuthoritiesMarc_MARC21.t
AuthoritiesMarc_UNIMARC.t
AuthUtils.t
Barcodes_annual.t
Barcodes_EAN13.t
Barcodes_hbyymmincr.t
Barcodes_incremental.t
Barcodes_ValueBuilder.t
Biblio.t Bug 11032: Check a valid MARC::Record passed to Biblio 2013-12-10 05:01:54 +00:00
Bookseller.t
Boolean.t
Branch.t
Breeding.t
Budgets.t
Cache.t Bug 12041 - improve Koha::Cache 2014-06-19 13:05:04 -03:00
Calendar.t
Charset.t Bug 11540: (follow-up) add a couple of tests more 2014-01-14 21:29:49 +00:00
Circulation_barcodedecode.t
ClassSortRoutine.t
ClassSortRoutine_Dewey.t
ClassSortRoutine_Generic.t
ClassSortRoutine_LCC.t
ClassSource.t
Context.t Bug 11848: Fix C4::Context::interface, add POD and UT 2014-05-05 04:32:31 +00:00
Contract.t
Creators.t Bug 8375: (follow-up) final adjustment to t/Creators.t 2014-05-07 01:00:34 +00:00
Dates.t
DateUtils.t Bug 11148: (follow-up) add more test cases 2014-04-18 21:51:09 +00:00
Debug.t
dummy.t
External_Overdrive.t
External_Syndetics.t
Form_MessagingPreferences.t
Heading.t
Images.t
ImportBatch.t
Input.t
Installer_PerlDependencies.t
Installer_PerlModules.t bug 11544: increasing test coverage for Installer_PerlModules.pm 2014-01-14 21:48:43 +00:00
Installer_pm.t
ItemCirculationAlertPreference.t
ItemType.t
Koha.t Bug 12288: add regression test 2014-05-19 19:59:40 +00:00
Koha_MetadataRecord.t
Koha_Template_Plugin_Cache.t Bug 11452: Add unit tests for Koha::Template::Plugin::Cache 2014-01-10 15:42:23 +00:00
Koha_Util_MARC.t Bug 5202: merge authorities from the authority file and reservoir 2013-10-10 21:32:27 +00:00
Labels.t Bug 11402: (follow-up) add one more unit test 2013-12-30 16:23:10 +00:00
Labels_split_ccn.t
Labels_split_ddcn.t
Labels_split_lccn.t
Languages.t Bug 11848: Move language detection function in C4::Languages 2014-05-05 04:29:34 +00:00
Letters.t Bug 11742: (QA followup) wrong number of tests 2014-06-23 15:23:37 -03:00
Log.t Bug 11537: (follow-up) mock C4::Context::preference 2014-01-14 19:27:07 +00:00
Matcher.t
Members_Attributes.t
Members_AttributeTypes.t
Members_Messaging.t
Message.t
Output.t Bug 10016: force zero browser-side caching of SCO pages 2013-10-21 18:05:12 +00:00
Output_JSONStream.t Bug 11480: Fix invalid assumptions in JSONStream test 2014-01-10 15:42:17 +00:00
Overdues.t
Patroncards.t
Patroncards_Batch.t
Patroncards_Layout.t
Patroncards_Lib.t
Patroncards_Patroncard.t
Patroncards_Profile.t
Patroncards_Template.t
perlcriticrc
Print.t bug 11542: Increase test coverage for Print.pm 2014-01-14 20:41:31 +00:00
QueryParser.t Bug 9972: (follow-up) add new indexes to the QueryParser config 2014-04-20 16:47:28 +00:00
RecordProcessor.t
Review.t
Ris.t
RotatingCollections.t
Scheduler.t
Scrubber.t
Search.t Bug 12443: (QA followup) Unit tests for _build_initial_query 2014-06-27 08:52:13 -03:00
Search_PazPar2.t
SimpleMARC.t Bug 8015: Add unit tests for SimpleMARC and MarcModificationTemplates routines 2013-10-31 22:50:11 +00:00
SIP_Sip.t
smolder_smoke_signal
SMS.t Bug 12455: (QA followup) license text missing 2014-06-30 12:28:23 -03:00
SocialData.t
Stats.t
SuggestionEngine.t
SuggestionEngine_AuthorityFile.t
TmplToken.t
VirtualShelves_Merge.t
XSLT.t