Guardar factura

This commit is contained in:
Juan Pablo Vial
2025-02-03 22:17:57 -03:00
parent 71615050f3
commit 59a28a353b
11 changed files with 296 additions and 122 deletions

View File

@ -64,7 +64,8 @@ class Factura extends Ideal\Service
$client = $this->personaService->add($data['cliente']);
$data['cliente_rut'] = $client->rut;
unset($data['cliente']);
$factura = $this->facturaRepository->save($this->facturaRepository->create($data));
$factura = $this->facturaRepository->create($data);
$factura = $this->facturaRepository->save($factura);
$tipo = $this->tipoRepository->fetchByDescripcion('generada');
$this->estadoRepository->save($this->estadoRepository->create([
'factura_id' => $factura->id,