Arreglado bug de bonos de ollas
This commit is contained in:
nathalie 2023-03-20 21:29:12 -03:00
commit 13a445ef64
3 changed files with 8 additions and 20 deletions

View file

@ -41,7 +41,7 @@ class GrupoDeCompra extends Model
} }
//Asume que los productos están gruadados en orden de fila //Asume que los productos están gruadados en orden de fila
private function obtenerTemplateDeFilasVacias(){ public function obtenerTemplateDeFilasVacias(){
$productosFilaID = Producto::productosFilaID(); $productosFilaID = Producto::productosFilaID();
$productosIDNombre = Producto::productosIDNombre(); $productosIDNombre = Producto::productosIDNombre();
$num_fila = 1; $num_fila = 1;
@ -64,7 +64,7 @@ class GrupoDeCompra extends Model
$registros = $csv->getRecords(); $registros = $csv->getRecords();
foreach($registros as $key => $registro) foreach($registros as $key => $registro)
if ($registro[0] == 'T') return $key+1; if ($registro[0] == 'T') return $key;
throw new Exception('No hay bono de transporte'); throw new Exception('No hay bono de transporte');
} }

12
composer.lock generated
View file

@ -773,16 +773,16 @@
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"version": "2.4.3", "version": "2.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "67c26b443f348a51926030c83481b85718457d3d" "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", "url": "https://api.github.com/repos/guzzle/psr7/zipball/3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
"reference": "67c26b443f348a51926030c83481b85718457d3d", "reference": "3cf1b6d4f0c820a2cf8bcaec39fc698f3443b5cf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -872,7 +872,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/2.4.3" "source": "https://github.com/guzzle/psr7/tree/2.4.4"
}, },
"funding": [ "funding": [
{ {
@ -888,7 +888,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-10-26T14:07:24+00:00" "time": "2023-03-09T13:19:02+00:00"
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",

View file

@ -37,16 +37,4 @@
</tr> </tr>
@endif @endif
@endforeach @endforeach
@foreach($subpedido->productos as $producto)
@if($producto->bono)
<tr>
<td>
{{ $producto->nombre }}
</td>
<td style="text-align: center">
{{ $producto->pivot->cantidad }}
</td>
</tr>
@endif
@endforeach
</table> </table>