diff --git a/PROYECTO/ipdir/ipprmt020.4gl b/PROYECTO/ipdir/ipprmt020.4gl index b4da779..de792cd 100644 --- a/PROYECTO/ipdir/ipprmt020.4gl +++ b/PROYECTO/ipdir/ipprmt020.4gl @@ -509,8 +509,7 @@ FUNCTION entradas() IF descRepetido IS NOT NULL THEN CALL fgl_winmessage( "Item repetido", - "No se puede repetir el item: -" || descRepetido CLIPPED, + "No se puede repetir el item:" || ASCII 10 || descRepetido CLIPPED, "stop") CONTINUE DIALOG END IF @@ -795,23 +794,33 @@ END FUNCTION # Aviso corto de item repetido (codigo y descripcion recortada). FUNCTION avisoRepetido(p) DEFINE p INT - DEFINE texto, desc STRING + DEFINE texto, descr, msj STRING - LET desc = arr_iptb58[p].descripcion CLIPPED - IF desc.getLength() > 35 THEN - LET desc = desc.subString(1, 35) + LET descr = arr_iptb58[p].descripcion CLIPPED + IF descr IS NULL THEN + LET descr = "" END IF - LET texto = arr_iptb58[p].cod_n USING "&&&&", "-", - arr_iptb58[p].cod_grupo USING "&&&&", "-", - arr_iptb58[p].cod_tipo USING "&&&&", "-", - arr_iptb58[p].cod_sec USING "&&&&&&" - CALL fgl_winmessage( - "Item repetido", - "Este item ya esta en el detalle: -" || texto || " -" - || desc, - "stop") + IF descr.getLength() > 35 THEN + LET descr = descr.subString(1, 35) + END IF + LET texto = "" + IF arr_iptb58[p].cod_n IS NOT NULL THEN + LET texto = texto || (arr_iptb58[p].cod_n USING "&&&&") + END IF + IF arr_iptb58[p].cod_grupo IS NOT NULL THEN + LET texto = texto || "-" || (arr_iptb58[p].cod_grupo USING "&&&&") + END IF + IF arr_iptb58[p].cod_tipo IS NOT NULL THEN + LET texto = texto || "-" || (arr_iptb58[p].cod_tipo USING "&&&&") + END IF + IF arr_iptb58[p].cod_sec IS NOT NULL THEN + LET texto = texto || "-" || (arr_iptb58[p].cod_sec USING "&&&&&&") + END IF + LET msj = "Este item ya esta en el detalle:" || ASCII 10 || texto + IF descr.getLength() > 0 THEN + LET msj = msj || ASCII 10 || descr + END IF + CALL fgl_winmessage("Item repetido", msj, "stop") END FUNCTION # Deja la fila p sin item para volver a escribirlo.