Appearance
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
| Type | Description |
|---|---|
| Single | Simple transaction with exactly two journal entries (one debit, one credit) |
| Compound | Complex 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) | Type | Description |
|---|---|---|
id | String? | ID of existing booking to update (omit for new transaction) |
date * | Date | Transaction posting date (must be within open fiscal year) |
message * | String | Transaction description (max 255 chars) |
| Single Transaction Mode | ||
debit_account_id * | String | Account ID for debit entry |
credit_account_id * | String | Account ID for credit entry |
amount * | Number | Transaction amount (must be > 0) |
vat_rate_id | String? | VAT Rate ID |
currency | String? | Currency code (CHF, EUR, USD) - defaults to CHF |
| Compound Transaction Mode | ||
entries * | Array | Array of journal entries (min 2 entries) |
entries.*.account_id * | String | Account ID |
entries.*.debit_amount | Number? | Debit amount (≥ 0) |
entries.*.credit_amount | Number? | Credit amount (≥ 0) |
entries.*.vat_rate_id | String? | VAT Rate ID |
entries.*.description | String? | Entry-specific description (max 255 chars) |
entries.*.currency | String? | Entry currency - defaults to CHF |
| File Attachment | ||
file | File? | Supporting document (max 10MB, PDF/images/Office docs) |
Validation Rules
- Single mode: Requires
debit_account_id,credit_account_id, andamount - Compound mode: Requires
entriesarray 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
FiscalYearClosedExceptionif 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