提交 7149d468 authored 作者: fengzy's avatar fengzy

预付款

上级 90cd7371
...@@ -6,20 +6,20 @@ ...@@ -6,20 +6,20 @@
class mode_finfybxClassAction extends inputAction{ class mode_finfybxClassAction extends inputAction{
protected function savebefore($table, $arr, $id, $addbo){ // protected function savebefore($table, $arr, $id, $addbo){
$cbzxid= $arr['cbzxid']; // $cbzxid= $arr['cbzxid'];
$model = 'c_fund_account'; // $model = 'c_fund_account';
$sql = " cost_id ='$cbzxid' and status = 1 and is_default=1"; // $sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
$data = m($model)->getone($sql,'id,account_balance'); // $data = m($model)->getone($sql,'id,account_balance');
if(!$data){ // if(!$data){
return "未检测到该成本中心默认扣款账户"; // return "未检测到该成本中心默认扣款账户";
} // }
// if($data['account_balance'] < $arr['amountOfThisPayment']){ // // if($data['account_balance'] < $arr['amountOfThisPayment']){
// return "账户余额不足"; // // return "账户余额不足";
// } // // }
} // }
......
...@@ -22,32 +22,32 @@ class mode_oayfkClassAction extends inputAction{ ...@@ -22,32 +22,32 @@ 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) { // 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';
$sql = " cost_id ='$cbzxid' and status = 1 and is_default=1"; // $sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
$data = m($model)->getone($sql,'id,account_balance'); // $data = m($model)->getone($sql,'id,account_balance');
if($data===false){ // if($data===false){
return "未检测到该成本中心默认扣款账户"; // return "未检测到该成本中心默认扣款账户";
} // }
} // }
}else{ // }else{
$cbzxid= $data['cbzx_code']; // $cbzxid= $data['cbzx_code'];
$model = 'c_fund_account'; // $model = 'c_fund_account';
$sql = " cost_id ='$cbzxid' and status = 1 and is_default=1"; // $sql = " cost_id ='$cbzxid' and status = 1 and is_default=1";
$data = m($model)->getone($sql,'id,account_balance'); // $data = m($model)->getone($sql,'id,account_balance');
if($data===false){ // if($data===false){
return "未检测到该成本中心默认扣款账户"; // return "未检测到该成本中心默认扣款账户";
} // }
} // }
} // }
return $data; // return $data;
} // }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论