Ensure recurring expenses have numeric for tax_amounts
This commit is contained in:
parent
7d896e843b
commit
8a85428532
2 changed files with 7 additions and 0 deletions
|
|
@ -42,6 +42,9 @@ class StoreRecurringExpenseRequest extends Request
|
|||
$rules['client_id'] = 'bail|sometimes|exists:clients,id,company_id,'.auth()->user()->company()->id;
|
||||
|
||||
$rules['frequency_id'] = 'required|integer|digits_between:1,12';
|
||||
$rules['tax_amount1'] = 'numeric';
|
||||
$rules['tax_amount2'] = 'numeric';
|
||||
$rules['tax_amount3'] = 'numeric';
|
||||
|
||||
return $this->globalRules($rules);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ class UpdateRecurringExpenseRequest extends Request
|
|||
$rules['number'] = Rule::unique('recurring_expenses')->where('company_id', auth()->user()->company()->id)->ignore($this->recurring_expense->id);
|
||||
}
|
||||
|
||||
$rules['tax_amount1'] = 'numeric';
|
||||
$rules['tax_amount2'] = 'numeric';
|
||||
$rules['tax_amount3'] = 'numeric';
|
||||
|
||||
return $this->globalRules($rules);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue