Siti Rahayu преди 5 години
родител
ревизия
4c3a638489
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2
    2
      app/Console/Commands/CalculateStatisticCompound.php

+ 2
- 2
app/Console/Commands/CalculateStatisticCompound.php Целия файл

@@ -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…
Отказ
Запис