mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/impresion_titulos' into 'main'
Fix/impresion titulos See merge request jjimenez/safekat!783
This commit is contained in:
@ -283,7 +283,6 @@ class EtiquetasTitulosService
|
||||
array_push($data['grupos'], [
|
||||
]);
|
||||
|
||||
$prefix = 1;
|
||||
$lineas = array_filter($etiquetas_lineas, function ($linea) use ($caja) {
|
||||
return $linea->numero_caja == $caja;
|
||||
});
|
||||
@ -313,12 +312,12 @@ class EtiquetasTitulosService
|
||||
|
||||
|
||||
$data['grupos'][$index_etiqueta][] = [
|
||||
'prefix' => $caja,
|
||||
'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,
|
||||
];
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ class ImpresoraEtiquetaService extends BaseService
|
||||
|
||||
// Crear variables específicas del grupo
|
||||
foreach ($grupo as $libro) {
|
||||
$prefix = $libro['prefix'];
|
||||
$prefix = $libro['prefix']==1 ? '' : $libro['prefix'];
|
||||
|
||||
$variables = [
|
||||
"titulo$prefix" => $libro['titulo'],
|
||||
|
||||
@ -64,6 +64,11 @@ class EtiquetaEdit {
|
||||
}
|
||||
});
|
||||
|
||||
if (ids.length == 0) {
|
||||
popErrorAlert('Seleccione al menos una linea');
|
||||
return;
|
||||
}
|
||||
|
||||
$.post(
|
||||
'/etiquetasTitulos/imprimirEtiquetas',
|
||||
{
|
||||
@ -283,6 +288,9 @@ class EtiquetaEdit {
|
||||
}
|
||||
|
||||
_addLineas() {
|
||||
|
||||
const self = this;
|
||||
|
||||
if (this.buscador.item.select2('data').length > 0) {
|
||||
|
||||
let maxUnidades = 0;
|
||||
|
||||
Reference in New Issue
Block a user