weight, plan and plandata fields in part_bill_event
authorivan <ivan>
Tue, 29 Jan 2002 17:42:46 +0000 (17:42 +0000)
committerivan <ivan>
Tue, 29 Jan 2002 17:42:46 +0000 (17:42 +0000)
FS/FS/part_bill_event.pm
README.1.4.0pre4567-8
bin/fs-setup
httemplate/docs/man/FS/cust_main.html
httemplate/docs/man/FS/cust_pay.html
httemplate/docs/man/FS/cust_pkg.html
httemplate/docs/man/FS/cust_svc.html
httemplate/docs/man/FS/svc_acct.html
httemplate/docs/schema.html
httemplate/docs/upgrade8.html

index fb2c06a..4a23315 100644 (file)
@@ -44,6 +44,12 @@ FS::Record.  The following fields are currently supported:
 
 =item seconds - how long after the invoice date events of this type are triggered
 
+=item weight - ordering for events with identical seconds
+
+=item plan - eventcode plan
+
+=item plandata - additional plan data
+
 =item disabled - Disabled flag, empty or `Y'
 
 =back
@@ -106,12 +112,17 @@ insert and replace methods.
 sub check {
   my $self = shift;
 
+  $self->weight(0) unless $self->weight;
+
   $self->ut_numbern('eventpart')
     || $self->ut_enum('payby', [qw( CARD BILL COMP )] )
     || $self->ut_text('event')
     || $self->ut_anything('eventcode')
     || $self->ut_number('seconds')
     || $self->ut_enum('disabled', [ '', 'Y' ] )
+    || $self->ut_number('weight')
+    || $self->ut_alphan('plan')
+    || $self->ut_anything('plandata')
   ;
 }
 
index 1f78783..11fc9c1 100644 (file)
@@ -8,7 +8,9 @@ http://cleanwhisker.420.am/cgi-bin/cvsweb/freeside/Attic/
 
 -----
 
-install the perl modules and httemplate as per install.html or upgrade8.html
+install Time::Duration and Tie::IxHash
+
+install the FS perl modules and httemplate as per install.html or upgrade8.html
 
 ALTER TABLE part_pkg ADD disabled char(1) NULL;
 ALTER TABLE part_svc ADD disabled char(1) NULL;
@@ -17,7 +19,7 @@ CREATE TABLE cust_bill_event (
   eventnum int primary key,
   invnum int not null,
   eventpart int not null,
-  _date int not null,
+  _date int not null
 );
 CREATE UNIQUE INDEX cust_bill_events1 ON cust_bill_events ( eventpart, invnum );
 CREATE INDEX cust_bill_events2 ON cust_bill_events ( invnum );
@@ -28,7 +30,10 @@ CREATE TABLE part_bill_event (
   event varchar(80) not null,
   eventcode text null,
   seconds int null,
-  disabled char(1) null,
+  weight int not null,
+  plan varchar(80) null,
+  plandata text null,
+  disabled char(1) null
 );
 CREATE INDEX part_bill_events1 ON part_bill_events ( payby );
 
index f3ff031..7e043d2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: fs-setup,v 1.72 2002-01-29 11:11:06 ivan Exp $
+# $Id: fs-setup,v 1.73 2002-01-29 17:42:46 ivan Exp $
 
 #to delay loading dbdef until we're ready
 BEGIN { $FS::Record::setup_hack = 1; }
@@ -319,6 +319,9 @@ sub tables_hash_hack {
         'event',       'varchar',           '',     $char_d,
         'eventcode',    @perl_type,
         'seconds',     'int', 'NULL', '',
+        'weight',      'int', '', '',
+        'plan',       'varchar', 'NULL', $char_d,
+        'plandata',   'text', 'NULL', '',
         'disabled',     'char', 'NULL', 1,
       ],
       'primary_key' => 'eventpart',
index 86e659a..1fb3391 100644 (file)
@@ -393,7 +393,7 @@ the error, otherwise returns false.
 <P>
 <HR>
 <H1><A NAME="version">VERSION</A></H1>
-<P>$Id: cust_main.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P>
+<P>$Id: cust_main.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
 <P>
 <HR>
 <H1><A NAME="bugs">BUGS</A></H1>
index ce057f0..a8c481f 100644 (file)
@@ -107,7 +107,7 @@ paid minus all payment applications (see <A HREF=".././FS/cust_bill_pay.html">th
 <P>
 <HR>
 <H1><A NAME="version">VERSION</A></H1>
-<P>$Id: cust_pay.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P>
+<P>$Id: cust_pay.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
 <P>
 <HR>
 <H1><A NAME="bugs">BUGS</A></H1>
index 9f1005d..76cb9e7 100644 (file)
@@ -191,7 +191,7 @@ newly-created cust_pkg objects.</P>
 <P>
 <HR>
 <H1><A NAME="version">VERSION</A></H1>
-<P>$Id: cust_pkg.html,v 1.2 2002-01-29 16:33:15 ivan Exp $</P>
+<P>$Id: cust_pkg.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
 <P>
 <HR>
 <H1><A NAME="bugs">BUGS</A></H1>
index 97a299c..55c90e2 100644 (file)
@@ -119,7 +119,7 @@ where <STRONG>svcdb</STRONG> is not ``svc_acct''.
 <P>
 <HR>
 <H1><A NAME="version">VERSION</A></H1>
-<P>$Id: cust_svc.html,v 1.2 2002-01-29 16:33:16 ivan Exp $</P>
+<P>$Id: cust_svc.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
 <P>
 <HR>
 <H1><A NAME="bugs">BUGS</A></H1>
index 9c41db3..93483f6 100644 (file)
@@ -251,7 +251,7 @@ See <A HREF=".././FS/session.html">the FS::session manpage</A>
 <P>
 <HR>
 <H1><A NAME="version">VERSION</A></H1>
-<P>$Id: svc_acct.html,v 1.2 2002-01-29 16:33:16 ivan Exp $</P>
+<P>$Id: svc_acct.html,v 1.3 2002-01-29 17:42:46 ivan Exp $</P>
 <P>
 <HR>
 <H1><A NAME="bugs">BUGS</A></H1>
index 21da3ec..bdf3a50 100644 (file)
@@ -40,6 +40,9 @@
         <li>event - event name
         <li>eventcode - event action
         <li>seconds - how long after the invoice date (<a href="#cust_bill">cust_bill</a>._date) events of this type are triggered
+        <li>weight - ordering for events with identical seconds
+        <li>plan - eventcode plan
+        <li>plandata - additional plan data
         <li>disabled - Disabled flag, empty or `Y'
       </ul>
     <li><a name="cust_bill_pkg" href="man/FS/cust_bill_pkg.html">cust_bill_pkg</a> - Invoice line items
index bbb528c..c4d023a 100644 (file)
@@ -128,7 +128,7 @@ CREATE TABLE cust_bill_event (
   eventnum int primary key,
   invnum int not null,
   eventpart int not null,
-  _date int not null,
+  _date int not null
 );
 CREATE UNIQUE INDEX cust_bill_event1 ON cust_bill_event ( eventpart, invnum );
 CREATE INDEX cust_bill_event2 ON cust_bill_event ( invnum );
@@ -139,7 +139,10 @@ CREATE TABLE part_bill_event (
   event varchar(80) not null,
   eventcode text null,
   seconds int null,
-  disabled char(1) null,
+  weight int not null,
+  plan varchar(80) null,
+  plandata text null,
+  disabled char(1) null
 );
 CREATE INDEX part_bill_event1 ON part_bill_event ( payby );