From 90c1c620f52039bad3dc7f15544f2df08f7b0ba4 Mon Sep 17 00:00:00 2001 From: Nicole Engard Date: Mon, 4 Jan 2010 02:21:36 -0500 Subject: [PATCH] Bug 3654: Resubmit: Fixes issues with authorized values #1 Moves Authorized Values under Basic on the Admin page & menu #2 Add defaults for PROC & CART in LOC #3 Add MANUAL_INV default #4 Add BOR_Notes default #5 Fix descriptions and language on authorized values page related to these changes --- installer/data/mysql/en/optional/auth_val.sql | 8 ++++ installer/data/mysql/updatedatabase.pl | 19 ++++++++++ .../prog/en/includes/admin-menu.inc | 4 +- .../prog/en/modules/admin/admin-home.tmpl | 8 ++-- .../en/modules/admin/authorised_values.tmpl | 38 +++++++++++++------ 5 files changed, 60 insertions(+), 17 deletions(-) diff --git a/installer/data/mysql/en/optional/auth_val.sql b/installer/data/mysql/en/optional/auth_val.sql index 11328e1591..5a39534656 100644 --- a/installer/data/mysql/en/optional/auth_val.sql +++ b/installer/data/mysql/en/optional/auth_val.sql @@ -24,6 +24,8 @@ INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('LOC', INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('LOC','GEN','General Stacks'); INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('LOC','AV','Audio Visual'); INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('LOC','REF','Reference'); +INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('LOC','CART','Book Cart'); +INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('LOC','PROC','Processing Center'); -- collection codes for an item INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('CCODE','FIC','Fiction'); @@ -43,3 +45,9 @@ INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('NOT_L -- restricted status of an item, linked to items.restricted INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('RESTRICTED','0',''); INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('RESTRICTED','1','Restricted Access'); + +-- manual invoice types +INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('MANUAL_INV','Copier Fees','.25'); + +--custom borrower notes +INSERT INTO `authorised_values` (category, authorised_value, lib) VALUES ('BOR_NOTES','ADDR','Address Notes'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 79bc299dae..197bcf7827 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3312,6 +3312,25 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + + eval { $maninv_count = $dbh->do("SELECT 1 FROM authorised_values WHERE category='MANUAL_INV'"); }; + if ($maninv_count == 0) { + $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('MANUAL_INV','Copier Fees','.25')"); + } + eval { $borrnotes_count = $dbh->do("SELECT 1 FROM authorised_values WHERE category='BOR_NOTES'"); }; + if ($borrnotes_count == 0) { + $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('BOR_NOTES','ADDR','Address Notes')"); + } + + $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('LOC','CART','Book Cart')"); + $dbh->do("INSERT INTO authorised_values (category,authorised_value,lib) VALUES ('LOC','PROC','Processing Center')"); + + print "Upgrade to $DBversion done ( add defaults to authorized values for MANUAL_INV and BOR_NOTES and add new default LOC authorized values for shelf to cart processing )\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index 1f82c076c8..d12aadb2b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -6,7 +6,8 @@
Basic parameters
Patrons and circulation
@@ -22,7 +23,6 @@
Catalog

Authorized values

-

This table is used in MARC definition. You can define as many categories as you want, and as many authorized values as you want in each category.

-

When you define the MARC subfield structure, you can link a subfield to a authorized-value category. When the user ask for adding of modifying a biblio, -the subfield is not entered through a free field, but though a list of authorized values

+

These values can be used in many pull down menus throughout the Koha system. You can define as many categories as you want, and as many authorized values as you want in each category.

+ +

When you define the MARC subfield structure, you can link a subfield to a authorized-value category. When the user ask for adding of modifying a biblio, the subfield is not entered through a free field, but though a list of authorized values

+
Could not add value "" for category @@ -175,28 +176,43 @@ the subfield is not entered through a free field, but though a list of authorize
-

Bsort1 is an authorized value attached to patrons, that can be used for stats purposes

+

An authorized value attached to patrons, that can be used for stats purposes

-

Bsort2 is an authorized value attached to patrons, that can be used for stats purposes

+

An authorized value attached to patrons, that can be used for stats purposes

-

Asort1 is an authorized value attached to acquisitions, that can be used for stats purposes

+

An authorized value attached to acquisitions, that can be used for stats purposes

-

Asort2 is an authorized value attached to acquisitions, that can be used for stats purposes

+

An authorized value attached to acquisitions, that can be used for stats purposes

-

The list of patron suggestion reject or accept reasons

+

Reasons to reject or accept patron suggestions

-

The list of status to describe a damaged item

+

Statuses to describe a damaged item

-

The list of status to describe a lost item

+

Statuses to describe a lost item

+ +

Additional values for manual invoice types

+ + +

Values for custom patron notes

+ + +

Values for shelving locations

+ + +

Values for collection codes

+ + +

Statuses to describe why an item is not for loan

+ - +
Authorised values for category :Authorized values for category :
Authorized value Description