sth
This commit is contained in:
parent
fe8f24543f
commit
2a38e106fa
|
|
@ -49,7 +49,8 @@ class Dispatcher extends Backend
|
|||
public function index()
|
||||
{
|
||||
//$this->chart();
|
||||
$today = now()->format('Y-m-d');
|
||||
//$today = now()->sub('')->format('Y-m-d' );
|
||||
$today = now()->sub(new \DateInterval('P7D'))->format('Y-m-d');
|
||||
$today_end = now()->format('Y-m-d');
|
||||
|
||||
|
||||
|
|
@ -196,7 +197,6 @@ class Dispatcher extends Backend
|
|||
$newData[] = $datum->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
if($getAll){
|
||||
return $newData;
|
||||
}else{
|
||||
|
|
@ -214,6 +214,9 @@ class Dispatcher extends Backend
|
|||
*/
|
||||
private function _calc($a, $b, int $scale=4, $is_percent=false): int|string
|
||||
{
|
||||
$a = $a??0;
|
||||
$b = $b??0;
|
||||
|
||||
$val = $b > 0 ? bcdiv($a,$b,$scale) : 0;
|
||||
|
||||
if($is_percent){
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user