mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-19 04:14:04 +00:00
x1 and x2 reports
This commit is contained in:
+2
-2
@@ -27,13 +27,13 @@ Route::get('/report/x1', function(){
|
||||
});
|
||||
|
||||
foreach($months as $month => $bookings){
|
||||
echo "<h1>".Carbon::parse($month)->format('m-Y')."(".$bookings->sum('bia').")</h1>";
|
||||
echo "<h1>".Carbon::parse($month)->format('m-Y').": <small style='color: green; font-size: larger'>".$bookings->sum('bia')." MYR</small></h1>";
|
||||
$days = $bookings->groupBy(function($item){
|
||||
return $item->created_at->format('Y-m-d');
|
||||
});
|
||||
|
||||
foreach($days as $day => $bookings ){
|
||||
echo "<p>".Carbon::parse($day)->format('d-m-Y')." -> Total: <small style='color: green; font-size: large'>".$bookings->sum('bia')." MYR</small></p>";
|
||||
echo "<p>".Carbon::parse($day)->format('d-m-Y').": <small style='color: green; font-size: large'>".$bookings->sum('bia')." MYR</small></p>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user