Bug 19933: Remove patronflags - unused vars oldamount/amountold in circulation.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sun, 7 Jan 2018 17:06:14 +0000 (14:06 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Mar 2018 14:45:38 +0000 (11:45 -0300)
There is oldamound/amountold variable that is sent to the template but
never used later. Let remove it now to avoid useless replacement.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

circ/circulation.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt

index 93ed09c..125d75d 100755 (executable)
@@ -552,9 +552,6 @@ foreach my $flag ( sort keys %$flags ) {
     }
 }
 
-my $amountold = $flags ? $flags->{'CHARGES'}->{'message'} || 0 : 0;
-$amountold =~ s/^.*\$//;    # remove upto the $, if any
-
 my $total = $patron ? $patron->account->balance : 0;
 
 if ( $patron && $patron->is_child) {
@@ -632,7 +629,6 @@ $template->param(
     borrowernumber    => $borrowernumber,
     branch            => $branch,
     was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
-    amountold         => $amountold,
     barcodes          => $barcodes,
     stickyduedate     => $stickyduedate,
     duedatespec       => $duedatespec,
index 4c66feb..2f1d118 100644 (file)
@@ -603,7 +603,6 @@ No patron matched <span class="ex">[% message | html %]</span>
           <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
                 [% IF ( CHARGES ) %]
                         <input type="hidden" name="charges" value="yes" />
-                        <input type="hidden" name="oldamount" value="[% amountold %]" />
                 [% END %]
 </fieldset>
 [% IF ( issue ) %]