Mostrar correctamente venta desistida
This commit is contained in:
@ -14,13 +14,13 @@ class Venta
|
||||
protected Repository\Venta\TipoEstadoVenta $tipoEstadoVentaRepository,
|
||||
protected Repository\Venta\Credito $creditoRepository,
|
||||
protected Repository\Venta\Escritura $escrituraRepository,
|
||||
protected Repository\Venta\Pago $pagoRepository,
|
||||
protected Venta\Propietario $propietarioService,
|
||||
protected Venta\Propiedad $propiedadService,
|
||||
protected Venta\Pie $pieService,
|
||||
protected Venta\Subsidio $subsidioService,
|
||||
protected Venta\Credito $creditoService,
|
||||
protected Venta\BonoPie $bonoPieService,
|
||||
protected Venta\Pago $pagoService,
|
||||
protected Money $moneyService
|
||||
) {}
|
||||
|
||||
@ -384,8 +384,7 @@ class Venta
|
||||
{
|
||||
try {
|
||||
if ($this->validarData($data, ['fecha', 'devolucion'])) {
|
||||
$pago = $this->pagoRepository->create(['fecha' => $data['fecha'], 'valor' => $data['devolucion']]);
|
||||
$pago = $this->pagoRepository->save($pago);
|
||||
$pago = $this->pagoService->add(['fecha' => $data['fecha'], 'valor' => $data['devolucion']]);
|
||||
$this->ventaRepository->edit($venta, ['resciliacion' => $pago->id]);
|
||||
}
|
||||
$tipoEstado = $this->tipoEstadoVentaRepository->fetchByDescripcion('desistida');
|
||||
|
Reference in New Issue
Block a user