Adds financial payment functionality to a website or organisation: invoicing, quoting, purchase orders and proposal preparation. Registers as "paymentApp" and contributes menu entries, a settings page, invoice and line item table uploaders, search indexers for transaction documents and line items, and journey builder goal nodes fired when a quote is sent or accepted. The nested AccountingRole grants organisation-level access to the payment resources it manages.

Implements: MenuApplication, BrowsableApplication, ChildPageApplication, ComponentApplication, TemplatingApplication, JourneyBuilderApplication, DependentApplication, FieldProviderApplication, SettingsApplication, InvoicingApplication, TableUploadApplication, SearchableApplication


Properties

PropertyReturnsDescription
andIncrementInvoiceCounterlongReads and atomically increments the shared invoice counter, for use in generating the next invoice number. Each call returns a new value.
andIncrementPurchaseOrderCounterlongReads and atomically increments the shared purchase order counter, for use in generating the next purchase order number. Each call returns a new value.
andIncrementQuoteCounterlongReads and atomically increments the shared quote counter, for use in generating the next quote number. Each call returns a new value.
configAppConfigThe application configuration used to read and write this app's per-organisation settings, such as the invoice, quote and purchase order expressions and the store name.
extraFieldsSettingStringThe raw, newline-separated extra field definitions configured for the current tenant organisation, in the "name=value" format written by the payment settings page.
instanceIdStringUnique key this application is registered under in the application manager, and how it is accessed from templates and scripts (for example applications.paymentApp). Always returns the literal value "paymentApp".
invoiceExpressionStringThe invoice number expression configured for the current tenant organisation. Falls back to the default expression if none is configured.
legacyboolean
purchaseOrderExpressionStringThe purchase order number expression configured for the current tenant organisation. Falls back to the default expression if none is configured.
quoteExpressionStringThe quote number expression configured for the current tenant organisation. Falls back to the default expression if none is configured.
rolesList<Role>The roles this application contributes to the platform's role registry - a single-element list containing the AccountingRole instance shared by this class.
storeNameSettingStringThe catalogue store used for payment line items in the current tenant organisation, as configured on the payment settings page.

Methods

getInstanceId() · getRoles() · countNewQuotes(Date from, Date to) · countAcceptedQuotes(Date from, Date to) · countNewProposals(Date from, Date to) · getProposalById(long proposalId) · getStoreNameSetting() · getExtraFieldsSetting() · extraFieldMap() · extraFields() · getStoreNameSetting(Organisation org) · getInvoiceExpression(Organisation org) · getQuoteExpression(Organisation org) · getPurchaseOrderExpression(Organisation org) · getQuoteExpression() · getInvoiceExpression() · getPurchaseOrderExpression() · getAndIncrementInvoiceCounter() · getAndIncrementQuoteCounter() · getAndIncrementPurchaseOrderCounter() · getConfig()

getInstanceId()

Returns: String

Unique key this application is registered under in the application manager, and how it is accessed from templates and scripts (for example applications.paymentApp). Always returns the literal value "paymentApp".

getRoles()

Returns: List<Role>

The roles this application contributes to the platform's role registry - a single-element list containing the AccountingRole instance shared by this class.

countNewQuotes(Date from, Date to)

Returns: Integer

Counts quotes created within the current organisation between the given dates that are still in the NEW status. When from or to is null the platform's default reporting start or finish date is used instead.

ParameterDescription
fromthe earliest creation date to include, or null to use the default reporting start date
tothe latest creation date to include, or null to use the default reporting finish date

countAcceptedQuotes(Date from, Date to)

Returns: Integer

Counts quotes created within the current organisation between the given dates that are in the ACCEPTED status. When from or to is null the platform's default reporting start or finish date is used instead.

ParameterDescription
fromthe earliest creation date to include, or null to use the default reporting start date
tothe latest creation date to include, or null to use the default reporting finish date

countNewProposals(Date from, Date to)

Returns: Integer

Counts proposals created within the current organisation between the given dates that are in the CREATED status. When from or to is null the platform's default reporting start or finish date is used instead.

ParameterDescription
fromthe earliest creation date to include, or null to use the default reporting start date
tothe latest creation date to include, or null to use the default reporting finish date

getProposalById(long proposalId)

Returns: Proposal

Looks up a proposal by its database id, scoped to the current user's home administration organisation.

ParameterDescription
proposalIdthe id of the proposal to find

getStoreNameSetting()

Returns: String

The catalogue store used for payment line items in the current tenant organisation, as configured on the payment settings page.

getExtraFieldsSetting()

Returns: String

The raw, newline-separated extra field definitions configured for the current tenant organisation, in the "name=value" format written by the payment settings page.

extraFieldMap()

Returns: Map<String,String>

Parses the current tenant organisation's raw extra field configuration into a map of field name to value, skipping entries with a blank value. The map preserves the order the fields were defined in.

extraFields()

Returns: List<ExtraField>

Builds the current tenant organisation's extra fields as parsed ExtraField beans, derived from extraFieldMap. Entries that fail to parse are omitted.

getStoreNameSetting(Organisation org)

Returns: String

The catalogue store used for payment line items in the given organisation, as configured on the payment settings page.

ParameterDescription
orgthe organisation to read the setting for

getInvoiceExpression(Organisation org)

Returns: String

The invoice number expression configured for the given organisation, used to generate invoice numbers such as "INV-00001". Falls back to the default expression if none is configured.

ParameterDescription
orgthe organisation to read the setting for

getQuoteExpression(Organisation org)

Returns: String

The quote number expression configured for the given organisation, used to generate quote numbers such as "QUO-00001". Falls back to the default expression if none is configured.

ParameterDescription
orgthe organisation to read the setting for

getPurchaseOrderExpression(Organisation org)

Returns: String

The purchase order number expression configured for the given organisation, used to generate purchase order numbers such as "PO-00001". Falls back to the default expression if none is configured.

ParameterDescription
orgthe organisation to read the setting for

getQuoteExpression()

Returns: String

The quote number expression configured for the current tenant organisation. Falls back to the default expression if none is configured.

getInvoiceExpression()

Returns: String

The invoice number expression configured for the current tenant organisation. Falls back to the default expression if none is configured.

getPurchaseOrderExpression()

Returns: String

The purchase order number expression configured for the current tenant organisation. Falls back to the default expression if none is configured.

getAndIncrementInvoiceCounter()

Returns: long

Reads and atomically increments the shared invoice counter, for use in generating the next invoice number. Each call returns a new value.

getAndIncrementQuoteCounter()

Returns: long

Reads and atomically increments the shared quote counter, for use in generating the next quote number. Each call returns a new value.

getAndIncrementPurchaseOrderCounter()

Returns: long

Reads and atomically increments the shared purchase order counter, for use in generating the next purchase order number. Each call returns a new value.

getConfig()

Returns: AppConfig

The application configuration used to read and write this app's per-organisation settings, such as the invoice, quote and purchase order expressions and the store name.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.