View | Details | Raw Unified | Return to bug 16889
Collapse All | Expand All

(-)a/C4/Items.pm (-15 / +2 lines)
Lines 37-42 use Data::Dumper; # used as part of logging item record changes, not just for Link Here
37
use Koha::DateUtils qw/dt_from_string/;
37
use Koha::DateUtils qw/dt_from_string/;
38
use Koha::Database;
38
use Koha::Database;
39
39
40
use Koha::Biblioitems;
40
use Koha::Items;
41
use Koha::Items;
41
use Koha::SearchEngine;
42
use Koha::SearchEngine;
42
use Koha::SearchEngine::Search;
43
use Koha::SearchEngine::Search;
Lines 3046-3065 sub PrepareItemrecordDisplay { Link Here
3046
    };
3047
    };
3047
}
3048
}
3048
3049
3049
=head2 biblioitems_columns
3050
3051
  my @columns = C4::Items::biblioitems_columns();
3052
3053
Returns an array of biblioitems' table columns on success,
3054
and an empty array on failure.
3055
3056
=cut
3057
3058
sub biblioitems_columns {
3059
    my $rs = Koha::Database->new->schema->resultset('Biblioitem');
3060
    return $rs->result_source->columns;
3061
}
3062
3063
sub ToggleNewStatus {
3050
sub ToggleNewStatus {
3064
    my ( $params ) = @_;
3051
    my ( $params ) = @_;
3065
    my @rules = @{ $params->{rules} };
3052
    my @rules = @{ $params->{rules} };
Lines 3068-3074 sub ToggleNewStatus { Link Here
3068
    my $dbh = C4::Context->dbh;
3055
    my $dbh = C4::Context->dbh;
3069
    my @errors;
3056
    my @errors;
3070
    my @item_columns = map { "items.$_" } Koha::Items->columns;
3057
    my @item_columns = map { "items.$_" } Koha::Items->columns;
3071
    my @biblioitem_columns = map { "biblioitems.$_" } C4::Items::biblioitems_columns;
3058
    my @biblioitem_columns = map { "biblioitems.$_" } Koha::Biblioitems->columns;
3072
    my $report;
3059
    my $report;
3073
    for my $rule ( @rules ) {
3060
    for my $rule ( @rules ) {
3074
        my $age = $rule->{age};
3061
        my $age = $rule->{age};
(-)a/tools/automatic_item_modification_by_age.pl (-2 / +2 lines)
Lines 41-46 use C4::Output; Link Here
41
use C4::Koha;
41
use C4::Koha;
42
42
43
use Koha::Items;
43
use Koha::Items;
44
use Koha::Biblioitems;
44
45
45
my $cgi = new CGI;
46
my $cgi = new CGI;
46
47
Lines 109-115 if ( $@ ) { Link Here
109
}
110
}
110
111
111
my @item_fields = map { "items.$_" } Koha::Items->columns;
112
my @item_fields = map { "items.$_" } Koha::Items->columns;
112
my @biblioitem_fields = map { "biblioitems.$_" } C4::Items::biblioitems_columns;
113
my @biblioitem_fields = map { "biblioitems.$_" } Koha::Biblioitems->columns;
113
$template->param(
114
$template->param(
114
    op => $op,
115
    op => $op,
115
    messages => \@messages,
116
    messages => \@messages,
116
- 

Return to bug 16889