feat: add whatsapp_number field to suppliers, customers, users
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
de3f4ceae6
commit
92a2eb120f
6 files changed
+93
-2
No files matched your search
@@ -9,7 +9,7 @@ class Customer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['name', 'contact_person', 'email', 'phone', 'address', 'tax_number', 'credit_limit', 'outstanding_balance', 'is_active'];
|
||||
protected $fillable = ['name', 'contact_person', 'email', 'phone', 'whatsapp_number', 'address', 'tax_number', 'credit_limit', 'outstanding_balance', 'is_active'];
|
||||
|
||||
protected $casts = [
|
||||
'credit_limit' => 'decimal:2',
|
||||
@@ -17,6 +17,11 @@ class Customer extends Model
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
|
||||
public function routeNotificationFor(string $channel, mixed $notification = null): ?string
|
||||
{
|
||||
return $this->whatsapp_number;
|
||||
}
|
||||
|
||||
public function salesOrders()
|
||||
{
|
||||
return $this->hasMany(SalesOrder::class);
|
||||
|
||||
Reference in new issue
Block a user