Compare commits

..

No commits in common. "4e7e46f92dabc13b8954aff66c464c0d42779a9f" and "c53e342f54f456804f6e7faddc352891c2770c15" have entirely different histories.

1 changed files with 4 additions and 7 deletions

View File

@ -37,9 +37,8 @@ class GrupoDeCompra extends Model
$total = $total + $cantidad; $total = $total + $cantidad;
} }
$fila = Producto::productosIdFila()[$id]; $fila = Producto::productosIdFila()[$id];
$planilla[$fila][$i-1] = $total; $planilla[$fila][$i+1] = $total;
} }
$planilla[GrupoDeCompra::obtenerFilaDeBonoTransporte()][$i-1] = $gdc->calcularCantidadBDT();
} }
array_splice($planilla, 0, 0, array($barrios)); array_splice($planilla, 0, 0, array($barrios));
return $planilla; return $planilla;
@ -225,9 +224,7 @@ class GrupoDeCompra extends Model
} }
public static function exportarTodosLosPedidosEnCSV(){ public static function exportarTodosLosPedidosEnCSV(){
$gdcs = GrupoDeCompra::all()->filter(function ($grupoDeCompra) { $gdcs = GrupoDeCompra::all();
return !$grupoDeCompra->pedidosAprobados()->isEmpty();
});
$planilla = GrupoDeCompra::obtenerTemplateDeFilasVacias($gdcs->count()); $planilla = GrupoDeCompra::obtenerTemplateDeFilasVacias($gdcs->count());
$planilla = self::getPlanilla($gdcs, $planilla); $planilla = self::getPlanilla($gdcs, $planilla);