应用对象
Dynamics NAV 2009 Service Pack 1 Microsoft Dynamics NAV 5.0 Service Pack 1

本文适用于西班牙语区域设置 (Microsoft Dynamics NAV) 应用。

症状

假设在西班牙语版本的 Microsoft Dynamics NAV 的"VAT发布设置"对话框中选中了"欧盟服务"复选框。 生成 349 声明文件时,导出文件中的数量不正确。此问题出现在以下产品中:

  • 西班牙语版本的 Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

  • 西班牙语版本的 Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)

解决方案

修补程序信息

Microsoft 现已提供受支持的修补程序。 但是,它仅用于更正本文中所述的问题。 仅应用于遇到此特定问题的系统。 此修补程序可能会收到其他测试。 因此,如果不受此问题的严重影响,建议等待下一个 Microsoft Dynamics NAV 2009 Service Pack 或下一个包含此修补程序的 Microsoft Dynamics NAV 版本。 注意,在特殊情况下,如果 Microsoft Dynamics 技术支持专业人员和相关产品确定特定更新将解决你的问题,则通常针对支持呼叫产生的费用可能会被取消。 通常的支持费用将应用于其他支持问题和不符合特定更新条件的问题。

安装信息

Microsoft 仅提供用于演示的编程示例,而不提供明示或默示的担保。 这包括但不限于对特定用途的可操作性或适用性的默示保证。 本文假定你熟悉演示的编程语言以及用于创建和调试过程的工具。 Microsoft 支持工程师可以帮助解释特定过程的功能,但他们不会修改这些示例以提供附加功能或构造过程以满足您的特定要求。请注意,安装此修补程序之前,请验证所有 Microsoft Navision 客户端用户是否都注销系统。 这包括 Microsoft Navision 应用程序服务 (NAS) 客户端用户。 实施此修补程序时,应是唯一登录的客户端用户。若要实现此修补程序,必须具有开发人员许可证。建议为 Windows 登录窗口或数据库登录窗口中的用户帐户分配"SUPER"角色 ID。 如果无法为用户帐户分配"SUPER"角色 ID,则必须验证用户帐户是否具有以下权限:

  • 要更改的对象的"修改"权限。

  • 系统对象 ID 5210 对象和系统对象 ID 9015 对象的"执行"权限。

注意,除非必须执行数据修复,否则不需要拥有对数据存储的权利。

代码更改

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

  1. 将"生成 349 声明"报告中"数据项编号 5"部分中的代码更改为 (88) 如下所示: 现有代码 1

                                  BEGIN                                REPEAT                                  //Delete the following line.                                  VATInvSales.RESET;                                  VATInvSales.SETRANGE(VATInvSales.Type,VATInvSales.Type::Sale);                                  VATInvSales.SETRANGE(VATInvSales."Document Type",VATInvSales."Document Type"::Invoice);

    替换代码 1

                                  BEGIN                                REPEAT                                  //Add the follwing lines.                                  LastTransactionNo := 0;                                  VATInvSales.RESET;                                  VATInvSales.SETCURRENTKEY("Transaction No.");                                   //End of the lines.                                                                 VATInvSales.SETRANGE(VATInvSales.Type,VATInvSales.Type::Sale);                                  VATInvSales.SETRANGE(VATInvSales."Document Type",VATInvSales."Document Type"::Invoice);

    现有代码 2

                                              IF "VAT Registration No." <> '' THEN BEGIN                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              //Delete the following lines.                                              OpTriang := 'X';                                              AmountOpTri := AmountOpTri + AmountToIncludein349                                              //End of the lines.                                                                                       END ELSE BEGIN                                              OpTriang := 'X';

    替换代码 2

                                              IF "VAT Registration No." <> '' THEN BEGIN                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              //Add the following lines.                                              IF VATInvSales."Transaction No." <> LastTransactionNo THEN BEGIN                                                OpTriang := 'X';                                                AmountOpTri := AmountOpTri + AmountToIncludein349;                                              END;                                              //End of the lines.                                                                                       END ELSE BEGIN                                              OpTriang := 'X';

    现有代码 3

                                          // OpTriang := 'X';                                      // AmountOpTri := AmountOpTri + VATInvSales.Base;                                    UNTIL VATInvSales.NEXT = 0;                                  END;

    替换代码 3

                                          // OpTriang := 'X';                                      // AmountOpTri := AmountOpTri + VATInvSales.Base;                                      //Add the following line.                                      LastTransactionNo := VATInvSales."Transaction No.";                                    UNTIL VATInvSales.NEXT = 0;                                  END;

    现有代码 4

                                        UNTIL VATInvSales.NEXT = 0;                                  END;                                  //Delete the following line.                                  VATInvSales.RESET;                                  VATInvSales.SETRANGE(VATInvSales.Type,VATInvSales.Type::Sale);                                  VATInvSales.SETRANGE(VATInvSales."Document Type",VATInvSales."Document Type"::Invoice);

    替换代码 4

                                        UNTIL VATInvSales.NEXT = 0;                                  END;                                  //Add the following lines.                                  LastTransactionNo := 0;                                  VATInvSales.RESET;                                  VATInvSales.SETCURRENTKEY("Transaction No.");                                   //End of the lines.                                  VATInvSales.SETRANGE(VATInvSales.Type,VATInvSales.Type::Sale);                                  VATInvSales.SETRANGE(VATInvSales."Document Type",VATInvSales."Document Type"::Invoice);

    现有代码 5

                                              ((VATInvSales."Country/Region Code" = CountryCode) AND LocationDiffCountryCode) THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                           //Delete the following lines.                                           IF AmountToIncludein349 <> 0 THEN                                             NormalAmount := NormalAmount + AmountToIncludein349                                           ELSE                                           //End of the lines.                                             NormalAmount := NormalAmount + VATInvSales.Base;                                          END ELSE

    替换代码 5

                                              ((VATInvSales."Country/Region Code" = CountryCode) AND LocationDiffCountryCode) THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                           //Add the following lines.                                           IF AmountToIncludein349 <> 0 THEN BEGIN                                             IF VATInvSales."Transaction No." <> LastTransactionNo THEN                                               NormalAmount := NormalAmount + AmountToIncludein349;                                           END ELSE                                           //End of the lines.                                                                                     NormalAmount := NormalAmount + VATInvSales.Base;                                          END ELSE

    现有代码 6

                                          END;                                      // NormalAmount := NormalAmount + VATInvSales.Base;                                    UNTIL VATInvSales.NEXT = 0;                                  END;

    替换代码 6

                                          END;                                      // NormalAmount := NormalAmount + VATInvSales.Base;                                      //Add the following line.                                      LastTransactionNo := VATInvSales."Transaction No.";                                    UNTIL VATInvSales.NEXT = 0;                                  END;

    现有代码 7

                                      END;                                  //Delete the following line.                                  VATInvSales.RESET;                                  VATInvSales.SETRANGE(Type,VATInvSales.Type::Sale);                                  VATInvSales.SETRANGE("Document Type",VATInvSales."Document Type"::Invoice);

    替换代码 7

                                      END;                                  //Add the following lines.                                  LastTransactionNo := 0;                                   VATInvSales.RESET;                                  VATInvSales.SETCURRENTKEY("Transaction No.");                                   //End of the lines.                                  VATInvSales.SETRANGE(Type,VATInvSales.Type::Sale);                                  VATInvSales.SETRANGE("Document Type",VATInvSales."Document Type"::Invoice);

    现有代码 8

                                              ((VATInvSales."Country/Region Code" = CountryCode) AND LocationDiffCountryCode) THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                            //Delete the following lines.                                            IF AmountToIncludein349 <> 0 THEN                                              AmountEUService := AmountEUService + AmountToIncludein349                                            ELSE                                            //End of the lines.                                                                                       AmountEUService := AmountEUService + VATInvSales.Base;                                          END ELSE

    替换代码 8

                                              ((VATInvSales."Country/Region Code" = CountryCode) AND LocationDiffCountryCode) THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                            //Add the following lines.                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              IF VATInvSales."Transaction No." <> LastTransactionNo THEN                                                AmountEUService := AmountEUService + AmountToIncludein349;                                            END ELSE                                            //End of the lines.                                                                                       AmountEUService := AmountEUService + VATInvSales.Base;                                          END ELSE

    现有代码 9

                                            END;                                      END;                                    UNTIL VATInvSales.NEXT = 0;

    替换代码 9

                                            END;                                      END;                                      //Add the following line.                                      LastTransactionNo := VATInvSales."Transaction No.";                                    UNTIL VATInvSales.NEXT = 0;
  2. 更改"生成 349 声明"报告中"数据项编号 6"部分中的代码 (88) 如下所示: 现有代码 1

                                  BEGIN                                REPEAT                                  //Delete the following line.                                  VATInvPurch.RESET;                                  VATInvPurch.SETRANGE(VATInvPurch.Type,VATInvPurch.Type::Purchase);                                  VATInvPurch.SETRANGE(VATInvPurch."Document Type",VATInvPurch."Document Type"::Invoice);

    替换代码 1

                                  BEGIN                                REPEAT                                  //Add the following lines.                                  LastTransactionNo := 0;                                  VATInvPurch.RESET;                                  VATInvPurch.SETCURRENTKEY("Transaction No.");                                  //End of the lines.                                                            VATInvPurch.SETRANGE(VATInvPurch.Type,VATInvPurch.Type::Purchase);                                  VATInvPurch.SETRANGE(VATInvPurch."Document Type",VATInvPurch."Document Type"::Invoice);

    现有代码 2

                                              IF "VAT Registration No." <> '' THEN BEGIN                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              //Delete the following lines.                                              OpTriang := 'X';                                              AmountOpTri := AmountOpTri + AmountToIncludein349;                                              //End of the lines.                                                                                       END ELSE BEGIN                                              OpTriang := 'X';

    替换代码 2

                                              IF "VAT Registration No." <> '' THEN BEGIN                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              //Add the following lines.                                              IF VATInvPurch."Transaction No." <> LastTransactionNo THEN BEGIN                                                OpTriang := 'X';                                                AmountOpTri := AmountOpTri + AmountToIncludein349;                                              END;                                              //End of the lines.                                            END ELSE BEGIN                                              OpTriang := 'X';

    现有代码 3

                                          // OpTriang := 'X';                                      // AmountOpTri := AmountOpTri + VATInvPurch.Base;                                    UNTIL VATInvPurch.NEXT = 0;                                  END;

    替换代码 3

                                          // OpTriang := 'X';                                      // AmountOpTri := AmountOpTri + VATInvPurch.Base;                                      //Add the following line.                                      LastTransactionNo := VATInvPurch."Transaction No.";                                    UNTIL VATInvPurch.NEXT = 0;                                  END;

    现有代码 4

                                        UNTIL VATInvPurch.NEXT = 0;                                  END;                                  //Delete the following line.                                  VATInvPurch.RESET;                                  VATInvPurch.SETRANGE(VATInvPurch.Type,VATInvPurch.Type::Purchase);                                  VATInvPurch.SETRANGE(VATInvPurch."Document Type",VATInvPurch."Document Type"::Invoice);

    替换代码 4

                                        UNTIL VATInvPurch.NEXT = 0;                                  END;                                  //Add the following lines.                                  LastTransactionNo := 0;                                  VATInvPurch.RESET;                                  VATInvPurch.SETCURRENTKEY("Transaction No.");                                  //End of the lines.                                                                 VATInvPurch.SETRANGE(VATInvPurch.Type,VATInvPurch.Type::Purchase);                                  VATInvPurch.SETRANGE(VATInvPurch."Document Type",VATInvPurch."Document Type"::Invoice);

    现有代码 5

                                              ((VATInvPurch."Country/Region Code" = CountryCode) AND LocationDiffCountryCode) THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                            //Delete the following lines.                                            IF AmountToIncludein349 <> 0 THEN                                              NormalAmount := NormalAmount + AmountToIncludein349                                            ELSE                                            //End of the lines.                                              NormalAmount := NormalAmount + VATInvPurch.Base;                                          END ELSE

    替换代码 5

                                              ((VATInvPurch."Country/Region Code" = CountryCode) AND LocationDiffCountryCode) THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                            //Add the following lines.                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              IF VATInvPurch."Transaction No." <> LastTransactionNo THEN                                                NormalAmount := NormalAmount + AmountToIncludein349;                                            END ELSE                                            //End of the lines.                                              NormalAmount := NormalAmount + VATInvPurch.Base;                                          END ELSE

    现有代码 6

                                          END;                                      // NormalAmount := NormalAmount + VATInvPurch.Base;                                    UNTIL VATInvPurch.NEXT = 0;                                  END;

    替换代码 6

                                          END;                                      // NormalAmount := NormalAmount + VATInvPurch.Base;                                      //Add the following line.                                      LastTransactionNo := VATInvPurch."Transaction No.";                                    UNTIL VATInvPurch.NEXT = 0;                                  END;

    现有代码 7

                                        UNTIL VATInvPurch.NEXT = 0;                                  END;                                  //Delete the following line.                                  VATInvPurch.RESET;                                  VATInvPurch.SETRANGE(Type,VATInvPurch.Type::Purchase);                                  VATInvPurch.SETRANGE("Document Type",VATInvPurch."Document Type"::Invoice);

    替换代码 7

                                        UNTIL VATInvPurch.NEXT = 0;                                  END;                                  //Add the following lines.                                  LastTransactionNo := 0;                                  VATInvPurch.RESET;                                  VATInvPurch.SETCURRENTKEY("Transaction No.");                                  //End of the lines.                                                              VATInvPurch.SETRANGE(Type,VATInvPurch.Type::Purchase);                                  VATInvPurch.SETRANGE("Document Type",VATInvPurch."Document Type"::Invoice);

    现有代码 8

                                            THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                            //Delete the following lines.                                            IF AmountToIncludein349 <> 0 THEN                                              AmountEUService := AmountEUService + AmountToIncludein349                                            ELSE                                            //End of the lines.                                                                                       AmountEUService := AmountEUService + VATInvPurch.Base;                                          END ELSE

    替换代码 8

                                            THEN BEGIN                                          IF "VAT Registration No." <> '' THEN BEGIN                                            //Add the following lines.                                            IF AmountToIncludein349 <> 0 THEN BEGIN                                              IF VATInvPurch."Transaction No." <> LastTransactionNo THEN                                                AmountEUService := AmountEUService + AmountToIncludein349;                                            END ELSE                                            //End of the lines.                                                                                       AmountEUService := AmountEUService + VATInvPurch.Base;                                          END ELSE

    现有代码 9

                                            END;                                      END;                                    UNTIL VATInvPurch.NEXT = 0;

    替换代码 9

                                            END;                                      END;                                      //Add the following line.                                      LastTransactionNo := VATInvPurch."Transaction No.";                                    UNTIL VATInvPurch.NEXT = 0;
  3. 在 Make 349 声明报告中添加新的全局变量 (88) ,然后按如下所示指定该变量:

    • 名称:LastTransactionNo@1100072

    • 数据类型整数

先决条件

必须安装以下产品之一,应用此修补程序:

  • 西班牙语版本的 Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

  • 西班牙语版本的 Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)

必须安装西班牙语 349 报告,应用此修补程序。有关详细信息,请访问以下 Microsoft 网站 :西班牙语 349报告。此外,必须安装 VAT 2010 程序包以应用此修补程序。有关详细信息,请访问以下 Microsoft 网站 :Microsoft Dynamics NAV 对 VAT 2010 的支持

删除信息

无法删除此修补程序。

状态

Microsoft 已经确认这是一个列于“适用范围”部分的 Microsoft 产品问题。

注意,这是直接从 Microsoft 支持组织内部创建的"FAST PUBLISH"一文。 此处包含的信息是作为响应新出现的问题而提供的。 由于其发布速度加快,材料可能包含拼写错误,并且可能随时修订,无需另行通知。 有关 其他注意事项, 请参阅使用条款。

需要更多帮助?

需要更多选项?

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