1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for scheduler requestS

This commit is contained in:
David Bomba 2023-12-13 10:32:40 +11:00
parent a973ece57b
commit 219e07c1c3

View File

@ -44,7 +44,7 @@ class UpdateSchedulerRequest extends Request
'parameters.end_date' => ['bail', 'sometimes', 'date:Y-m-d', 'required_if:parameters.date_rate,custom', 'after_or_equal:parameters.start_date'], 'parameters.end_date' => ['bail', 'sometimes', 'date:Y-m-d', 'required_if:parameters.date_rate,custom', 'after_or_equal:parameters.start_date'],
'parameters.entity' => ['bail', 'sometimes', 'string', 'in:invoice,credit,quote,purchase_order'], 'parameters.entity' => ['bail', 'sometimes', 'string', 'in:invoice,credit,quote,purchase_order'],
'parameters.entity_id' => ['bail', 'sometimes', 'string'], 'parameters.entity_id' => ['bail', 'sometimes', 'string'],
'parameters.report_name' => ['bail','sometimes', 'string', 'required_if:template,email_report', 'in:ar_detailed,ar_summary,client_balance,tax_summary,profitloss,client_sales,user_sales,product_sales,client,client_contact,credit,document,expense,invoice,invoice_item,quote,quote_item,recurring_invoice,payment,product,task'], 'parameters.report_name' => ['bail','sometimes', 'string', 'required_if:template,email_report','in:ar_detailed,ar_summary,client_balance,tax_summary,profitloss,client_sales,user_sales,product_sales,activity,client,contact,client_contact,credit,document,expense,invoice,invoice_item,quote,quote_item,recurring_invoice,payment,product,task'],
'parameters.date_key' => ['bail','sometimes', 'string'], 'parameters.date_key' => ['bail','sometimes', 'string'],
'parameters.status' => ['bail','sometimes', 'string'], 'parameters.status' => ['bail','sometimes', 'string'],
]; ];
@ -67,7 +67,7 @@ class UpdateSchedulerRequest extends Request
if(isset($input['parameters']) && !isset($input['parameters']['clients'])) { if(isset($input['parameters']) && !isset($input['parameters']['clients'])) {
$input['parameters']['clients'] = []; $input['parameters']['clients'] = [];
} }
if(isset($input['parameters']['status'])) { if(isset($input['parameters']['status'])) {
$input['parameters']['status'] = collect(explode(",", $input['parameters']['status'])) $input['parameters']['status'] = collect(explode(",", $input['parameters']['status']))
@ -76,9 +76,9 @@ class UpdateSchedulerRequest extends Request
})->implode(",") ?? ''; })->implode(",") ?? '';
} }
$this->replace($input); $this->replace($input);
} }
} }