Orders: order, return, invoice

This commit is contained in:
Thanakorn S
2026-05-02 16:49:21 +07:00
parent ac4fd9a5ad
commit a90975d9f1
47 changed files with 4838 additions and 99 deletions
@@ -7,6 +7,9 @@
* Current keys:
* default_stock_status int 0 = draft (manual approve required)
* 1 = auto-approve on save
* auto_invoice_and_credit_note int 0 = manual
* 1 = auto-generate invoice on confirm order
* + auto-generate credit note on confirm return
*
* Designed to accept new keys without schema changes.
*/
@@ -17,7 +20,8 @@ class CompanySettingManager
// ── Known keys with their defaults ───────────────────────────────────────
private const DEFAULTS = [
'default_stock_status' => 1, // auto-approve by default
'default_stock_status' => 1, // auto-approve by default
'auto_invoice_and_credit_note' => 0, // manual by default
];
public function __construct(PDO $pdo, int $companyId)