Schema reference
  
    - agent - Agents are resellers of your service.  Agents may be limited to a subset of your full offerings (via their agent type).
      
        - agentnum - primary key
        
 - agent - name of this agent
        
 - typenum - agent type
        
 - prog - (unimplemented)
        
 - freq - (unimplemented)
      
 
     - agent_type - Agent types define groups of packages that you can then assign to particular agents.
      
        - typenum - primary key
        
 - atype - name of this agent type
      
 
     - cust_bill - Invoices
      
        - invnum - primary key
        
 - custnum - customer
        
 - _date
        
 - charged - amount of this invoice
        
 - owed - amount still outstanding on this invoice
        
 - printed - how many times this invoice has been printed automatically
      
 
     - cust_bill_pkg - Invoice line items
      
        - invnum - (multiple) key
        
 - pkgnum - package
        
 - setup - setup fee 
        
 - recur - recurring fee
        
 - sdate - starting date
        
 - edate - ending date
      
 
     - cust_credit - Credits
      
        - crednum - primary key
        
 - custnum - customer
        
 - amount - amount credited
        
 - credited - amount still outstanding (not yet refunded) on this credit
        
 - _date
        
 - otaker - order taker
        
 - reason
      
 
     - cust_main - Customers
      
        - custnum - primary key
        
 - agentnum - agent
        
 - refnum - referral
        
 - titlenum - title
        
 - first - name
        
 - middle - name
        
 - last - name
        
 - ss - social security number
        
 - company
        
 - address1
        
 - address2
        
 - city
        
 - county
        
 - state
        
 - zip
        
 - country
        
 - daytime - phone
        
 - night - phone
        
 - fax - phone
        
 - payby - CARD, BILL, or COMP
        
 - payinfo - card number, P.O.#, or comp issuer
        
 - paydate - expiration date
        
 - payname - billing name (name on card)
        
 - tax - tax exempt, Y or null
        
 - otaker - order taker
      
 
     - cust_main_invoice - Invoice destinations for email invoices
      
        - destnum - primary key
        
 - custnum - customer
        
 - dest - Invoice destination: If numeric, a svcnum, if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)
      
 
     - cust_main_county - Tax rates
      
        - taxnum - primary key
        
 - state
        
 - county
        
 - country
        
 - tax - % rate
      
 
     - cust_pay - Payments
      
        - paynum - primary key
        
 - invnum - invoice
        
 - paid - amount
        
 - _date
        
 - payby - CARD, BILL, or COMP
        
 - payinfo - card number, P.O.#, or comp issuer
        
 - paybatch - text field for tracking card processor batches
      
 
     - cust_pay_batch - Pending batch
      
        - trancode - 77 for charges
        
 - cardnum
        
 - exp - card expiration
        
 - amount
        
 - invnum - invoice
        
 - custnum - customer
        
 - payname - name on card
        
 - first - name
        
 - last - name
        
 - address1
        
 - address2
        
 - city
        
 - state
        
 - zip
        
 - country
      
 
     - cust_pkg - Customer billing items
      
        - pkgnum - primary key
        
 - custnum - customer
        
 - pkgpart - Package definition
        
 - setup - date
        
 - bill - next bill date
        
 - susp - (past) suspension date
        
 - expire - (future) cancellation date
        
 - cancel - (past) cancellation date
        
 - otaker - order taker
      
 
     - cust_refund - Refunds
      
        - refundnum - primary key
        
 - crednum - credit
        
 - refund - amount
        
 - _date
        
 - payby - CARD, BILL or COMP
        
 - payinfo - card number, P.O.#, or comp issuer
        
 - otaker - order taker
      
 
     - cust_svc - Customer services
      
    
 - part_pkg - Package definitions
      
        - pkgpart - primary key
        
 - pkg - package name
        
 - comment - non-customer visable package comment
        
 - setup - setup fee
        
 - freq - recurring frequency (months)
        
 - recur - recurring fee
      
 
     - part_referral - Referral listing
      
        - refnum - primary key
        
 - referral - referral
      
 
     - part_svc - Service definitions
      
        - svcpart - primary key
        
 - svc - name of this service
        
 - svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo
        
 - table__field - Default or fixed value for field in table
        
 - table__field_flag - null, D or F
      
 
     - part_title - Personal titles
      
        - titlenum - primary key
        
 - title - personal title (`Dr.' or `Mr.')
      
 
     - pkg_svc
      
    
 - prepay_credit
      
        - prepaynum - primary key
        
 - identifier - text or numeric string used to receive this credit
        
 - amount - amount of credit
      
 
     - svc_acct - Accounts
      
        - svcnum - primary key
        
 - username
        
 - _password
        
 - popnum - Point of Presence
        
 - uid
        
 - gid
        
 - finger - GECOS
        
 - dir
        
 - shell
        
 - quota - (unimplementd)
        
 - slipip - IP address
        
 - radius_Radius_Attribute - Radius-Attribute
      
 
     - svc_acct_pop - Points of Presence
      
        - popnum - primary key
        
 - city
        
 - state
        
 - ac - area code
        
 - exch - exchange
        
 - loc - rest of number
      
 
     - svc_acct_sm - Domain mail aliases
      
    
 - svc_domain - Domains
      
    
 - domain_record - Domain zone detail
      
        - recnum - primary key
        
 - svcnum - Domain (by svcnum)
        
 - reczone - zone for this line
        
 - recaf - address family, usually IN
        
 - rectype - type for this record (A, MX, etc.)
        
 - recdata - data for this record
      
 
     - svc_www
       
 - svcnum - primary key
       
 - recnum - host
       
 - usersvc - account
     
 
    type_pkgs