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. Hence, they aggregate the booking details produced for this month. 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. By default, JustOn creates one booking detail per invoice line item. For other options, see Revenue Recognition.

The booking detail 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), Deferred and Payment.
VAT ID Account.TaxNumber The VAT identifier of the related account.

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

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

Applying Revenue Recognition

JustOn ships a number of revenue recognition rules. They control the way invoices and invoice line items are transformed into booking details. The following revenue recognition rules are available:

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.
The Monthly recognition rule is available as of JustOn 2.49.
Shortfall Creates two booking details if a defined minimum price exceeds the actually incurred costs: one for actually incurred costs, and another one for the shortfall amount, that is, the difference between the actually incurred costs and the defined minimum price.
The Shortfall recognition rule is available as of JustOn 2.52.

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

The booking detail generation examples below illustrate the default booking detail generation and the revenue distribution using the Monthly recognition rule.

(1) Creating Booking Details

If enabled, JustOn creates booking details upon invoice finalization.

Depending on your business or accounting requirements, you can create booking details applying either the Default, Monthly or Shortfall recognition rule. The 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.

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.

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.

Booking Detail Generation Examples

Consider the following example: One invoice with four invoice line items and the Default recognition rule results in four booking details, split by G/L account and revenue/tax.

Invoice line items

# G/L Account Pos Total Net Pos Total Tax Tax Rate Invoice No.
1 0001 10 0,7 7% R12345
2 0001 20 1,4 7% R12345
3 0002 30 5,7 19% R12345
4 0002 40 7,6 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 2,1 7% 7.0-R12345
4 Tax 13,3 19% 19.0-R12345

booking_details.png
Booking details split by G/L account and revenue/tax with Default recognition rule

Now assume, in addition, that the invoice's service period covers ten months and that the fourth invoice line item is subject to the Monthly recognition rule. The same invoice line items on the invoice will now produce 14 booking details: additional 10 for the item's revenue portions, which are to be distributed over 10 months). The item's tax is not split, and, following the example, combined with the 19% tax of item #3.

# Type Account No. Amount Tax Rate Name
1 Revenue 0001 30 7% 0001-R12345
2 Revenue 0002 30 19% 0002-R12345
3..12 Revenue 0002 4 19% 0002-R12345
13 Tax 2,1 7% 7.0-R12345
14 Tax 13,3 19% 19.0-R12345

booking_details_monthly.png
Booking details split by G/L account and revenue/tax with combined Default/Monthly recognition rule

Handling Deferred Revenue

Your accounting may require to book deferred revenue to a dedicated account. This may be the case if you distribute the revenue of an invoice over multiple booking periods using the Monthly revenue recognition rule. Consequently, the revenue amount booked during the defined period is "taken out" from the deferred revenue account.

Info

Deferred revenue handling is available as of JustOn 2.52.

For JustOn to generate a booking detail for the deferred revenue, you must create a corresponding Collective Accounts custom setting.

Consider the following example: There is an invoice whose amount is to be distributed equally to four booking periods using the Monthly recognition rule.

Field Value
Pos Total Net 1000€
Tax 190€
Grand Total 1190€
Service Period Start 2018-05-01
Service Period End 2018-08-31

Now assume that your accounting requires the deferred revenue to be booked to the account 2500. To this end, you create the following collective account setting:

Field Value
Name Deferred Revenue
Type Deferred
Account 2500

Accordingly, JustOn generates the following booking details upon invoice finalization:

# Booking Period Type Amount Notes
1 2018-05 Tax 190 The tax is always booked in the first booking period.
If there is a corresponding collective account setting for taxes, it specifies the account number.
2 Revenue 250 1/4 of the revenue is booked in the first booking period.
The account number is taken from a corresponding G/L accounts setting.
3 Deferred 750 3/4 of the revenue is booked to the deferred revenue account in the first booking period.
The account number is taken from the corresponding collective account setting (■ 2500).
4 2018-06 Revenue 250 1/4 of the revenue is booked in the second booking period.
5 Deferred -250 1/4 of the revenue is taken out from the deferred revenue account to offset the booked revenue in the second booking period.
6 2018-07 Revenue 250 1/4 of the revenue is booked in the third booking period.
7 Deferred -250 1/4 of the revenue is taken out from the deferred revenue account to offset the booked revenue in the third booking period.
8 2018-08 Revenue 250 1/4 of the revenue is booked in the fourth booking period.
9 Deferred -250 1/4 of the revenue is taken out from the deferred revenue account to offset the booked revenue in the fourth booking period.

Handling Shortfall Amounts

JustOn can generate separate booking details for so-called shortfall amounts - the difference between some actually incurred costs and the defined minimum price.

Consider the following use case: You invoice usage costs with a fixed minimum base price. That is, you combine usage data billing with price tiers, where the first tier has defined a flat price. Now assume that the actually occurred quantity of an item is smaller than the quantity for the flat price tier. You invoice the flat price, but your accounting may need to separately track a) the revenue resulting from the actual consumption and b) the revenue resulting from the difference billed by implication. To support this scenario, you apply the recognition rule Shortfall.

Info

Shortfall amount handling is available as of JustOn 2.52.

The Shortfall recognition rule uses the following invoice line item fields in particular:

Field Description
Base Quantity The actually occurred quantity, determined via usage data billing.
Quota Quantity The quantity specified for the flat price tier.
GL Account The G/L account used for the revenue resulting from the actual consumption. The value is taken from the G/L Account field of the Assignment Rules - G/L Account custom setting.
GL Account 2 The second G/L account, used for the revenue resulting from the shortfall amount. The value is taken from the G/L Account 2 field of the Assignment Rules - G/L Account custom setting.

JustOn applies the Shortfall recognition rule if the following conditions are met:

  • The fields Base Quantity and Quota Quantity of the invoice line item are set, which implies
    • a price tier with the price type Flat
    • usage data billing properly set up to determine the actual quantity
  • The value of Quota Quantity is higher than the value of Base Quantity.
  • The field Recognition Rule of the invoice line item is set to Shortfall.

If the conditions are not met, JustOn uses the recognition rule Default.

Now if enabled and set up accordingly, JustOn creates two booking details when finalizing the invoice:

(1) one for the revenue that results from the tracked product consumption
(2) a second one for the revenue that results from the shortfall amount, that is, the difference between the actually incurred costs and the defined minimum price

The invoice line item total (the defined minimum flat price) is split proportionally according to the determined quantity, as illustrated in the following example:

Price tier:

Quantity Price Price Type
500 1000,00 Flat

With an actual consumption of 400, the invoice line item has the following quantity information:

Field Value
Base Quantity 400
Quota Quantity 500

Applying the proportional distribution, this produces the following booking details:

# Booking Account Calculation Amount
1 G/L Account (400 / 500) * 1000,00 800,00
2 G/L Account 2 (100 / 500) * 1000,00 200,00