From 851ec0f35f5bf901513a403b6911375f45e7b238 Mon Sep 17 00:00:00 2001 From: CRM8000 Date: Wed, 23 Oct 2024 08:16:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=AD=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SLN0002/DAO/VoucherDAO.class.php | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) 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; } }