AP DACs: Reference Data

In this topic, you can find information about the data access classes (DACs) that contain reference data that is used in most of the DACs in accounts payable, such as information about vendors, locations, and addresses.

Accounts Payable Preferences

The general preferences for accounts payable are stored in the APSetup DAC. An administrative user can edit these preferences on the Accounts Payable Preferences (AP101000) form.

Vendors

The Vendors (AP303000) form is used to define business accounts that satisfy the following condition: BAccount.Type = VE OR BAccount.Type = VC. (That is, the business account is a vendor or both a vendor and a customer.) Business accounts of these types are extended with the information from the Vendor DAC, as shown in the following SQL query.

SELECT 
    * 
FROM 
    BAccount 
    INNER JOIN Vendor 
        ON BAccount.CompanyID = Vendor.CompanyID 
        AND BAccount.BAccountID = Vendor.BAccountID 

The Vendor DAC contains AP-specific business account data related to vendors, including default currency settings, credit terms, and tax reporting settings for tax agency vendors.

Locations

As is true of any other business account record, a Vendor record can have multiple Location records associated with it. The default vendor location is stored in the BAccount.DefLocationID field.

The Location DAC contains multiple AP-specific fields. The names of these fields start with the V prefix. Examples of these fields are shown in the following table.

Field Description
VTaxZoneID The default vendor TaxZone associated with the location.
VExpenseAcctID The default expense GL account associated with the location.
VAPAccountID The default AP account associated with the location.
VPaymentMethodID The default PaymentMethod that is for use in AP and associated with the location.

The tax zones and accounts specified in a Location record can be overridden at the document level. For example, if you specify a particular location in a vendor bill, the tax zone (APInvoice.TaxZoneID) has the default value copied from Location.VTaxZoneID, but a user can override this value with any other tax zone.

Vendor locations can be defined on the Vendor Locations (AP303010) form.

Addresses and Contacts

Three types of addresses and contacts are defined for every vendor in the system:

  • The main contact and address, which are specified on the General tab of the Vendors (AP303000) form.

    The main contact and address are referenced by the BAccount.DefContactID and BAccount.DefAddressID fields, respectively.

  • The default remittance contact and address, which are specified on the Payment tab of the Vendors form.

    These contact and address are referenced by the Location.VRemitContactID and Location.VRemitAddressID fields of the vendor's default location (which is specified in BAccount.DefLocationID).

    Tip:
    The remittance Address and Contact records serve as templates for a bill-level address and contact.
  • The default shipper's contact and address, which are specified on the Purchase Settings tab of the Vendors form.

    These contact and address are referenced by the Location.DefContactID and Location.DefAddressID of the vendor's default location (which is specified in BAccount.DefLocationID).

The selection of particular types of addresses and contacts is illustrated in the following SQL queries:

  • Selection of the main vendor address and contact
    SELECT 
        * 
    FROM 
        Vendor 
        INNER JOIN BAccount 
            ON BAccount.CompanyID = Vendor.CompanyID 
            AND BAccount.BAccountID = Vendor.BAccountID 
        INNER JOIN Contact 
            ON Contact.CompanyID = BAccount.CompanyID 
            AND Contact.ContactID = BAccount.DefContactID 
        INNER JOIN Address 
            ON Address.CompanyID = BAccount.CompanyID 
            AND Address.AddressID = BAccount.DefAddressID
  • Selection of the default remittance and shipper's address and contact
    SELECT 
        * 
    FROM 
        Vendor 
        INNER JOIN BAccount 
            ON BAccount.CompanyID = Vendor.CompanyID 
            AND BAccount.BAccountID = Vendor.BAccountID 
        INNER JOIN Location -- Default Location 
            ON Location.CompanyID = Vendor.CompanyID 
            AND Location.LocationID = BAccount.DefLocationID 
        LEFT JOIN Contact AS DefaultRemittanceContact 
            ON DefaultRemittanceContact.CompanyID = Location.CompanyID 
            AND DefaultRemittanceContact.ContactID = Location.VRemitContactID 
        LEFT JOIN Address AS DefaultRemittanceAddress 
            ON DefaultRemittanceAddress.CompanyID = Location.CompanyID 
            AND DefaultRemittanceAddress.AddressID = Location.VRemitAddressID 
        LEFT JOIN Contact AS DefaultShipperContact 
            ON DefaultShipperContact.CompanyID = Location.CompanyID 
            AND DefaultShipperContact.ContactID = Location.DefContactID 
        LEFT JOIN Address AS DefaultShipperAddress 
            ON DefaultShipperAddress.CompanyID = Location.CompanyID 
            AND DefaultShipperAddress.AddressID = Location.DefAddressID 

Vendor Payment Method Details

The VendorPaymentMethodDetail DAC stores vendor-specific values for AP-related payment method settings (which are stored in PaymentMethodDetail). These settings are edited on the Payment tab of the Vendor Locations(AP303010) form. For the main vendor location, they can also be specified on the Payment tab of the Vendors (AP303000) form.

Discount Codes and Sequences

APDiscount represents an accounts payable discount code that is used to define discount sequences (which are stored in VendorDiscountSequence). The primary function of a discount code is to specify the type of discounts that are based on that code. For example, a document discount can be applicable only to specific vendors, or a line discount can be applicable to specific inventory items. The APDiscount records are defined on the Vendor Discount Codes (AP204000) form.

VendorDiscountSequence represents a specific discount sequence based on a discount code. The discount sequence specifies how the discount is calculated based on the amount or quantity of the line item, or on the amount of the document. Discount sequences can be defined on the Vendor Discounts (AP205000) form.

In the following examples, a discount code defines a type of discount, including its applicability, while discount sequences based on this code specify to which specific entities the discount applies:

  • Suppose that a discount code specifies a type of document-level discounts that are applicable to specific vendors. The discount sequence defines this discount as being applicable to the A, B, and C vendors, and provides a 50% discount if the line amount is greater than $200.
  • Suppose that a discount code specifies a type of line-level discounts that are applicable to specific inventory items. The discount sequence defines this discount as being for the D, E, and F inventory items, and provides a $25 discount if the document amount is greater than $1000.

Price Lists

The system uses the APVendorPrice DAC to suggest the unit cost in document details (that is, the unit cost that is stored in the APTran.UnitCost field) that the user inserts into a bill or adjustment. The records store inventory item prices broken down by the following:
  • Vendor
  • Warehouse
  • Inventory item
  • Currency
  • Unit of measure
  • Break quantity
  • An indicator of whether the price is promotional

All these fields form the compound key of vendor price records, meaning that they should be unique across the combination of these dimensions.

All existing vendor prices are defined on the Vendor Prices (AP202000) form. Also, a user can update the APVendorPrice records indirectly by creating and releasing AP price worksheets, which are stored in APPriceWorksheet and are editable on the Vendor Price Worksheets (AP202010) form. The system uses the details of a price worksheet (which are stored in APPriceWorksheetDetail) to automatically update the APVendorPrice records once the user releases a worksheet.