26 lines
785 B
PHP
26 lines
785 B
PHP
<?php
|
|
/**
|
|
* JournalManager
|
|
*
|
|
* Create, read, and void journal entries in ac_journal + ac_journal_line.
|
|
* Updates ac_balance after each post.
|
|
* Never called directly by WMS — goes through PostingManager.
|
|
*/
|
|
class JournalManager
|
|
{
|
|
private PDO $pdo;
|
|
private int $companyId;
|
|
|
|
public function __construct(PDO $pdo, int $company_id)
|
|
{
|
|
$this->pdo = $pdo;
|
|
$this->companyId = $company_id;
|
|
}
|
|
|
|
// TODO: create(array $header, array $lines): int — returns journal_id
|
|
// TODO: void(int $journal_id): void
|
|
// TODO: getBySource(string $source_type, int $source_id): ?array
|
|
// TODO: getById(int $journal_id): ?array
|
|
// TODO: updateBalance(string $period, string $account_code, ?int $dept_id, float $debit, float $credit): void
|
|
}
|