Configuring the General Ledger
You would usually not need to configure your organization's general ledger and accounting from scratch. opentaps provides you with a template in hot-deploy/mycompany/ to help you set up your organization. All you have to do is edit the XML files to fill in the name and address of your company.
Warning: opentaps Financials is an extremely flexible and configurable application. With just changes to configuration settings you can support many different accounting processes. This also means that you must really understand accounting best practices, how the system works, and how best to configure it, so please read through it several times carefully and compare to the examples in hot-deploy/mycompany/
- 1 Turning the Ledger Off
- 2 Setting up the Organization
- 3 Setting up the Chart of Accounts
- 4 Configuring Ledger Posting
Turning the Ledger Off
If you do not intend to do accounting (income statements, accounts receivables, etc.) you can turn the ledger off by editing hot-deploy/fnancials/ofbiz-component.xml and commenting out the line:
<service-resource type="eca" loader="main" location="servicedef/secas_ledger.xml"/>
Setting up the Organization
The first step to configuring the ledger is to set up your company as an internal organization and configure its accounting preferences. You can create your company as a Party Group in the Party Manager and then associate a Role of "Internal Organization" (INTERNAL_ORGANIZATIO) with it.
Next, you would configure the following accounting preferences for your company:
- Tax form of choice
- Cost of Goods Sold (COGS) method: LIFO, FIFO, or average cost. COGS method should be consistent with the inventory reservation method of the product stores associated with this party.
- Base currency
Once configured, the system does not allow you to change key accounting practices such as COGS method or default currency right now. If you’ve made a mistake, use [Web Tools] > [Entity Data Maintenance] to correct it.
All the warehouses which may hold inventory for your company should have its ownerPartyId ("Owner") field set to your company's partyId. This can be done in the Warehouse application's Configuration screens.
Finally, you must configure your company's Accounting Time Periods. At a minimum, you should configure fiscal years for your company. If, however, you choose to configure fiscal quarters and months as well, make sure that you also configure them to match all your fiscal years. For example, the following configuration IS INCORRECT:
- Fiscal years ending 2008-01-01, 2009-01-01
- fiscal quarters ending 2008-04-01, 2008-07-01, 2008-10-01, 2009-01-01
You must also have a fiscal quarter which ends on 2008-01-01 to be consistent with your fiscal years.
Setting up the Chart of Accounts
The second step is to set up the chart of accounts for your company. This can be done by editing the chart of accounts file in hot-deploy/mycompany and loading it or by using the Financials application's [Chart of Accounts] tab, where you can create a new account.
When configuring a new GL account, be sure to specify a parent GL account so that the hierarchy of accounts could be displayed correctly on reports.
There are two fields on the GL account which are important: glAccountClassId and glAccountTypeId. They are both used to classify the GL account. Currently, glAccountClassId classifications are used for financial reporting purposes (balance sheet, income statement, statement of cash flows), while glAccountTypeId is used for internal classifications and reports such as AR/AP balances, inventory valuation, and aging. For example:
- glAccountClassId determines whether the GL account is a debit or credit account
- glAccountClassId determines whether the GL account is an asset, liability, or equity account for balance sheet purposes and whether it should be revenue or expense for income statement. The glAccountClassId of an account determines which financial statement the account would display on.
- glAccountClassId determines whether an account is a cash or non-cash account for the cash flow statement
- glAccountTypeId determines whether the account is a Revenue, COGS, Operating Expense, Other Income, Other Expense, or Tax Expense on income statements
- glAccountTypeId determines whether the account should be included in the calculation of customer or vendor balances.
Special Note: Inventory variance GL accounts must be set up not as a “NON-CASH EXPENSE” but as a “INVENTORY_ADJUST” GL account class. The reason is that for a statement of cash flow, changes to inventory are considered “non-cash” and added back to operating cash flow. If the offsetting account is also a “non-cash” account, it would cause double counting.
Once you have created the accounts, they must be associated with your company. If you created the accounts in the Financials application's Chart of Accounts screen, they will automatically be associated with your company. You can also add an existing account to your company using the Financials Chart of Accounts screen, or by creating a GlAccountOrganization entity.
Configuring Ledger Posting
When the system posts ledger entries, it will map business transactions such as an invoice to a particular set of pre-configured GL accounts via an "account type" configured for your company. Thus, you can change how the ledger is posted by changing the "account type" for your company using the Financials > Configure Ledger screen. Alternatively, you can modify the GlAccountTypeDefault entity's values for your company directly in the database.
In addition, you can associate various payment, payment method, and invoice item types directly with account types via configurable entities in the database. These configurations are meant only for systems administrators, so they can only be configured by updating the database tables. This section describes which tables would need to be updated.
Configuring the Ledger for Invoices
The following entities are used for configuring invoicing:
- InvoiceItemType: a GL account can be specified as the default GL account for this invoice item type. Note that the accounting for the sales tax invoice item (ITM_SALES_TAX) will probably not be used, as the GL accounts for tax items will be in the TaxAuthorityGlAccount entity. It is nice to set it up as a "failsafe" setting, though.
- InvoiceItemTypeGlAccount: can be used to override the defaults set in InvoiceItemType by setting a different GL account for each invoice item type for a particular company.
- For each product, you can specify the different types of GL account used for a particular product. For example, you can specify the SALES, COGS, INVENTORY accounts for a particular product.
Configuring the Ledger for Payments
You can create a hierarchy of payment types as long as the ultimate parent of your payment type is either a DISBURSEMENT or a RECEIPT. If the Payment is a disbursement (ie, it has a payment type which is a child type of DISBURSEMENT), the transaction entry is a debit to the offsetting (PaymentGlAccountTypeMap) GL account and a credit to the Payment GL account. If the Payment is a receipt (ie, its payment type is a child type of RECEIPT), the transaction is a debit to the Payment's GL account and a credit to the offsetting (PaymentGlAccountTypeMap) GL account.
GL accounts for payments are configured in the following ways and will be used in the following sequence:
- A glAcccountId for a particular PaymentMethod (such as particular credit card or checking account.) Usually this is done for the company's internal credit cards, although it can be done for customer cards as well.
- If the Payment Method is a Credit Card, then use glAccountId in the CreditCardTypeGlAccount entity is used, so you can define different receivables accounts for different credit cards.
- A glAccountId in PaymentMethodTypeGlAccount, defining the glAccount for this generic payment method type (CHECK, CREDIT CARD, etc.) for a company.
- defaultGlAccountId in the PaymentMethodType.
To handle incoming and outgoing payments correctly, make sure that the company's internal payment methods (used for outgoing payments) have the right GL accounts associated with them. To configure the correct GL account for various payment types, create PaymentGlAccountTypeMap values which map payment types to account types (and hence, from above, to GL accounts.) You can create as many payment types and match them to as many GL account types as you need.
If the Payment or PaymentApplication has an overrideGlAccountId, then the PaymentType's related GlAccountId is overriden in favor of the glAccountId defined in the Payment or PaymentApplication. Important
Best practice for configuring payment GL accounts is:
- For each internal payment method (ie, the Company's checking accounts and credit cards), put a glAccountId in the PaymentMethod entity value.
- For external payment methods (ie, customers' credit cards or checking accounts), use PaymentMethodTypeGlAccount to put in a glAccountId for each PaymentMethodType.
- Avoid using the defaultGlAccountId for PaymentTypes, as these are ambiguous. For example, the PaymentType of "CREDIT_CARD" is used for credit cards of customers and employees, so it is not possible to set the right GL account for all credit cards.
Example Here is an example for configuring GL accounts for vendor payments using a company checking account:
- Create a PaymentType of "Vendor Payment"
- Create a PaymentTypeGlAccountMap of paymentId="VENDOR_PAYMENT", glAccountTypeId="ACCOUNTS_PAYABLE". This says that all vendor payments will be set off against the "Accounts Payable" GL account.
- Create a PaymentMethod of paymentMethodId="COCHECKING", glAccountId = "111000" (ie, Cash in Checking Accounts) This says that the "COCHECKING" payment method" will be booked against account "111000".
- Create a GlAccountTypeDefault which maps glAccountTypeId="Accounts Payable" and glAccountId="210000" This says that the Accounts Payable account will be "210000".
Special Accounts for Purchasing
Two accounts need to be set up for purchasing and accounts payable invoicing: Uninvoiced Shipment Receipts (UNINVOICED_SHIP_RCPT) and Purchase Price Variance (PURCHASE_PRICE_VAR). See ledger transactions references on purchasing and receiving inventory.
Special Accounts for Inventory
For inventory variance, configure the GL account for expensing inventory at the product-specific level (using ProductGlAccount), which can be done in the Catalog Manager's "GL account" tab for a product. Or, use the VarianceReasonGlAccount entity to configure a default glAccountId for your organization for each variance reason (found in VarianceReason entity.)
Gift certificates transactions can be set up simply as a special payment method type of GIFT_CERTIFICATE and can be either a GC_DEPOSIT or GC_WITHDRAWAL payment type. GC_DEPOSIT should be a sub-type of RECEIPT, and GC_WITHDRAWAL a sub-type of DISBURSEMENT. Both payment types are configured to use a glAccountTypeId of CUSTOMER_GC_DEPOSIT, and the payment method of GIFT_CERTIFICATE is configured to a GL account. We recommend that you set up a special GL account such as “Unredeemed Gift Certificates” to track the outstanding of your customers' gift certificates. Once set up this way, the system will post your gift certificates according to the ledger transactions reference.
Configuring the Ledger for Billing Accounts
For customer credits to work correctly, be sure to configure the EXT_BILLACT payment method type to the right G/L account (ie, ACCOUNTS RECEIVABLE) using the PaymentMethodTypeGlAccount entity. This is because customer credits are all created as payments to a billing account with paymentMethodTypeId of "EXT_BILLACT".
Set up the GL account for tracking tax liabilities in the TaxAuthorityGlAccount entity. Tax liabilities are tracked by tax authority party and geo id's. You can thus set up a different GL account for each geo id covered by the same tax authority.
Manual pages >> Time Periods
Section pages >> Facilities Setup: Stores, Warehouses, Shipping