Koha/admin
Yohann Dufour 0247b6741e Bug 12493: moving the subroutines GetContract and GetContracts from C4::Acquisition.pm to C4::Contract.pm
This patch includes:
- the subroutines GetContract and GetContracts has been moved from C4::Acquisition.pm to C4::Contract.pm and adapted for a general use
- adaptation of acqui/basket.pl, acqui/basketheader.pl, acqui/neworderempty.pl, acqui/supplier.pl and admin/aqcontract.pl
- the unit tests for the module C4::Contract.pm

Test plan:
1) Apply the patch
2) Execute the unit tests by launching:
prove t/db_dependent/Contract.t t/Acquisition/ t/db_dependent/Acquisition/ t/db_dependent/Acquisition.t
3) The command has to be a success :
t/db_dependent/Contract.t ................................. ok
t/Acquisition/CanUserManageBasket.t ....................... ok
t/Acquisition/Invoice.t ................................... ok
t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok
t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok
t/db_dependent/Acquisition/Invoices.t ..................... ok
t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok
t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2
t/db_dependent/Acquisition/TransferOrder.t ................ ok
t/db_dependent/Acquisition/close_reopen_basket.t .......... ok
t/db_dependent/Acquisition.t .............................. ok
All tests successful.
Files=10, Tests=284, 15 wallclock secs ( 0.11 usr  0.02 sys + 12.88 cusr  0.77 csys = 13.78 CPU)
Result: PASS

4) Log on with a superlibrarian permission
5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor")
6) Record a vendor with a nonzero "name"
7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu)
8) Click on the button "New" > "Contract" and record a new one
9) Verify the displayed data are correct about the contract
10) "Edit" the contract with different values and verify the data are updated
11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation
12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract
13) Verify the contract name displayed is correct
14) Record an active budget and a fund linked to this budget
15) Go on the new basket (Home > Acquisitions > Search the created vendor)
16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested with both patches applied.
Works as described following test plan, all points (I did 14 first)
All test pass
No koha-qa errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-30 10:40:06 -03:00
..
searchengine/solr Bug 8233 : SearchEngine: Add a Koha::SearchEngine module 2012-07-06 16:51:58 +02:00
admin-home.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
aqbudget_user_search.pl Bug 7304: More permissions for budgets 2012-06-27 16:25:44 +02:00
aqbudgetperiods.pl Bug 12164: follow-up: various fixes 2014-07-24 14:17:49 -03:00
aqbudgets.pl Bug 12482 [QA Followup] 2014-07-03 14:25:22 -03:00
aqcontract.pl Bug 12493: moving the subroutines GetContract and GetContracts from C4::Acquisition.pm to C4::Contract.pm 2014-07-30 10:40:06 -03:00
aqplan.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
auth_subfields_structure.pl Bug 12614: Remove CGI::scrolling_list from auth_subfields_structure.pl 2014-07-29 11:30:19 -03:00
auth_tag_structure.pl Bug 12612: Remove CGI::scrolling_list from auth_tag_structure.pl 2014-07-29 11:31:09 -03:00
authorised_values.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
authtypes.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
biblio_framework.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
branch_transfer_limits.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
branches.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
categorie.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
check_budget_parent.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
check_parent_total.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
checkmarc.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
cities.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
classsources.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
clone-rules.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
currency.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
didyoumean.pl Bug 8726: ExplodedTerms suggestion plugin (functionality) 2012-09-28 17:08:21 +02:00
env_tz_test.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
fieldmapping.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
import_export_framework.pl Bug 9114: Make frameworks import/export routines correctly use UTF-8 2014-03-14 14:37:31 +00:00
item_circulation_alerts.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
itemtypes.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
koha2marclinks.pl Bug 12613: Remove CGI::scrolling_list from koha2marclinks.pl 2014-07-29 11:30:51 -03:00
marc_subfields_structure.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
marctagstructure.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
matching-rules.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
oai_set_mappings.pl Bug 9295: Introduce operator equal/ notequal to OAI set mapping instead of hardcoded 'equal' value. 2013-10-10 23:03:30 +00:00
oai_sets.pl bug_8083: parameters subpermissions: manage_circ_rules and parameters_remaining_permissions 2012-07-23 10:43:59 +02:00
patron-attr-types.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
preferences.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
printers.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
smart-rules.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
stopwords.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
systempreferences.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
transport-cost-matrix.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
z3950servers.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00