1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/app/Services/TaxRateService.php
2016-05-23 19:52:20 +03:00

34 lines
812 B
PHP

<?php namespace App\Services;
use URL;
use Auth;
use App\Services\BaseService;
use App\Ninja\Repositories\TaxRateRepository;
use App\Ninja\Datatables\TaxRateDatatable;
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)
{
$datatable = new TaxRateDatatable(false);
$query = $this->taxRateRepo->find($accountId);
return $this->datatableService->createDatatable($datatable, $query);
}
}