This commit is contained in:
CRM8000 2024-10-23 08:16:56 +08:00
parent 01ad665f6f
commit 851ec0f35f

View File

@ -43,7 +43,26 @@ class VoucherDAO extends PSIBaseExDAO
$orgId = $params["orgId"];
// TODO
return $this->emptyResult();
$sql = "select id, name
from t_sln0002_ct_voucher_word
where company_id = '%s' and record_status = 1000
order by code";
$data = $db->query($sql, $orgId);
$result = [];
foreach ($data as $v) {
$result[] = [
"id" => $v["id"],
"name" => $v["name"],
];
}
if (count($result) === 0) {
$result[] = [
"id" => "-1",
"name" => "[不使用凭证字]",
];
}
return $result;
}
}