From f5266a4d07d116efd732f433d0f4f3a47b143a7d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 11 Sep 2001 00:08:18 +0000 Subject: faster (cached) fuzzy searches prelim. job queues! fixed part_svc editing --- httemplate/browse/part_svc.cgi | 4 ++-- httemplate/docs/install.html | 4 +++- httemplate/docs/schema.html | 23 +++++++++++++++++++++++ httemplate/docs/upgrade8.html | 19 ++++++++++++++++++- httemplate/edit/part_svc.cgi | 6 +++--- httemplate/edit/process/part_svc.cgi | 2 +- httemplate/index.html | 1 + httemplate/search/cust_main.cgi | 20 +++++++++----------- 8 files changed, 60 insertions(+), 19 deletions(-) (limited to 'httemplate') diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi index cfb1ad82b..8a564ba9a 100755 --- a/httemplate/browse/part_svc.cgi +++ b/httemplate/browse/part_svc.cgi @@ -1,4 +1,4 @@ - + <%= header('Service Definition Listing', menubar( 'Main Menu' => $p) ) %> Services are items you offer to your customers.

@@ -35,7 +35,7 @@ foreach my $field ( @fields ) { my $flag = $part_svc->part_svc_column($field)->columnflag; %> - <%= $n1 %><%= $row %> + <%= $n1 %><%= $field %> <% if ( $flag eq "D" ) { print "Default"; } elsif ( $flag eq "F" ) { print "Fixed"; } diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 1529c648e..4bf7b44ea 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -109,9 +109,11 @@ require "/usr/local/apache/conf/handler.pl"; diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 32c365ec3..e3fe98096 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -43,6 +43,14 @@
  • otaker - order taker
  • reason +
  • cust_credit_bill - Credit invoice application. Links a credit to an invoice. +
  • cust_main - Customers (columns in italics are optional)
  • cust_main_invoice - Invoice destinations for email invoices. Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination. @@ -302,5 +312,18 @@
  • typenum - agent type
  • pkgpart - Package definition +
  • queue - job queue + +
  • queue_arg - job arguments + diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html index 67b0e5fe1..d86adc046 100644 --- a/httemplate/docs/upgrade8.html +++ b/httemplate/docs/upgrade8.html @@ -103,6 +103,19 @@ CREATE TABLE part_svc_column ( columnflag char(1) null ); +CREATE TABLE queue ( + jobnum int primary key, + job varchar not null, + _date int not null, + status varchar(80) not null +); + +CREATE TABLE queue_arg ( + argnum int primary key, + jobnum int not null, + arg varchar null +); +CREATE INDEX queue_arg1 ON queue_arg ( jobnum ); ALTER TABLE svc_acct ADD domsvc integer NOT NULL; ALTER TABLE svc_domain ADD catchall integer NULL; @@ -217,5 +230,9 @@ ALTER TABLE cust_refund DROP COLUMN crednum;
  • IMPORTANT: After applying the second set of database changes, run bin/dbdef-create again. -
  • create the conf.dbsrc/user_policy as appropriate for your site +
  • create the user_policy configuration file as appropriate for your site. +
  • Create the `/usr/local/etc/freeside/cache.datasrc' directory + (ownded by the freeside user). +
  • freeside-queued was installed with the Perl modules. Start it now and ensure that is run upon system startup. + diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi index c0d632fa5..c0a789667 100755 --- a/httemplate/edit/part_svc.cgi +++ b/httemplate/edit/part_svc.cgi @@ -1,4 +1,4 @@ - + <% my $part_svc; if ( $cgi->param('error') ) { #error @@ -147,7 +147,7 @@ foreach my $svcdb ( qw( my(@fields) = $svcdb eq 'konq_kludge' ? () - : grep { $_ ne 'svcnum' } fields($svcdb) ); + : grep { $_ ne 'svcnum' } fields($svcdb); #my($rowspan)=scalar(@rows); #my($ptmp)="$svcdb"; @@ -180,7 +180,7 @@ function fixup(what) { my $part_svc_column = $part_svc->part_svc_column($field); my $value = $cgi->param('error') ? $cgi->param("${svcdb}__${field}") - : $$part_svc_column->columnvalue; + : $part_svc_column->columnvalue; my $flag = $cgi->param('error') ? $cgi->param("${svcdb}__${field}_flag") : $part_svc_column->columnflag; diff --git a/httemplate/edit/process/part_svc.cgi b/httemplate/edit/process/part_svc.cgi index 5652c5805..937f7fb4c 100755 --- a/httemplate/edit/process/part_svc.cgi +++ b/httemplate/edit/process/part_svc.cgi @@ -17,7 +17,7 @@ my $new = new FS::part_svc ( { my $error; if ( $svcpart ) { - $error = $new->replace($old); + $error = $new->replace($old, '1.3-COMPAT'); } else { $error = $new->insert; $svcpart=$new->getfield('svcpart'); diff --git a/httemplate/index.html b/httemplate/index.html index f24d354b1..2fbc06221 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -60,6 +60,7 @@
  • unlinked domains (by service number) (by domain)
  • NAS ports +
  • Joe queue
  • Administration