mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-14 07:02:34 +01:00
42 lines
868 B
PHP
42 lines
868 B
PHP
|
<?php namespace App\Ninja\Datatables;
|
||
|
|
||
|
use Utils;
|
||
|
use URL;
|
||
|
use Auth;
|
||
|
|
||
|
class TaxRateDatatable extends EntityDatatable
|
||
|
{
|
||
|
public $entityType = ENTITY_TAX_RATE;
|
||
|
|
||
|
public function columns()
|
||
|
{
|
||
|
return [
|
||
|
[
|
||
|
'name',
|
||
|
function ($model) {
|
||
|
return link_to("tax_rates/{$model->public_id}/edit", $model->name)->toHtml();
|
||
|
}
|
||
|
],
|
||
|
[
|
||
|
'rate',
|
||
|
function ($model) {
|
||
|
return $model->rate . '%';
|
||
|
}
|
||
|
]
|
||
|
];
|
||
|
}
|
||
|
|
||
|
public function actions()
|
||
|
{
|
||
|
return [
|
||
|
[
|
||
|
uctrans('texts.edit_tax_rate'),
|
||
|
function ($model) {
|
||
|
return URL::to("tax_rates/{$model->public_id}/edit");
|
||
|
}
|
||
|
]
|
||
|
];
|
||
|
}
|
||
|
|
||
|
}
|