Merge branch 'branch-jagad' into 'main'

Branch jagad

See merge request fiqhpratama1/xpendify!46
This commit is contained in:
Jagad Raya
2025-02-15 06:30:35 +00:00
@@ -210,9 +210,15 @@ class FormOtherController extends Controller
$phoneNumbers = array_unique($phoneNumbers); $phoneNumbers = array_unique($phoneNumbers);
$receiver_ids = array_unique($receiver_ids); $receiver_ids = array_unique($receiver_ids);
try {
// Generate URL and send WhatsApp notification // Generate URL and send WhatsApp notification
$url = route('forms.other.view', $form->id); $url = route('forms.other.view', $form->id);
WhatsappHelper::newExpense($phoneNumbers, $expense_number, $url, $tanggal, $total, $name); WhatsappHelper::newExpense($phoneNumbers, $expense_number, $url, $tanggal, $total, $name);
} catch (\Exception $e) {
session()->flash('error', 'Failed to send whatsapp message.');
} finally {
Log::error("Failed to send WhatsApp message to {$phoneNumbers}: ");
}
// Send bulk email // Send bulk email
foreach ($recipients as $recipient) { foreach ($recipients as $recipient) {