pembaikan tentang portal

This commit is contained in:
hafifierahman
2022-01-22 00:08:40 +08:00
parent 98ff5a8647
commit 178989ab3d
2 changed files with 18 additions and 13 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ use App\Gadai;
use App\Lelong;
use App\Tebus;
use App\Vault;
use App\Gldetail;
use App\GlDetail;
use App\Panjar;
use App\TransactionOnline;
use App\Tunai;
+17 -12
View File
@@ -3270,45 +3270,50 @@ class GadaiController extends Controller
$array_totalup = [];
for($i=0;$i<12;$i++){
if($i == 0){
$monthly_array_date = $monthly_array->startOfMonth()->subMonths(0);
}else{
$monthly_array_date = $monthly_array->startOfMonth()->subMonths(1);
}
if($monthly_array_date->year === $current->year)
{
switch($monthly_array_date->month){
switch($i+1){
case 1: $namabulan = 'Jan';
$tarikh = $current->year . '-' . '01';
break;
case 2: $namabulan = 'Feb';
$tarikh = $current->year . '-' . '02';
break;
case 3: $namabulan = 'Mac';
$tarikh = $current->year . '-' . '03';
break;
case 4: $namabulan = 'Apr';
$tarikh = $current->year . '-' . '04';
break;
case 5: $namabulan = 'Mei';
$tarikh = $current->year . '-' . '05';
break;
case 6: $namabulan = 'Jun';
$tarikh = $current->year . '-' . '06';
break;
case 7: $namabulan = 'Jul';
$tarikh = $current->year . '-' . '07';
break;
case 8: $namabulan = 'Aug';
$tarikh = $current->year . '-' . '08';
break;
case 9: $namabulan = 'Sep';
$tarikh = $current->year . '-' . '09';
break;
case 10: $namabulan = 'Okt';
$tarikh = $current->year . '-' . '10';
break;
case 11: $namabulan = 'Nov';
$tarikh = $current->year . '-' . '11';
break;
case 12: $namabulan = 'Dis';
$tarikh = $current->year . '-' . '12';
break;
}
array_push($array_totalup,['tarikh'=>$monthly_array_date->year.'-'.sprintf("%02d", $monthly_array_date->month),'namabulan'=>$namabulan,'pembiayaan'=>0,'bayaran'=>0]);
}
array_push($array_totalup,['tarikh'=>$tarikh,'namabulan'=>$namabulan,'pembiayaan'=>0,'bayaran'=>0]);
}
foreach($cawangan_all as $index=>$cawangan){
$gadai = Gadai::on($cawangan['mysql'])