fix lelong

This commit is contained in:
MUHD HAFIFIE
2021-07-15 11:14:48 +08:00
parent 8a81343bee
commit 659d3b828b
2 changed files with 18 additions and 1 deletions
+15
View File
@@ -496,4 +496,19 @@ class LelongController extends Controller
return response()->json($cajperkhidmatan,200);
}
public function LelonganHarini($kodcaw)
{
$current = Carbon::now();
$current = new Carbon();
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$lelong = Lelong::on($cawangan['mysql'])
->whereNotNull('t_jual')
->where('t_jual','=', $current->toDateString())
->sum('hargajual');
return response()->json($lelong,200);
}
}