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

预付款

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