=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
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')
;
}
-----
-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;
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 );
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 );
#!/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; }
'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',
<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>
<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>
<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>
<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>
<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>
<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
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 );
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 );