mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-10 03:24:36 -04:00
commit
3b2574eeaa
@ -38,10 +38,10 @@ class UpdateTaxRateRequest extends Request
|
|||||||
|
|
||||||
$rules = [];
|
$rules = [];
|
||||||
|
|
||||||
$rules['rate'] = 'required|numeric';
|
$rules['rate'] = 'sometimes|numeric';
|
||||||
|
|
||||||
if ($this->name) {
|
if ($this->name) {
|
||||||
$rules['name'] = Rule::unique('tax_rates')->where('company_id', auth()->user()->company()->id)->ignore($this->tax_rate->id);
|
$rules['name'] = Rule::unique('tax_rates')->where('company_id', $user->company()->id)->ignore($this->tax_rate->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
|
@ -29,6 +29,8 @@ class TaxRateApiTest extends TestCase
|
|||||||
use DatabaseTransactions;
|
use DatabaseTransactions;
|
||||||
use MockAccountData;
|
use MockAccountData;
|
||||||
|
|
||||||
|
public $faker;
|
||||||
|
|
||||||
protected function setUp() :void
|
protected function setUp() :void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user