使用 Microsoft 登录
登录或创建帐户。
你好,
使用其他帐户。
你有多个帐户
选择要登录的帐户。

本文对所有国家/地区和语言的所有语言环境的 Microsoft 动态导航。

症状

当您创建服务合同 (不预付) 并更改发票过帐在 Microsoft Dynamics 导航 2009 年之前时,没有服务的分类帐条目和总帐之间的数据不一致。下列产品中发生此问题︰

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics 导航 2009 Service Pack 1

解决方案

修补程序信息

受支持的修补程序现已从 Microsoft 推出。然而,它仅用于纠正本文中描述的问题。它仅应用于正经历此特定问题的系统。此修补程序可能会接受进一步的测试。因此,如果这个问题没有对您造成严重的影响,我们建议您等待下一个 Microsoft Dynamics 导航 2009 服务包 或包含此修复程序的下一步的 Microsoft Dynamics 导航版本。

注意: 在特殊情况下,可免收的支持电话,可免收如果技术支持专业人员对 Microsoft Dynamics 和相关的产品的费用确定某个特定的更新能够解决您的问题。照常收取支持费用将应用于其他支持问题和对于特定更新无法解决的问题。


安装信息

Microsoft 提供的编程示例仅用于说明,没有任何明示或暗示的担保。这包括但不限于适销性或特定用途适用性的暗示担保。本文假定您熟悉所演示的编程语言和用于创建和调试过程的工具。Microsoft 的支持工程师可以帮助解释某个特定过程的功能。但是,他们不会修改这些示例以提供额外的功能或构建过程以满足您的特定要求。

注意:安装此修复程序之前,请验证所有 Microsoft Navision 客户端用户都注销系统。这包括 Microsoft Navision 应用程序服务 (NAS) 客户端的用户。要实现此修补程序时,在登录的唯一客户端用户。

若要实现此修补程序,必须使用开发人员许可证。

我们建议在 Windows 登录窗口或数据库登录窗口中的用户帐户将分配该"超级"角色 id。如果不能将用户帐户分配成"超级"角色 ID,则必须验证用户帐户具有下列权限:

  • 您将更改该对象的修改权限。

  • 为系统对象 ID ™ 5210对象和系统对象 ID 9015对象的 Execute 权限。



注意:您不需要具有对数据存储区的权限,除非您需要执行数据修复。

代码更改

注意:始终测试代码修复在受控环境中应用之前与您的生产计算机的修补程序。
若要解决此问题,请执行以下步骤:

  1. 更改文档维度表 (357) 中的代码,如下所示︰
    现有代码 1

    ...      Text005@1009 : TextConst 'ENU=Canceled.';
    Text006@1010 : TextConst 'ENU=You may have changed a dimension. Some lines are already shipped. When you post the line with the changed dimension to the general ledger, amounts on the Inventory Interim account will be out of balance when reported per dimension.\\Do you want to update the lines?';

    PROCEDURE UpdateGlobalDimCode@25(GlobalDimCodeNo@1000 : Integer;"Table ID"@1001 : Integer;"Document Type"@1002 : Option;"Document No."@1003 : Code[20];"Line No."@1004 : Integer;NewDimValue@1005 : Code[20]);
    ...

    替换代码 1

    ...      Text005@1009 : TextConst 'ENU=Canceled.';
    Text006@1010 : TextConst 'ENU=You may have changed a dimension. Some lines are already shipped. When you post the line with the changed dimension to the general ledger, amounts on the Inventory Interim account will be out of balance when reported per dimension.\\Do you want to update the lines?';
    Text007@1011 : TextConst 'ENU=You cannot change the dimension because the document is based on a service contract.';

    PROCEDURE UpdateGlobalDimCode@25(GlobalDimCodeNo@1000 : Integer;"Table ID"@1001 : Integer;"Document Type"@1002 : Option;"Document No."@1003 : Code[20];"Line No."@1004 : Integer;NewDimValue@1005 : Code[20]);
    ...

    现有代码 2

    ...    PROCEDURE VerifyLineDim@5(VAR DocDim@1000 : Record 357);
    VAR
    SalesLine@1001 : Record 37;
    PurchaseLine@1002 : Record 39;
    BEGIN
    CASE "Table ID" OF
    DATABASE::"Sales Line":
    BEGIN
    IF SalesLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
    IF (SalesLine."Qty. Shipped Not Invoiced" <> 0) OR (SalesLine."Return Rcd. Not Invd." <> 0) THEN
    IF NOT CONFIRM(Text004,TRUE,SalesLine.TABLECAPTION) THEN
    ERROR(Text005)
    END;
    DATABASE::"Purchase Line":
    BEGIN
    IF PurchaseLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
    IF (PurchaseLine."Qty. Rcd. Not Invoiced" <> 0) OR (PurchaseLine."Return Qty. Shipped Not Invd." <> 0) THEN

    IF NOT CONFIRM(Text004,TRUE,PurchaseLine.TABLECAPTION) THEN
    ERROR(Text005)
    END;
    END;
    END;
    ...

    替换代码 2

    ...    PROCEDURE VerifyLineDim@5(VAR DocDim@1000 : Record 357);
    VAR
    SalesLine@1001 : Record 37;
    PurchaseLine@1002 : Record 39;
    ServiceHeader@1003 : Record 5900;
    ServiceLine@1004 : Record 5902;
    BEGIN
    CASE "Table ID" OF
    DATABASE::"Sales Line":
    BEGIN
    IF SalesLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
    IF (SalesLine."Qty. Shipped Not Invoiced" <> 0) OR (SalesLine."Return Rcd. Not Invd." <> 0) THEN
    IF NOT CONFIRM(Text004,TRUE,SalesLine.TABLECAPTION) THEN
    ERROR(Text005)
    END;
    DATABASE::"Purchase Line":
    BEGIN
    IF PurchaseLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
    IF (PurchaseLine."Qty. Rcd. Not Invoiced" <> 0) OR (PurchaseLine."Return Qty. Shipped Not Invd." <> 0) THEN

    IF NOT CONFIRM(Text004,TRUE,PurchaseLine.TABLECAPTION) THEN
    ERROR(Text005)
    END;
    DATABASE::"Service Header":
    IF ServiceHeader.GET(DocDim."Document Type",DocDim."Document No.") AND (ServiceHeader."Contract No." <> '') THEN
    ERROR(Text007);
    DATABASE::"Service Line":
    IF ServiceLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN
    IF (ServiceLine."Contract No." <> '') THEN
    ERROR(Text007);
    END;
    END;
    ...

  2. 更改服务线该表 (5902) 中的代码,如下所示︰
    现有代码 1

    ...               IF (Quantity <> 0) AND ItemExists(xRec."No.") AND
    (("Spare Part Action" = "Spare Part Action"::"Component Replaced") OR
    ("Spare Part Action" = "Spare Part Action"::"Component Installed") OR
    ("Spare Part Action" = "Spare Part Action"::" "))
    THEN
    ReserveServLine.VerifyChange(Rec,xRec);
    END;

    OnDelete=VAR
    ...

    替换代码 1

    ...               IF (Quantity <> 0) AND ItemExists(xRec."No.") AND
    (("Spare Part Action" = "Spare Part Action"::"Component Replaced") OR
    ("Spare Part Action" = "Spare Part Action"::"Component Installed") OR
    ("Spare Part Action" = "Spare Part Action"::" "))
    THEN
    ReserveServLine.VerifyChange(Rec,xRec);
    IF "Document Type" = ServiceLine."Document Type"::Invoice THEN
    IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN
    ERROR(Text046);
    END;

    OnDelete=VAR
    ...

    现有代码 2

    ...    { 5   ;   ;Type                ;Option        ;OnValidate=BEGIN



    GetServHeader;

    TESTFIELD("Qty. Shipped Not Invoiced",0);
    ...

    替换代码 2

    ...    { 5   ;   ;Type                ;Option        ;OnValidate=BEGIN
    IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN
    ERROR(Text046);

    GetServHeader;
    ...

    现有代码 3

    ...    { 6   ;   ;No.                 ;Code20        ;TableRelation=IF (Type=CONST(" ")) "Standard Text"
    ELSE IF (Type=CONST(G/L Account)) "G/L Account"
    ELSE IF (Type=CONST(Item)) Item
    ELSE IF (Type=CONST(Resource)) Resource
    ELSE IF (Type=CONST(Cost)) "Service Cost";
    OnValidate=VAR
    ShowLocMessage@1000 : Boolean;
    BEGIN
    TESTFIELD("Qty. Shipped Not Invoiced",0);
    ...

    替换代码 3

    ...    { 6   ;   ;No.                 ;Code20        ;TableRelation=IF (Type=CONST(" ")) "Standard Text"
    ELSE IF (Type=CONST(G/L Account)) "G/L Account"
    ELSE IF (Type=CONST(Item)) Item
    ELSE IF (Type=CONST(Resource)) Resource
    ELSE IF (Type=CONST(Cost)) "Service Cost";
    OnValidate=VAR
    ShowLocMessage@1000 : Boolean;
    BEGIN
    IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN
    ERROR(Text046);

    TESTFIELD("Qty. Shipped Not Invoiced",0);
    ...

    现有代码 4

    ...    { 22  ;   ;Unit Price          ;Decimal       ;OnValidate=BEGIN
    GetServHeader;


    IF ("Unit Price" > ServHeader."Max. Labor Unit Price") AND
    ...

    替换代码 4

    ...    { 22  ;   ;Unit Price          ;Decimal       ;OnValidate=BEGIN
    GetServHeader;
    IF ("Appl.-to Service Entry" > 0) AND (CurrFieldNo <> 0) THEN
    ERROR(Text046,FIELDCAPTION("Unit Price"));
    IF ("Unit Price" > ServHeader."Max. Labor Unit Price") AND
    ...

    现有代码 5

    ...      Text043@1097 : TextConst 'ENU=You cannot change the value of the %1 field manually if %2 for this line is %3';
    Text044@1012 : TextConst 'ENU=Do you want to split the resource line and use it to create resource lines\for the other service items with divided amounts?';
    Text045@1099 : TextConst 'ENU=You cannot delete this service line because one or more service entries exist for this line.';
    ...

    替换代码 5

    ...      Text043@1097 : TextConst 'ENU=You cannot change the value of the %1 field manually if %2 for this line is %3';
    Text044@1012 : TextConst 'ENU=Do you want to split the resource line and use it to create resource lines\for the other service items with divided amounts?';
    Text045@1099 : TextConst 'ENU=You cannot delete this service line because one or more service entries exist for this line.';
    Text046@1100 : TextConst 'ENU=You cannot modify the document because it is based on a service contract.';
    ...

系统必备组件

您必须具有要应用此修补程序的安装以下产品之一︰

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics 导航 2009 Service Pack 1

删除信息

您不能删除此修补程序。

状态

Microsoft 已经确认这是“适用于”一节中列出的 Microsoft 产品中的问题。

注意:这是直接从创建 Microsoft 支持部门内的"快速发布"的文章。此处包含的信息是作为为了响应新出现的问题而提供的。由于以使其可用的速度,而材料可能包含印刷错误,恕不另行通知,随时可能进行修订。其他考虑因素,请参阅使用条款

需要更多帮助?

需要更多选项?

了解订阅权益、浏览培训课程、了解如何保护设备等。

社区可帮助你提出和回答问题、提供反馈,并听取经验丰富专家的意见。

此信息是否有帮助?

你对语言质量的满意程度如何?
哪些因素影响了你的体验?
按“提交”即表示你的反馈将用于改进 Microsoft 产品和服务。 你的 IT 管理员将能够收集此数据。 隐私声明。

谢谢您的反馈!

×