| Lines 38-43
          use C4::Branch; # GetBranches
      
      
        Link Here | 
        
          | 38 |  | 38 |  | 
        
          | 39 | use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; | 39 | use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; | 
        
          | 40 |  | 40 |  | 
            
              |  |  | 41 | use Date::Calc qw( | 
            
              | 42 |   Today | 
            
              | 43 |   Add_Delta_Days | 
            
              | 44 |   Date_to_Days | 
            
              | 45 | ); | 
            
              | 46 |  | 
        
          | 41 | my $query = new CGI; | 47 | my $query = new CGI; | 
        
          | 42 |  | 48 |  | 
        
          | 43 | BEGIN { | 49 | BEGIN { | 
  
    | Lines 99-104
          $borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'};
      
      
        Link Here | 
        
          | 99 | my @bordat; | 105 | my @bordat; | 
        
          | 100 | $bordat[0] = $borr; | 106 | $bordat[0] = $borr; | 
        
          | 101 |  | 107 |  | 
            
              |  |  | 108 | # Warningdate is the date that the warning starts appearing | 
            
              | 109 | my (  $today_year,   $today_month,   $today_day) = Today(); | 
            
              | 110 | my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'}; | 
            
              | 111 |  | 
            
              | 112 | if ( C4::Context->preference('NotifyBorrowerDeparture') && | 
            
              | 113 |     Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < | 
            
              | 114 |     Date_to_Days( $today_year, $today_month, $today_day ) )  | 
            
              | 115 | { | 
            
              | 116 |     # borrower card soon to expire, warn the borrower | 
            
              | 117 |     $borr->{'warndeparture'} = format_date($borr->{dateexpiry}); | 
            
              | 118 |     if (C4::Context->preference('ReturnBeforeExpiry')){ | 
            
              | 119 |         $borr->{'returnbeforeexpiry'} = 1; | 
            
              | 120 |     } | 
            
              | 121 | } | 
            
              | 122 |  | 
        
          | 102 | $template->param(   BORROWER_INFO     => \@bordat, | 123 | $template->param(   BORROWER_INFO     => \@bordat, | 
        
          | 103 |                     borrowernumber    => $borrowernumber, | 124 |                     borrowernumber    => $borrowernumber, | 
        
          | 104 |                     patron_flagged    => $borr->{flagged}, | 125 |                     patron_flagged    => $borr->{flagged}, | 
            
              | 105 | -  |  |  |