> 
> Dosen't sound like it's reduced very far.
> 

now you've asked for it:

# Zen Accounting - ZenCustomer
# Copyright (c)2002 Thomas Sawyer, All Rights Reserved

require 'zencustomer_html'
require 'zenrecord'
require 'zenaddress'
require 'zenphone'
require 'zenbond'
require 'zennote'
require 'zenurl'

module ZenAcct

  class ZenCustomer < ZenRecord
    
    def initialize
      super('CUSTOMER', 'c')
      # subrecords 
      @addresses = ZenAddress.new(self)
      @phones = ZenPhone.new(self)
      @bonds = ZenBond.new(self)
      @notes = ZenNote.new(self)
      @urls = ZenURL.new(self)
    end

    #
    def action
      super
      @addresses.action(@act)
      @phones.action(@act)
      @bonds.action(@act)
      @notes.action(@act)
      @urls.action(@act)
    end
    
    # Display the customer edit html
    def display
      @html = ZenCustomer_HTML.new(self)
      $cgi.out { @html.html_page(@title, 'com') }
    end
    
    #
    def load_dbi
      super
      @addresses.load_dbi
      @phones.load_dbi
      @bonds.load_dbi
      @notes.load_dbi
      @urls.load_dbi
    end
    
    #
    def references
      ref = super
      if @edit_new
        ref.update(@addresses.references)
        ref.update(@phones.references)
        ref.update(@bonds.references)
        ref.update(@notes.references)
        ref.update(@urls.references)
      end
      return ref
    end
  
    #
    def sql_taxes
      sql = "SELECT * FROM taxes WHERE partner='c';"
      rec = $dbi.connection.select_all(sql)
      return rec
    end
    
    #
    def sql_terms
      sql = "SELECT * FROM terms WHERE partner='c';"
      rec = $dbi.connection.select_all(sql)
      return rec
    end
    
  end  # ZenCustomer
  
end  # ZenAcct