Siti Rahayu 5 anni fa
parent
commit
4c3a638489
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      app/Console/Commands/CalculateStatisticCompound.php

+ 2
- 2
app/Console/Commands/CalculateStatisticCompound.php Vedi File

@@ -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';

Loading…
Annulla
Salva