funcion/devoluciones #28

Merged
rho merged 31 commits from funcion/devoluciones into master 2024-08-27 21:18:17 -03:00
Showing only changes of commit 388beba5cc - Show all commits

View file

@ -37,11 +37,11 @@ Route::middleware('api')->group(function () {
return ['bonos_barriales' => $grupo->totalBonosBarriales()];
});
Route::get('/{gdc}/devoluciones', function($gdc) {
$habilitadas = GrupoDeCompra::where('id',$gdc)->value('devoluciones_habilitadas');
$habilitadas = GrupoDeCompra::find($gdc)->devoluciones_habilitadas;
return ['devoluciones' => $habilitadas];
});
Route::post('/{gdc}/devoluciones', function($gdc) {
$habilitadas = GrupoDeCompra::where('id',$gdc)->toggleDevoluciones();
$habilitadas = GrupoDeCompra::find($gdc)->toggleDevoluciones();
return ['devoluciones' => $habilitadas];
});
});