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

修复旧的抄表单没有生成amount导致无法审核的问题,并刷新抄表单金额字段

上级 ec47182b
......@@ -160,7 +160,15 @@ class Invoice extends Base
$inv->rate = $uData['rate'];
$inv->repo_numb = round(($uData['current_sum_numb'] - $uData['last_sum_numb']) * $uData['rate'],3);
if(!$uData['amount']) $uData['amount'] =round($inv->repo_numb * $uData['pay_price'],3);
if(!$uData['amount']) {
$uData['amount'] =round($inv->repo_numb * $uData['pay_price'],3);
$useage = \app\em\model\Useage::get(['useage_id'=>$uData['useage_id']]);
if($useage) {
$useage->amount = $uData['amount'];
$useage->save();
}
}
$inv->payment_amount = $inv->payment_balance = $uData['amount'];
//结算信息
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论