Wiki Change:

omfgppc
2009-03-10
2013-03-08
  • omfgppc
    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:

      =

      Effectivity will default to "Always" for the start date and "Never" for t=
    he end date on the first entry.  On subsequent entries the start date shoul=
    d default to the latest expire date on the list.  Error trapping should be =
    included to prevent overlapping dates.
      =

    - Users will be able to specify whether tax is calculated as a percentage o=
    r a flat rate.  The percentage and should use the percentage validator, whi=
    le the flat rate will be specified in a specific currency amount.  The curr=
    ency amount will be converted to the transaction document currency at the t=
    ime of a transaction.
    + Users will be able to specify both percentage and/or flat rate amounts.  =
    The percentage and should use the percentage validator, while the flat rate=
    will be specified in a specific currency amount.  The currency amount will=
    be converted to the transaction document currency at the time of a transac=
    tion.
      =

      =3D=3D=3D Sales Order Item, Select Billing Quantity, Invoice Item, Return=
    Authorization Item and Credit Memo Item =3D=3D=3D
      The tax code widget will be removed from these windows. The tax type widg=
    et will remain and only the tax type value that will be saved at the line i=
    tem level. Tax code detail will be saved as sub records on documents that c=
    urrently record A, B, C tax detail as described later in this document.
    @@ -295, +295 @@

      =

      =3D=3D Schema Changes =3D=3D
      =3D=3D=3D New Tables =3D=3D=3D
    -  . '''taxzone'''' - Will be used to store tax zone master data.
    +  . '''taxzone''' - Will be used to store tax zone master data.
      =

      {{{
      CREATE TABLE taxzone
    @@ -338, +338 @@

      (
        taxrate_id serial,
        taxrate_tax_id integer NOT NULL REFERENCES tax (tax_id),
    -   taxrate_rate numeric (8,4) NOT NULL,
    +   taxrate_percent numeric (8,4) NOT NULL,
    +   taxrate_curr_id integer REFERENCES curr_symbol (curr_id),
    +   taxrate_amount numeric (16,2) NOT NULL,
        taxrate_effective date,
        taxrate_expires date
      );
    @@ -346, +348 @@

      COMMENT ON TABLE taxrate IS 'Tax rates.';
      COMMENT ON COLUMN taxrate.taxrate_id IS 'Primary key.';
      COMMENT ON COLUMN taxrate.taxrate_tax_id IS 'The id of the parent tax cod=
    e.';
    - COMMENT ON COLUMN taxrate.taxrate_rate IS 'Tax rate percentage.';
    + COMMENT ON COLUMN taxrate.taxrate_percent IS 'Tax rate percentage.';
    + COMMENT ON COLUMN taxrate.taxrate_curr_id IS 'The currency id of the flat=
    rate amount.';
    + COMMENT ON COLUMN taxrate.taxrate_amount IS 'Flat tax rate amount.';
      COMMENT ON COLUMN taxrate.taxrate_effective IS 'The effective date of the=
    tax rate.  NULL value means always.';
      COMMENT ON COLUMN taxrate.taxrate_expires IS 'The expire date of the tax =
    rate.  NULL value means never.';
      }}}
    @@ -356, +360 @@

      CREATE TABLE taxass
      (
        taxass_id serial PRIMARY KEY,
    -   taxass_taxzone_id integer NOT NULL REFERENCES taxzone (taxzone_id),
    +   taxass_taxzone_id integer REFERENCES taxzone (taxzone_id),
    -   taxass_taxtype_id integer NOT NULL REFERENCES taxtype (taxtype_id),
    +   taxass_taxtype_id integer REFERENCES taxtype (taxtype_id),
    -   taxass_tax_id integer NOT NULL REFERENCES tax (tax_id),
    +   taxass_tax_id integer NOT NULL REFERENCES tax (tax_id)
    -   taxass_taxauth_id integer REFERENCES taxauth (taxauth_id),
    -   taxass_basis_taxass_id integer REFERENCES taxass (taxass_id)
      );
      GRANT ALL ON TABLE taxass TO xtrole;
      COMMENT ON TABLE taxass IS 'The tax assignment table associates different=
    tax zones and tax types to a given set of tax codes.';
      COMMENT ON COLUMN taxass.taxass_taxzone_id IS 'The id of the tax zone. If=
    NULL any tax zone will apply.';
      COMMENT ON COLUMN taxass.taxass_taxtype_id IS 'The id of the tax type. If=
    NULL any tax type will apply.';
      COMMENT ON COLUMN taxass.taxass_tax_id IS 'The id of the tax code.';
    - COMMENT ON COLUMN taxass.taxass_taxauth_id IS 'The id of the tax authorit=
    y.';
    - COMMENT ON COLUMN taxass.taxass_basis_taxass_id IS 'The calculation basis=
    of the tax code.  If NULL then base price. If id then the amount of the ta=
    x assignment referenced.';
    - }}}
    -  . '''taxcum''' - Used to store cumulative tax assignment information.
    - =

    - {{{
    - CREATE TABLE taxcum
    - (
    -   taxcum_id serial PRIMARY KEY,
    -   taxcum_taxass_id integer NOT NULL REFERENCES taxass (taxass_id),
    -   taxcum_cumulative_taxass_id integer NOT NULL REFERENCES taxass (taxass_=
    id)
    - );
    - GRANT ALL ON TABLE taxcum TO xtrole;
    - COMMENT ON TABLE taxcum IS 'The tax cumulative table associates tax assig=
    nments with each other in a parent child relationship to calculate cumulati=
    ve taxes.';
    - COMMENT ON COLUMN taxcum.taxcum_taxass_id IS 'The id of the parent tax as=
    signment.';
    - COMMENT ON COLUMN taxcum.taxcum_cumulative_taxass_id IS 'The id of the ta=
    x assignment whose calculation will be added to the parent base price.';
      }}}
       . '''taxhist''' - A master table definition inherited by child tables to=
    record tax transaction history.
      =

    @@ -394, +380 @@

        taxhist_tax_id integer NOT NULL REFERENCES tax (tax_id),
        taxhist_basis numeric (16,2) NOT NULL,
        taxhist_basis_tax_id integer,
    -   taxhist_cum_taxhist_ids integer[],
    +   taxhist_sequence integer,
    -   taxhist_rate numeric (8,4) NOT NULL,
    +   taxhist_percent numeric (8,4) NOT NULL,
        taxhist_amount numeric (16,2) NOT NULL,
    +   taxhist_tax numeric (16,2) NOT NULL,
        taxhist_docdate date NOT NULL,
        taxhist_distdate date NOT NULL
      );
    @@ -406, +393 @@

      COMMENT ON COLUMN taxhist.taxhist_tax_id IS 'Tax code id.';
      COMMENT ON COLUMN taxhist.taxhist_basis IS 'Base price amount on which th=
    e tax calculation is based.';
      COMMENT ON COLUMN taxhist.taxhist_basis_tax_id IS 'Tax rate calculation b=
    asis.  If null, then the amount of the parent document, otherwise calculate=
    d on the result amount of the tax code id referenced.';
    - COMMENT ON COLUMN taxhist.taxhist_cum_taxhist_ids IS 'An array that conta=
    ins references to other tax hist records that were cumulatively added to th=
    e basis.';
    - COMMENT ON COLUMN taxhist.taxhist_rate IS 'Tax rate percentage.';
    - COMMENT ON COLUMN taxhist.taxhist_amount IS 'Tax amount transacted';
    + COMMENT ON COLUMN taxhist.taxhist_amount IS 'Flat tax amount.';
    + COMMENT ON COLUMN taxhist.taxhist_tax IS 'Calculated tax amount.';
      COMMENT ON COLUMN taxhist.taxhist_docdate IS 'The date of the parent docu=
    ment.';
      COMMENT ON COLUMN taxhist.taxhist_docdate IS 'The G/L distribution date o=
    f the parent document.';
      }}}
    @@ -420, +406 @@

      CREATE TABLE cohisttax
      (
          PRIMARY KEY (taxhist_id),
    -     FOREIGN KEY (taxhist_source_id) REFERENCES cohist (cohist_id) ON DELE=
    TE CASCADE,
    +     FOREIGN KEY (taxhist_parent_id) REFERENCES cohist (cohist_id) ON DELE=
    TE CASCADE,
          FOREIGN KEY (taxhist_tax_id) REFERENCES tax (tax_id),
          FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax (tax_id)
      )