mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Change requirements for report request
This commit is contained in:
parent
d123fea439
commit
76240fdbfb
@ -33,8 +33,18 @@ class ProfitLossRequest extends Request
|
||||
'is_income_billed' => 'required|bail|bool',
|
||||
'is_expense_billed' => 'required|bail|bool',
|
||||
'include_tax' => 'required|bail|bool',
|
||||
'date_range' => 'required|bail|string',
|
||||
'date_range' => 'sometimes|string',
|
||||
'send_email' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
public function prepareForValidation()
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
if(!array_key_exists('date_range', $input))
|
||||
$input['date_range'] = 'all';
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user