SquidSoft Inc. - GUIDOs
Detailed Design Document - Process Specifications


           Process 4: Main Orders Screen           

Inputs:

  • Mouse action
  • Date completed
  • Security level
  • Security level access

Outputs:

  • Instance of "order" to be modified in the data store "Orders"
  • Message to screen

Called By:

  • 2

Calls:

  • 2
  • 4.1
  • 4.3
  • 4.4
  • 4.5
  • 4.6
  • 4.8
  • 4.9

Assumptions:

  • None

Error conditions:

  • User does not have security access

Algorithm:

if user modifies table then
  if user has security access
    order[Status] = Pending|Filled|Incomplete|Complete
    if order[Status] == Incomplete then
      call details function
      order[Date Completed] := Date Completed
      Send order to data store (orders) to be updated
      if data store reported success then
        print_to_user `successfully modified'
      else
        print_to_user  `something wrong!'
      end if
    else
      print_to_user `No access to modify table'
    end if
  end if
end if

if user presses manual order button then
  if user has security access
    call manual order function
  else
    print_to_user `You do not have access to that function'
  end if
end if
if user presses details button then
  call details function
end if
if user presses auto order button then
  if user has security access
    call auto order function
  else
    print_to_user `You do not have access to that function'
  end if
end if
if user presses find button then
  call find function
end if
if user presses sort by button then
  call sort by function
end if
if user presses print button then 
  call print function
end if
if user presses exit button then
  call main menu process
end if

           Process 4.1: Manual Order           

Inputs:

  • Order
  • Security Level
  • Security Level Access
  • Groceries
  • Mouse Action

Outputs:

  • Order
  • Details

Called By:

  • 4

Calls:

  • 4.1.1
  • 4.1.2
  • 4.1.3
  • 4.1.4
  • 4.1.5

Assumptions:

  • The Groceries Ordered and Orders databases are large enough to handle the new entries.

Error Conditions:

  • An order is submitted with no entries in the items-to-order table. Submit behaves as Cancel in this case.

Algorithm:

Get the time and date from the system
Get the employee_id, store_id from employee database
Get max_order_number + 1 from orders database
repeat
  On Mouse_Action:
    case Mouse_Action = add_grocery:
      do Add_Grocery
    case Mouse_Action = remove_grocery:
      do Remove_Grocery
    case Mouse_Action = submit:
      do Submit_Order
    case Mouse_Action = cancel:
      do Cancel_Order
until(false)
exit

           Process 4.1.1: Find Grocery           

Inputs:

  • Mouse Action
  • UPC
  • description

Outputs:

  • Updated table

Called By:

  • 4.1

Calls:

  • None

Assumptions:

  • The Groceries database exists.

Error Conditions:

  • The Grocery sought does not exit

Algorithm:

if exist UPC
  table_lookup(UPC)
else
  table_lookup(description)
update table
end.

           Process 4.1.2: Submit Order           

Inputs:

  • Mouse Action

Outputs:

  • Order
  • Groceries Ordered

Called By:

  • 4.1

Calls:

  • None

Assumptions:

  • The Groceries Ordered and Orders databases are large enough to handle the new entries.

Error Conditions:

  • There are no entries in the Groceries to order table.

Algorithm:

if (sizeof groceries_to_order != 0)
  order_id = create_new_order(date, time, employee_ID,
                       store_ID, max(order_number) + 1)
  for (1..sizeof groceries_to_order)
    create_new_groceries_ordered(order_id, UPC, quantity)
  else
    error: "No items to order"
end if
end.

           Process 4.1.3: Add Grocery           

Inputs:

  • Mouse Action

Outputs:

  • None

Called By:

  • 4.1

Calls:

  • None

Assumptions:

  • None

Error Conditions:

  • None

Algorithm:

if !exist Ordered_Grocery_table(highlighted UPC)
  add_to_Qrdered_Grocery_table(highlighted UPC, 1)
else
  Ordered_Grocery_table(highlighted UPC).quantity++
end if
exit.

           Process 4.1.4: Remove Grocery           

Inputs:

  • Mouse Action

Outputs:

  • None

Called By:

  • 4.1

Calls:

  • None

Assumptions:

  • None

Error Conditions:

  • None

Algorithm:

if exist Ordered_Grocery_table(highlighted UPC)
  Ordered_Grocery_table(highlighted UPC).quantity--
  if Ordered_Grocery_table(highlighted UPC).quantity == 0)
    remove_from_Qrdered_Grocery_table(highlighted UPC, 1)
  end if
end if
exit.

           Process 4.1.5: Calcel New Order           

Inputs:

  • Mouse Action

Outputs:

  • None

Called By:

  • 4.1

Calls:

  • None

Assumptions:

  • None

Error Conditions:

  • None

Algorithm:

clear Groceries_to_order_table
close Manual_Order interface
display Orders interface
exit.

           Process 4.3: Details           

Inputs:

  • Mouse Action
  • UPC
  • Description
  • Number Ordered
  • Number Received

Output:

  • Instance of "grocery order" to be modified in the data store "Groceries Ordered"
  • Message to screen

Called By:

  • 4

Calls:

  • 4.3.1
  • 4.3.2
  • 4.3.3
  • 4.3.4

Assumptions:

  • None

Error conditions:

  • Syntactically incorrect input
  • Number received invalid (negative)

Algorithm:

(values in fields are by default, the values currently 
entered for that order)

if inputs from user are syntactically correct then
  if user modifies table then
    groceries ordered[Number Received] = Number Received
    order[Date Completed] = Date Completed

    Send order to the data store (orders) to be updated

    if data store reported success then
      print_to_user `successfully modified'
    else
      print_to_user `number received must be positive'
    end if
  if user presses exit button then
    call main menu process
  end if
else
  print_to_user `Syntax error in input(s)'
end if

           Process 4.4: Find Order           

Inputs:

  • Order date emploee stats upc
  • Date Ordered
  • Employee ID
  • Status
  • UPC

Outputs:

  • instances of Order matching search criteria

Called By:

  • 4

Calls:

  • NONE

Assumptions:

  • None

Error Conditions:

  • No criteria specified
  • Inputs not syntactically correct

Algorithm:

if user presses ok button
  if all input fields blank then
    print_to_user `Please enter criteria'
    redisplay find screen
  else if inputs are syntactically correct
    search Orders and Details databases for orders matching
      ALL given criteria
    if search is successful
      return orders matching criteria
    else
      print_to_user `no orders matching criteria were found'
    end if
  else
    print_to_user `syntax error(s) in input'
  end if
if user presses exit button
  return to orders menu

           Process 4.5: Sort by           

Inputs:

  • Mouse Action

Outputs:

  • Orders

Called By:

  • 4

Calls:

  • NONE

Assumptions:

  • None

Error Conditions:

  • None

Notes:

  • primary, secondary and tertiary sort implemented as check boxes
    4 types:
    1. by order number (ascending)
    2. by order number (descending)
    3. by employee ID (lowest to highest)
    4. by status (by status type)

Algorithm:

if user tries to check 4th box after checking 3,
it will not check
  if no boxes checked
    sort by default (order number - descending)
  else if 1 box checked
    sort by criteria that was checked
  else if 2 boxes checked
    sort by primary criteria
    sort by secondary criteria
  else if 3 boxes checked
    sort by primary criteria
    sort by secondary criteria
    sort by tertiary criteria
  end if
end if
return sorted order list

           Process 4.6: Print Order           

Inputs:

  • Mouse Action

Output:

  • print all the orders currently in the system OR
  • prints out the order which is highlighted from the list.

Note that this includes the details of each order.

Called By:

  • 4

Calls:

  • none

Error conditions:

  • printer not responding

Algorithm:

if no order highlighted
  if printer responding
    do
      send_to_printer order[Order_Number]
      send_to_printer order[Date_Ordered]
      send_to_printer order[Employee ID]
      send_to_printer order[Status]
      send_to_printer groceries_ordered[UPC]
      send_to_printer groceries_ordered[Description]
      send_to_printer groceries_ordered[Number Ordered]
      send_to_printer groceries_ordered[Number Received]
    until no more orders to print
  else
    print_to_user `printer not responding'
  end if
else   //print selected order
  if printer responding
    send_to_printer order[Order_Number]
    send_to_printer order[Date_Ordered]
    send_to_printer order[Employee ID]
    send_to_printer order[Status]
    send_to_printer groceries_ordered[UPC]
    send_to_printer groceries_ordered[Description]
    send_to_printer groceries_ordered[Number Ordered]
    send_to_printer groceries_ordered[Number Received]
  else
    print_to_user `printer not responding'
  end if
end if
return to the details screen

           Process 4.7: Automatic Order           

Inputs:

  • time
  • Inventory
  • Mouse Action

Outputs:

  • Order
  • Details

Called By:

  • 4
  • timer

Calls:

  • NONE

Assumptions:

  • The Groceries Ordered and Orders databases are large enough to handle the new entries.

Error Conditions:

  • None

Algorithm:

Get the time, date, and store_id from the system
if process started by employee
  Get store_id and employee_id from employee database
end if
Get max_order_number + 1 from orders databas
Get inventory from inventory database
do
  search inventory for grocer with stock < set amount
  add inventory.UPC to items-in-order
  set items-in-order.qnty to set amount
  set inventory.status to ordered
until end of inventory
if sizeof items-to-order > 0
  create new order
  create new grocery_ordered for each item in
    items-to-order
end if
exit

           Process 4.8: Exit           

Inputs:

  • Mouse Action

Outputs:

  • None

Called By:

  • 4

Calls:

  • 2

Error Conditions:

  • None

Algorithm:

call main menu function
Login  
Main Menu  
Security  
Password  
Orders  
Product  
Personnel  
Stores  
Cashier  
Inventory  

Main Page  


About SquidSoft Inc. This site created and maintained
with Mortar