accounting modules

This commit is contained in:
Thanakorn S
2026-05-13 15:11:24 +07:00
parent 511360faa2
commit 04a683bd02
70 changed files with 4451 additions and 42 deletions
@@ -0,0 +1,23 @@
<?php
/**
* AccountingEngine
*
* Core double-entry validation and rules.
* Ensures every journal entry balances (total debit = total credit).
* All other accounting classes depend on this for validation.
*/
class AccountingEngine
{
private PDO $pdo;
private int $companyId;
public function __construct(PDO $pdo, int $company_id)
{
$this->pdo = $pdo;
$this->companyId = $company_id;
}
// TODO: validate journal lines balance (sum debit = sum credit)
// TODO: validate account codes exist and are posting accounts
// TODO: validate period is open
}