fix keuntungan akru percent
This commit is contained in:
@@ -469,7 +469,12 @@ class OnePercentService
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function filterCollection($collection,$type,$sumtype) : Float{
|
private function filterCollection($collection,$type,$sumtype) : Float{
|
||||||
return $collection->filter(function ($item) use($type) {
|
|
||||||
|
$array_type = ['T','S','P','AT'];
|
||||||
|
return $collection->filter(function ($item) use($type,$array_type) {
|
||||||
|
if($type == 'T')
|
||||||
|
return in_array($type, $array_type);
|
||||||
|
|
||||||
return $item->trans_type === $type;
|
return $item->trans_type === $type;
|
||||||
})->sum($sumtype);
|
})->sum($sumtype);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user