FIX: filter
This commit is contained in:
@ -35,7 +35,14 @@ class Resumen
|
||||
$ventas = $proyecto->ventas();
|
||||
$output = [];
|
||||
foreach ($ventas as $venta) {
|
||||
if (!in_array($venta, $output)) {
|
||||
$found = false;
|
||||
foreach ($output as $v) {
|
||||
if ($v->unidad()->descripcion == $venta->unidad()->descripcion) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
$output []= $venta;
|
||||
}
|
||||
}
|
||||
@ -129,7 +136,7 @@ class Resumen
|
||||
protected function buildLibro(Venta $venta, DateTimeInterface $up_to)
|
||||
{
|
||||
$pagos = $this->getPagos($venta, $up_to);
|
||||
$output = [' ', "Cuenta: Anticipos Dpto {$venta->unidad()->descripcion}"];
|
||||
$output = ['', "Cuenta: Anticipos Dpto {$venta->unidad()->descripcion}"];
|
||||
$debe = 0;
|
||||
$haber = 0;
|
||||
foreach ($pagos as $pago) {
|
||||
|
Reference in New Issue
Block a user