akaunting 3.0 (the last dance)
This commit is contained in:
@ -45,7 +45,7 @@ class Tax extends Model
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany('App\Models\Common\Item');
|
||||
return $this->hasMany('App\Models\Common\ItemTax');
|
||||
}
|
||||
|
||||
public function document_items()
|
||||
@ -136,6 +136,33 @@ class Tax extends Model
|
||||
return $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the line actions.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLineActionsAttribute()
|
||||
{
|
||||
$actions = [];
|
||||
|
||||
$actions[] = [
|
||||
'title' => trans('general.edit'),
|
||||
'icon' => 'edit',
|
||||
'url' => route('taxes.edit', $this->id),
|
||||
'permission' => 'update-settings-taxes',
|
||||
];
|
||||
|
||||
$actions[] = [
|
||||
'type' => 'delete',
|
||||
'icon' => 'delete',
|
||||
'route' => 'taxes.destroy',
|
||||
'permission' => 'delete-settings-taxes',
|
||||
'model' => $this,
|
||||
];
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new factory instance for the model.
|
||||
*
|
||||
|
Reference in New Issue
Block a user