koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.15,1.21.2.16


From: Finlay Thompson
Subject: [Koha-cvs] CVS: koha/C4/Circulation Circ2.pm,1.21.2.15,1.21.2.16
Date: Wed, 27 Nov 2002 15:48:24 -0800

Update of /cvsroot/koha/koha/C4/Circulation
In directory sc8-pr-cvs1:/tmp/cvs-serv28961

Modified Files:
      Tag: rel-1-2
        Circ2.pm 
Log Message:

Bug fix in calc_charges for hlt


Index: Circ2.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Circulation/Circ2.pm,v
retrieving revision 1.21.2.15
retrieving revision 1.21.2.16
diff -C2 -r1.21.2.15 -r1.21.2.16
*** Circ2.pm    26 Nov 2002 04:45:03 -0000      1.21.2.15
--- Circ2.pm    27 Nov 2002 23:48:22 -0000      1.21.2.16
***************
*** 702,706 ****
      my ($rejected,$question,$defaultanswer,$questionnumber, $noissue);
      my $message;
! 
      # See if there's any reason this book shouldn't be issued to this
      # patron.
--- 702,706 ----
      my ($rejected,$question,$defaultanswer,$questionnumber, $noissue);
      my $message;
! #    warn "in issue book";
      # See if there's any reason this book shouldn't be issued to this
      # patron.
***************
*** 769,773 ****
                    last SWITCH;
                } elsif ($responses->{4} eq 'Y') {
!                   my $charge = calc_charges($env, $dbh, 
$iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'});
                    if ($charge > 0) {
                        createcharge($env, $dbh, 
$iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'}, 
$charge);
--- 769,774 ----
                    last SWITCH;
                } elsif ($responses->{4} eq 'Y') {
!                   my ($charge,$itemtyp1) = calc_charges($env, $dbh, 
$iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'});
! 
                    if ($charge > 0) {
                        createcharge($env, $dbh, 
$iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'}, 
$charge);
***************
*** 900,904 ****
        $sth->finish;
        # If it costs to borrow this book, charge it to the patron's account.
!       my $charge=calc_charges($env, $dbh, $iteminformation->{'itemnumber'}, 
$patroninformation->{'borrowernumber'});
        if ($charge > 0) {
            createcharge($env, $dbh, $iteminformation->{'itemnumber'}, 
$patroninformation->{'borrowernumber'}, $charge);
--- 901,906 ----
        $sth->finish;
        # If it costs to borrow this book, charge it to the patron's account.
!       my ($charge,$itemtype)=calc_charges($env, $dbh, 
$iteminformation->{'itemnumber'}, $patroninformation->{'borrowernumber'});
! #     warn "here charge is $charge itemtype $itemtype";
        if ($charge > 0) {
            createcharge($env, $dbh, $iteminformation->{'itemnumber'}, 
$patroninformation->{'borrowernumber'}, $charge);
***************
*** 1712,1716 ****
        $item_type = $data1->{'itemtype'};
        $charge = $data1->{'rentalcharge'};
! #     print FILE "charge is $charge\n";
        my $q2 = "select rentaldiscount from borrowers,categoryitem
        where (borrowers.borrowernumber = '$bornum')
--- 1714,1718 ----
        $item_type = $data1->{'itemtype'};
        $charge = $data1->{'rentalcharge'};
!       print FILE "charge is $charge\n";
        my $q2 = "select rentaldiscount from borrowers,categoryitem
        where (borrowers.borrowernumber = '$bornum')
***************
*** 1722,1729 ****
        if (my $data2=$sth2->fetchrow_hashref) {
            my $discount = $data2->{'rentaldiscount'};
! #         print FILE "discount is $discount";
            if ($discount eq 'NULL') {
              $discount=0;
            }
            $charge = ($charge *(100 - $discount)) / 100;
        }
--- 1724,1732 ----
        if (my $data2=$sth2->fetchrow_hashref) {
            my $discount = $data2->{'rentaldiscount'};
! 
            if ($discount eq 'NULL') {
              $discount=0;
            }
+ #                 print FILE "discount is $discount\n";
            $charge = ($charge *(100 - $discount)) / 100;
        }
***************
*** 1731,1735 ****
      }
      $sth1->finish;
! #    close FILE;
      return ($charge, $item_type);
  }
--- 1734,1739 ----
      }
      $sth1->finish;
!  #   print FILE "charge is now $charge\n itemtype = $item_type";
!  #   close FILE;
      return ($charge, $item_type);
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]