summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-01-29 17:42:46 +0000
committerivan <ivan>2002-01-29 17:42:46 +0000
commitc5c0ba135749164ec8ba75d18f76c29625e1bc7e (patch)
tree6c855b5b5e0a4774d7f6737fc46bf357042e6d3c
parent6991d4986df7fb3a6c7c49b5ae1b3713e87a16c4 (diff)
weight, plan and plandata fields in part_bill_event
-rw-r--r--FS/FS/part_bill_event.pm11
-rw-r--r--README.1.4.0pre4567-811
-rwxr-xr-xbin/fs-setup5
-rw-r--r--httemplate/docs/man/FS/cust_main.html2
-rw-r--r--httemplate/docs/man/FS/cust_pay.html2
-rw-r--r--httemplate/docs/man/FS/cust_pkg.html2
-rw-r--r--httemplate/docs/man/FS/cust_svc.html2
-rw-r--r--httemplate/docs/man/FS/svc_acct.html2
-rw-r--r--httemplate/docs/schema.html3
-rw-r--r--httemplate/docs/upgrade8.html7
10 files changed, 36 insertions, 11 deletions
diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm
index fb2c06ad4..4a23315dd 100644
--- a/FS/FS/part_bill_event.pm
+++ b/FS/FS/part_bill_event.pm
@@ -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')
;
}
diff --git a/README.1.4.0pre4567-8 b/README.1.4.0pre4567-8
index 1f7878395..11fc9c1db 100644
--- a/README.1.4.0pre4567-8
+++ b/README.1.4.0pre4567-8
@@ -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 );
diff --git a/bin/fs-setup b/bin/fs-setup
index f3ff031d4..7e043d238 100755
--- a/bin/fs-setup
+++ b/bin/fs-setup
@@ -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',
diff --git a/httemplate/docs/man/FS/cust_main.html b/httemplate/docs/man/FS/cust_main.html
index 86e659ad0..1fb339124 100644
--- a/httemplate/docs/man/FS/cust_main.html
+++ b/httemplate/docs/man/FS/cust_main.html
@@ -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>
diff --git a/httemplate/docs/man/FS/cust_pay.html b/httemplate/docs/man/FS/cust_pay.html
index ce057f068..a8c481fc0 100644
--- a/httemplate/docs/man/FS/cust_pay.html
+++ b/httemplate/docs/man/FS/cust_pay.html
@@ -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>
diff --git a/httemplate/docs/man/FS/cust_pkg.html b/httemplate/docs/man/FS/cust_pkg.html
index 9f1005da7..76cb9e786 100644
--- a/httemplate/docs/man/FS/cust_pkg.html
+++ b/httemplate/docs/man/FS/cust_pkg.html
@@ -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>
diff --git a/httemplate/docs/man/FS/cust_svc.html b/httemplate/docs/man/FS/cust_svc.html
index 97a299c52..55c90e28e 100644
--- a/httemplate/docs/man/FS/cust_svc.html
+++ b/httemplate/docs/man/FS/cust_svc.html
@@ -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>
diff --git a/httemplate/docs/man/FS/svc_acct.html b/httemplate/docs/man/FS/svc_acct.html
index 9c41db3f0..93483f67d 100644
--- a/httemplate/docs/man/FS/svc_acct.html
+++ b/httemplate/docs/man/FS/svc_acct.html
@@ -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>
diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html
index 21da3ecf6..bdf3a500e 100644
--- a/httemplate/docs/schema.html
+++ b/httemplate/docs/schema.html
@@ -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
diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html
index bbb528cda..c4d023a58 100644
--- a/httemplate/docs/upgrade8.html
+++ b/httemplate/docs/upgrade8.html
@@ -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 );