|
|
|
@ -77,6 +77,14 @@ class Index extends Base { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$finalReportArr = ['type' => '当月结报金额', 'count' => 0]; |
|
|
|
$where = [ |
|
|
|
['report_time', '>=', strtotime(date("Y-m"))], |
|
|
|
['report_time', '<', strtotime('+1 month', strtotime(date("Y-m")))] |
|
|
|
]; |
|
|
|
$finalReportArr['count'] = (new InvoiceFinalReport())->getSumAmount($where); |
|
|
|
$data['invoice_head_data'][] = $finalReportArr; |
|
|
|
|
|
|
|
return $this->buildSuccess($data); |
|
|
|
} catch (\Exception $e) { |
|
|
|
|
|
|
|
@ -112,8 +120,7 @@ class Index extends Base { |
|
|
|
['report_time', '<', $end_time] |
|
|
|
]; |
|
|
|
|
|
|
|
$result = (new InvoiceFinalReport())->where($where)->field('sum(`ydzse`) as ydzse_sum')->find(); |
|
|
|
$amountArr[$key] = $result['ydzse_sum'] ?? 0; |
|
|
|
$amountArr[$key] = (new InvoiceFinalReport())->getSumAmount($where); |
|
|
|
} |
|
|
|
|
|
|
|
return $this->buildSuccess([ |
|
|
|
|