mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 08:04:33 -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 $error_msg;
|
||||||
|
|
||||||
private $invoice;
|
// private $invoice;
|
||||||
|
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
@ -45,7 +45,9 @@ class ActionInvoiceRequest extends Request
|
|||||||
{
|
{
|
||||||
$input = $this->all();
|
$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';
|
$this->error_msg = 'Action is a required field';
|
||||||
} elseif (!$this->invoiceDeletable($this->invoice)) {
|
} elseif (!$this->invoiceDeletable($this->invoice)) {
|
||||||
unset($input['action']);
|
unset($input['action']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user