Adding a system preference to choose whether a homebranch or a holdingbranch is used to check against for independentbranches
Changing GanBookBeIssued to use this systempreference Set to homebranch by default Paul and others you might want to switch this to holdingbranch to get the behaviour you are used to Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
653885bdf0
commit
7934f95494
|
|
@ -727,7 +727,7 @@ sub CanBookBeIssued {
|
|||
my $userenv = C4::Context->userenv;
|
||||
if ( ($userenv) && ( $userenv->{flags} != 1 ) ) {
|
||||
$issuingimpossible{NOTSAMEBRANCH} = 1
|
||||
if ( $item->{'holdingbranch'} ne $userenv->{branch} );
|
||||
if ( $item->{C4::Context->preference("HomeOrHoldingbranch")} ne $userenv->{branch} );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ my %tabsysprefs;
|
|||
$tabsysprefs{dateformat}="Admin";
|
||||
$tabsysprefs{delimiter}="Admin";
|
||||
$tabsysprefs{IndependantBranches}="Admin";
|
||||
$tabsysprefs{HomeOrHoldingBranch}="Admin";
|
||||
$tabsysprefs{insecure}="Admin";
|
||||
$tabsysprefs{KohaAdmin}="Admin";
|
||||
$tabsysprefs{KohaAdminEmailAddress}="Admin";
|
||||
|
|
|
|||
|
|
@ -561,6 +561,38 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.00.00.023";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type)
|
||||
VALUES ('yuipath','http://yui.yahooapis.com/2.3.1/build','Insert the path to YUI libraries','','free')");
|
||||
print "Upgrade to $DBversion done (adding new system preference for controlling YUI path)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.00.00.024";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("ALTER TABLE biblioitems CHANGE itemtype itemtype VARCHAR(10)");
|
||||
print "Upgrade to $DBversion done (changing itemtype to (10))\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.00.00.025";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("ALTER TABLE items ADD COLUMN itype VARCHAR(10)");
|
||||
if(C4::Context->preference('item-level_itypes')){
|
||||
$dbh->do('update items,biblioitems set items.itype=biblioitems.itemtype where items.biblionumber=biblioitems.biblionumber and itype is null');
|
||||
}
|
||||
print "Upgrade to $DBversion done (reintroduce items.itype - fill from itemtype)\n ";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.00.00.026";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type)
|
||||
VALUES ('HomeOrHoldingBranch','homebranch','homebranch|holdingbranch','With independent branches turned on this decides whether to check the items holdingbranch or homebranch at circulatilon','choice')");
|
||||
print "Upgrade to $DBversion done (adding new system preference for choosing whether homebranch or holdingbranch is checked in circulation)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
=item DropAllForeignKeys($table)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# and is automatically called by Auth.pm when needed.
|
||||
|
||||
sub kohaversion {
|
||||
return "3.00.00.025";
|
||||
return "3.00.00.026";
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue