Chapter 4. Purchasing Module

4.1. Requirements

This chapter is $Revision: 1.1 $ $Date: 2003/01/05 00:00:30 $.

4.1.1. Business Requirements

  1. Provide capability for non-purchasing staff to manually enter requisitions to purchase both inventory and non-inventory items.

  2. Capability to requisition items without part numbers.

  3. Provide capability to notify requisitioner that purchase order for the requisitioned items has been processed.

  4. Provide place for requisitioner to notify purchasing that substitutions are or are not allowed.

  5. Requisition will have required date which specifies the date the items must be received by.

  6. Automated or batch conversion of requisitions to purchase orders based on policy

  7. Provide list of open requisitions by buyer responsible and allow buyer to check each requisition and convert to purchase order.

  8. Send purchase orders to vendors.

  9. Keep track of which purchase orders have been printed and/or sent (via fax, EDI or mail).

  10. Provide capability to resend Purchase Orders.

  11. Provide capability keep track of purchase order history. When sent, when resent, when modified etc.

  12. Provide capability to select a group of unsent Purchase Orders and send all at one time.

  13. Maintain delivery status of line items on purchase orders. If an line item is going to be delivered by multiple deliveries then each delivery should be shown on a separate line item.

  14. Provide buyer prompting for almost due or late material follow-up.

  15. Provide capability for purchasing staff to enter buyer information and link buyers to simple inventory type.

  16. Maintain simple user defined product types. Allow purchasing staff to enter product types in a master table and to assign inventory items to product types.

4.1.8. Business Object Definition

					
# purchasing.gcd
#                  
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# This file is part of GNU Enterprise.
#
# GNU Enterprise is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# 
# GNU Enterprise is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Enterprise; see the file COPYING.  If not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
#
# This file originally written by Neil Tiffin (neilt@gnue.org).
#
# $Revision: 1.1 $ $Date: 2003/01/05 00:00:30 $ $Author: psu_gnue $
#
include "../../../base/units/classes/units.gcd"
include "../../../supply-chain/vendor/classes/vendor.gcd"

module pur
{

  # -------------------------------------------------------------------------
  # Add purchasing info to vendor object.
  # -------------------------------------------------------------------------
# EXTEND vendor::vendor
# {
#   text    notes;
#       
#  # help en notes  "These notes will show up in the purchasing form"
#  #                "with an option to print on the purchase order.";
# };
    
  # -------------------------------------------------------------------------
  # Recommended Vendor
  # -------------------------------------------------------------------------
  class use_vendor
  {
    vendor::vendor  *recommended;
    text             notes;
  };
  
  # -------------------------------------------------------------------------
  # Purchasing Item
  # -------------------------------------------------------------------------
  class item : base_item::item
  {
    char    buyer_code<8>;
    text    purch_text;
    char    purch_desc<100>;
    
    pur::use_vendor [] recommend_vendor;
   
    # help en buyer_code  "The buyer code is a reference to the buyer responsible"
    #                     "for purchasing this product.";
    # help en purch_text  "The purchasing text is text that appears on a line item"
    #                     "on the purchase order.  It would normally be used for"
    #                     "special notes.";
    # help en purch_desc  "The purchasing description replaces the normal item"
    #                     "description for purchase orders only.";
  };
        
  # -------------------------------------------------------------------------
  # buyer - employees responsible for this purchase group
  # -------------------------------------------------------------------------
  class buyer
  {
    char                buyer_group<8>;
    person::employee [] buyers;
  };
    
  # -------------------------------------------------------------------------
  # this is standard text that can be referenced by id and copied to p.o.
  # ------------------------------------------------------------------------
  class text
  {
    char      id<8>;     # is unique for id+buyer
    char      buyer<8>;  # buyer code
    text      text;      # for keeping standard text that is not by item
                         # normally for various special conditions
  };
  
  # -------------------------------------------------------------------------
  # approval_list - a company wide list of all chains of approval.
  # ------------------------------------------------------------------------
  class approval_list
  {
    char                name<25>;
    person::employee [] employee;
  };
  
  # -------------------------------------------------------------------------
  # approval - the status of this po/req chain of approval
  # ------------------------------------------------------------------------
  class approval
  {
    char              name<25>;  #list name
    person::employee *employee;
    boolean           approved     = false;
    boolean           not_approved = false;
    # pur::header      *what;      # what was approved (redundant)
  };
  
  # -------------------------------------------------------------------------
  # status - overall status of this document
  #   req, approved req, po, approved po, sent po, closed po
  #   not approved req, not approved po.
  # ------------------------------------------------------------------------
  class status
  {
    char name<25>;
  };

  # -------------------------------------------------------------------------
  # 
  # -------------------------------------------------------------------------
  class detail
  {
    # pur::header     *header;         # redundant
    
    int              line_number;      # the line on the po
    char             item_number<25>;  # the item ordered
    pur::item       *item;             # optional
    char             purch_desc<100>;
    text             purch_text;       # for free form notes by item.
    currency::money  price;
    unit::quantity   quantity;
    date             required_date;
  };
    
  # -------------------------------------------------------------------------
  # header - for requisitions or purchase orders
  # -------------------------------------------------------------------------
  class header
  {
    char    id<10>;
    
    vendor::vendor *vendor;
        
    char    payment_terms<25>;  # TODO should be pointer
    char    delivery_terms<25>; # TODO should be pointer
        
    date    date_placed;
    date    date_completed;
    
    pur::approval [] approval;
    pur::status     *status;
        
    text    po_notes;        # free form notes for the total purchase order
    
    pur::detail [] detail;

    # help en po_notes  "These notes will show up in the purchasing form"
    #                   "with an option to print on the purchase order.";
  };
};