Document Navigator For The Design Index (Testing Document)
Previous Section
(Customer Administration)
This Section
(Transactions)
Next Section
(Entity Relationship Diagram)
Previous (Borrowing A Book) Returning A Book Next (Renewing A Book)

 


PseudoCode                                   
     * Procedure "Returning a book" changes circulation status as customer returns a book depending on if that book copy is on hold or not. If the book copy is on hold, circulation status is changed to 'on loan' (borrowed by the holder and not allowing others to borrow) otherwise it will be changed to available.
Procedure RETURNING_A_BOOK
{  
   while (CANCEL button not pressed)
   {  
     if(OK button pressed)
     {
       read in Call_Number from the text-box;
       checks for syntax error on Call_Number;

       if(syntax error on Call_Number occurred)
         display error message(syntax error occurred);

       else /* no syntax error */
       {
         if(Call_Number doesn't exist in database)
            display error message(call number doesn't exist);

         else if(Circulation_Status is On_Loan or On_Hold or Overdue)
         {
           update Circulation_Status as Available in database;
           display message(book successfully returned);

           if(Circulation_Status is On_Hold)
           {
             open new pop-up window displaying a holder's information;

             if(PRINT button pressed) 
               print out the holder's information;

             else /* CLOSE button */ 
               close current window;

             update Circulation_Status as On_Loan in database;
             update Loans.User_ID as a holder and Loans.Loan_Date as today for book copy with Call_Number in database;
           }
         }

         else /* Circulation_Status is Available or Out_of_Circulation */
           display error message(The book is not on loan);
       }
     }
     else if(CLEAR button pressed) 
   clear the contents in the entry field;

     else /* HLEP button */
     {
       open new pop-up window displaying help;

       if(CLOSE button pressed) 
         close help window;
     }
   }
}

 


Document Navigator For The Design Index (Testing Document)
Previous Section
(Customer Administration)
This Section
(Transactions)
Next Section
(Entity Relationship Diagram)
Previous (Borrowing A Book) Returning A Book Next (Renewing A Book)

Copyright ©1997 VoidWorks Software Inc.

Send mail to the Group Leader or the Webmaster
Pages created and maintained with Mortar