diff --git a/web/Application/SLN0002/DAO/VoucherDAO.class.php b/web/Application/SLN0002/DAO/VoucherDAO.class.php index 2396d4d4..92017287 100644 --- a/web/Application/SLN0002/DAO/VoucherDAO.class.php +++ b/web/Application/SLN0002/DAO/VoucherDAO.class.php @@ -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; } }