scope is added for the code field of InvoiceTotal model
This commit is contained in:
parent
5c7a886a99
commit
66ac9eceb1
@ -31,6 +31,11 @@ class InvoiceTotal extends Model
|
|||||||
return $this->belongsTo('App\Models\Sale\Invoice');
|
return $this->belongsTo('App\Models\Sale\Invoice');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function scopeCode($query, $code)
|
||||||
|
{
|
||||||
|
return $query->where('code', '=', $code);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert amount to double.
|
* Convert amount to double.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user