mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
When Archiving/Deleting Recurring Invoices, Silently Drops into Invoice Screen #1377
This commit is contained in:
parent
35b139fa91
commit
ce3afdaf8d
@ -37,7 +37,7 @@ class BaseController extends Controller
|
||||
|
||||
// when restoring redirect to entity
|
||||
if ($action == 'restore' && count($ids) == 1) {
|
||||
return redirect("{$entityTypes}/" . $ids[0]);
|
||||
return redirect("{$entityTypes}/" . $ids[0] . '/edit');
|
||||
// when viewing from a datatable list
|
||||
} elseif (strpos($referer, '/clients/')) {
|
||||
return redirect($referer);
|
||||
@ -45,7 +45,7 @@ class BaseController extends Controller
|
||||
return redirect("{$entityTypes}");
|
||||
// when viewing individual entity
|
||||
} elseif (count($ids)) {
|
||||
return redirect("{$entityTypes}/" . $ids[0]);
|
||||
return redirect("{$entityTypes}/" . $ids[0] . '/edit');
|
||||
} else {
|
||||
return redirect("{$entityTypes}");
|
||||
}
|
||||
|
@ -464,7 +464,6 @@ class InvoiceController extends BaseController
|
||||
public function bulk($entityType = ENTITY_INVOICE)
|
||||
{
|
||||
$action = Input::get('bulk_action') ?: Input::get('action');
|
||||
;
|
||||
$ids = Input::get('bulk_public_id') ?: (Input::get('public_id') ?: Input::get('ids'));
|
||||
$count = $this->invoiceService->bulk($ids, $action);
|
||||
|
||||
@ -482,6 +481,10 @@ class InvoiceController extends BaseController
|
||||
Session::flash('message', $message);
|
||||
}
|
||||
|
||||
if (strpos(\Request::server('HTTP_REFERER'), 'recurring_invoices')) {
|
||||
$entityType = ENTITY_RECURRING_INVOICE;
|
||||
}
|
||||
|
||||
return $this->returnBulk($entityType, $action, $ids);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user