document item model append discount_rate
This commit is contained in:
parent
fc3a5d0d0f
commit
702cffe246
@ -15,7 +15,7 @@ class DocumentItem extends Model
|
|||||||
|
|
||||||
protected $table = 'document_items';
|
protected $table = 'document_items';
|
||||||
|
|
||||||
protected $appends = ['discount'];
|
protected $appends = ['discount', 'discount_rate'];
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'company_id',
|
'company_id',
|
||||||
@ -77,7 +77,6 @@ class DocumentItem extends Model
|
|||||||
public function scopeType(Builder $query, string $type)
|
public function scopeType(Builder $query, string $type)
|
||||||
{
|
{
|
||||||
return $query->where($this->table . '.type', '=', $type);
|
return $query->where($this->table . '.type', '=', $type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeInvoice(Builder $query)
|
public function scopeInvoice(Builder $query)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user