提交 bb606411 authored 作者: chengye's avatar chengye

test

上级 0d8502e4
......@@ -439,16 +439,16 @@ class Payment extends Base
foreach ($invs as $k => $inv){
$details[$k]['chargeType'] = "维护电费";
if($inv->payment_balance == 0){
$details[$k]['charge_amount'] = 0;
$details[$k]['amount'] = 0;
} else if($inv->payment_amount == $inv->payment_balance){
$details[$k]['charge_amount'] = $inv->payment_amount;
$details[$k]['amount'] = $inv->payment_amount;
} else {
$details[$k]['charge_amount'] = $inv->payment_amount - $inv->payment_balance;
$details[$k]['amount'] = $inv->payment_amount - $inv->payment_balance;
}
$details[$k]['cbzx_code'] = $this->getDetailsFields($inv->account_id);
$details[$k]['contract_id'] = $this->getDetailsFields($inv->account_id,true);
$details[$k]['projectNumber'] = $this->getDetailsFields($inv->account_id);
$details[$k]['contractNumber'] = $this->getDetailsFields($inv->account_id,true);
$details[$k]['receipt_id'] = '';
$details[$k]['receipt'] = '';
}
$data = [
......@@ -483,7 +483,7 @@ class Payment extends Base
if($k == 'details') {
foreach ($v as $a=>$b){
foreach ($b as $aa => $bb){
if($aa != 'receipt_id' && $aa != 'contract_id'){
if($aa != 'receipt' && $aa != 'contractNumber'){
if(empty($bb)) return json(['status'=>0,'message'=>'金额为0,或成本中心编码不存在']);
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论