mirror of
https://gitee.com/crm8000/PSI
synced 2024-11-21 23:35:34 +00:00
记账凭证
This commit is contained in:
parent
bea2695759
commit
18f73f35ef
@ -211,6 +211,7 @@ class VoucherDAO extends PSIBaseExDAO
|
||||
$db = $this->db;
|
||||
|
||||
$loginUserId = $bill["loginUserId"];
|
||||
$dataOrg = $bill["dataOrg"];
|
||||
|
||||
$orgId = $bill["orgId"];
|
||||
$wordId = $bill["wordId"];
|
||||
@ -224,14 +225,14 @@ class VoucherDAO extends PSIBaseExDAO
|
||||
}
|
||||
|
||||
// 检查orgId
|
||||
$sql = "select count(*) as cnt
|
||||
$sql = "select name
|
||||
from t_org
|
||||
where id = '%s' and parent_id is null";
|
||||
$data = $db->query($sql, $orgId);
|
||||
$cnt = $data[0]["cnt"];
|
||||
if ($cnt != 1) {
|
||||
if (!$data) {
|
||||
return $this->badParam("orgId");
|
||||
}
|
||||
$orgName = $data[0]["name"];
|
||||
|
||||
// 检查凭证字
|
||||
$word = "";
|
||||
@ -341,13 +342,15 @@ class VoucherDAO extends PSIBaseExDAO
|
||||
id, v_status, v_year, v_month, v_dt,
|
||||
v_word, v_ref, ref, input_user_id, input_user_name,
|
||||
input_dt, charge_user_id, charge_user_name, cash_user_id, cash_user_name,
|
||||
bill_number, company_id, biz_user_id, biz_user_name
|
||||
bill_number, company_id, biz_user_id, biz_user_name, company_name,
|
||||
data_org
|
||||
)
|
||||
values (
|
||||
'%s', 0, %d, %d, '%s',
|
||||
'%s', %d, '%s', '%s', '%s',
|
||||
now(), '%s', '%s', '%s', '%s',
|
||||
%d, '%s', '%s', '%s'
|
||||
%d, '%s', '%s', '%s', '%s',
|
||||
'%s'
|
||||
)";
|
||||
$rc = $db->execute(
|
||||
$sql,
|
||||
@ -371,7 +374,10 @@ class VoucherDAO extends PSIBaseExDAO
|
||||
$billNumber,
|
||||
$orgId,
|
||||
$bizUserId,
|
||||
$bizUserName
|
||||
$bizUserName,
|
||||
$orgName,
|
||||
// ----
|
||||
$dataOrg
|
||||
);
|
||||
if ($rc === false) {
|
||||
return $this->sqlError(__METHOD__, __LINE__);
|
||||
|
@ -102,7 +102,6 @@ class VoucherService extends PSIBaseExService
|
||||
$dao = new VoucherDAO($db);
|
||||
|
||||
$us = new UserService();
|
||||
$bill["companyId"] = $us->getCompanyId();
|
||||
$bill["loginUserId"] = $us->getLoginUserId();
|
||||
$bill["dataOrg"] = $us->getLoginUserDataOrg();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user