Kumara - predecessor to Koha
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
1.9 KiB

  1. #!/usr/bin/perl
  2. #wrriten 11/1/2000 by chris@katipo.oc.nz
  3. #script to display borrowers account details
  4. use strict;
  5. use C4::Output;
  6. use CGI;
  7. use C4::Search;
  8. my $input=new CGI;
  9. my $bornum=$input->param('bornum');
  10. #get borrower details
  11. my $data=borrdata('',$bornum);
  12. #get account details
  13. my %bor;
  14. $bor{'borrowernumber'}=$bornum;
  15. my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
  16. print $input->header;
  17. print startpage();
  18. print startmenu('member');
  19. print <<printend
  20. <FONT SIZE=6><em>Account for $data->{'firstname'} $data->{'surname'}</em></FONT><P>
  21. <center>
  22. <p>
  23. <TABLE CELLSPACING=0 CELLPADDING=5 border=1 >
  24. <TR VALIGN=TOP>
  25. <td bgcolor="99cc33" background="/images/background-mem.gif" colspan=2><B>FINES & CHARGES</TD>
  26. <td bgcolor="99cc33" background="/images/background-mem.gif" colspan=1><B>AMOUNT</TD>
  27. <td bgcolor="99cc33" background="/images/background-mem.gif" colspan=1><B>STILL OWING</TD>
  28. <td bgcolor="99cc33" background="/images/background-mem.gif" colspan=1><B>FIX</B></TD>
  29. </TR>
  30. <form method=post action=tidyaccounts.pl>
  31. printend
  32. ;
  33. for (my $i=0;$i<$numaccts;$i++){
  34. $accts->[$i]{'amount'}+=0.00;
  35. $accts->[$i]{'amountoutstanding'}+=0.00;
  36. print <<printend
  37. <tr VALIGN=TOP >
  38. <td>$accts->[$i]{'date'}</td>
  39. <TD>$accts->[$i]{'description'}
  40. printend
  41. ;
  42. if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){
  43. print "$accts->[$i]{'title'}";
  44. }
  45. print <<printend
  46. </td>
  47. <td>$accts->[$i]{'amount'}</td>
  48. <TD>$accts->[$i]{'amountoutstanding'}</td>
  49. <td><input type=text size=5 name=$accts->[$i]{'accountno'} value="$accts->[$i]{'amount'}"></td>
  50. </tr>
  51. printend
  52. ;
  53. }
  54. print <<printend
  55. <tr VALIGN=TOP >
  56. <TD></td>
  57. <TD colspan=2><b>Total Due</b></td>
  58. <TD><b>$total</b></td>
  59. </tr>
  60. </table>
  61. <input type=hidden name=bornum value=$bornum>
  62. <input type=submit value="Tidy Accounts">
  63. </form>
  64. <br clear=all>
  65. <p> &nbsp; </p>
  66. printend
  67. ;
  68. print endmenu('member');
  69. print endpage();