Skip to content

Manual Booking

Introduction

Manual bookings allow you to create custom journal transactions for accounting purposes. Unlike system-generated transactions from invoices or expenses, manual bookings give you direct control over journal entries while maintaining double-entry bookkeeping principles.

Each manual booking creates a journal transaction with multiple entries that record specific debits and credits to individual accounts. The system ensures all entries balance (total debits equal total credits) and maintains accounting integrity.

Transaction Types

TypeDescription
SingleSimple transaction with exactly two journal entries (one debit, one credit)
CompoundComplex transaction with more than two journal entries

Create and update manual bookings

post
/journal

Create or update manual bookings with proper double-entry validation. Supports both single transactions (2 entries) and compound transactions (multiple entries).

Attribute (* required)TypeDescription
idString?ID of existing booking to update (omit for new transaction)
date *DateTransaction posting date (must be within open fiscal year)
message *StringTransaction description (max 255 chars)
Single Transaction Mode
debit_account_id *StringAccount ID for debit entry
credit_account_id *StringAccount ID for credit entry
amount *NumberTransaction amount (must be > 0)
vat_rate_idString?VAT Rate ID
currencyString?Currency code (CHF, EUR, USD) - defaults to CHF
Compound Transaction Mode
entries *ArrayArray of journal entries (min 2 entries)
entries.*.account_id *StringAccount ID
entries.*.debit_amountNumber?Debit amount (≥ 0)
entries.*.credit_amountNumber?Credit amount (≥ 0)
entries.*.vat_rate_idString?VAT Rate ID
entries.*.descriptionString?Entry-specific description (max 255 chars)
entries.*.currencyString?Entry currency - defaults to CHF
File Attachment
fileFile?Supporting document (max 10MB, PDF/images/Office docs)

Validation Rules

  • Single mode: Requires debit_account_id, credit_account_id, and amount
  • Compound mode: Requires entries array with balanced debits/credits
  • Each entry must have either debit OR credit amount, not both
  • Sum of debit amounts must equal sum of credit amounts
  • Transaction date must be within an open fiscal year
  • Accounts must exist and be different for single transactions

VAT Handling

The system automatically determines which side (debit/credit) to apply VAT based on account types:

  • Revenue transactions: VAT on revenue side
  • Expense transactions: VAT on expense side
  • Asset transactions: Special handling for fixed assets (accounts 1400-1999)

Single Transaction Example

json
{
    "date": "2024-03-15",
    "message": "Office equipment purchase",
    "debit_account_id": "acc_equipment_id",
    "credit_account_id": "acc_bank_id",
    "amount": 1080.0,
    "vat_rate_id": "vat_77_id",
    "currency": "CHF"
}

Compound Transaction Example

json
{
    "date": "2024-03-15",
    "message": "Multi-account expense allocation",
    "entries": [
        {
            "account_id": "acc_office_supplies",
            "debit_amount": 500.0,
            "description": "Office supplies",
            "vat_rate_id": "vat_77_id"
        },
        {
            "account_id": "acc_marketing",
            "debit_amount": 300.0,
            "description": "Marketing materials"
        },
        {
            "account_id": "acc_bank",
            "credit_amount": 800.0
        }
    ]
}

Update Transaction Example

json
{
    "id": "existing_booking_id",
    "date": "2024-03-16",
    "message": "Updated: Office equipment purchase",
    "debit_account_id": "acc_equipment_id",
    "credit_account_id": "acc_bank_id",
    "amount": 1200.0,
    "file": "[uploaded file]"
}

Automatic Behaviors

The system automatically handles several aspects of manual booking management:

Transaction Numbering

  • Automatic numbering: New transactions receive sequential numbers (number_sequence) and formatted numbers (number_full)
  • Number format: Uses system-defined prefix + sequence number (e.g., "TX-1001")

Fiscal Year Management

  • Auto-creation: Missing fiscal years are automatically created when transactions are posted
  • Validation: Transaction dates must fall within open (non-closed) fiscal years
  • Updates blocked: Transactions cannot be updated if their fiscal year is closed
  • Deletions blocked: Transactions cannot be deleted if their fiscal year is closed

VAT Period Management

  • Auto-creation: VAT periods are automatically created for transaction dates when missing
  • Swiss compliance: Ensures proper VAT reporting period structure

User Attribution

  • Member tracking: Transactions are automatically attributed to the current user's member record
  • Audit trail: Maintains who created/modified each transaction

Manual Booking Cleanup

  • Cascade deletion: When deleting manual booking transactions, the associated manual booking document is also removed

Fiscal Year Restrictions

  • Transactions in closed fiscal years cannot be updated or deleted
  • The system will throw a FiscalYearClosedException if these operations are attempted
  • Always verify fiscal year status before attempting modifications

Delete a manual booking

delete
/journal_transaction/{id}

Transaction Deletion Restrictions

  • Locked transactions cannot be deleted
  • Transactions from closed fiscal years cannot be deleted (system enforced)
  • Manual booking transactions will also delete their associated document
  • Consider the impact on financial reports before deletion

Example response

json
// HTTP 204 No Content