From 94494835be39e34474d8564a8cde9fdd389fcdbe Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 1 Apr 2003 08:03:22 +0000 Subject: [PATCH] - update qsearch for Pg 7.3 - preliminary 1.5.0 upgrade docs - syntax error in main customer view --- FS/FS/Record.pm | 12 ++++++++++-- httemplate/docs/index.html | 1 + httemplate/docs/upgrade10.html | 6 ++++++ httemplate/view/cust_main.cgi | 7 +++++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 40215100f..c711f1214 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -223,13 +223,21 @@ sub qsearch { if ( ! defined( $record->{$_} ) || $record->{$_} eq '' ) { if ( $op eq '=' ) { if ( driver_name eq 'Pg' ) { - qq-( $column IS NULL OR $column = '' )-; + if ( $dbdef->table($table)->column($column)->type =~ /(int)/i ) { + qq-( $column IS NULL )-; + } else { + qq-( $column IS NULL OR $column = '' )-; + } } else { qq-( $column IS NULL OR $column = "" )-; } } elsif ( $op eq '!=' ) { if ( driver_name eq 'Pg' ) { - qq-( $column IS NOT NULL AND $column != '' )-; + if ( $dbdef->table($table)->column($column)->type =~ /(int)/i ) { + qq-( $column IS NOT NULL )-; + } else { + qq-( $column IS NOT NULL AND $column != '' )-; + } } else { qq-( $column IS NOT NULL AND $column != "" )-; } diff --git a/httemplate/docs/index.html b/httemplate/docs/index.html index 8f6f91378..b57b06feb 100644 --- a/httemplate/docs/index.html +++ b/httemplate/docs/index.html @@ -9,6 +9,7 @@
  • Upgrading from 1.3.0 to 1.3.1
  • Upgrading from 1.3.1 to 1.4.0
  • Upgrading from 1.4.0 to 1.4.1 +
  • Upgrading from 1.4.1 (or 1.4.2?) to 1.5.0 diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index 7aa26f698..6c4fe0c37 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -1,5 +1,8 @@ +
     this is very incomplete
     
    +install NetAddr::IP and Chart
    +
     CREATE TABLE cust_bill_pkg_detail (
       detailnum serial,
       pkgnum int NOT NULL,
    @@ -9,3 +12,6 @@ CREATE TABLE cust_bill_pkg_detail (
     );
     CREATE INDEX cust_bill_pkg_detail1 ON cust_bill_pkg_detail ( pkgnum, invnum );
     
    +create all of the new broadband tables
    +
    +
    diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 1d6243e23..01ad57373 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -365,8 +365,11 @@ if ( $conf->exists('hidecancelledpackages') ) { if ( @packages ) { #formatting + + my $colspan = $packages[0]->dbdef_table->column('last_bill') ? 6 : 5; + print &table(), "\n", - qq!Package!, + qq!Package!, qq!DatesServices\n!, qq!Setup!; @@ -375,7 +378,7 @@ if ( @packages ) { print qq!Next bill!, qq!Susp.!, - qq!Expire!!, + qq!Expire!, qq!Cancel!, qq!\n!; } -- 2.11.0