add table cust_main_invoice
authorivan <ivan>
Wed, 16 Dec 1998 06:05:40 +0000 (06:05 +0000)
committerivan <ivan>
Wed, 16 Dec 1998 06:05:40 +0000 (06:05 +0000)
bin/fs-setup
htdocs/docs/schema.html
htdocs/docs/upgrade3.html

index 19ac533..9f87400 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: fs-setup,v 1.9 1998-12-15 04:36:29 ivan Exp $
+# $Id: fs-setup,v 1.10 1998-12-16 06:05:38 ivan Exp $
 #
 # ivan@sisd.com 97-nov-8,9
 #
 # fix radius attributes ivan@sisd.com 98-sep-27
 #
 # $Log: fs-setup,v $
-# Revision 1.9  1998-12-15 04:36:29  ivan
+# Revision 1.10  1998-12-16 06:05:38  ivan
+# add table cust_main_invoice
+#
+# Revision 1.9  1998/12/15 04:36:29  ivan
 # s/croak/die/; #oops
 #
 # Revision 1.8  1998/12/15 04:33:27  ivan
@@ -368,6 +371,17 @@ sub tables_hash_hack {
       'index' => [ ['last'], ],
     },
 
+    'cust_main_invoice' => {
+      'columns' => [
+        'destnum',  'int',  '',     '',
+        'custnum',  'int',  '',     '',
+        'dest',     'varchar', '',  $char_d,
+      ],
+      'primary_key' => 'destnum',
+      'unique' => [ [] ],
+      'index' => [ ['custnum'], ],
+    },
+
     'cust_main_county' => { #county+state+country are checked off the
                             #cust_main_county for validation and to provide
                             # a tax rate.
index f7a9bc1..c561a5a 100644 (file)
         <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
+      <ul>
+        <li>destnum - primary key
+        <li>custnum - <a href="#cust_main">customer</a>
+        <li>dest - Invoice destination: <a href="#svc_acct">svcnum</a> if numeric, literal email address if string
     <li><a name="cust_main_county">cust_main_county</a> - Tax rates
       <ul>
         <li>taxnum - primary key
index 1506642..87f551d 100644 (file)
@@ -22,9 +22,16 @@ ALTER TABLE cust_main_county ADD country char(2);
 UPDATE cust_main_county SET country = "US" where country IS NULL;
 CREATE TABLE part_title (
    titlenum int NOT NULL,
-   title varchar(80),
+   title varchar(80) NOT NULL,
    PRIMARY KEY (titlenum)
 );
+CREATE TABLE cust_main_invoice (
+   destnum int NOT NULL,
+   custnum int NOT NULL,
+   dest varchar(80) NOT NULL,
+   PRIMARY KEY (destnum),
+   INDEX ( custnum )
+);
 </pre>
   <li>Run bin/dbdef-create.  This file uses MySQL-specific syntax.  If you are r
 unning a different database engine you will need to modify it slightly.