screenshot of an example of balance transaction type
screenshot of transaction type list
screenshot of transaction type form
screenshot of transaction operations management
screenshot of a transaction form

This project is not covered by Drupal’s security advisory policy.

This module provides generic support for transactional operations linked to content entities. An example of transactional operation is an accounting account, where the content entity acts as the account and each transaction is a movement.

Different transactional flows can be created in addition to accounting, such as tracking/logging systems, workflows, or your own by integration with rules or by programming a transactor.

How it works

The parts involved are:

  • a content entity

    the target entity to which the transaction flow is linked

  • a transaction type

    that defines the transactional flow

  • the transactor

    the plugin that performs the transaction logic

  • transactions

    content entities where the data of each transaction is stored

Usage

The first basic steps are:

  1. create a transaction type

    at Configuration -> Workflow -> Transaction types -> Add transaction type. Then, choose the target entity type and the involved transactor

  2. go to any target entity to work with

  3. create your first transaction

    in the transaction tab, label as the transaction type

  4. execute the transaction to perform the operation

Available transactors

Currently there are two transactors included:

  • Balance transactor

    maintains an account with debit and credit operations. Useful for accounting, point systems, etc.

  • Generic transactor

    for basic transaction flows with just tracking information without a specific logic. Useful for integration with rules. Use it as a base to implement your own transactor plugin

Transactor provided by other modules:

Features

  • works with standard fields

    does not require its own field type, so it is very versatile. For example, the balance transactor stores the current balance in a standard decimal number field in the transaction entity, with optional reflection in a decimal number field in the target entity

  • works with existing fields

    select the fields to work with in the transaction type, or create new ones if needed

  • supports transaction operations

    define custom operations per transaction type, with tokenized description and detail templates

  • computed transaction description and details

    the description of the transaction is generated by the transactor, with optional details, which makes it multilingual

  • rules integration

    react to the transaction execution event

  • automatic transaction execution options

    on save, ask the user or delayed

To be added:

Dependencies

Currently, the core entity_reference field type is restricted to one target type. The transaction entity type stores a reference to the target entity, which can be of any type. The module depends on dynamic entity reference to refer the target entity in transactions. This dependency will be removed once the support is in core, see #2407587: Allow multiple target entity types in the entity reference field

Roadmap

On the way of a stable release. It is currently feature freeze and actively working on #3118339: Add tests.

About the transaction namespace

This project replaces an obsolete one developed in 2008 by David Strauss.

Supporting organizations: 

Project information

Releases