close #2432 Fixed: Invoice form sent to button not working ( #2zftu0c )

This commit is contained in:
Cüneyt Şentürk
2022-06-07 15:52:42 +03:00
parent d1f987c720
commit c94ab51c52
4 changed files with 36 additions and 3 deletions

View File

@ -70,7 +70,13 @@ class Invoices extends Controller
$response = $this->ajaxDispatch(new CreateDocument($request));
if ($response['success']) {
$response['redirect'] = route('invoices.show', $response['data']->id);
$paramaters = ['invoice' => $response['data']->id];
if ($request->has('senddocument')) {
$paramaters['senddocument'] = true;
}
$response['redirect'] = route('invoices.show', $paramaters);
$message = trans('messages.success.added', ['type' => trans_choice('general.invoices', 1)]);