Merge branch 'hotfix' into develop
This commit is contained in:
commit
0f3fc52866
1 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,6 @@ use Illuminate\Validation\ValidationException;
|
|||
use Kwaadpepper\CrudPolicies\Http\Requests\CrudIndexRequest;
|
||||
use Kwaadpepper\CrudPolicies\Traits\CrudController;
|
||||
use Kwaadpepper\Enum\Rules\EnumIsValidRule;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* * Because update is denied when invoice is sent to the client
|
||||
|
|
@ -144,7 +143,8 @@ class InvoiceController extends Controller
|
|||
public function updateModel(Invoice &$model)
|
||||
{
|
||||
if ($model->signed_date) {
|
||||
throw ValidationException::withMessages(['erreur' => trans('Il n\'est pas possible de mettre a jour un devis qui est signé')
|
||||
throw ValidationException::withMessages([
|
||||
'erreur' => trans('Il n\'est pas possible de mettre a jour un devis qui est signé')
|
||||
]);
|
||||
}
|
||||
$this->validateTasks($model);
|
||||
|
|
@ -209,7 +209,7 @@ class InvoiceController extends Controller
|
|||
* @param \App\Models\Invoice $invoice
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function download(Invoice $invoice): Response
|
||||
public function download(Invoice $invoice)
|
||||
{
|
||||
$this->authorize($invoice, 'download');
|
||||
return $invoice->generateInvoice()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue