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}; |