En este artículo se aplica a Microsoft Dynamics NAV para todas las configuraciones regionales.
Síntomas
En Microsoft Dynamics NAV, cuando intenta crear una orden de venta en moneda extranjera, si la Fecha de registro predeterminado está establecido en "Sin fecha", el sistema no puede validar el tipo de cambio. Por lo tanto, recibirá el siguiente mensaje de error:
No hay ningún tipo de cambio de divisa en el filtro.
Además, no puede imprimir el informe de confirmación del pedido (205).
Este problema se produce en los siguientes productos:
-
Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
-
Microsoft Dynamics NAV 2009 R2
Solución
Información de la revisión
Ahora hay una revisión compatible de Microsoft. Sin embargo, sólo se diseñó para corregir el problema que se describe en este artículo. Aplíquela sólo a sistemas que experimenten este problema específico. Esta revisión puede ser sometida a comprobaciones adicionales. Por lo tanto, si no se ve muy afectado por este problema, recomendamos que espere al próximo service pack de Microsoft Dynamics NAV 2009 o la próxima versión de Microsoft Dynamics NAV que contenga esta revisión.
Nota: En casos especiales, los costos derivados normalmente de las llamadas pueden cancelarse si un profesional de soporte técnico de Microsoft Dynamics y productos relacionados de soporte determina que una actualización específica resolverá el problema. Los costos habituales de soporte se aplicarán a las preguntas de soporte técnico adicionales y problemas que no guarden relación con la actualización en cuestión.
Información sobre la instalación
Microsoft proporciona ejemplos de programación únicamente con fines ilustrativos, sin ninguna garantía expresa o implícita. Esto incluye, pero no se limita, a las garantías implícitas de comerciabilidad o idoneidad para un propósito particular. Este artículo asume que está familiarizado con el lenguaje de programación que se muestra y con las herramientas que se utilizan para crear y depurar procedimientos. Los ingenieros de soporte técnico de Microsoft pueden explicarle la funcionalidad de un determinado procedimiento, pero no modificarán estos ejemplos para ofrecer mayor funcionalidad ni crearán procedimientos que cumplan sus requisitos específicos.
Nota: Antes de instalar este hotfix, compruebe que todos los usuarios del cliente Microsoft Navision han salido del sistema. Esto incluye a los usuarios del cliente Microsoft Navision Application Services (NAS). Debe ser el único usuario del cliente conectado cuando implemente este hotfix.
Para implementar esta revisión, debe tener una licencia de desarrollador.
Recomendamos que la cuenta de usuario en la ventana Conexiones Windows o en la ventana Conexiones base de datos se asigne el identificador de rol "SUPER". Si la cuenta de usuario no se puede asignar el identificador de rol "SUPER", debe comprobar que la cuenta de usuario tiene los permisos siguientes:
-
El permiso de modificación para el objeto que se va a cambiar.
-
El permiso de ejecución para el objeto System Object ID 5210 y System Object ID 9015 del objeto.
Nota: No es necesario tener derechos para los almacenes de datos a menos que deba realizar reparaciones de datos.
Cambios de código
Nota: Siempre pruebe correcciones de código en un entorno controlado antes de aplicar las revisiones a los equipos de producción.
Para resolver este problema, siga estos pasos:
-
Cambie el código en la función SalesHeaderExchDate en el módulo de Gestión de ventas precio Calc (7000) como sigue:
Código existente...WITH SalesHeader DO BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT("Posting Date");
// End of the deleted lines.
END;
...Código de sustitución
...WITH SalesHeader DO BEGIN
// Add the following lines.
IF "Posting Date" <>0D THEN
EXIT("Posting Date");
EXIT(WORKDATE);
// End of the added lines.
END;
... -
Cambie el código en la función PurchHeaderExchDate en la de compra. Precio gestión Calc Codeunit (7010) como sigue:
Código existente...WITH PurchHeader DO BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT("Posting Date");
// End of the deleted lines.
END;
...Código de sustitución
...WITH PurchHeader DO BEGIN
// Add the following lines.
IF "Posting Date" <> 0D THEN
EXIT("Posting Date");
EXIT(WORKDATE);
// End of the added lines.
END;
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (111) en el formulario de Pedido de ventas (42) de la siguiente manera:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (107) en el formulario Facturas venta (43) como sigue:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (91) en el formulario de Nota de crédito de ventas (44) como sigue:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (119) en el formulario de Pedido de compra (50) de la siguiente manera:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (104) en el formulario de la Factura de compra (51) de la siguiente manera:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (91) en forma de Abono de compra (52) como sigue:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (91) en el formulario de Pedido de devolución de ventas (6630) como sigue:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código del disparador OnAssistEdit en el campo de Código de divisa (91) en el formulario de Pedido de devolución de compra (6640) como sigue:
Código existente...CLEAR(ChangeExchangeRate);
// Delete the following line.
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date");
// End of the deleted line.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
...Código de sustitución
...CLEAR(ChangeExchangeRate);
// Add the following lines.
IF "Posting Date" <> 0D THEN
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor","Posting Date")
ELSE
ChangeExchangeRate.SetParameter("Currency Code","Currency Factor",WORKDATE);
// End of the added lines.
IF ChangeExchangeRate.RUNMODAL = ACTION::OK THEN BEGIN
VALIDATE("Currency Factor",ChangeExchangeRate.GetParameter);
CurrForm.UPDATE;
END;
CLEAR(ChangeExchangeRate);
... -
Cambie el código en la función UpdateCurrencyFactor en la tabla Sales Header (36) de la siguiente manera:
Código existente...IF "Currency Code" <>'' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::Quote,"Document Type"::"Blanket Order"]) AND
("Posting Date" = 0D)
THEN
CurrencyDate := WORKDATE
ELSE
CurrencyDate := "Posting Date";
// End of the deleted lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
...Código de sustitución
...IF "Currency Code" <> '' THEN BEGIN
// Add the following lines.
IF "Posting Date" <> 0D THEN
CurrencyDate := "Posting Date"
ELSE
CurrencyDate := WORKDATE;
// End of the added lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
... -
Cambie el código en la función GetDate en la tabla Línea venta (37) como sigue:
Código existente...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(SalesHeader."Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT(SalesHeader."Posting Date");
// End of the deleted lines.
...Código de sustitución
...// Add the following lines.
IF SalesHeader."Posting Date" <> 0D THEN
EXIT(SalesHeader."Posting Date");
EXIT(WORKDATE);
// End of the added lines.
... -
Cambie el código en la función UpdateCurrencyFactor de la tabla Purchase Header (38) como sigue:
Código existente...IF "Currency Code" <> '' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::Quote,"Document Type"::"Blanket Order"]) AND
("Posting Date" = 0D)
THEN
CurrencyDate := WORKDATE
ELSE
CurrencyDate := "Posting Date";
// End of the deleted lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
...Código de sustitución
...IF "Currency Code"<>'' THEN BEGIN
// Add the following lines.
IF "Posting Date" <> 0D THEN
CurrencyDate := "Posting Date"
ELSE
CurrencyDate := WORKDATE;
// End of the added lines.
"Currency Factor" := CurrExchRate.ExchangeRate(CurrencyDate,"Currency Code");
END ELSE
"Currency Factor" := 0;
... -
Cambie el código en la función GetDate en la tabla Línea compra (39) como sigue:
Código existente...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(PurchHeader."Posting Date" = 0D)
THEN
EXIT(WORKDATE);
EXIT(PurchHeader."Posting Date")
// End of the deleted lines.
...Código de sustitución
...// Add the following lines.
IF PurchHeader."Posting Date"<>0D THEN
EXIT(PurchHeader."Posting Date");
EXIT(WORKDATE);
// End of the added lines.
... -
Cambie el código en la función RoundAmount de la codeunit Sales-Post (80) como sigue:
Código existente...IF SalesHeader."Currency Code" <>'' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(SalesHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
UseDate := WORKDATE
ELSE
UseDate := SalesHeader."Posting Date";
...Código de sustitución
...IF SalesHeader."Currency Code" <>'' THEN BEGIN
// Add the following line.
IF (SalesHeader."Posting Date" = 0D) THEN
// End of the added line.
UseDate := WORKDATE
ELSE
UseDate := SalesHeader."Posting Date";
... -
Cambie el código de la función RoundAmount en la Purch-Post codeunit (90) como se indica a continuación:
Código existente...IF PurchHeader."Currency Code" <>'' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(PurchHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
Usedate := WORKDATE
ELSE
Usedate := PurchHeader."Posting Date";
...Código de sustitución
...IF PurchHeader."Currency Code"<> '' THEN BEGIN
// Add the following line.
IF (PurchHeader."Posting Date" = 0D) THEN
// End of the added line.
Usedate := WORKDATE
ELSE
Usedate := PurchHeader."Posting Date";
... -
Cambie el código en la función UpdateHeaderInfo en el formulario de Estadísticas pedido ventas (402) como sigue:
Código existente...IF "Prices Including VAT" THEN
TotalSalesLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalSalesLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <> '' THEN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
// End of the deleted lines.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
...Código de sustitución
...IF "Prices Including VAT" THEN
TotalSalesLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalSalesLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <>'' THEN
// Add the following line.
IF "Posting Date" = 0D THEN
// End of the added line.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
... -
Cambie el código en la función UpdateHeaderInfo en el formulario de Estadísticas de la orden de compra (403) como sigue:
Código existente...IF "Prices Including VAT" THEN
TotalPurchLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalPurchLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <> '' THEN BEGIN
// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
("Posting Date" = 0D)
THEN
// End of the deleted lines.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
...Código de sustitución
...IF "Prices Including VAT" THEN
TotalPurchLineLCY[IndexNo].Amount := TotalAmount2[IndexNo]
ELSE
TotalPurchLineLCY[IndexNo].Amount := TotalAmount1[IndexNo];
IF "Currency Code" <> '' THEN BEGIN
// Add the following line.
IF "Posting Date" = 0D THEN
// End of the added line.
UseDate := WORKDATE
ELSE
UseDate := "Posting Date";
... -
Cambie el código en la función CalculateInvoiceDiscount de la codeunit Sales Calcular descuento (60) como sigue:
Código existente...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(SalesHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := SalesHeader."Posting Date";
...Código de sustitución
...// Add the following line.
IF SalesHeader."Posting Date" = 0D THEN
// End of the added line.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := SalesHeader."Posting Date";
... -
Cambie el código de la función CalculateInvoiceDiscount en la Purch-Calc.Discount codeunit (70) como sigue:
Código existente...// Delete the following lines.
IF ("Document Type" IN ["Document Type"::"Blanket Order","Document Type"::Quote]) AND
(PurchHeader."Posting Date" = 0D)
THEN
// End of the deleted lines.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := PurchHeader."Posting Date";
...Código de sustitución
...// Add the following line.
IF PurchHeader."Posting Date" = 0D THEN
// End of the added line.
CurrencyDate := WORKDATE
ELSE
CurrencyDate := PurchHeader."Posting Date";
...
Requisitos previos
Debe tener uno de los siguientes productos instalados para aplicar esta revisión:
-
Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
-
Microsoft Dynamics NAV 2009 R2
Información de eliminación
No se puede quitar este hotfix.
Estado
Microsoft ha confirmado que se trata de un problema de los productos de Microsoft que se enumeran en la sección "Aplicable a".
Referencias
DynamicsNAV VSTF SE: 237796, 245981, 254036
Nota: Es un artículo "Publicación rápida" creado directamente desde dentro de la organización de soporte técnico de Microsoft. La información contenida en este documento se proporciona como está en respuesta a nuevos problemas. Como consecuencia de la velocidad en la puesta a disposición, los materiales pueden incluir errores tipográficos y podrán revisarse en cualquier momento sin previo aviso. Para obtener información adicional, consulte Condiciones de uso.