|
|
|
@ -7,11 +7,15 @@ use think\Model; |
|
|
|
class FinalReportDate extends Model |
|
|
|
{ |
|
|
|
|
|
|
|
public function getSumAmount($date) |
|
|
|
public function getSumAmount($date, $type = 1) |
|
|
|
{ |
|
|
|
$result = $this->where(['report_date' => $date])->field('id')->find(); |
|
|
|
if (!$result) return 0; |
|
|
|
$ydzse_sum = FinalReportData::getFrdSumAmount($result['id']); |
|
|
|
return $ydzse_sum ? number_format($ydzse_sum, 2, '.', ',') : 0; |
|
|
|
if ($type == 1) { |
|
|
|
return $ydzse_sum ? number_format($ydzse_sum, 2, '.', ',') : 0; |
|
|
|
} else { |
|
|
|
return $ydzse_sum ?: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|