Bug 14364: (QA follow-up) Fix capitalization
[srvgit] / installer / onboarding.pl
index 40b4c33..95e2b7b 100755 (executable)
 
 use Modern::Perl;
 use C4::Context;
-use C4::InstallAuth;
+use C4::InstallAuth qw( checkauth get_template_and_user );
 use CGI qw ( -utf8 );
-use C4::Output;
-use C4::Members qw(checkcardnumber);
+use C4::Output qw( output_html_with_http_headers );
+use C4::Members qw( checkcardnumber );
 use Koha::Patrons;
 use Koha::Libraries;
 use Koha::Database;
-use Koha::DateUtils;
+use Koha::DateUtils qw( dt_from_string output_pref );
 use Koha::Patrons;
 use Koha::Patron::Categories;
 use Koha::ItemTypes;
@@ -242,7 +242,7 @@ if ( $step == 5 ) {
         my $categorycode    = $input->param('categorycode');
         my $itemtype        = $input->param('itemtype');
         my $maxissueqty     = $input->param('maxissueqty');
-        my $issuelength     = $input->param('issuelength');
+        my $issuelength     = $input->param('issuelength') || 0;
         my $lengthunit      = $input->param('lengthunit');
         my $renewalsallowed = $input->param('renewalsallowed');
         my $renewalperiod   = $input->param('renewalperiod');
@@ -252,7 +252,6 @@ if ( $step == 5 ) {
         my $onshelfholds    = $input->param('onshelfholds') || 0;
         $maxissueqty =~ s/\s//g;
         $maxissueqty = undef if $maxissueqty !~ /^\d+/;
-        $issuelength = $issuelength eq q{} ? undef : $issuelength;
 
         my $params = {
             branchcode      => $branchcode,
@@ -286,7 +285,15 @@ if ( $step == 5 ) {
                 overduefinescap                  => "",
                 rentaldiscount                   => 0,
                 reservesallowed                  => $reservesallowed,
-                suspension_chargeperiod          => undef,
+                suspension_chargeperiod          => 1,
+                decreaseloanholds                => "",
+                unseen_renewals_allowed          => "",
+                recalls_allowed                  => undef,
+                recalls_per_record               => undef,
+                on_shelf_recalls                 => undef,
+                recall_due_date_interval         => undef,
+                recall_overdue_fine              => undef,
+                recall_shelf_time                => undef,
               }
         };
 
@@ -320,7 +327,6 @@ my ( $template, $loggedinuser );
         template_name   => "onboarding/onboardingstep${step}.tt",
         query           => $input,
         type            => "intranet",
-        debug           => 1,
     }
 );