Commit 0a5e02bbbbe3f63f21fa1431702915077970c03c
1 parent
f62eec5c
Exists in
master
Não permitir empréstimo para exemplares reservados
portabilis/ieducar#108
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
ieducar/modules/Biblioteca/Views/EmprestimoApiController.php
@@ -444,15 +444,18 @@ class EmprestimoApiController extends ApiCoreController | @@ -444,15 +444,18 @@ class EmprestimoApiController extends ApiCoreController | ||
444 | $reservas = new clsPmieducarReservas($codReserva); | 444 | $reservas = new clsPmieducarReservas($codReserva); |
445 | $reservas->data_retirada = date('Y-m-d H:i:s'); | 445 | $reservas->data_retirada = date('Y-m-d H:i:s'); |
446 | $reservas->edita(); | 446 | $reservas->edita(); |
447 | + $return = 'disponivel'; | ||
447 | }else{ | 448 | }else{ |
448 | 449 | ||
449 | $this->messenger->append("Outros clientes já haviam reservado o exemplar anteriormente.".$cont, 'success'); | 450 | $this->messenger->append("Outros clientes já haviam reservado o exemplar anteriormente.".$cont, 'success'); |
451 | + $return = 'reservado'; | ||
450 | } | 452 | } |
451 | }else if($cont>0){ | 453 | }else if($cont>0){ |
452 | $this->messenger->append("Outros clientes já haviam reservado o exemplar.", 'success'); | 454 | $this->messenger->append("Outros clientes já haviam reservado o exemplar.", 'success'); |
455 | + $return = 'reservado'; | ||
453 | } | 456 | } |
454 | 457 | ||
455 | - return 'disponivel'; | 458 | + return $return; |
456 | } | 459 | } |
457 | 460 | ||
458 | 461 |