Siti Rahayu před 5 roky
rodič
revize
4c3a638489

+ 2
- 2
app/Console/Commands/CalculateStatisticCompound.php Zobrazit soubor

@@ -44,12 +44,12 @@ class CalculateStatisticCompound extends Command
//calculate all compound [status = Belum Bayar, Bayar & Batal]
$s1 = ReportOverallCompound::where('status','all')->where('department','all')->where('modul','all')->first();
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();
}else {
$dataS = new ReportOverallCompound;
// $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->department = 'all';
$dataS->modul = 'all';

Načítá se…
Zrušit
Uložit