Enabling Additional Options for Invoice Bookkeeping Data
JustOn Billing & Invoice Management allows for writing bookkeeping data for revenues and taxes from finalized invoices. These records can then be transferred to accounting systems like DATEV, SAP or Microsoft Dynamics via CSV export or, for DATEV, direct transfer.
In addition to generally enabling the booking data generation and configuring the booking account allocation, JustOn Billing & Invoice Management provides a number of optional settings to cover specific use cases:
- Enabling Additional Information on Booking Details
- Enabling Payment Date-Based Tax Bookings
- Enabling Booking Detail Regeneration
- Creating Flow for Moving Booking Details
Enabling Additional Information on Booking Details
JustOn Billing & Invoice Management can copy additional fields from the invoice or an invoice line item to the booking details. All additional custom fields on the booking detail – with the same API name and data type as the source fields on the invoice or the invoice line item – invoke a copy operation on booking detail creation. Specific field prefixes (like for the ON field mechanism) are not required. 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 |
Explicitly set booking detail fields → excluded from copy operation
JustOn Billing & Invoice Management sets the following fields explicitly when creating booking details according to the applied business logic. This is why they will not be copied as additional custom fields:
Booking Detail Target Field | Source Object and Field |
---|---|
Account | Invoice.Account |
AccountName | Invoice.AccountName |
AccountNo | InvoiceLineItem.GLAccount CollectiveAccount.Account |
AccountRule | AssignmentRulesGLAccount.Name CollectiveAccount.Name |
Amount | InvoiceLineItem.PosTotalNet InvoiceLineItem.PosTotalTax |
BIC | Invoice.BankCode |
Balance | Balance.Name |
BankAccountOwner | Invoice.BankAccountOwner |
BillingCity | Invoice.BillingCity |
BillingPractice | Item.BillingPractice |
BookingDate | Invoice.Date Invoice.ON_BookingDate |
BookingPeriod | dynamically set on creation |
BpAccountNo | Invoice.DebtorNo Account.ON_DebtorNo CollectiveAccount.Account2 CollectiveAccount.BpAccount |
Center | InvoiceLineItem.Center |
CostObject | InvoiceLineItem.CostObject |
CurrencyIsoCode | Invoice.CurrencyIsoCode |
CustomerCity | |
CustomerName | |
Exported | dynamically set on creation |
IBAN | Invoice.BankAccount |
InvoiceNo | Invoice.Name |
Invoice | Invoice.Id |
Name | dynamically set on creation |
PaymentDate | Balance.Date |
Region | Invoice.Region |
Subscription | Subscription.Name |
TaxCode | InvoiceLineItem.TaxCode |
TaxRate | InvoiceLineItem.TaxRate |
Type | dynamically set on creation |
VATId | Account.ON_VATNumber Account.TaxNumber |
To enable this functionality, add the intended fields to the Booking Detail object.
-
On the Booking Detail object, create new custom fields with the same API name and data type as the source fields on the invoice or the invoice line item.
This copies the corresponding field values to the booking detail.
For help about creating fields, see Managing Object Fields.
Enabling Payment Date-Based Tax Bookings
In order to enable the payment date-based creation of tax booking details, the feature must be activated in the global settings.
-
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.
-
Click Manage in the row of Global Settings.
- Click Edit in the Default row.
- Select the checkbox
Move Tax Booking Details to Payment Date
. - Click Save.
Enabling Booking Detail Regeneration
Certain business use cases may require to regenerate booking details, for example, when the configuration was incorrect (G/L account, cost center/profit center, recognition rule, etc.), or when the bookkeeping data generation was not enabled on invoice finalization. JustOn Billing & Invoice Management allows to use the Invoice Import and Fix feature to recreate booking details if they have not been exported.
To enable this functionality, add the custom field FixBookingData
to the Invoice object:
- Navigate to the fields list of the Invoice object.
-
Create the following new field.
API Name Data Type Description FixBookingData Checkbox Select the checkbox to enable the booking detail regeneration. For help about creating fields, see Managing Object Fields.
Calling the invoice fixing process regenerates the booking details of all invoices where the checkbox FixBookingData
is selected. The checkbox is unselected after processing the invoice.
Note
If one of the existing booking details of an invoice is already exported, JustOn Billing & Invoice Management will skip the invoice completely and will not regenerate any booking details for this invoice.
Info
Be aware of the following specifics:
When regenerating the booking details for a cancellation invoice, JustOn Billing & Invoice Management processes the information of the related canceled invoice – the same way as described in Bookkeeping Data for Cancellation Invoices.
Make sure that the related canceled invoice is correct before starting the fix invoice process for the cancellation invoice.
JustOn Billing & Invoice Management will not regenerate booking details produced from sub invoices (partial invoices and progress invoices) and their related final invoices.
To fix such booking details, users must cancel the existing invoices and create new ones.
Creating Flow for Moving Booking Details
Some business use cases may require to shift future booking details to the current month, for example, when an invoice is written off.
To this end, you can configure a flow that calls the Apex class Move booking details
provided by JustOn Billing & Invoice Management. When your defined criteria are met, the flow moves the booking details of a given invoice to the current booking period – setting the booking date to the current date.
The source object for the flow can be either Invoice or another object that has an Invoice
field to hold the ID of the relevant invoice.
Note
Depending on your use cases, the flow setup and the objects to involve will vary.
- Click to enter Setup, then navigate to Process Automation > Flows.
- Click New Flow.
- Select
Record-Triggered Flow
and click Create. -
Configure the Start element.
Option Description Object The object whose record modifications are to trigger the booking detail reallocation Trigger The type of record change that triggers the flow, like A record is created or updated
Conditions The use case-specific trigger conditions, one or more filter criteria for evaluating certain field values or a formula for evaluating records Optimize for Actions and Related Records
-
Click and add the following Action element.
Option Description Action The Apex class to call, must be Move booking details
Input Values Invocable variables for the Apex class
Invoice Id: specifies the reference to the ID field of the relevant invoiceSpecify a label and an API name as required.
-
Click Save.
Specify a label and an API name as required.
-
Click Activate.
When the defined conditions are met, JustOn triggers the flow. It moves the booking details of the relevant invoice to the current booking period, setting the booking date to the current date.
For help about creating flows, see Flows in the Salesforce Help.
Example use case: Write off invoice
You want JustOn to move the booking details of an invoice that is written off completely. So the relevant object is Balance, and the conditions to consider include the balance type (Write-off
) and the amount compared to the invoice total.
To trigger the flow when the balance is created accordingly, specify:
Flow Element | Option | Value |
---|---|---|
Start | Object | Balance |
Trigger | A record is created |
|
Conditions | Formula Evaluates to True |
|
Formula | AND(TEXT({!$Record.ONB2__Type__c})=='Write-off',ABS({!$Record.ONB2__Amount__c})=={!$Record.ONB2__Invoice__r.ONB2__Balance__c}) |
|
Action | Action | Move booking details |
Input Values | Invoice Id: {!$Record.ONB2__Invoice__r.Id} |
This triggers JustOn to execute the flow when the balance type equals Write-off
and the write-off amount equals the invoice balance: It moves all invoice booking details to the current month.