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 | 444 | $reservas = new clsPmieducarReservas($codReserva); |
| 445 | 445 | $reservas->data_retirada = date('Y-m-d H:i:s'); |
| 446 | 446 | $reservas->edita(); |
| 447 | + $return = 'disponivel'; | |
| 447 | 448 | }else{ |
| 448 | 449 | |
| 449 | 450 | $this->messenger->append("Outros clientes já haviam reservado o exemplar anteriormente.".$cont, 'success'); |
| 451 | + $return = 'reservado'; | |
| 450 | 452 | } |
| 451 | 453 | }else if($cont>0){ |
| 452 | 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 | ... | ... |