提交 5b6f39b2 authored 作者: chengye's avatar chengye

修复账单如果没有附件则现实错误页面的问题

上级 89317172
......@@ -117,9 +117,9 @@ class EmInvoice extends Base
$eiu = EmInvoiceUseage::where(['invoice_id'=>$inv->invoice_id])->find();
//查询抄表信息
$useage = Useage::with('photo')->get(['useage_id'=>$eiu->useage_id]);
if(is_int($useage->photo_id) && $useage->photo_id != 0) {
$useage = Useage::with('photo')->get(['useage_id'=>$eiu->useage_id]);
if(isset($useage->photo_id) && is_int($useage->photo_id) && $useage->photo_id != 0) {
$receipt = Receipt::get(['id'=>$useage->photo_id ?: 0]);
if($receipt) $useage['photo'] = $receipt;
} else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论