Download the PHP package azaharizaman/nexus-journal-entry without Composer
On this page you can find all versions of the php package azaharizaman/nexus-journal-entry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azaharizaman/nexus-journal-entry
More information about azaharizaman/nexus-journal-entry
Files in azaharizaman/nexus-journal-entry
Package nexus-journal-entry
Short Description Framework-agnostic journal entry management for general ledger systems
License MIT
Informations about the package nexus-journal-entry
Nexus Journal Entry Package
A framework-agnostic PHP package for journal entry management in general ledger systems.
Overview
Nexus\JournalEntry provides a complete journal entry management engine for ERP systems, including:
- Double-entry bookkeeping with balance validation
- Journal entry creation, posting, and reversal
- Multi-currency support with exchange rate handling
- Fiscal period validation integration
- Balance calculation engine
- Trial balance generation
Requirements
- PHP 8.3+
azaharizaman/nexus-common^1.0azaharizaman/nexus-chart-of-account^1.0azaharizaman/nexus-period^1.0
Installation
Key Concepts
Journal Entries
A journal entry represents a financial transaction recorded in the general ledger. Each entry:
- Contains multiple line items (minimum 2 for double-entry)
- Must be balanced (total debits = total credits)
- References valid accounts from the Chart of Accounts
- Is posted to an open fiscal period
Status Lifecycle
- Draft: Entry created but not yet posted
- Posted: Entry finalized and immutable
- Reversed: Entry has been reversed with offsetting entry
Multi-Currency
Line items can be in different currencies:
- Transaction amount in original currency
- Base amount converted using effective exchange rate
- Exchange rate captured at posting time
Important: Multi-currency journal entries require a CurrencyConverterInterface implementation to be injected into JournalEntryManager. Without it, all lines must use the same currency.
Quick Start
Available Interfaces
Core Contracts
| Interface | Description |
|---|---|
JournalEntryInterface |
Journal entry entity contract |
JournalEntryLineInterface |
Line item entity contract |
JournalEntryQueryInterface |
Read operations (CQRS Query) |
JournalEntryPersistInterface |
Write operations (CQRS Command) |
JournalEntryManagerInterface |
High-level management operations |
Supporting Contracts
| Interface | Description |
|---|---|
LedgerQueryInterface |
Balance and ledger queries |
CurrencyConverterInterface |
Currency conversion for multi-currency entries |
SequencingIntegrationInterface |
Journal entry number generation |
PeriodValidationInterface |
Fiscal period validation |
Services
JournalEntryManager
High-level service for journal entry operations:
PostingEngine
Validates journal entries before posting:
BalanceCalculator
Calculates account balances:
Value Objects
Money
The Money value object is provided by Nexus\Common (shared across all packages):
ExchangeRate
Effective-dated exchange rate:
JournalEntryNumber
Validated journal entry number:
Integration with Other Packages
Chart of Account (azaharizaman/nexus-chart-of-account)
Journal entries reference accounts for posting:
Period (azaharizaman/nexus-period)
Period validation before posting:
Sequencing (azaharizaman/nexus-sequencing)
Journal entry number generation:
Consumer Implementation
Consuming applications must provide implementations for:
- Repository Interfaces - Database persistence using Eloquent/Doctrine
- Currency Converter - Convert money between currencies (required for multi-currency entries)
- Period Validator - Integration with Period package
Example: Laravel Implementation
Testing
License
MIT License. See LICENSE for details.
All versions of nexus-journal-entry with dependencies
ext-bcmath Version *
psr/log Version ^3.0
azaharizaman/nexus-common Version dev-main