Files
oficial/app/resources/routes/api/ventas.php

65 lines
2.5 KiB
PHP
Raw Normal View History

<?php
2023-10-19 18:20:37 -03:00
use Incoviba\Controller\API\Ventas;
2023-07-28 16:22:20 -04:00
$app->group('/ventas', function($app) {
$folder = implode(DIRECTORY_SEPARATOR, [__DIR__, 'ventas']);
if (file_exists($folder)) {
$files = new FilesystemIterator($folder);
foreach ($files as $file) {
if ($file->isDir()) {
continue;
}
include_once $file->getRealPath();
}
}
2023-10-19 18:20:37 -03:00
$app->post('/add[/]', [Ventas::class, 'add']);
$app->group('/estados', function($app) {
$app->post('/firmar[/]', [Ventas::class, 'porFirmar']);
});
$app->group('/escrituras', function($app) {
$app->post('/estados[/]', [Ventas::class, 'escrituras']);
});
$app->group('/by', function($app) {
$app->get('/unidad/{unidad_id}', [Ventas::class, 'unidad']);
$app->post('/unidades[/]', [Ventas::class, 'byUnidades']);
});
2024-03-13 16:17:14 -03:00
$app->post('/get[/]', [Ventas::class, 'getMany']);
2023-07-28 16:22:20 -04:00
$app->post('[/]', [Ventas::class, 'proyecto']);
});
$app->group('/venta/{venta_id}', function($app) {
2023-12-21 18:45:47 -03:00
$app->get('/unidades[/]', [Ventas::class, 'unidades']);
2024-07-04 18:09:25 -04:00
$app->group('/comentarios', function($app) {
$app->post('/add[/]', [Ventas::class, 'addComentario']);
$app->get('[/]', [Ventas::class, 'comentarios']);
});
2024-11-18 23:25:20 -03:00
$app->group('/bono_pie', function($app) {
$app->post('/edit[/]', [Ventas\Bonos::class, 'edit']);
2024-11-18 23:25:20 -03:00
$app->post('/add[/]', [Ventas\Bonos::class, 'add']);
});
$app->group('/escritura', function($app) {
2024-11-28 17:12:35 -03:00
$app->group('/cuotas', function($app) {
$app->post('/add[/]', [Ventas\Abonos\Cuotas::class, 'add']);
});
2024-11-28 19:14:14 -03:00
$app->group('/cuota/{cuota_id:[0-9]+}', function($app) {
$app->post('/edit[/]', [Ventas\Abonos\Cuotas::class, 'edit']);
});
$app->post('/add[/]', [Ventas\Escrituras::class, 'add']);
});
2024-02-15 18:57:56 -03:00
$app->group('/credito', function($app) {
$app->post('[/]', [Ventas\Creditos::class, 'edit']);
});
2023-12-21 18:45:47 -03:00
$app->post('/escriturar[/]', [Ventas::class, 'escriturar']);
$app->group('/desistir', function($app) {
$app->get('/eliminar[/]', [Ventas::class, 'insistir']);
$app->post('[/]', [Ventas::class, 'desistir']);
});
$app->group('/propietario', function($app) {
$app->put('/edit[/]', [Ventas::class, 'propietario']);
});
$app->group('/pie', function($app) {
$app->post('/add[/]', [Ventas\Pies::class, 'add']);
});
2023-12-04 19:00:21 -03:00
$app->post('[/]', [Ventas::class, 'edit']);
$app->get('[/]', [Ventas::class, 'get']);
});