|
@@ -335,7 +335,7 @@ class Report extends Command
|
|
|
{
|
|
|
// $param = $this->request->only(['company' => '', 'start' => '', 'end' => ''], 'post', 'trim');
|
|
|
|
|
|
- $where = [['a.is_del', '=', 0], ['b.is_del', '=', 0], ['c.is_del', '=', 0], ['d.is_del', '=', 0]];
|
|
|
+ $where = [['a.is_del', '=', 0],['a.status', 'in',[3,4]],['b.is_del', '=', 0], ['c.is_del', '=', 0], ['d.is_del', '=', 0]];
|
|
|
|
|
|
if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.check_time', 'between', [$param['start'], $param['end']]];
|
|
|
if ($param['companyNo'] != '') $where[] = ['b.companyNo', '=', $param['companyNo']];
|
|
@@ -351,6 +351,7 @@ class Report extends Command
|
|
|
a.check_time 本次回票时间,
|
|
|
a.invoiceNumber 发票号,
|
|
|
a.inv_amount 本次回票金额,
|
|
|
+ d.totalPrice 采购单回票金额,
|
|
|
"" 不含税采购成本,
|
|
|
"" 税额,
|
|
|
d.companyName 公司回票抬头,
|
|
@@ -386,7 +387,6 @@ class Report extends Command
|
|
|
->leftJoin('pay b', 'a.payNo=b.payNo')
|
|
|
->leftJoin('pay_info c', 'c.payNo=a.payNo and c.status=1 and c.is_del=0')
|
|
|
->leftJoin('cgd_info d', 'd.sequenceNo=c.cgdNo')
|
|
|
- ->leftJoin('invoice_info e', 'e.payNo=a.payNo')
|
|
|
->where($where)
|
|
|
->order(['a.id' => 'desc'])
|
|
|
->cursor();
|