diff options
author | ivan <ivan> | 2002-02-27 22:39:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-02-27 22:39:14 +0000 |
commit | 6a37289c12238d48ea864b8177216ca276b33a40 (patch) | |
tree | 5b19e5b3a4ad47d0ebd19edc9b1694c3baf8b29d | |
parent | 9dacc694c1401117d7e34376aa4916f5a4810cab (diff) |
add status and statustext fields to cust_bill_event
-rw-r--r-- | FS/FS/cust_bill_event.pm | 2 | ||||
-rw-r--r-- | README.1.4.0pre12 | 19 | ||||
-rwxr-xr-x | bin/fs-setup | 6 | ||||
-rw-r--r-- | httemplate/docs/schema.html | 2 | ||||
-rw-r--r-- | httemplate/docs/upgrade8.html | 2 | ||||
-rwxr-xr-x | httemplate/view/cust_bill.cgi | 10 |
6 files changed, 36 insertions, 5 deletions
diff --git a/FS/FS/cust_bill_event.pm b/FS/FS/cust_bill_event.pm index cc9ce7cb8..242b39e26 100644 --- a/FS/FS/cust_bill_event.pm +++ b/FS/FS/cust_bill_event.pm @@ -107,6 +107,8 @@ sub check { || $self->ut_number('invnum') || $self->ut_number('eventpart') || $self->ut_number('_date') + || $self->ut_enum('status', [qw( done failed )] + || $self->ut_textn('statustext'); ; return "Unknown invnum" diff --git a/README.1.4.0pre12 b/README.1.4.0pre12 new file mode 100644 index 000000000..3f30aa48c --- /dev/null +++ b/README.1.4.0pre12 @@ -0,0 +1,19 @@ +the following is necessary to upgrade from 1.4.0pre11 to 1.4.0pre12 + +if you're upgrading from before 1.4.0pre12 see README.1.4.0pre11 first! + +if you're upgrading from 1.3.1 follow the instructions in +httemplate/docs/upgrade8.html instead + +---- + +install the FS perl modules and httemplate as per install.html or upgrade8.html + +ALTER TABLE cust_bill_event ADD status varchar(80); +ALTER TABLE cust_bill_event ADD statustext text NULL; +UPDATE cust_bill_event SET status = 'done'; + +Run bin/dbdef-create + +Restart Apache and freeside-queued + diff --git a/bin/fs-setup b/bin/fs-setup index 3ad0bbdf6..62c2cd490 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.81 2002-02-22 07:50:19 ivan Exp $ +# $Id: fs-setup,v 1.82 2002-02-27 22:39:14 ivan Exp $ #to delay loading dbdef until we're ready BEGIN { $FS::Record::setup_hack = 1; } @@ -329,10 +329,12 @@ sub tables_hash_hack { 'invnum', 'int', '', '', 'eventpart', 'int', '', '', '_date', @date_type, + 'status', 'varchar', '', $char_d, + 'statustext', 'text', 'NULL', '', ], 'primary_key' => 'eventnum', 'unique' => [ [ 'eventpart', 'invnum' ] ], - 'index' => [ ['invnum'] ], + 'index' => [ ['invnum'], ['status'] ], }, 'part_bill_event' => { diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 8420161bf..b828213ff 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -32,6 +32,8 @@ <li>invnum - <a href="#cust_bill">invoice</a> <li>eventpart - <a href="#part_bill_event">event definition</a> <li>_date + <li>status + <li>statustext </ul> <li><a name="part_bill_event" href="man/FS/part_bill_event.html">part_bill_event</a> - Invoice event definitions <ul> diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html index 3edf425bf..a4fb1762f 100644 --- a/httemplate/docs/upgrade8.html +++ b/httemplate/docs/upgrade8.html @@ -188,6 +188,8 @@ ALTER TABLE cust_bill ADD closed char(1) NULL; ALTER TABLE cust_pay ADD closed char(1) NULL; ALTER TABLE cust_credit ADD closed char(1) NULL; ALTER TABLE cust_refund ADD closed char(1) NULL; +ALTER TABLE cust_bill_event ADD status varchar(80); +ALTER TABLE cust_bill_event ADD statustext text NULL; CREATE INDEX cust_main3 ON cust_main ( referral_custnum ); CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum ); CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum ); diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index 7c2af06a7..95f1a0af8 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -22,13 +22,17 @@ print qq!<A HREF="${p}edit/cust_pay.cgi?$invnum">Enter payments (check/cash) aga print qq!<A HREF="${p}misc/print-invoice.cgi?$invnum">Reprint this invoice</A>!. '<BR><BR>'; +print table(). '<TR><TH>Event</TH><TH>Date</TH><TH>Status</TH></TR>'; foreach my $cust_bill_event ( sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event ) { - print time2str("%a %b %e %T %Y", $cust_bill_event->_date). ' - '. - $cust_bill_event->part_bill_event->event. '<BR>'; + my $status = $cust_bill_event->status; + $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext; + print '<TR><TD>'. $cust_bill_event->part_bill_event->event. '</TD><TD>'. + time2str("%a %b %e %T %Y", $cust_bill_event->_date). '</TD><TD>'. + $status. '</TD></TR>'; } -print '<BR><PRE>'; +print '</TABLE><BR><PRE>'; print $cust_bill->print_text; |