Browse Source

开票列表新增查询条件3

master
wanghongjun 11 months ago
parent
commit
c3501cbb4c
  1. 4
      app/controller/admin/InvoiceIssuance.php

4
app/controller/admin/InvoiceIssuance.php

@ -40,7 +40,7 @@ class InvoiceIssuance extends Base
$where[] = ['merge', '=', $param['merge']];
}
if (isset($param['status']) && in_array($param['status'], [0, 3, 4])) {
if (isset($param['status']) && is_numeric($param['status']) && in_array($param['status'], [0, 3, 4])) {
$where[] = ['status', '=', $param['status']];
}
@ -52,7 +52,7 @@ class InvoiceIssuance extends Base
$where[] = ['create_time', '<=', strtotime($param['end_time'] . ' 23:59:59')];
}
if (isset($param['head_type']) && in_array($param['status'], [0, 1])) {
if (isset($param['head_type']) && is_numeric($param['head_type']) && in_array($param['head_type'], [0, 1])) {
$invoice_head_id = (new InvoiceHead())->where(['type' => $param['head_type']])->column('id');
$where[] = ['invoice_head_id', 'in', $invoice_head_id];
}

Loading…
Cancel
Save