Skip to content

Bookkeeping Data for Finalized Invoices

JustOn allows for writing bookkeeping data for finalized invoices. These records can then be exported to bookkeeping systems like DATEV or SAP.

Enabling Bookkeeping Data Generation

In order to enable the creation of bookkeeping data upon invoice finalization, the feature has to be activated in the global settings.

  1. In Setup, 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 Global Settings.
  3. Click Edit in the Default row.
  4. Select the checkbox Create Bookkeeping Data.
  5. Optionally, select the checkbox Enable Accounting in Gross Values.
    Depending on the requirements of your accounting system, select this option to make JustOn use gross values when creating bookkeeping data.
  6. Click Save.

Data Structure

Bookkeeping data is structured in booking periods and booking details. Booking periods and booking details are in a master-detail relationship.

Booking Period

A booking period represents one month in bookkeeping. Booking periods are grouped by tenants.

The following fields are available:

Field Data Type Possible Values Required Description
Name Text The booking period name, is set automatically using this pattern:
TENANT-YEAR-MONTH (w/ tenant)
YEAR-MONTH (w/o tenant)
Month Picklist 01, 02 ... 12 The month for the booking period.
Year Text (4) 2017 The year for the booking period.
Tenant Text (255) The tenant for the booking period.
Status Picklist Open
Closed
The booking period status: A closed booking period is ignored when finalizing the invoice, any matching details for this period are moved to the next open period.

Booking Details

A booking detail represents a record in an accounting ledger. It holds the following fields:

Field Required Source Fields Description
Name The booking detail name, is set automatically based on the type using these patterns:
Revenue: ACCOUNTNUMBER-INVOICENUMBER
Tax: TAXRATE-INVOICENUMBER
Account Invoice.Account The account for the booking detail.
Account Name Invoice.AccountName The account name as taken from the invoice.
Account Number InvoiceLineItem.GLAccount The general ledger account as taken from the invoice line item.
Amount InvoiceLineItem.PosTotalNet
InvoiceLineItem.PosTotalTax
The amount of the booking detail; Revenue is taken from PosTotalNet and Tax is taken from PosTotalTax of the invoice line item.
Balance The source balance for booking details of the type Payment.
Bank Account Owner Invoice.BankAccountOwner The bank account owner as part of the banking data.
BIC Invoice.BankCode The bank code/BIC as part of the banking data.
Billing City Invoice.BillingCity The billing city as taken from the invoice.
Booking Date Invoice.ON_BookingDate
Invoice.Date
The booking date as taken from ON_BookingDate on the invoice (fallback: invoice Date field).
If the booking detail is to be moved to the next open booking period, JustOn applies the date of the target booking period to the booking detail.
Booking Period The booking period as determined by the booking date.
Center InvoiceLineItem.Center The cost center or profit center for this booking detail.
Export Destination The export target, is set automatically upon export.
Exported Selected automatically upon export completion.
IBAN Invoice.BankAccount The bank account/IBAN as part of the banking data.
Invoice Invoice.Id The source invoice for booking details of the types Revenue and Tax.
Invoice Line Items InvoiceLineItem.Name A comma separated list of the invoice line items that have been used to build this booking detail
Invoice No The invoice number as taken from the invoice via a formula.
Recognition Rule InvoiceLineItem.RecognitionRule The recognition rule that has been used to create this booking detail.
Last Error Shows export errors, is set automatically upon export.
Tax Rate InvoiceLineItem.TaxRate The tax rate of the invoice line item.
Tax Rule InvoiceLineItem.AppliedTaxRule The applied tax rule of the invoice line item.
Type The booking detail type; possible values include Revenue, Tax (set based on invoices) and Payment.
VAT ID Account.TaxNumber The VAT identifier of the related account.

For additional technical information about the booking detail fields (API names, data types, etc.), see the Booking Detail object reference.

Revenue Recognition

Upon finalization, an invoice and its invoice line items are split into several booking details. This is a three-step process:

(1) Creating booking details
(2) Assigning booking details to booking periods
(3) Combining booking details

(1) Creating Booking Details

The way invoices and invoice line items are transformed into booking details represent revenue recognition rules. JustOn uses the following rules:

Recognition Rule Description
Default Creates one booking detail per invoice line item. The booking date is taken from the field ON_BookingDate of the invoice. The invoice date is used as fallback.
Monthly Creates multiple booking details that are evenly distributed over the service period of the invoice line item. The service period of the invoice is used as fallback.
If the service period does not start at the beginning or end at the end of a month, the booking amount is calculated proportionally for this month.

Irrespective of the recognition rule, JustOn creates separate booking details for the taxes of an invoice line item. As with the Default rule, the booking date is taken from the invoice line item field ON_BookingDate, with the invoice date as fallback. Be aware that if you use gross values when creating bookkeeping data (see Enabling Bookkeeping Data Generation), JustOn does not create tax details.

The recognition rule is determined via the field Recognition Rule of the invoice line item. If the field is not set, it defaults to the Default recognition rule.

Info

You can set the recognition rule on the invoice line item using the ON field mechanism when creating the invoice.

(2) Assigning Booking Details to Booking Periods

Each booking detail is assigned to a booking period. The Booking Date is used to determine the target period. If the target period does not yet exist, it is created automatically. If the period is closed, the booking detail is assigned to the next open period.

(3) Combining Booking Details

JustOn combines booking details that are assigned to the same booking period if the following data match:

Info

The field InvoiceLineItems of the booking detail contains a comma separated list of the invoice line items that have been used to build this booking detail.

Consider the following example: One invoice with four invoice line items and the default recognition rule results in four booking details.

Invoice line items

# G/L Account Pos Total Net Pos Total Tax Tax Rate Invoice No.
1 0001 10 2 7% R12345
2 0001 20 3 7% R12345
3 0002 30 4 19% R12345
4 0002 40 5 19% R12345

Resulting booking details

# Type Account No. Amount Tax Rate Name
1 Revenue 0001 30 7% 0001-R12345
2 Revenue 0002 70 19% 0002-R12345
3 Tax 5 7% 7.0-R12345
4 Tax 9 19% 19.0-R12345

Additional Fields for Booking Details

JustOn can copy additional fields from the invoice or an invoice line item to the booking details. All additional fields on the booking detail invoke a copy operation. JustOn first tries to copy data from the invoice, then from the invoice line item.

Booking Detail Field Invoice Field Invoice Line Item Field Result
Billing Country Billing Country n/a copy from invoice to booking detail
Discount n/a Discount copy from invoice line item to booking detail
Duplicate Duplicate Duplicate copy from invoice line item to booking detail