action.skip

G/L Account and Center

Your organization's business may require to export invoice bookkeeping data to accounting systems like DATEV or SAP. Usually, these systems assign generated revenues to general ledger accounts (G/L accounts, structures that record value movements in defined contexts) or cost centers or profit centers (business subdivisions to which costs or profits are allocated).

To support these assignments, JustOn can add G/L account or center information to invoice line items. When generating the bookkeeping data, this information is then populated to the booking details accordingly.

Info

JustOn always recalculates the G/L Account and Center fields when doing a database update on the invoice line item. By default, this happens during the invoice creation or the invoice finalization.

Updating open invoices

If you need to update an invoice that is already set Open with additional or new G/L account or center data, use JustOn's invoice fixing functionality, clicking Fix Invoices as described in Invoice Import and Fix. If that fails, perform a database update on the invoice line items of the selected invoices with the appropriate admin tools, like the Data Loader or the Salesforce Workbench.

You can control which G/L account or center information is added to invoice line items using specific assignment rules. JustOn implements these assignment rules as two custom settings:

Assignment Rules - Center

Using the custom setting Assignment Rules - Center, you define the criteria (fields and values to match) based on which an invoice line item is assigned a cost center or profit center.

Center Assignment Rule Information

Each Assignment Rules - Center setting specifies the following information:

Field Description
Name A unique name for the custom setting record.
Billing Type Maps to the custom text field ON_BillingType__c of the invoice.
Center Specifies the resulting cost center or profit center. If the matching process yields this center, it is added to the Center__c field of the invoice line item.
Product Group Maps to the field Product Group of the invoice line item (see Product Group).
Can include multiple values in a comma-separated list.
Business Entity Maps to the field Business Entity of the invoice.

When working with assignment rules, be aware of the following:

  • The rule matching process yields the specified result only if all specified criteria match. If you specify, for example, a product group and a business entity, the rule applies only if both the business entity on the invoice and the product group on the invoice line item have the corresponding values.
  • If a rule field is empty, it is ignored during the matching process. If you specify, for example, a business entity, the rule applies if the business entity on the invoice has the corresponding value. Other data, like the product group, have no effect in this case.
  • If you use multiple rules, the same fields must be filled (or empty) in all rules. If you specify, for example, a product group in one rule, you must specify a product group in all other rules, too. Otherwise, if you leave a field empty in one rule, the field must also be empty in all other rules.

    In case of ambiguous rule sets, the assignment becomes random.

Defining Center Assignment Rules

Create an Assignment Rules - Center record for each cost center or profit center to be available for allocation.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Assignment Rules - Center.

  3. Click New.
  4. Specify the information as necessary.
  5. Click Save.

    This creates the new center assignment rule.

Assignment Rules - G/L Account

Using the custom setting Assignment Rules - G/L Account, you define the criteria (fields and values to match) based on which an invoice line item is assigned a G/L account.

Info

Accounting systems like DATEV or SAP usually require an account number. For booking details without dedicated G/L account numbers, primarily, for taxes or deferred revenues, you can use the collective accounts feature.

G/L Account Assignment Rule Information

Each Assignment Rules - G/L Account setting specifies the following information:

Field Description
Name A unique name for the custom setting record.
JustOn recommends to use a descriptive name for the rule, because it can be part of the reference booking text.
Custom Rule Maps to the custom field ON_CustomGLRule__c on the invoice line item.
On the invoice line item, ON_CustomGLRule__c must not be a formula field, but a text field. It can be a formula on a source object, with the formula result being transferred to the invoice line item field as a string.
G/L Account Specifies the resulting G/L account. If the matching process yields this G/L account, it is added to the GL Account field of the invoice line item.
G/L Account 2 Specifies a second (optional) G/L account, which is added to the GL Account 2 field of the invoice line item if the matching process yields the G/L account(s) specified in the current setting.
This field is available as of JustOn 2.52.
Invoice Class Maps to the invoice class, like Invoice or Credit.
Invoice Type Maps to the invoice type, like Deposit.
Payment Method Maps to the field Payment Method of the invoice.
Product Group Maps to the field Product Group of the invoice line item (see Product Group).
Can include multiple values in a comma-separated list.
Tax Rule Maps to the field Applied Tax Rule of the invoice line item (see Tax Rules).
Can include multiple values in a comma-separated list.
Tax Code Maps to the field Tax Code of the invoice line item.
Can include multiple values in a comma-separated list.
Business Entity Maps to the field Business Entity of the invoice (see Business Entities).
Can include multiple values in a comma-separated list.

When working with assignment rules, be aware of the following:

  • The rule matching process yields the specified result only if all specified criteria match. If you specify, for example, a product group and a business entity, the rule applies only if both the business entity on the invoice and the product group on the invoice line item have the corresponding values.
  • If a rule field is empty, it is ignored during the matching process. If you specify, for example, a business entity, the rule applies if the business entity on the invoice has the corresponding value. Other data, like the product group, have no effect in this case.
  • If you use multiple rules, the same fields must be filled (or empty) in all rules. If you specify, for example, a product group in one rule, you must specify a product group in all other rules, too. Otherwise, if you leave a field empty in one rule, the field must also be empty in all other rules.

    In case of ambiguous rule sets, the assignment becomes random.

Applying a custom rule

By default, JustOn determines the best matching G/L account based on available criteria like Invoice Class, Business Entity, Product Group, etc.

You can, however, use a custom rule, which takes precedence over other criteria. This way, you can apply certain logic to determine the criterion by which a G/L account is associated to an invoice line item and, consequently, to the exported booking detail.

If the custom rule evaluation does not produce a clear result, JustOn proceeds to evaluate other available criteria.

To enable custom rules, you must create the custom field ON_CustomGLRule__c on the Invoice Line Item object.

On the invoice line item, ON_CustomGLRule__c must not be a formula field, but a text field. It can be a formula on a source object, with the formula result being transferred to the invoice line item field as a string.

Defining G/L Account Assignment Rules

Create an Assignment Rules - G/L Account record for each G/L account to be available for allocation.

  1. Click to enter Setup, then open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Assignment Rules - G/L Account.

  3. Click New.
  4. Specify the information as necessary.

    Custom settings names must not exceed 38 ASCII characters.

    g-l_acc_edit
    Creating G/L account assignment rule based on product group and business entity

  5. Click Save.

    This creates the new G/L account assignment rule.

Naming considerations

Using the target account number as the name for a G/L account assignment rule seems to be straightforward and intuitive. But what about multiple rules to check different conditions that all produce the same G/L account? The account number alone will no longer work.

Instead, consider combining, for example, the account number with the rule condition that makes the difference to the other rules for this G/L account.

Assume you book revenue made in a certain region to a dedicated account, like 3493. One part of this revenue is identified by the business entity that has made it ("Bizkaia"), another part is identified by a specific tax rule valid for this region ("VAT Spain"). Consequently, you can name your G/L account assignment rules 3493 Bizkaia and 3493 VAT Spain.

For details, see How to name custom settings?