Merge pull request #1663 from SevanNerse/2.1-dev
scopes are added for InvoiceTotal and BillTotal models
This commit is contained in:
commit
1cff173824
@ -31,6 +31,11 @@ class BillTotal extends Model
|
||||
return $this->belongsTo('App\Models\Purchase\Bill');
|
||||
}
|
||||
|
||||
public function scopeCode($query, $code)
|
||||
{
|
||||
return $query->where('code', '=', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert amount to double.
|
||||
*
|
||||
|
@ -31,6 +31,11 @@ class InvoiceTotal extends Model
|
||||
return $this->belongsTo('App\Models\Sale\Invoice');
|
||||
}
|
||||
|
||||
public function scopeCode($query, $code)
|
||||
{
|
||||
return $query->where('code', '=', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert amount to double.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user