Showing
1 changed file
with
13 additions
and
1 deletions
@@ -243,11 +243,23 @@ class OrderModel | @@ -243,11 +243,23 @@ class OrderModel | ||
243 | 243 | ||
244 | $result['invoice'] = array(); | 244 | $result['invoice'] = array(); |
245 | //电子发票 | 245 | //电子发票 |
246 | - if (!empty($orderDetail['data']['invoice']) && $orderDetail['data']['status'] >=4) { | 246 | + do{ |
247 | + if(empty($orderDetail['data']['invoice']) || !isset($orderDetail['data']['invoice'])){ | ||
248 | + break; | ||
249 | + } | ||
250 | + //判断是否显示电子发票 | ||
251 | + if($orderDetail['data']['invoice']['showInvoice'] == 'false' || empty($orderDetail['data']['invoice']['showInvoice'])){ | ||
252 | + break; | ||
253 | + } | ||
254 | + //pdf下载地址 | ||
255 | + if(empty($orderDetail['data']['invoice']['pdfUrl']) || !isset($orderDetail['data']['invoice']['pdfUrl'])){ | ||
256 | + break; | ||
257 | + } | ||
247 | $result['invoice'] = $orderDetail['data']['invoice']; | 258 | $result['invoice'] = $orderDetail['data']['invoice']; |
248 | //纸质 1,电子 2 | 259 | //纸质 1,电子 2 |
249 | $result['invoice']['type'] = $result['invoice']['type'] * 1 === 2 ? true : false; | 260 | $result['invoice']['type'] = $result['invoice']['type'] * 1 === 2 ? true : false; |
250 | } | 261 | } |
262 | + while(false); | ||
251 | 263 | ||
252 | // $result['invoice'] = array( | 264 | // $result['invoice'] = array( |
253 | // 'type' => true,//-- 纸质 false,电子 true | 265 | // 'type' => true,//-- 纸质 false,电子 true |
-
Please register or login to post a comment