projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 16256 - Can't edit library EAN if you leave EAN empty
[koha.git]
/
reports
/
guided_reports.pl
diff --git
a/reports/guided_reports.pl
b/reports/guided_reports.pl
index
ceba539
..
4b45f95
100755
(executable)
--- a/
reports/guided_reports.pl
+++ b/
reports/guided_reports.pl
@@
-28,11
+28,13
@@
use C4::Reports::Guided;
use C4::Auth qw/:DEFAULT get_session/;
use C4::Output;
use C4::Debug;
use C4::Auth qw/:DEFAULT get_session/;
use C4::Output;
use C4::Debug;
-use C4::
Branch; # XXX subfield_is_koha_internal_p
-use C4::
Koha qw/IsAuthorisedValueCategory GetFrameworksLoop/
;
+use C4::
Koha qw/GetFrameworksLoop/;
+use C4::
Branch
;
use C4::Context;
use C4::Log;
use Koha::DateUtils qw/dt_from_string output_pref/;
use C4::Context;
use C4::Log;
use Koha::DateUtils qw/dt_from_string output_pref/;
+use Koha::AuthorisedValue;
+use Koha::AuthorisedValues;
=head1 NAME
=head1 NAME
@@
-705,7
+707,7
@@
elsif ($phase eq 'Run this report'){
#---- "true" authorised value
}
else {
#---- "true" authorised value
}
else {
- if (
IsAuthorisedValueCategory($authorised_value)
) {
+ if (
Koha::AuthorisedValues->search({ category => $authorised_value })->count
) {
my $query = '
SELECT authorised_value,lib
FROM authorised_values
my $query = '
SELECT authorised_value,lib
FROM authorised_values
@@
-998,12
+1000,21
@@
sub create_non_existing_group_and_subgroup {
my $report_groups = C4::Reports::Guided::get_report_groups;
if (not exists $report_groups->{$group}) {
my $groupdesc = $input->param('groupdesc') // $group;
my $report_groups = C4::Reports::Guided::get_report_groups;
if (not exists $report_groups->{$group}) {
my $groupdesc = $input->param('groupdesc') // $group;
- C4::Koha::AddAuthorisedValue('REPORT_GROUP', $group, $groupdesc);
+ Koha::AuthorisedValue->new({
+ category => 'REPORT_GROUP',
+ authorised_value => $group,
+ lib => $groupdesc,
+ })->store;
}
if (defined $subgroup and $subgroup ne '') {
if (not exists $report_groups->{$group}->{subgroups}->{$subgroup}) {
my $subgroupdesc = $input->param('subgroupdesc') // $subgroup;
}
if (defined $subgroup and $subgroup ne '') {
if (not exists $report_groups->{$group}->{subgroups}->{$subgroup}) {
my $subgroupdesc = $input->param('subgroupdesc') // $subgroup;
- C4::Koha::AddAuthorisedValue('REPORT_SUBGROUP', $subgroup, $subgroupdesc, $group);
+ Koha::AuthorisedValue->new({
+ category => 'REPORT_SUBGROUP',
+ authorised_value => $subgroup,
+ lib => $subgroupdesc,
+ lib_opac => $group,
+ })->store;
}
}
}
}
}
}