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.
In Setup, open Custom Settings.
In Salesforce Lightning, navigate to Custom Code > Custom Settings.
In Salesforce Classic, navigate to Develop > Custom Settings.
Click Manage in the row of Global Settings.
- Click Edit in the Default row.
- Select the checkbox
Create Bookkeeping Data.
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.
Bookkeeping data is structured in booking periods and booking details. Booking periods and booking details are in a master-detail relationship.
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:
||The month for the booking period.|
||The year for the booking period.|
|Tenant||Text (255)||The tenant for the booking period.|
||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.|
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:
|Name||The booking detail name, is set automatically based on the type using these patterns:
|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.|
|The amount of the booking detail;
|Balance||The source balance for booking details of the type
|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.|
|The booking date as taken from
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
|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
|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:
|Default||Creates one booking detail per invoice line item. The booking date is taken from the field
|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.
|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.
Upon finalization, an invoice and its invoice line items are split into several booking details. This is a three-step process:
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
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.
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:
- the invoice ID
- the applied tax rate
- the available G/L account information
- the center
- the recognition rule
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.|
Resulting booking details
|#||Type||Account No.||Amount||Tax Rate||Name|
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|
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.
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.
|Pos Total Net||1000€|
|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:
Accordingly, JustOn generates the following booking details upon invoice finalization:
|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 (
|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 amount handling is available as of JustOn 2.52.
Shortfall recognition rule uses the following invoice line item fields in particular:
|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
|GL Account 2||The second G/L account, used for the revenue resulting from the shortfall amount. The value is taken from the
JustOn applies the
Shortfall recognition rule if the following conditions are met:
(1) The fields
Base Quantity and
Quota Quantity of the invoice line item are set, which implies
- a price tier with the price type
- usage data billing properly set up to determine the actual quantity
(2) The value of
Quota Quantity is higher than the value of
(3) The field
Recognition Rule of the invoice line item is set to
If the conditions are not met, JustOn uses the recognition rule
Now if enabled and set up accordingly, JustOn creates two booking details when finalizing the invoice:
- one for the revenue that results from the tracked product consumption
- 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:
With an actual consumption of 400, the invoice line item has the following quantity information:
Applying the proportional distribution, this produces the following booking details:
|1||G/L Account||(400 / 500) * 1000,00||800,00|
|2||G/L Account 2||(100 / 500) * 1000,00||200,00|