funcion/arreglos-ollas #50
1 changed files with 4 additions and 2 deletions
|
@ -133,10 +133,12 @@ class GrupoDeCompra extends Model
|
|||
*/
|
||||
public function exportarPedidosAPdf()
|
||||
{
|
||||
$subpedidos = $this->pedidosAprobados();
|
||||
$fecha = now()->format('Y-m-d');
|
||||
$filepath = $this->nombre . '-' . $fecha . '.pdf';
|
||||
PdfHelper::exportarPedidos($filepath, $subpedidos);
|
||||
$pedidoOllas = $this->subpedidos
|
||||
->where('tipo_pedido_id', '=', TipoPedido::firstOrCreate(['nombre' => 'olla'])->id);
|
||||
$pedidos = $this->pedidosAprobados()->concat($pedidoOllas);
|
||||
PdfHelper::exportarPedidos($filepath, $pedidos);
|
||||
}
|
||||
|
||||
function pedidoParaPdf(): array
|
||||
|
|
Loading…
Add table
Reference in a new issue