mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for actions
This commit is contained in:
parent
fbf4ecdf5f
commit
9dc91e5f97
@ -27,7 +27,7 @@ class ActionInvoiceRequest extends Request
|
||||
*/
|
||||
private $error_msg;
|
||||
|
||||
private $invoice;
|
||||
// private $invoice;
|
||||
|
||||
public function authorize() : bool
|
||||
{
|
||||
@ -45,7 +45,9 @@ class ActionInvoiceRequest extends Request
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
if (!array_key_exists('action', $input)) {
|
||||
if($this->action){
|
||||
$input['action'] = $this->action;
|
||||
} elseif (!array_key_exists('action', $input) ) {
|
||||
$this->error_msg = 'Action is a required field';
|
||||
} elseif (!$this->invoiceDeletable($this->invoice)) {
|
||||
unset($input['action']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user