add svc_forward, depriciate svc_acct_sm
[freeside.git] / htdocs / docs / schema.html
index f035286..a61000f 100644 (file)
@@ -23,7 +23,6 @@
         <li>custnum - <a href="#cust_main">customer</a>
         <li>_date
         <li>charged - amount of this invoice
-        <li>owed - amount still outstanding on this invoice
         <li>printed - how many times this invoice has been printed automatically
       </ul>
     <li><a name="cust_bill_pkg">cust_bill_pkg</a> - Invoice line items
         <li>sdate - starting date
         <li>edate - ending date
       </ul>
-    <li><a name="cust_credit">cust_credit</a> - Credits.  The equivalent of a negative <a href="#cust_bill>cust_bill</a> record.
+    <li><a name="cust_credit">cust_credit</a> - Credits.  The equivalent of a negative <a href="#cust_bill">cust_bill</a> record.
       <ul>
         <li>crednum - primary key
         <li>custnum - <a href="#cust_main">customer</a>
         <li>amount - amount credited
-        <li>credited - amount still outstanding (not yet refunded) on this credit
         <li>_date
         <li>otaker - order taker
         <li>reason
         <li>tax - tax exempt, Y or null
         <li>otaker - order taker
       </ul>
-    <li><a name="cust_main_invoice">cust_main_invoice</a> - Invoice destinations for email invoices
+    <li><a name="cust_main_invoice">cust_main_invoice</a> - Invoice destinations for email invoices.  Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination.
       <ul>
         <li>destnum - primary key
         <li>custnum - <a href="#cust_main">customer</a>
-        <li>dest - Invoice destination: If numeric, a <a href="#svc_acct">svcnum</a>, if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)
+        <li>dest - Invoice destination.  Freeside supports three types of invoice delivery: send directly to a service defined in Freeside, send to an arbitrary email address, or print the invoice to a printer and have someone send it out via snail mail.  Freeside determines which method to use based on the contents of the dest field.  If the contents are numeric, a <a href="#svc_acct">svcnum</a> pointing to a valid service is expected in the field.  If the contents are a string, a literal email address is expected to be in the field.  If the special keyword `POST' is present, the snail mail method is used (which is the default if no cust_main_invoice records exist).  Snail mail invoices get their address information from <A name="#cust_main">cust_main</A> and are printed with the printer defined in the configuration files.
       </ul>
     <li><a name="cust_main_county">cust_main_county</a> - Tax rates
       <ul>
         <li>recdata - data for this record
       </ul>
     <li><a name="svc_www">svc_www</a>
+      <ul>
        <li>svcnum - <a href="#cust-svc">primary key</a>
        <li>recnum - <a href="#domain_record">host</a>
        <li>usersvc - <a href="#svc_acct">account</a>
-     </ul>
+      </ul>
     <li><a name="type_pkgs">type_pkgs</a>
       <ul>
         <li>typenum - <a href="#agent_type">agent type</a>