omfgppc - 2009-03-10

You have subscribed to a wiki page or wiki category on "xTuple" for change =
notification.

The "EnhancedTaxInternationalization" page has been changed by jrogelstad:

  {{{
  CREATE TABLE taxclass
  (
-   taxclass_id serial,
+   taxclass_id serial PRIMARY KEY,
    taxclass_code text,
    taxclass_descrip text,
    taxclass_sequence integer,
-   CONSTRAINT taxclass_pkey PRIMARY KEY (taxclass_id)
  );
  GRANT ALL ON TABLE taxclass TO xtrole;
  COMMENT ON TABLE taxclass IS 'Tax class information';
@@ -336, +335 @@

  {{{
  CREATE TABLE taxrate
  (
-   taxrate_id serial,
+   taxrate_id serial PRIMARY KEY,
    taxrate_tax_id integer NOT NULL REFERENCES tax (tax_id),
    taxrate_percent numeric (8,4) NOT NULL,
    taxrate_curr_id integer REFERENCES curr_symbol (curr_id),
@@ -437, +436 @@

  }}}
  These same tables should be populated with the existing taxauth_id into t=
he taxzone_id on their respective records.  Finally, the taxauth_id on the =
tables listed above should be dropped, with the exception of taxreg (tax re=
gistration).
  =

- '''tax''' will be modified to include a reference to tax class:
+ '''tax''' will be modified to include new references to tax class, tax au=
thority and tax basis as described above:
  =

  {{{
  ALTER TABLE tax ADD COLUMN tax_taxclass_id integer REFERENCES taxclass (t=
axclass_id);
+ ALTER TABLE tax ADD COLUMN tax_taxauth_id integer REFERENCES taxauth (tax=
auth_id);
+ ALTER TABLE tax ADD COLUMN tax_basis_tax_id integer REFERENCES tax (tax_i=
d) ON DELETE CASCADE;
  }}}
+ =3D=3D=3D New Types =3D=3D=3D
+ =

+   '''taxassign''' - A composite type to return indented tax assignment re=
cords from the taxassign function which is in turn used by the Tax Assignme=
nts window
+ =

+ {{{
+ CREATE TYPE taxassign AS
+ (
+   taxassign_taxzone_id integer,
+   taxassign_taxzone_code text,
+   taxassign_taxtype_id integer,
+   taxassign_taxtype_code text,
+   taxassign_level integer,
+   taxassign_taxcode_id integer,
+   taxassign_taxcode_code text,
+   taxassign_taxcode_descrip text,
+   taxassign_taxclass_id integer,
+   taxassign_taxclass_code text,
+   taxassign_taxclass_sequence integer
+ );
+ }}}
+ =

+   '''taxdetail''' - A composite type to return a calculated tax detail re=
cord set used by the taxdetail function which is in turn used by the Tax De=
tail window.
+ =

+ {{{
+ CREATE TYPE taxdetail AS
+ (
+   taxdetail_taxcode_id integer,
+   taxdetail_taxcode_code text,
+   taxdetail_taxcode_descrip text,
+   taxdetail_taxcode_percent numeric(8,4),
+   taxdetail_taxcode_curr_id integer,
+   taxdetail_taxcode_curr_abbr text,
+   taxdetail_taxcode_amount numeric(16,2),
+   taxdetail_level integer,
+   taxdetail_taxclass_id integer,
+   taxdetail_taxclass_code text,
+   taxdetail_taxclass_sequence integer,
+   taxdetail_tax numeric (16,2)
+ );
+ }}}
+ =

  What privileges do we need?
  ||||<style=3D"text-align: center;">'''Privileges for feature''' ||
  =