记账凭证

This commit is contained in:
CRM8000 2024-11-07 14:37:37 +08:00
parent e1e586f7d3
commit 2464be8c84

View File

@ -71,8 +71,42 @@ class VoucherDAO extends PSIBaseExDAO
*/
function queryFmtEx($params)
{
// TODO
$db = $this->db;
return [];
$companyId = $params["companyId"];
$subjectCode = $params["subjectCode"];
$result = [];
$sql = "select id
from t_acc_fmt
where company_id = '%s' and subject = '%s' ";
$data = $db->query($sql, $companyId, $subjectCode);
if (!$data) {
return $result;
}
$fmtId = $data[0]["id"];
$sql = "select db_field_name, caption, voucher_input,
code_table_name, code_table_field_name, code_table_field_name_fk,
lookup_field_name
from t_acc_fmt_cols
where fmt_id = '%s' and sys_col = 0
order by voucher_input_show_order ";
$data = $db->query($sql, $fmtId);
foreach ($data as $v) {
$result[] = [
"dbFieldName" => $v["db_field_name"],
"caption" => $v["caption"],
"voucherInput" => $v["voucher_input"],
"codeTableName" => $v["code_table_name"],
"codeTableFieldName" => $v["code_table_field_name"],
"codeTableFieldNameFK" => $v["code_table_field_name_fk"],
"lookupFieldName" => $v["lookup_field_name"],
];
}
return $result;
}
}