From c5c0ba135749164ec8ba75d18f76c29625e1bc7e Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 29 Jan 2002 17:42:46 +0000 Subject: [PATCH] weight, plan and plandata fields in part_bill_event --- FS/FS/part_bill_event.pm | 11 +++++++++++ README.1.4.0pre4567-8 | 11 ++++++++--- bin/fs-setup | 5 ++++- httemplate/docs/man/FS/cust_main.html | 2 +- httemplate/docs/man/FS/cust_pay.html | 2 +- httemplate/docs/man/FS/cust_pkg.html | 2 +- httemplate/docs/man/FS/cust_svc.html | 2 +- httemplate/docs/man/FS/svc_acct.html | 2 +- httemplate/docs/schema.html | 3 +++ httemplate/docs/upgrade8.html | 7 +++++-- 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.


VERSION

-

$Id: cust_main.html,v 1.2 2002-01-29 16:33:15 ivan Exp $

+

$Id: cust_main.html,v 1.3 2002-01-29 17:42:46 ivan Exp $


BUGS

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 th


VERSION

-

$Id: cust_pay.html,v 1.2 2002-01-29 16:33:15 ivan Exp $

+

$Id: cust_pay.html,v 1.3 2002-01-29 17:42:46 ivan Exp $


BUGS

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.


VERSION

-

$Id: cust_pkg.html,v 1.2 2002-01-29 16:33:15 ivan Exp $

+

$Id: cust_pkg.html,v 1.3 2002-01-29 17:42:46 ivan Exp $


BUGS

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 svcdb is not ``svc_acct''.


VERSION

-

$Id: cust_svc.html,v 1.2 2002-01-29 16:33:16 ivan Exp $

+

$Id: cust_svc.html,v 1.3 2002-01-29 17:42:46 ivan Exp $


BUGS

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 the FS::session manpage


VERSION

-

$Id: svc_acct.html,v 1.2 2002-01-29 16:33:16 ivan Exp $

+

$Id: svc_acct.html,v 1.3 2002-01-29 17:42:46 ivan Exp $


BUGS

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 @@
  • event - event name
  • eventcode - event action
  • seconds - how long after the invoice date (cust_bill._date) events of this type are triggered +
  • weight - ordering for events with identical seconds +
  • plan - eventcode plan +
  • plandata - additional plan data
  • disabled - Disabled flag, empty or `Y'
  • cust_bill_pkg - 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 ); -- 2.11.0