22 lines
464 B
PHP
22 lines
464 B
PHP
<?php
|
|
/**
|
|
* InvoicePosting
|
|
*
|
|
* Builds the journal entry for a posted sales invoice.
|
|
* DR: Accounts Receivable
|
|
* CR: Revenue + Output VAT
|
|
*/
|
|
class InvoicePosting
|
|
{
|
|
private PDO $pdo;
|
|
private int $companyId;
|
|
|
|
public function __construct(PDO $pdo, int $company_id)
|
|
{
|
|
$this->pdo = $pdo;
|
|
$this->companyId = $company_id;
|
|
}
|
|
|
|
// TODO: build(int $invoice_id): array — returns [header, lines] ready for JournalManager
|
|
}
|