Arreglos en resource
This commit is contained in:
		
							parent
							
								
									354079519a
								
							
						
					
					
						commit
						56eb59ddeb
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -14,17 +14,16 @@ class SubpedidoResource extends JsonResource | |||
|      */ | ||||
|     public function toArray($request) | ||||
|     { | ||||
|         $total = $this->total(); | ||||
|         return [ | ||||
|             'id' => $this->id, | ||||
|             'nombre' => $this->nombre, | ||||
|             'grupo_de_compra' => $this->grupoDeCompra, | ||||
|             'productos' => $this->productos, | ||||
|             'aprobado' => (bool) $this->aprobado, | ||||
|             'total' => $total, | ||||
|             'total' => $this->total(), | ||||
|             'total_transporte' => $this->totalTransporte(), | ||||
|             'cantidad_transporte' => number_format($this->cantidadTransporte(),0), | ||||
|             'total_menos_devoluciones' => $total - $this->devoluciones_total, | ||||
|             'total_sin_devoluciones' => $this->totalSinDevoluciones(), | ||||
|             'devoluciones_total' => $this->devoluciones_total, | ||||
|             'devoluciones_notas' => $this->devoluciones_notas | ||||
|         ]; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue