浏览代码

cron fix

master
Siti Rahayu 5 年前
父节点
当前提交
4c3a638489
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      app/Console/Commands/CalculateStatisticCompound.php

+ 2
- 2
app/Console/Commands/CalculateStatisticCompound.php 查看文件

//calculate all compound [status = Belum Bayar, Bayar & Batal] //calculate all compound [status = Belum Bayar, Bayar & Batal]
$s1 = ReportOverallCompound::where('status','all')->where('department','all')->where('modul','all')->first(); $s1 = ReportOverallCompound::where('status','all')->where('department','all')->where('modul','all')->first();
if(!empty($s1)){ if(!empty($s1)){
$s1->total = count(Compound::where('status', ['Belum Bayar', 'Berbayar', 'Batal'])->get();
$s1->total = count(Compound::whereIn('status', ['Belum Bayar', 'Berbayar', 'Batal'])->get();
$s1->save(); $s1->save();
}else { }else {
$dataS = new ReportOverallCompound; $dataS = new ReportOverallCompound;
// $dataS->total = count(Compound::all()); // $dataS->total = count(Compound::all());
$dataS->total = count(Compound::where('status', ['Belum Bayar', 'Berbayar', 'Batal'])->get();
$dataS->total = count(Compound::whereIn('status', ['Belum Bayar', 'Berbayar', 'Batal'])->get();
$dataS->status = 'all'; $dataS->status = 'all';
$dataS->department = 'all'; $dataS->department = 'all';
$dataS->modul = 'all'; $dataS->modul = 'all';

正在加载...
取消
保存