[Koha-cvs] CVS: koha/koha-curses circ.pl,1.2,1.3

Chris Cormack rangi at users.sourceforge.net
Sun May 15 06:29:56 CEST 2005


Update of /cvsroot/koha/koha/koha-curses
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22844

Modified Files:
	circ.pl 
Log Message:
Continuing work, issues getting closed to finished


Index: circ.pl
===================================================================
RCS file: /cvsroot/koha/koha/koha-curses/circ.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** circ.pl	15 May 2005 00:03:26 -0000	1.2
--- circ.pl	15 May 2005 04:29:54 -0000	1.3
***************
*** 71,78 ****
  );
  
! my $texteditor =
!   $win1->add( "text", "TextEditor",
!     -text => "This is the first cut of a \ncirculations system using Curses::UI\n".
!   "Use the menus (or the keyboard\nshortcuts) to choose issues or \nreturns");
  
  $cui->set_binding( sub { $menu->focus() }, "\cX" );
--- 71,79 ----
  );
  
! my $texteditor = $win1->add( "text", "TextEditor",
!     -text =>
!       "This is the first cut of a \ncirculations system using Curses::UI\n"
!       . "Use the menus (or the keyboard\nshortcuts) to choose issues or \nreturns"
! );
  
  $cui->set_binding( sub { $menu->focus() }, "\cX" );
***************
*** 109,115 ****
                getpatroninformation( \%env, $borrower->{'borrowernumber'}, 0 );
              $win1->delete('borrowerdata');
!             my $borrowerdata = $win1->add( 'borrowerdata', 'TextViewer',
                  -text => "Cardnumber: $borrower->{'cardnumber'}\n"
!                   . "Name: $borrower->{'title'} $borrower->{'firstname'} $borrower->{'surname'}"
              );
  
--- 110,118 ----
                getpatroninformation( \%env, $borrower->{'borrowernumber'}, 0 );
              $win1->delete('borrowerdata');
!             my $borrowerdata = $win1->add(
!                 'borrowerdata', 'TextViewer',
                  -text => "Cardnumber: $borrower->{'cardnumber'}\n"
!                   . "Name: $borrower->{'title'} $borrower->{'firstname'} $borrower->{'surname'}\n"
! 
              );
  
***************
*** 193,196 ****
--- 196,200 ----
          # go into a loop issuing until a blank barcode is given
          while ( my $barcode = $cui->question( -question => 'Barcode' ) ) {
+             my $issues;
              my $issueconfirmed;
              my ( $error, $question ) =
***************
*** 203,219 ****
                  $noerror = 0;
              }
  
!             foreach my $needsconfirmation ( keys %$question ) {
!                 $noquestion     = 0;
!                 $issueconfirmed = $cui->dialog(
!                     -message => $needsconfirmation,
!                     -title   => "Confirmation",
!                     -buttons => [ 'yes', 'no' ],
  
!                 );
  
              }
              if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
                  issuebook( \%env, $borrower, $barcode, $datedue );
              }
  
--- 207,233 ----
                  $noerror = 0;
              }
+             if ($noerror) {
  
!                 # no point asking confirmation questions if we cant issue
!                 foreach my $needsconfirmation ( keys %$question ) {
!                     $noquestion     = 0;
!                     $issueconfirmed = $cui->dialog(
!                         -message =>
! "$needsconfirmation $question->{$needsconfirmation} Issue anyway?",
!                         -title   => "Confirmation",
!                         -buttons => [ 'yes', 'no' ],
  
!                     );
  
+                 }
              }
              if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
                  issuebook( \%env, $borrower, $barcode, $datedue );
+                 $issues .= "$barcode $datedue";
+                 $win2->delete('currentissues');
+                 $currentissues =
+                   $win2->add( 'currentissues', 'TextViewer', -text => $issues,
+                   );
+ 
              }
  





More information about the Koha-cvs mailing list