Skip to content

Commit

Permalink
Adds support for GetIt Acquisitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Ferraro authored and pjones9 committed Jan 12, 2011
1 parent f9c4fd9 commit fdda11b
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 9 deletions.
14 changes: 14 additions & 0 deletions .gitignore
@@ -0,0 +1,14 @@
cataloguing/biblios.pl
koha-tmpl/intranet-tmpl/prog/en/lib/biblios/
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/biblios.tmpl
acqui/getit.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/getit.tmpl
plugins/
svc/proxy_auth_cookie
svc/z3950
svc/bibs
svc/item_types
svc/collections
svc/organizations
svc/collection_codes
svc/shelving_locations
6 changes: 6 additions & 0 deletions C4/Auth.pm
Expand Up @@ -292,6 +292,8 @@ sub get_template_and_user {
ClubsAndServices => C4::Context->preference("EnableClubsAndServices"),
UsePeriodicals => C4::Context->preference('UsePeriodicals'),
HideItypeInOPAC => C4::Context->boolean_preference('HideItypeInOPAC'),
GetItAcquisitions => C4::Context->preference("GetItAcquisitions"),
BibliosCataloging => C4::Context->preference("BibliosCataloging"),
);

if ( $in->{'type'} eq "intranet" ) {
Expand Down Expand Up @@ -323,6 +325,8 @@ sub get_template_and_user {
NoZebra => C4::Context->preference('NoZebra'),
LinkLostItemsToPatron => C4::Context->preference('LinkLostItemsToPatron'),
RefundReturnedLostItem => C4::Context->preference('RefundReturnedLostItem'),
GetItAcquisitions => C4::Context->preference("GetItAcquisitions"),
BibliosCataloging => C4::Context->preference("BibliosCataloging"),
);
}
else {
Expand Down Expand Up @@ -410,6 +414,8 @@ sub get_template_and_user {
virtualshelves => "" . C4::Context->preference("virtualshelves"),
OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
ResetOpacInactivityTimeout => C4::Context->preference("ResetOpacInactivityTimeout"),
GetItAcquisitions => C4::Context->preference("GetItAcquisitions"),
BibliosCataloging => C4::Context->preference("BibliosCataloging"),
);
}
return ( $template, $borrowernumber, $cookie, $flags);
Expand Down
14 changes: 11 additions & 3 deletions C4/Biblio.pm
Expand Up @@ -3112,7 +3112,9 @@ sub _koha_modify_biblioitem_nonmarc {
cn_item = ?,
cn_suffix = ?,
cn_sort = ?,
totalissues = ?
totalissues = ?,
on_order_count = ?,
in_process_count = ?,
where biblioitemnumber = ?
";
my $sth = $dbh->prepare($query);
Expand Down Expand Up @@ -3145,6 +3147,8 @@ sub _koha_modify_biblioitem_nonmarc {
$biblioitem->{'cn_suffix'},
$cn_sort,
$biblioitem->{'totalissues'},
$biblioitem->{'on_order_count'},
$biblioitem->{'in_process_count'},
$biblioitem->{'biblioitemnumber'}
);
if ( $dbh->errstr ) {
Expand Down Expand Up @@ -3201,7 +3205,9 @@ sub _koha_add_biblioitem {
cn_item = ?,
cn_suffix = ?,
cn_sort = ?,
totalissues = ?
totalissues = ?,
on_order_count = ?,
in_process_count = ?
";
my $sth = $dbh->prepare($query);
$sth->execute(
Expand Down Expand Up @@ -3233,7 +3239,9 @@ sub _koha_add_biblioitem {
$biblioitem->{'cn_item'},
$biblioitem->{'cn_suffix'},
$cn_sort,
$biblioitem->{'totalissues'}
$biblioitem->{'totalissues'},
$biblioitem->{'on_order_count'},
$biblioitem->{'in_process_count'}
);
my $bibitemnum = $dbh->{'mysql_insertid'};
if ( $dbh->errstr ) {
Expand Down
2 changes: 1 addition & 1 deletion C4/Context.pm
Expand Up @@ -78,7 +78,7 @@ BEGIN {
$main::SIG{__DIE__} = \&CGI::Carp::confess;
}
} # else there is no browser to send fatals to!
$VERSION = '4.03.08.001';
$VERSION = '4.03.08.002';
}

use DBI;
Expand Down
7 changes: 5 additions & 2 deletions C4/Items.pm
Expand Up @@ -437,6 +437,7 @@ my %default_values_for_mod_from_marc = (
suppress => 0,
uri => undef,
wthdrawn => 0,
catstat => undef,
);

sub ModItemFromMarc {
Expand Down Expand Up @@ -1996,7 +1997,8 @@ sub _koha_new_item {
enumchron = ?,
more_subfields_xml = ?,
copynumber = ?,
otherstatus = ?
otherstatus = ?,
catstat = ?
";
my $sth = $dbh->prepare($query);
$sth->execute(
Expand Down Expand Up @@ -2034,7 +2036,8 @@ sub _koha_new_item {
$item->{'enumchron'},
$item->{'more_subfields_xml'},
$item->{'copynumber'},
$item->{'otherstatus'}
$item->{'otherstatus'},
$item->{'catstat'},
);
my $itemnumber = $dbh->{'mysql_insertid'};
if ( defined $sth->errstr ) {
Expand Down
2 changes: 2 additions & 0 deletions admin/systempreferences.pl
Expand Up @@ -70,6 +70,7 @@ =head1 systempreferences.pl
$tabsysprefs{acquisitions} = "Acquisitions";
$tabsysprefs{gist} = "Acquisitions";
$tabsysprefs{emailPurchaseSuggestions} = "Acquisitions";
$tabsysprefs{GetItAcquisitions} = "Acquisitions";

# Admin
$tabsysprefs{singleBranchMode} = "Admin";
Expand Down Expand Up @@ -103,6 +104,7 @@ =head1 systempreferences.pl
$tabsysprefs{BiblioAddsAuthorities} = "Authorities";

# Cataloguing
$tabsysprefs{BibliosCataloging} = "Cataloging";
$tabsysprefs{advancedMARCeditor} = "Cataloging";
$tabsysprefs{autoBarcode} = "Cataloging";
$tabsysprefs{hide_marc} = "Cataloging";
Expand Down
2 changes: 2 additions & 0 deletions installer/data/mysql/en/mandatory/sysprefs.sql
Expand Up @@ -326,3 +326,5 @@ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('HideItypeInOPAC','0','If ON, do not use/display item type in the OPAC','','YesNo');
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('EnableHoldExpiredNotice','0','If ON, allow hold expiration notices to be sent.','','YesNo');
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('EnableHoldCancelledNotice','0','If ON, allow hold cancellation notices to be sent.','','YesNo');
INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GetItAcquisitions','0','If set, a link to GetIt Acquisitions will appear in the Koha menu and GetIt Acquisitions-specific functionality will appear elsewhere. Please refer to the documentation for details.','','YesNo');
INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BibliosCataloging','0','If set, a link to Biblios Cataloging will appear in the Koha menu and Biblios Cataloging-specific functionality will appear elsewhere. Please refer to the documentation for details.','','YesNo');
Expand Up @@ -83,8 +83,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`
('942', 'k', 'Call number prefix', 'Call number prefix', 0, 0, 'biblioitems.cn_prefix', 9, '', '', '', NULL, 0, '', '', '', NULL),
('942', 'm', 'Call number suffix', 'Call number suffix', 0, 0, 'biblioitems.cn_suffix', 9, '', '', '', 0, 0, '', '', '', NULL),
('942', 'n', 'Suppress in OPAC', 'Suppress in OPAC', 0, 0, NULL, 9, '', '', '', 0, 0, '', '', '', NULL),
('942', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL);

('942', 't', 'On Order Count', 'On Order Count', 0, 0, 'biblioitems.on_order_count', 9, '', '', '', NULL, 0, '', '', '', NULL),
('942', 'u', 'In Processing Count', 'In Processing Count', 0, 0, 'biblioitems.in_process_count', 9, '', '', '', NULL, 0, '', '', '', NULL),
('942', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL);

-- ******************************************************

Expand Down Expand Up @@ -123,6 +124,7 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`
('952', 'g', 'Cost, normal purchase price', 'Cost, normal purchase price', 0, 0, 'items.price', 10, '', '', '', 0, 0, '', '', '', NULL),
('952', 'h', 'Serial Enumeration / chronology','Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, 0, '', '', '', NULL),
('952', 'j', 'Shelving control number', 'Shelving control number', 0, 0, 'items.stack', 10, 'STACK', '', '', NULL, -1, '', '', '', NULL),
('952', 'k', 'Cataloging Status', 'Cataloging Status', 0, 0, 'items.catstat', 10, 'CATSTAT', '', '', NULL, 0, '', '', '', NULL),
('952', 'l', 'Total Checkouts', 'Total Checkouts', 0, 0, 'items.issues', 10, '', '', '', NULL, -5, '', '', '', NULL),
('952', 'm', 'Total Renewals', 'Total Renewals', 0, 0, 'items.renewals', 10, '', '', '', NULL, -5, '', '', '', NULL),
('952', 'n', 'Total Holds', 'Total Holds', 0, 0, 'items.reserves', 10, '', '', '', NULL, -5, '', '', '', NULL),
Expand Down

0 comments on commit fdda11b

Please sign in to comment.