Authored by cailing

订单详情页是否显示发票信息

... ... @@ -243,11 +243,23 @@ class OrderModel
$result['invoice'] = array();
//电子发票
if (!empty($orderDetail['data']['invoice']) && $orderDetail['data']['status'] >=4) {
do{
if(empty($orderDetail['data']['invoice']) || !isset($orderDetail['data']['invoice'])){
break;
}
//判断是否显示电子发票
if($orderDetail['data']['invoice']['showInvoice'] == 'false' || empty($orderDetail['data']['invoice']['showInvoice'])){
break;
}
//pdf下载地址
if(empty($orderDetail['data']['invoice']['pdfUrl']) || !isset($orderDetail['data']['invoice']['pdfUrl'])){
break;
}
$result['invoice'] = $orderDetail['data']['invoice'];
//纸质 1,电子 2
$result['invoice']['type'] = $result['invoice']['type'] * 1 === 2 ? true : false;
}
while(false);
// $result['invoice'] = array(
// 'type' => true,//-- 纸质 false,电子 true
... ...