feat: send WhatsApp notification on GRN confirmed

This commit is contained in:
ghassan committed 2026-05-19 13:19:27 +03:00
1 parent 358907bbed
commit 639282f707
2 files changed
+33

No files matched your search

@@ -9,6 +9,7 @@ use App\Models\PurchaseOrder;
use App\Models\StockLevel;
use App\Models\StockMovement;
use App\Models\Warehouse;
use App\Notifications\Purchase\GoodsReceiptConfirmedNotification;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
@@ -145,6 +146,9 @@ class GoodsReceiptNoteController extends Controller
}
});
$storeManagers = \App\Models\User::role('Store Manager')->whereNotNull('whatsapp_number')->get();
\Illuminate\Support\Facades\Notification::send($storeManagers, new GoodsReceiptConfirmedNotification($grn));
return redirect()->back()->with('success', 'GRN confirmed and stock updated.');
}
}