diff --git a/ci4/app/Services/EtiquetasTitulosService.php b/ci4/app/Services/EtiquetasTitulosService.php index af9c579a..35d617a8 100644 --- a/ci4/app/Services/EtiquetasTitulosService.php +++ b/ci4/app/Services/EtiquetasTitulosService.php @@ -312,12 +312,12 @@ class EtiquetasTitulosService $data['grupos'][$index_etiqueta][] = [ - 'prefix' => $lineaCounter, + 'prefix' => $lineaCounter+1, 'titulo' => mb_substr($datos_etiqueta->titulo, 0, 40), 'cantidad' => $linea->unidades, 'tirada' => $datos_etiqueta->total_tirada, 'ean' => str_replace('-', '', $datos_etiqueta->isbn), - 'npedido' => $datos_etiqueta->id, + 'npedido' => $datos_etiqueta->id_pedido, 'refcliente' => $datos_etiqueta->referencia_cliente, ]; diff --git a/ci4/app/Services/ImpresoraEtiquetaService.php b/ci4/app/Services/ImpresoraEtiquetaService.php index 88e4e4f2..fa823e24 100755 --- a/ci4/app/Services/ImpresoraEtiquetaService.php +++ b/ci4/app/Services/ImpresoraEtiquetaService.php @@ -96,7 +96,7 @@ class ImpresoraEtiquetaService extends BaseService // Crear variables específicas del grupo foreach ($grupo as $libro) { - $prefix = $libro['prefix']==0 ? '' : $libro['prefix']; + $prefix = $libro['prefix']==1 ? '' : $libro['prefix']; $variables = [ "titulo$prefix" => $libro['titulo'],