Merge branch 'bug_9592' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-02-15 08:07:53 -05:00
commit e85c55ace7
3 changed files with 44 additions and 39 deletions

View file

@ -1169,20 +1169,20 @@ Charges exempt from non-issue are:
=cut
my $ACCOUNT_TYPE_LENGTH = 5; # this is plain ridiculous...
my @not_fines = ('Res');
push @not_fines, 'Rent' unless C4::Context->preference('RentalsInNoissuesCharge');
unless ( C4::Context->preference('ManInvInNoissuesCharge') ) {
my $dbh = C4::Context->dbh;
my $man_inv_types = $dbh->selectcol_arrayref(qq{SELECT authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'});
push @not_fines, map substr($_, 0, $ACCOUNT_TYPE_LENGTH), @$man_inv_types;
}
my %not_fine = map {$_ => 1} @not_fines;
sub GetMemberAccountBalance {
my ($borrowernumber) = @_;
my $ACCOUNT_TYPE_LENGTH = 5; # this is plain ridiculous...
my @not_fines = ('Res');
push @not_fines, 'Rent' unless C4::Context->preference('RentalsInNoissuesCharge');
unless ( C4::Context->preference('ManInvInNoissuesCharge') ) {
my $dbh = C4::Context->dbh;
my $man_inv_types = $dbh->selectcol_arrayref(qq{SELECT authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'});
push @not_fines, map substr($_, 0, $ACCOUNT_TYPE_LENGTH), @$man_inv_types;
}
my %not_fine = map {$_ => 1} @not_fines;
my ($total, $acctlines) = GetMemberAccountRecords($borrowernumber);
my $other_charges = 0;
foreach (@$acctlines) {

6
debian/control vendored
View file

@ -17,8 +17,6 @@ Build-Depends: libalgorithm-checkdigits-perl,
libcgi-session-driver-memcached-perl,
libcgi-session-perl,
libcgi-session-serialize-yaml-perl,
libchi-driver-memcached-perl,
libchi-perl,
libclass-accessor-perl,
libclass-factory-util-perl,
libdata-ical-perl,
@ -78,6 +76,7 @@ Build-Depends: libalgorithm-checkdigits-perl,
libscalar-list-utils-perl,
libschedule-at-perl,
libsms-send-perl,
libstring-random-perl,
libstring-rewriteprefix-perl,
libtemplate-perl,
libtemplate-plugin-htmltotext-perl,
@ -194,8 +193,6 @@ Depends: libalgorithm-checkdigits-perl,
libcgi-session-driver-memcached-perl,
libcgi-session-perl,
libcgi-session-serialize-yaml-perl,
libchi-driver-memcached-perl,
libchi-perl,
libclass-accessor-perl,
libclass-factory-util-perl,
libdata-ical-perl,
@ -255,6 +252,7 @@ Depends: libalgorithm-checkdigits-perl,
libscalar-list-utils-perl,
libschedule-at-perl,
libsms-send-perl,
libstring-random-perl,
libstring-rewriteprefix-perl,
libtemplate-perl,
libtemplate-plugin-htmltotext-perl,

55
debian/list-deps vendored
View file

@ -3,21 +3,20 @@
# Write dependency list from Koha PerlDependencies.pm, in Debian format.
#
# Copyright 2010 Catalyst IT, Ltd
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict;
use warnings;
@ -26,43 +25,49 @@ use C4::Installer::PerlDependencies;
# These are packages that may not be in the apt archive in a way that
# apt-file can find, e.g. in the Koha repo rather than the regular
# debian one.
my %overrides = (
'CGI::Session::Driver::memcached' => 'libcgi-session-driver-memcached-perl',
'CHI' => 'libchi-perl',
'CHI::Driver::Memcached' => 'libchi-driver-memcached-perl',
'Template::Plugin::HtmlToText' => 'libtemplate-plugin-htmltotext-perl',
my %overrides = ();
# These are packages we're going to ignore
my %ignore = (
'Data::Pagination' => 1,
'CHI' => 1,
'CHI::Driver::Memcached' => 1,
);
my $deps = $C4::Installer::PerlDependencies::PERL_DEPS;
my $prefix = "^/usr/((lib|share)/perl5|(lib|share)/perl/[0-9.]+)";
foreach my $module (keys %$deps) {
my $ver = $deps->{$module}->{'min_ver'};
foreach my $module ( keys %$deps ) {
next if $ignore{$module};
my $ver = $deps->{$module}->{'min_ver'};
my $subpath = $module;
$subpath =~ s,::,/,g;
my $output =
qx(apt-file -l -x search "$prefix/$subpath.pm\$");
my @temp = split(/\n/, $output);
my @lines = ();
my $output = qx(apt-file -l -x search "$prefix/$subpath.pm\$");
my @temp = split( /\n/, $output );
my @lines = ();
# Remove packages that are required/essential and always installed on
# a Debian system. Debian packages should not have unversioned
# a Debian system. Debian packages should not have unversioned
# dependencies on such packages.
foreach my $line (@temp) {
if ($line ne "perl-base") {
@lines = (@lines, $line);
if ( $line ne "perl-base" ) {
@lines = ( @lines, $line );
}
}
if (scalar(@lines) == 1 && $lines[0] ne "") {
if ( scalar(@lines) == 1 && $lines[0] ne "" ) {
my $pkg = $lines[0];
print "$pkg\n";
} elsif (scalar(@lines) > 1) {
}
elsif ( scalar(@lines) > 1 ) {
foreach my $pkg (@lines) {
print " | " if ($pkg ne $lines[0]);
print " | " if ( $pkg ne $lines[0] );
print "$pkg";
}
print "\n";
} elsif (scalar(@temp) != 0) {
}
elsif ( scalar(@temp) != 0 ) {
# I'm an Essential and I'm OK,
# I install all night, and work all day.
# I chomp up strings. I eat my bugs.
@ -74,9 +79,11 @@ foreach my $module (keys %$deps) {
# is no reason to be suspicious of this
# commit.)
# RM note: suspicious? me? always!
} elsif (exists $overrides{$module}) {
}
elsif ( exists $overrides{$module} ) {
print "$overrides{$module}\n";
} else {
}
else {
print "EEEK: unknown package for $module\n";
}
}