Files
wms-app/app/assets/utils/classes_ac/AccountingEngine.php
T
2026-05-13 15:11:24 +07:00

24 lines
609 B
PHP

<?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
}