Bug 6739: (follow-up) fix conflicts with some others bugs.
See comments 86 and 88. This patch fixes a bad conflict resolution in a previous patch. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
b1b0d88e11
commit
fd3985eb6c
2 changed files with 30 additions and 24 deletions
|
@ -7130,7 +7130,6 @@ if ( CheckVersion($DBversion) ) {
|
||||||
SetVersion($DBversion);
|
SetVersion($DBversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$DBversion = "3.13.00.020";
|
$DBversion = "3.13.00.020";
|
||||||
if ( CheckVersion($DBversion) ) {
|
if ( CheckVersion($DBversion) ) {
|
||||||
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo')");
|
$dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo')");
|
||||||
|
@ -7139,24 +7138,6 @@ if ( CheckVersion($DBversion) ) {
|
||||||
SetVersion($DBversion);
|
SetVersion($DBversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$DBversion = "3.13.00.XXX";
|
|
||||||
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
|
||||||
$dbh->do("
|
|
||||||
INSERT INTO systempreferences (variable,value,explanation,options,type)
|
|
||||||
VALUES (
|
|
||||||
'BlockExpiredPatronOpacActions',
|
|
||||||
'1',
|
|
||||||
'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis',
|
|
||||||
NULL,
|
|
||||||
'YesNo'
|
|
||||||
)
|
|
||||||
");
|
|
||||||
$dbh->do("ALTER TABLE `categories` ADD COLUMN `BlockExpiredPatronOpacActions` TINYINT(1) DEFAULT -1 NOT NULL AFTER category_type");
|
|
||||||
print "Upgraded to $DBversion done (Bug 6739 - expired patrons not blocked from opac actions)\n";
|
|
||||||
SetVersion ($DBversion);
|
|
||||||
}
|
|
||||||
|
|
||||||
$DBversion ="3.13.00.021";
|
$DBversion ="3.13.00.021";
|
||||||
if ( CheckVersion($DBversion) ) {
|
if ( CheckVersion($DBversion) ) {
|
||||||
$dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ConfirmFutureHolds','0','Number of days for confirming future holds','','Integer');");
|
$dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('ConfirmFutureHolds','0','Number of days for confirming future holds','','Integer');");
|
||||||
|
@ -8387,6 +8368,24 @@ if ( CheckVersion($DBversion) ) {
|
||||||
SetVersion($DBversion);
|
SetVersion($DBversion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$DBversion = "3.15.00.XXX";
|
||||||
|
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
|
||||||
|
$dbh->do("
|
||||||
|
INSERT INTO systempreferences (variable,value,explanation,options,type)
|
||||||
|
VALUES (
|
||||||
|
'BlockExpiredPatronOpacActions',
|
||||||
|
'1',
|
||||||
|
'Set whether an expired patron can perform opac actions such as placing holds or renew books, can be overridden on a per patron-type basis',
|
||||||
|
NULL,
|
||||||
|
'YesNo'
|
||||||
|
)
|
||||||
|
");
|
||||||
|
$dbh->do("ALTER TABLE `categories` ADD COLUMN `BlockExpiredPatronOpacActions` TINYINT(1) DEFAULT -1 NOT NULL AFTER category_type");
|
||||||
|
print "Upgraded to $DBversion done (Bug 6739 - expired patrons not blocked from opac actions)\n";
|
||||||
|
SetVersion ($DBversion);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
=head1 FUNCTIONS
|
=head1 FUNCTIONS
|
||||||
|
|
||||||
=head2 TableExists($table)
|
=head2 TableExists($table)
|
||||||
|
|
|
@ -64,7 +64,11 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0;
|
my $show_priority;
|
||||||
|
for ( C4::Context->preference("OPACShowHoldQueueDetails") ) {
|
||||||
|
m/priority/ and $show_priority = 1;
|
||||||
|
}
|
||||||
|
|
||||||
my $patronupdate = $query->param('patronupdate');
|
my $patronupdate = $query->param('patronupdate');
|
||||||
my $canrenew = 1;
|
my $canrenew = 1;
|
||||||
|
|
||||||
|
@ -106,6 +110,7 @@ if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstandi
|
||||||
$canrenew = 0;
|
$canrenew = 0;
|
||||||
$template->param(
|
$template->param(
|
||||||
renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
|
renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ),
|
||||||
|
renewal_blocked_fines_amountoutstanding => sprintf( '%.02f', $borr->{amountoutstanding} ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +163,7 @@ my $issues = GetPendingIssues($borrowernumber);
|
||||||
if ($issues){
|
if ($issues){
|
||||||
foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) {
|
foreach my $issue ( sort { $b->{date_due}->datetime() cmp $a->{date_due}->datetime() } @{$issues} ) {
|
||||||
# check for reserves
|
# check for reserves
|
||||||
my ( $restype, $res, undef ) = CheckReserves( $issue->{'itemnumber'} );
|
my $restype = GetReserveStatus( $issue->{'itemnumber'} );
|
||||||
if ( $restype ) {
|
if ( $restype ) {
|
||||||
$issue->{'reserved'} = 1;
|
$issue->{'reserved'} = 1;
|
||||||
}
|
}
|
||||||
|
@ -169,6 +174,8 @@ if ($issues){
|
||||||
if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
|
if ( $ac->{'itemnumber'} == $issue->{'itemnumber'} ) {
|
||||||
$charges += $ac->{'amountoutstanding'}
|
$charges += $ac->{'amountoutstanding'}
|
||||||
if $ac->{'accounttype'} eq 'F';
|
if $ac->{'accounttype'} eq 'F';
|
||||||
|
$charges += $ac->{'amountoutstanding'}
|
||||||
|
if $ac->{'accounttype'} eq 'FU';
|
||||||
$charges += $ac->{'amountoutstanding'}
|
$charges += $ac->{'amountoutstanding'}
|
||||||
if $ac->{'accounttype'} eq 'L';
|
if $ac->{'accounttype'} eq 'L';
|
||||||
}
|
}
|
||||||
|
@ -272,8 +279,8 @@ foreach my $res (@reserves) {
|
||||||
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
|
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
|
||||||
my $biblioData = GetBiblioData($res->{'biblionumber'});
|
my $biblioData = GetBiblioData($res->{'biblionumber'});
|
||||||
$res->{'reserves_title'} = $biblioData->{'title'};
|
$res->{'reserves_title'} = $biblioData->{'title'};
|
||||||
if ($OPACDisplayRequestPriority) {
|
if ($show_priority) {
|
||||||
$res->{'priority'} = '' if $res->{'priority'} eq '0';
|
$res->{'priority'} ||= '';
|
||||||
}
|
}
|
||||||
$res->{'suspend_until'} = C4::Dates->new( $res->{'suspend_until'}, "iso")->output("syspref") if ( $res->{'suspend_until'} );
|
$res->{'suspend_until'} = C4::Dates->new( $res->{'suspend_until'}, "iso")->output("syspref") if ( $res->{'suspend_until'} );
|
||||||
}
|
}
|
||||||
|
@ -283,7 +290,7 @@ foreach my $res (@reserves) {
|
||||||
|
|
||||||
$template->param( RESERVES => \@reserves );
|
$template->param( RESERVES => \@reserves );
|
||||||
$template->param( reserves_count => $#reserves+1 );
|
$template->param( reserves_count => $#reserves+1 );
|
||||||
$template->param( showpriority=>1 ) if $OPACDisplayRequestPriority;
|
$template->param( showpriority=>$show_priority );
|
||||||
|
|
||||||
my @waiting;
|
my @waiting;
|
||||||
my $wcount = 0;
|
my $wcount = 0;
|
||||||
|
|
Loading…
Reference in a new issue