feature/grabar-factura #11

Merged
aldarien merged 14 commits from feature/grabar-factura into develop 2025-02-04 10:37:34 -03:00
7 changed files with 205 additions and 141 deletions
Showing only changes of commit bf054c22c2 - Show all commits

View File

@ -18,11 +18,11 @@ class Facturas extends Controller
$output = [ $output = [
'input' => $data, 'input' => $data,
'factura' => null, 'factura' => null,
'saved' => false 'success' => false
]; ];
try { try {
$output['factura'] = $facturaService->add($data); $output['factura'] = $facturaService->add($data);
$output['saved'] = true; $output['success'] = true;
} catch (Implement\Exception\EmptyResult) { } catch (Implement\Exception\EmptyResult) {
$output['error'] = 'No se pudo agregar la factura'; $output['error'] = 'No se pudo agregar la factura';
return $this->withJson($response, $output, 400); return $this->withJson($response, $output, 400);