提交 90cd7371 authored 作者: fengzy's avatar fengzy

预付款

上级 a0dbdf08
...@@ -25,6 +25,7 @@ class mode_oayfkClassAction extends inputAction{ ...@@ -25,6 +25,7 @@ class mode_oayfkClassAction extends inputAction{
protected function savesubbefore($data,$tables){ protected function savesubbefore($data,$tables){
if($tables == 'c_fund_details_yfk'){ if($tables == 'c_fund_details_yfk'){
if (count($data) > 1) {
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$cbzxid= $value['cbzx_code']; $cbzxid= $value['cbzx_code'];
$model = 'c_fund_account'; $model = 'c_fund_account';
...@@ -34,8 +35,16 @@ class mode_oayfkClassAction extends inputAction{ ...@@ -34,8 +35,16 @@ class mode_oayfkClassAction extends inputAction{
return "未检测到该成本中心默认扣款账户"; return "未检测到该成本中心默认扣款账户";
} }
} }
}else{
$cbzxid= $data['cbzx_code'];
$model = 'c_fund_account';
$sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
$data = m($model)->getone($sql,'id,account_balance');
if($data===false){
return "未检测到该成本中心默认扣款账户";
}
}
} }
return $data; return $data;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论