Tax Code Override Lookup for Purchase Orders Example

To limit which tax codes users can choose when entering lines in a purchase order, you can create a Tax Code Override lookup in the portal.

To do this, create a lookup in Vista Web and apply it to the appropriate portal setting. You must be a System or Security Admin to create a portal lookup.

The following example outlines how to set up a portal lookup that uses the state on a particular job to display only the tax codes that apply to that state.

  1. In the portal, go to Admin > Manage Lookups.
  2. To create a new lookup, from the Select a lookup dropdown, select Add New Lookup.
  3. Enter a Lookup Name (you can edit this later on), and select Add.

    For example, State Tax Codes.

  4. In the SQL Choices Override section, copy and paste the following lookup details:
    SELECT *
    FROM kHQTX t
    JOIN kHQCO c
        ON c.TaxGroup = t.TaxGroup
    WHERE c.HQCo = @POCo
        AND LEFT(t.TaxCode, 2) = (  SELECT [PRStateCode]
                                    FROM kJCJM j
                                    WHERE j.JCCo = @JCCo
                                        AND j.Job = @Job)

  5. Select Evaluate Lookup to test your entry.
  6. In the portal settings, go to Admin > Portal Settings > Purchase Orders > PO Pending.
  7. Assign your new lookup to the portal setting Tax Code Override Lookup for PO.

    The Tax Code override lookup that you created restricts the Tax Code dropdown for PO Purchase Orders, PO Requisition, PO Pending, Material Orders, and SM Purchase Orders.

    In this example, the State Code on the job is WA, so in this new PO Requisition line, the Tax Code field defaults to WA as well.

Parameters for the Tax Code Override Lookup

Additional parameters you may find useful when setting up this Tax Code Override lookup:
  • @APVMKeyID
  • @JCCo
  • @Job
  • @Phase
  • @POCo
  • @TaxType