fix bug periode

This commit is contained in:
Jagad R R
2025-05-05 19:40:38 +07:00
parent af21c0877d
commit 35ad132607
9 changed files with 270 additions and 72 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Helpers;
use Illuminate\Support\Carbon;
class PeriodeHelper
{
public static function getPeriodeRange($month, $year)
{
$month = (int) date('m', strtotime($month));
$year = (int) $year;
// Jika Januari, periode dimulai dari 11 Januari hingga 10 Februari
$start = Carbon::create($year, $month, 11)->startOfDay();
$end = $start->copy()->addMonth()->subDay()->endOfDay();
return [$start, $end];
}
}
-1
View File
@@ -249,7 +249,6 @@ class WhatsappHelper
return $response->getBody()->getContents();
} catch (\Exception $e) {
AuditTrailHelper::AddAuditTrail('Error', 'Failed to send WhatsApp message at Form (' . $expense_number . ')');
dd($e);
return null;
}
}