[freeside-devel] texas tax

ivan ivan at 420.am
Thu Mar 14 08:12:11 PST 2002


It looks like you manually edited the h_part_pkg table.  here's mine for
example:

                                           Table "h_part_pkg"
     Column     |         Type          | Modifiers                           
----------------+-----------------------+---------------------------------------------------------------
 historynum     | integer               | not null default nextval('"h_part_pkg_historynum_seq"'::text)
 history_date   | integer               | 
 history_user   | character varying(80) | not null
 history_action | character varying(80) | not null
 pkgpart        | integer               | not null
 pkg            | character varying(80) | not null
 comment        | character varying(80) | not null
 setup          | text                  | 
 freq           | integer               | not null
 recur          | text                  | 
 setuptax       | character(1)          | 
 recurtax       | character(1)          | 
 plan           | character varying(80) | 
 plandata       | text                  | 
 disabled       | character(1)          | 
Primary key: h_part_pkg_pkey

As you can see you're missing the sequence, primary key and all column
constraints.

Instead of manually editing the database schema, seems like the best way
to get back to what you want to be working on is just start from scratch
with fs-setup

On Thu, Mar 14, 2002 at 10:02:27AM -0600, Rick Eicher II wrote:
> freeside=# \d h_part_pkg_historynum_seq
> Sequence "h_part_pkg_historynum_seq"
>    Attribute   |  Type
> ---------------+---------
>  sequence_name | name
>  last_value    | integer
>  increment_by  | integer
>  max_value     | integer
>  min_value     | integer
>  cache_value   | integer
>  log_cnt       | integer
>  is_cycled     | "char"
>  is_called     | "char"
> 
> 
> 
> > -----Original Message-----
> > From: Rick Eicher II [mailto:rick at pbol.net]
> > Sent: Thursday, March 14, 2002 9:55 AM
> > To: ivan-freeside-devel at sisd.com
> > Subject: RE: [freeside-devel] texas tax
> >
> >
> > freeside=# \d h_part_pkg
> >                 Table "h_part_pkg"
> >    Attribute    |         Type          | Modifier
> > ----------------+-----------------------+----------
> >  historynum     | integer               |
> >  history_date   | integer               |
> >  history_user   | character varying(80) |
> >  history_action | character varying(80) |
> >  pkgpart        | integer               |
> >  pkg            | character varying(80) |
> >  comment        | character varying(80) |
> >  setup          | text                  |
> >  freq           | integer               |
> >  recur          | text                  |
> >  setuptax       | character(1)          |
> >  recurtax       | character(1)          |
> >  plan           | character varying(80) |
> >  plandata       | text                  |
> >  disabled       | character(1)          |
> >  taxclass       | character varying(80) |
> >
> >
> >
> > > -----Original Message-----
> > > From: ivan [mailto:ivan at 420.am]
> > > Sent: Thursday, March 14, 2002 9:49 AM
> > > To: ivan-freeside-devel at sisd.com
> > > Subject: Re: [freeside-devel] texas tax
> > >
> > >
> > > go into the psql tool and paste the output of
> > >
> > > 	\d h_part_pkg
> > >
> > > On Thu, Mar 14, 2002 at 08:40:38AM -0600, Rick Eicher II wrote:
> > > > Here is a tail -30 of error_log.
> > > >
> > > > [debug][FS::Record] SELECT * FROM part_pkg WHERE pkgpart = ?
> > > > setuptax:  at part_pkg.cgi line 26.
> > > > recurtax:  at part_pkg.cgi line 27.
> > > > [debug][FS::Record] SELECT * FROM part_svc
> > > > [debug][FS::Record] FS::part_pkg=HASH(0x8cedec4) ->replace
> > > > FS::part_pkg=HASH(0x8d14a58)
> > > > [debug][FS::Record] UPDATE part_pkg SET taxclass = 'access'
> > > WHERE pkgpart =
> > > > 11 AND pkg = 'Flat Rate Dail-Up' AND comment = 'For Old
> > > Customers' AND setup
> > > > = 0 AND freq = 1 AND recur = 16.95 AND setuptax IS NULL AND
> > > recurtax IS NULL
> > > > AND plan = 'flat' AND plandata = 'setup_fee=0
> > > > recur_fee=16.95
> > > > ' AND disabled IS NULL AND taxclass IS NULL
> > > > [debug][FS::Record] INSERT INTO h_part_pkg ( history_date,
> > history_user,
> > > > history_action, pkgpart, pkg, comment, setup, freq, recur,
> > > plan, plandata)
> > > > VALUES (1016097258, 'rick', 'replace_old', 11, 'Flat Rate
> > > Dail-Up', 'For Old
> > > > Customers', 0, 1, 16.95, 'flat', 'setup_fee=0
> > > > recur_fee=16.95
> > > > ')
> > > > [debug][FS::Record] INSERT INTO h_part_pkg ( history_date,
> > history_user,
> > > > history_action, pkgpart, pkg, comment, setup, freq, recur,
> > > plan, plandata,
> > > > taxclass) VALUES (1016097258, 'rick', 'replace_new', 11, 'Flat Rate
> > > > Dail-Up', 'For Old Customers', 0, 1, 16.95, 'flat', 'setup_fee=0
> > > > recur_fee=16.95
> > > > ', 'access')
> > > > DBD::Pg::st execute failed: ERROR:  Unable to identify an
> > > operator '=' for
> > > > types 'text' and 'int4' at
> > > /usr/local/lib/perl5/site_perl/5.6.1/FS/Record.pm
> > > > line 662.
> > > > [debug][FS::Record] SELECT * FROM part_svc WHERE ( disabled IS NULL OR
> > > > disabled = '' )
> > > > [debug][FS::Record] SELECT * FROM pkg_svc WHERE pkgpart = ? AND
> > > svcpart = ?
> > > > [debug][FS::Record] SELECT * FROM pkg_svc WHERE pkgpart = ? AND
> > > svcpart = ?
> > > > [debug][FS::Record] SELECT * FROM pkg_svc WHERE pkgpart = ? AND
> > > svcpart = ?
> > > > [debug][FS::Record] SELECT * FROM part_pkg WHERE ( disabled IS NULL OR
> > > > disabled = '' )
> > > >
> > > >
> > > ##################################################################
> > > ##########
> > > > ###########
> > > >
> > > >
> > > > I assume it is haveing a problem with the h_part_pkg table.
> > > >
> > > > Here is the definition of the h_part_pkg.
> > > >
> > > > CREATE TABLE "h_part_pkg" (
> > > >   "historynum" int4,
> > > >   "history_date" int4,
> > > >   "history_user" varchar(80),
> > > >   "history_action" varchar(80),
> > > >   "pkgpart" int4,
> > > >   "pkg" varchar(80),
> > > >   "comment" varchar(80),
> > > >   "setup" text,
> > > >   "freq" int4,
> > > >   "recur" text,
> > > >   "setuptax" char(1),
> > > >   "recurtax" char(1),
> > > >   "plan" varchar(80),
> > > >   "plandata" text,
> > > >   "disabled" char(1),
> > > >   "taxclass" varchar(80)
> > > > );
> > > >
> > > > Nothing jumps out at me. Any have an idea?
> > > >
> > > > Thanks Ivan,
> > > > rick
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: ivan [mailto:ivan at 420.am]
> > > > > Sent: Wednesday, March 13, 2002 8:04 PM
> > > > > To: ivan-freeside-devel at sisd.com
> > > > > Subject: Re: [freeside-devel] texas tax
> > > > >
> > > > >
> > > > > Turn on query debugging:
> > > > >
> > > > >   $FS::Record::DEBUG = 1;
> > > > >
> > > > > and post the exact statement that's causing the error.
> > > > >
> > > > > On Wed, Mar 13, 2002 at 05:05:29PM -0600, Rick Eicher II wrote:
> > > > > > Having to redo texas tax. Now have a select box on the
> > > part_pkg.cgi page
> > > > > > that sets the "taxclass" to one of two objects. But when I
> > > hit submit
> > > > > > changes it says this:
> > > > > >
> > > > > > DBD::Pg::st execute failed: ERROR:  Unable to identify an
> > > > > operator '=' for
> > > > > > types 'text' and 'int4' at
> > > > > /usr/local/lib/perl5/site_perl/5.6.1/FS/Record.pm
> > > > > > line 662.
> > > > > >
> > > > > > Since the new column taxclass is set to varchar I have no idea
> > > > > where this
> > > > > > error comeing from.
> > > > > >
> > > > > > Any ideas? Or does any one have any idea how to add a column to
> > > > > a table and
> > > > > > get freeside to populate it?
> > > > > >
> > > > > > Ivan I would love to get this working before your deal in
> > > > > Dallas. But I have
> > > > > > hit a wall.
> > > > > >
> > > > > > frustrated,
> > > > > > rick
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > _ivan
> > > > >
> > > > >
> > > >
> > > >
> > >
> > > --
> > > _ivan
> > >
> > >
> >
> >
> >
> >
> 
> 

-- 
_ivan



More information about the freeside-devel mailing list