1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Handle already approved quote

This commit is contained in:
Hillel Coren 2017-12-16 22:29:56 +02:00
parent 535246916c
commit 2247697f68

View File

@ -156,9 +156,11 @@ class QuoteController extends BaseController
}
}
$invitationKey = $this->invoiceService->approveQuote($invoice, $invitation);
Session::flash('message', trans('texts.quote_is_approved'));
return Redirect::to("view/{$invitationKey}");
if ($invoiceInvitationKey = $this->invoiceService->approveQuote($invoice, $invitation)) {
Session::flash('message', trans('texts.quote_is_approved'));
return Redirect::to("view/{$invoiceInvitationKey}");
} else {
return Redirect::to("view/{$invitationKey}");
}
}
}