Assets from purchase invoice lines, straight-line depreciation/amortization with salvage value, disposals, and [Asset Mgmt] sources in Batch GL Entries. Green third workspace with an app access guard.
16 lines
521 B
PHP
16 lines
521 B
PHP
<?php
|
|
session_start();
|
|
require_once '../../../assets/utils/db_auth.php';
|
|
require_app_access('asset');
|
|
require_once '../../../assets/utils/classes_as/AssetCategoryManager.php';
|
|
|
|
$id = (int)($data['id'] ?? 0);
|
|
if (!$id) { $answer['message'] = 'Missing id'; exit(json_encode($answer)); }
|
|
|
|
$row = (new AssetCategoryManager($pdo2, $company_id))->getById($id);
|
|
if (!$row) { $answer['message'] = 'Category not found'; exit(json_encode($answer)); }
|
|
|
|
$answer['output'] = $row;
|
|
$answer['success'] = 1;
|
|
exit(json_encode($answer));
|