Compare commits
	
		
			2 commits
		
	
	
		
			7975528317
			...
			763fd3f646
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 763fd3f646 | |||
| 
							 | 
						89c9a85204 | 
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -22,7 +22,8 @@ class SubpedidoResource extends JsonResource
 | 
			
		|||
            'bonos_de_transporte' => $this->cantidadBDT(),
 | 
			
		||||
            'subtotal_bonos_de_transporte' => number_format($this->getSubtotalBDT(),2),
 | 
			
		||||
            'total' => number_format($this->getTotal(),2),
 | 
			
		||||
            'grupo_de_compra' => $this->grupoDeCompra
 | 
			
		||||
            'grupo_de_compra' => $this->grupoDeCompra,
 | 
			
		||||
            'productos' => $this->productos
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ class Subpedido extends Model
 | 
			
		|||
 | 
			
		||||
  public function productos()
 | 
			
		||||
  {
 | 
			
		||||
    return $this->belongsToMany('App\Producto')->withPivot(["cantidad"]);
 | 
			
		||||
    return $this->belongsToMany('App\Producto')->withPivot(["cantidad","total"]);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  //Bonos del MPS, Sororo, etc. NO devuelve bonos de transporte
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue