| Lines 27-32
          use C4::Output qw( output_html_with_http_headers );
      
      
        Link Here | 
        
          | 27 |  | 27 |  | 
        
          | 28 | use Koha::Account::DebitType; | 28 | use Koha::Account::DebitType; | 
        
          | 29 | use Koha::Account::DebitTypes; | 29 | use Koha::Account::DebitTypes; | 
            
              |  |  | 30 | use Koha::AdditionalFields; | 
        
          | 30 |  | 31 |  | 
        
          | 31 | my $input = CGI->new; | 32 | my $input = CGI->new; | 
        
          | 32 | my $code  = $input->param('code'); | 33 | my $code  = $input->param('code'); | 
  
    | Lines 67-75
          if ( $op eq 'add_form' ) {
      
      
        Link Here | 
        
          | 67 |           }; | 68 |           }; | 
        
          | 68 |     } | 69 |     } | 
        
          | 69 |  | 70 |  | 
            
              |  |  | 71 |     my @additional_fields       = Koha::AdditionalFields->search( { tablename => 'account_debit_types' } )->as_list; | 
            
              | 72 |     my @additional_field_values = $debit_type ? $debit_type->get_additional_field_values_for_template : (); | 
            
              | 73 |  | 
        
          | 70 |     $template->param( | 74 |     $template->param( | 
          
            
              | 71 |         debit_type    => $debit_type, | 75 |         debit_type              => $debit_type, | 
            
              | 72 |         branches_loop => \@branches_loop | 76 |         branches_loop           => \@branches_loop, | 
            
              |  |  | 77 |         additional_fields       => \@additional_fields, | 
            
              | 78 |         additional_field_values => @additional_field_values, | 
        
          | 73 |     ); | 79 |     ); | 
        
          | 74 | } | 80 | } | 
        
          | 75 | elsif ( $op eq 'cud-add_validate' ) { | 81 | elsif ( $op eq 'cud-add_validate' ) { | 
  
    | Lines 92-97
          elsif ( $op eq 'cud-add_validate' ) {
      
      
        Link Here | 
        
          | 92 |     try { | 98 |     try { | 
        
          | 93 |         $debit_type->store; | 99 |         $debit_type->store; | 
        
          | 94 |         $debit_type->replace_library_limits( \@branches ); | 100 |         $debit_type->replace_library_limits( \@branches ); | 
            
              |  |  | 101 |  | 
            
              | 102 |         my @additional_fields = $debit_type->prepare_cgi_additional_field_values( $input, 'account_debit_types' ); | 
            
              | 103 |         $debit_type->set_additional_fields( \@additional_fields ); | 
            
              | 104 |  | 
        
          | 95 |         push @messages, { type => 'message', code => 'success_on_saving' }; | 105 |         push @messages, { type => 'message', code => 'success_on_saving' }; | 
        
          | 96 |     } | 106 |     } | 
        
          | 97 |     catch { | 107 |     catch { |