2023-07-24 20:55:26 -04:00
|
|
|
<?php
|
2023-10-19 18:20:37 -03:00
|
|
|
use Incoviba\Controller\API\Ventas;
|
2023-07-28 16:22:20 -04:00
|
|
|
|
2023-07-24 20:55:26 -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']);
|
|
|
|
});
|
2024-02-14 13:54:01 -03:00
|
|
|
$app->group('/by', function($app) {
|
|
|
|
$app->get('/unidad/{unidad_id}', [Ventas::class, 'unidad']);
|
2025-07-22 13:18:00 +00:00
|
|
|
$app->post('/unidades[/]', [Ventas::class, 'byUnidades']);
|
2024-02-14 13:54:01 -03:00
|
|
|
});
|
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']);
|
2023-07-24 20:55:26 -04:00
|
|
|
});
|
2023-08-08 23:53:49 -04:00
|
|
|
$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) {
|
2025-04-11 17:34:40 +00:00
|
|
|
$app->post('/edit[/]', [Ventas\Bonos::class, 'edit']);
|
2024-11-18 23:25:20 -03:00
|
|
|
$app->post('/add[/]', [Ventas\Bonos::class, 'add']);
|
|
|
|
});
|
2024-02-14 13:54:01 -03:00
|
|
|
$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']);
|
|
|
|
});
|
2024-02-14 13:54:01 -03:00
|
|
|
$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']);
|
2023-12-22 12:52:04 -03:00
|
|
|
$app->group('/desistir', function($app) {
|
|
|
|
$app->get('/eliminar[/]', [Ventas::class, 'insistir']);
|
|
|
|
$app->post('[/]', [Ventas::class, 'desistir']);
|
|
|
|
});
|
2024-07-04 15:42:10 -04:00
|
|
|
$app->group('/propietario', function($app) {
|
|
|
|
$app->put('/edit[/]', [Ventas::class, 'propietario']);
|
|
|
|
});
|
2025-07-22 13:18:00 +00:00
|
|
|
$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']);
|
2023-08-08 23:53:49 -04:00
|
|
|
$app->get('[/]', [Ventas::class, 'get']);
|
|
|
|
});
|