1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00
invoiceninja/app/Services/TaxRateService.php

34 lines
812 B
PHP
Raw Normal View History

2015-11-05 23:37:04 +01:00
<?php namespace App\Services;
use URL;
use Auth;
use App\Services\BaseService;
use App\Ninja\Repositories\TaxRateRepository;
2016-05-23 18:52:20 +02:00
use App\Ninja\Datatables\TaxRateDatatable;
2015-11-05 23:37:04 +01:00
class TaxRateService extends BaseService
{
protected $taxRateRepo;
protected $datatableService;
public function __construct(TaxRateRepository $taxRateRepo, DatatableService $datatableService)
{
$this->taxRateRepo = $taxRateRepo;
$this->datatableService = $datatableService;
}
protected function getRepo()
{
return $this->taxRateRepo;
}
public function getDatatable($accountId)
{
2016-05-23 18:52:20 +02:00
$datatable = new TaxRateDatatable(false);
2015-11-05 23:37:04 +01:00
$query = $this->taxRateRepo->find($accountId);
2016-05-23 18:52:20 +02:00
return $this->datatableService->createDatatable($datatable, $query);
2015-11-05 23:37:04 +01:00
}
2016-05-23 18:52:20 +02:00
}