refactor/totales #41

Merged
atasistro merged 16 commits from refactor/totales into master 2025-04-13 23:22:10 -03:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 45757f0ae1 - Show all commits

View file

@ -19,11 +19,11 @@ class GrupoDeCompraResource extends JsonResource
'nombre' => $this->nombre,
'devoluciones_habilitadas' => $this->devoluciones_habilitadas,
'pedidos' => SubpedidoResource::collection($this->subpedidos),
'total_a_recaudar' => $this->totalARecaudar(),
'total_barrial' => $this->totalBarrial(),
'total_devoluciones' => $this->totalDevoluciones(),
'total_a_transferir' => $this->totalATransferir(),
'total_transporte' => $this->totalTransporte(),
'total_a_recaudar' => number_format($this->totalARecaudar(),2),
'total_barrial' => number_format($this->totalBarrial(),2),
'total_devoluciones' => number_format($this->totalDevoluciones(),2),
'total_a_transferir' => number_format($this->totalATransferir(),2),
'total_transporte' => number_format($this->totalTransporte(),0),
'cantidad_transporte' => number_format($this->cantidadTransporte(),0),
];
}

View file

@ -20,11 +20,11 @@ class SubpedidoResource extends JsonResource
'grupo_de_compra' => $this->grupoDeCompra,
'productos' => $this->productos,
'aprobado' => (bool) $this->aprobado,
'total' => $this->total(),
'total_transporte' => $this->totalTransporte(),
'total' => number_format($this->total(),2),
'total_transporte' => number_format($this->totalTransporte(),0),
'cantidad_transporte' => number_format($this->cantidadTransporte(),0),
'total_sin_devoluciones' => $this->totalSinDevoluciones(),
'devoluciones_total' => $this->devoluciones_total,
'total_sin_devoluciones' => number_format($this->totalSinDevoluciones(),2),
'devoluciones_total' => number_format($this->devoluciones_total,2),
'devoluciones_notas' => $this->devoluciones_notas
];
}