action.skip

Enabling Partial Invoices or Progress Invoices

Certain business use cases, like projects or services that extend over a large period of time, require merchants or suppliers to distribute the corresponding payment requests over multiple invoices. To this end, JustOn Billing & Invoice Management allows for creating partial invoices or progress invoices (commonly referred to as sub invoices).

JustOn Billing & Invoice Management allows for creating sub invoices and, consequently, the related final invoices when billing arbitrary objects. So setting up the software to make use of this functionality means to properly configure the generic invoice run and, if required, the booking data creation.

Info

The PDF output of partial invoices or progress invoices as well as the related final invoices is supported with the JustOn PDF service by default.

The default Liquid template for invoices, Invoice Template.liquid, does usually not require configuration. Depending on your project, you may still want to customize some display specifics. For details, see Configuring Liquid Templates and Working With Liquid Code.

Configuring Invoice Creation

Basically, the creation of a partial invoice or progress invoice is controlled using the ON field ON_Type on the invoice source object. It defines the type of the produced invoice. If this field is set to Partial or Progress, JustOn generates a partial invoice or progress invoice, respectively. Likewise, if the field is set to Final, the software creates the final invoice.

In addition, partial invoices or progress invoices that relate to one project must hold the same sub invoice assignment key. Using this key, JustOn Billing & Invoice Management associates the sub invoices to the related final invoice. To support this association, the relevant invoice source object must also set the ON field ON_SubInvoiceAssignmentKey.

As always, the way to actually set up the generic invoice run depends on your billing use cases and the representation of your source data in Salesforce. The following sections outline typical solutions, showing best-practice approaches. For an example of how an invoice may look like, see Final Invoice Creation.

Use Case 1: Parent-Child Objects With Target-Specific Fields

This use case assumes two source objects in a parent-child relation, like opportunity and opportunity products. It requires two invoice run configurations:

  • a single-object GIR ("is item" configuration) to create the sub invoices from the opportunity products, and
  • a parent-child GIR to create the final invoice from the opportunity.

partial_final_invoice_setup_uc1
Sub invoices and final invoice from the same source objects

To support this scenario, the source objects require individual, target invoice-specific sets of controlling fields in order to allocate the correct data to the relevant invoices. To this end, you add an individual suffix string (like, for example, Sub and Final) to the controlling fields.

In addition, you need target invoice-specific invoice run filters to retrieve the correct data to be included in the invoice-specific invoice run.

Use Case 1: GIR for Sub Invoices

To enable the sub invoice creation:

  1. Create the required controlling fields on the source object.

    Following the example, you need at least these controlling fields with the suffix Sub on the Opportunity Product object:

    API Name Description
    ON_AccountSub The Salesforce account ID or external ID.
    ON_TemplateSub The Salesforce ID or name of the related template.
    ON_ServiceDateSub The record will be invoiced when the date is null or within the service period of the invoice run.
    ON_InvoiceSub The invoice that resulted from this record.
    ON_LastInvoiceRunSub The last invoice run that has processed this object.
    ON_InvoiceBuildErrorSub Errors that occurred during the last invoice run.
    ON_IsItemSub If true, forces JustOn to use this object as the source for both the invoice and the invoice line items.
    ON_SubInvoiceAssignmentKeySub The key to associate sub invoices and final invoice.
    ON_TitleSub The name or short description of the invoice line item.
    ON_TypeSub The target invoice type.
    Must be either Partial or Progress
    ON_UnitPriceSub The net or gross price of one unit of this item.

    For more details on single-object GIR configurations, see Setting Up Single Object.

  2. Create the invoice run filter as required.

    To retrieve the correct data for the sub invoice creation, you need this filter:

    Field Description Example Value
    Name The filter name. Sub Invoice
    Target The API name of the target object. OpportunityLineItem
    Use Case The filter use case. Generic
    Transactional Suffix The control field suffix. Sub

    For details on GIR filter configurations, see Creating Invoice Run Filter.

Use Case 1: GIR for Final Invoice

To enable the final invoice creation:

  1. Create the required controlling fields on the parent-child objects.

    Following the example, you need at least the following controlling fields with the suffix Final on the Opportunity and Opportunity Product objects:

    Object API Name Description
    Opportunity ON_AccountFinal The Salesforce account ID that links the record to the account.
    ON_InvoiceFinal The invoice that resulted from this record.
    ON_LastInvoiceRunFinal The last invoice run that has processed this record.
    ON_InvoiceBuildErrorFinal Errors that occurred during the last invoice run.
    ON_SubInvoiceAssignmentKeyFinal The key to associate sub invoices and final invoice.
    ON_ServiceDateFinal The record will be invoiced when the date is null or within the service period of the invoice run.
    ON_TemplateFinal The Salesforce ID or name of the related template.
    ON_TypeFinal The target invoice type.
    Must be Final
    Opportunity Product ON_TitleFinal The name or short description of the invoice line item.
    ON_QuantityFinal The quantity to be billed for this invoice line item.
    ON_UnitPriceFinal The net or gross price of one unit of this invoice line item.

    For more details on parent-child GIR configurations, see Setting Up Parent-Child Objects.

  2. Create the invoice run filter as required.

    To retrieve the correct data for the final invoice creation, you need this filter:

    Field Description Example Value
    Name The filter name. Final Invoice
    Child Relation The name of the child object. OpportunityLineItems
    Target The API name of the target object. Opportunity
    Use Case The filter use case. Generic
    Transactional Suffix The control field suffix. Final

    For details on GIR filter configurations, see Creating Invoice Run Filter.

Use Case 2: Parent-Child-Subchild Objects, Disclosed Sub Invoice Positions

Think of three source objects in a parent-child-subchild relation, for example, order and order product with another, subordinate custom object, like partial delivery. This approach also requires two invoice run configurations:

  • a single-object GIR ("is item" configuration) to create the sub invoices from the partial delivery records, and
  • a parent-child GIR to create the final invoice from the order.

partial_final_invoice_setup_uc2
Sub invoices and final invoice from different source objects, disclosing sub invoice positions

This use case assumes that the final invoice will reproduce the same invoice line items as processed for the sub invoices. To this end, you use

  • the same number of partial delivery records and order product records, and
  • the same titles for creating the sub invoice positions (as taken from ON_Title on the partial delivery) and the final invoice positions (as taken from ON_Title on the order product).

Use Case 2: GIR for Sub Invoices

To enable the sub invoice creation:

  1. Create the required controlling fields on the source object.

    Following the example, you need at least these fields on the Partial Delivery object:

    API Name Description
    ON_Account The Salesforce account ID or external ID.
    ON_Template The Salesforce ID or name of the related template.
    ON_ServiceDate The record will be invoiced when the date is null or within the service period of the invoice run.
    ON_Invoice The invoice that resulted from this record.
    ON_LastInvoiceRun The last invoice run that has processed this object.
    ON_InvoiceBuildError Errors that occurred during the last invoice run.
    ON_IsItem If true, forces JustOn to use this object as the source for both the invoice and the invoice line items.
    ON_SubInvoiceAssignmentKey The key to associate sub invoices and final invoice.
    ON_Title The name or short description of the invoice line item.
    Must correspond to ON_Title on the order product.
    ON_Type The target invoice type.
    Must be either Partial or Progress
    ON_Quantity The quantity to be billed for this invoice line item.
    ON_UnitPrice The net or gross price of one unit of this item.

    For more details on single-object GIR configurations, see Setting Up Single Object.

  2. Create the invoice run filter as required.

    To retrieve the correct data for the sub invoice creation, you need this filter:

    Field Description Example Value
    Name The filter name. Sub Invoice
    Target The API name of the target object. Partial_Delivery__c
    Use Case The filter use case. Generic

    For details on GIR filter configurations, see Creating Invoice Run Filter.

Use Case 2: GIR for Final Invoice

To enable the final invoice creation:

  1. Create the required controlling fields on the parent-child objects.

    Following the example, you need at least the following fields on the Order and Order Product objects:

    Object API Name Description
    Order ON_Account The Salesforce account ID that links the record to the account.
    ON_Invoice The invoice that resulted from this record.
    ON_LastInvoiceRun The last invoice run that has processed this record.
    ON_InvoiceBuildError Shows errors that occurred during the last invoice run.
    ON_ServiceDate The record will be invoiced when the date is null or within the service period of the invoice run.
    ON_Template The Salesforce ID or name of the template to be used.
    ON_Type The target invoice type.
    Must be Final
    Order Product ON_Title The name or short description of the invoice line item.
    Must correspond to ON_Title on the partial delivery.
    ON_Quantity The quantity to be billed for this invoice line item.
    ON_UnitPrice The net or gross price of one unit of this invoice line item.

    For more details on parent-child GIR configurations, see Setting Up Parent-Child Objects.

  2. Create the invoice run filter as required.

    To retrieve the correct data for the final invoice creation, you need this filter:

    Field Description Example Value
    Name The filter name. Final Invoice
    Child Relation The name of the child object. OrderItems
    Target The API name of the target object. Order
    Use Case The filter use case. Generic

    For details on GIR filter configurations, see Creating Invoice Run Filter.

Use Case 3: Parent-Child-Subchild Objects, Hidden Sub Invoice Positions

Think of three source objects in a parent-child-subchild relation, for example, order and order product with another, subordinate custom object, like partial delivery. This approach requires two invoice run configurations as well:

  • a single-object GIR ("is item" configuration) to create the sub invoices from the partial delivery records, and
  • a parent-child GIR to create the final invoice from the order.

partial_final_invoice_setup_uc2a
Sub invoices and final invoice from different source objects, hiding sub invoice positions

With respect to the configuration, this approach resembles use case 2 above. However, as opposed to the previous example, this use case assumes that the final invoice will not disclose the invoice line items as processed for the sub invoices. This is why you use different invoice line item titles, and may use a different number of source records that make up the invoice line items.

Use Case 3: GIR for Sub Invoices

To enable the sub invoice creation:

  1. Create the required controlling fields on the source object.

    Following the example, you need at least these fields on the Partial Delivery object:

    API Name Description
    ON_Account The Salesforce account ID or external ID.
    ON_Template The Salesforce ID or name of the related template.
    ON_ServiceDate The record will be invoiced when the date is null or within the service period of the invoice run.
    ON_Invoice The invoice that resulted from this record.
    ON_LastInvoiceRun The last invoice run that has processed this object.
    ON_InvoiceBuildError Errors that occurred during the last invoice run.
    ON_IsItem If true, forces JustOn to use this object as the source for both the invoice and the invoice line items.
    ON_SubInvoiceAssignmentKey The key to associate sub invoices and final invoice.
    ON_Title The name or short description of the invoice line item.
    Using a different value than that of ON_Title on the order product will hide the sub invoice positions on the final invoice.
    ON_Type The target invoice type.
    Must be either Partial or Progress
    ON_Quantity The quantity to be billed for this invoice line item.
    ON_UnitPrice The net or gross price of one unit of this item.

    For more details on single-object GIR configurations, see Setting Up Single Object.

  2. Create the invoice run filter as required.

    To retrieve the correct data for the sub invoice creation, you need this filter:

    Field Description Example Value
    Name The filter name. Sub Invoice
    Target The API name of the target object. Partial_Delivery__c
    Use Case The filter use case. Generic

    For details on GIR filter configurations, see Creating Invoice Run Filter.

Use Case 3: GIR for Final Invoice

To enable the final invoice creation:

  1. Create the required controlling fields on the parent-child objects.

    Following the example, you need at least the following fields on the Order and Order Product objects:

    Object API Name Description
    Order ON_Account The Salesforce account ID that links the record to the account.
    ON_Invoice The invoice that resulted from this record.
    ON_LastInvoiceRun The last invoice run that has processed this record.
    ON_InvoiceBuildError Shows errors that occurred during the last invoice run.
    ON_ServiceDate The record will be invoiced when the date is null or within the service period of the invoice run.
    ON_Template The Salesforce ID or name of the template to be used.
    ON_Type The target invoice type.
    Must be Final
    Order Product ON_Title The name or short description of the invoice line item.
    Using a different value than that of ON_Title on the partial delivery will hide the sub invoice positions on the final invoice.
    ON_Quantity The quantity to be billed for this invoice line item.
    ON_UnitPrice The net or gross price of one unit of this invoice line item.

    For more details on parent-child GIR configurations, see Setting Up Parent-Child Objects.

  2. Create the invoice run filter as required.

    To retrieve the correct data for the final invoice creation, you need this filter:

    Field Description Example Value
    Name The filter name. Final Invoice
    Child Relation The name of the child object. OrderItems
    Target The API name of the target object. Order
    Use Case The filter use case. Generic

    For details on GIR filter configurations, see Creating Invoice Run Filter.

Configuring Booking Data Creation

Irrespective of the way you set up the invoice creation, your organization may want to create bookkeeping data.

To do so, you generally enable the booking detail creation. In particular, however, you must provide for the correct booking account allocation using G/L Account Assignment Rules and Collective Account settings.

Note

Be aware that the booking details produced for progress invoices are not compatible with the current implementation of JustOn Connector for DATEV.

Enabling Booking Detail Creation

To enable the creation of booking details for revenue and payment data:

  1. Enable the creation of bookkeeping data for finalized invoices.

    For details, see Enabling Bookkeeping Data for Finalized Invoices.

  2. Enable the creation of bookkeeping data for payment balances.

    For details, see Enabling Bookkeeping Data for Payment Balances.

Booking data creation restrictions

When planning the booking detail creation, be aware that the booking details for the sub invoices must be generated before the final invoice is created.

Enabling Booking Accounts

To provide for the correct booking account allocation, you create dedicated G/L Account Assignment Rules and Collective Account settings.

The use cases for partial and final invoices as well as for progress and final invoices require (at least) the following booking accounts:

Account name Account no.
SKR 03
Configuration
Interim Revenue 1593 Collective Account
Interim Payment 1718 Collective Account
Bank 1200 Collective Account
Revenue 19% 8400 G/L Account
Taxes 19% 1776 Collective Account
Debtor Debtor number

Remember that depending on your accounting system, the booking account numbers may differ.

  1. Create Assignment Rules - G/L Account settings to book the revenue.

    To cover the minimum use cases, you need at least the following setting for revenues with 19% VAT:

    Field Description Example Value
    Name A unique, descriptive name Revenue 19%
    G/L Account The target G/L account 8400
    Tax Code Maps to the field Tax Code on the invoice line item DE_19
    Business Entity Maps to the field Business Entity of the invoice

    For details, see Configuring G/L Account.

  2. Create Collective Account settings for tax bookings, payment bookings and the interim bookings for progress invoices.

    To cover the outlined use cases, you need at least the following settings:

    Name Booking Account Contra Account Tax Code Type
    Bank 1200 DE_19 Payment
    Interim Payment 19% 1718 1593 DE_19 Interim Payment
    Interim Payment Clearing 19% 1718 DE_19 Interim Payment Clearing
    Interim Revenue 1593 DE_19 Interim Revenue
    Interim Tax 19% 1776 1593 DE_19 Interim Tax
    Tax 19% 1776 DE_19 Tax

    Depending on your requirements, your Collective Account settings may, in addition, need to define the Business Entity.

    For details, see Configuring Collective Accounts.

  3. Enable the debtor account number.

    Depending on your requirements, the way to define the account number differs:

    • For customer-specific debtor numbers, you use the optional Account field ON_DebtorNo.
    • To support collective debtors, you use the optional Invoice field DebtorNo (for revenue-related bookings) or the Business Partner Account field of the relevant collective account setting (for payment-related bookings)

    For details, see Enabling Debtor Accounts for revenue data and Enabling Debtor Accounts for payment data.