Add laporan keseluruhan ringkasan harian
This commit is contained in:
@@ -23,7 +23,7 @@ class OnePercentService
|
||||
|
||||
|
||||
public function getTotalRounded($type='B',$start = '2023-12-14',$end = '2023-12-14'){
|
||||
if($type == 'B'){
|
||||
if($type == 'B'){
|
||||
$rounded = TransaksiKeuntungan::on('mysql7')
|
||||
->leftJoin('transaction as trans', function($join)
|
||||
{
|
||||
@@ -37,19 +37,19 @@ class OnePercentService
|
||||
$rounded = TransaksiKeuntungan::on('mysql7')
|
||||
->whereDate('tarikh_bayaran','>=',$start)
|
||||
->whereDate('tarikh_bayaran','<=',$end)
|
||||
->sum('rounded');;
|
||||
->sum('rounded');;
|
||||
}
|
||||
|
||||
return $rounded;
|
||||
|
||||
}
|
||||
|
||||
public function getTotalKeuntungan($type = 'B',$start = '2023-12-14',$end = '2023-12-14') : Float{
|
||||
public function getTotalKeuntungan($type = 'B',$start = '2023-12-14',$end = '2023-12-14') : Float{
|
||||
if($type == 'B'){
|
||||
|
||||
$akrual = Gadai::on($this->cawangan['mysql'])->where([['sttebus',''],['tagbaru',1]])->sum('tunggakanonepercent');
|
||||
$norujukan = Gadai::on($this->cawangan['mysql'])->where('sttebus','T')->where('tagbaru',1)->pluck('norujukan');
|
||||
|
||||
|
||||
$keuntungan = TransaksiKeuntungan::on('mysql7')
|
||||
->whereIn('norujukan',$norujukan)
|
||||
->sum('onepercent_rebet');
|
||||
@@ -99,5 +99,5 @@ class OnePercentService
|
||||
return $totalujrah;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user