当您在 Microsoft Dynamics 导航 2009 年瑞士版本 LSV DD 文件导入错误的文档类型

模板︰ CPR-Navision 代码 Fiacx 模板

错误 #: 215930 (内容维护)

症状

当您导入 LSV DD (直接借记) 文件和被拒绝的付款的 Microsoft Dynamics 导航 2009年瑞士版本中存在使用错误的文档类型。后付款已被取消,仍对付款设置文档类型。但是,您无法过帐这些条目由于不正确数量的符号。按照在代码更改部分,若要解决此问题的步骤。下列产品中发生此问题︰

  • 瑞士版本的 Microsoft Dynamics 导航 2009 R2

  • 瑞士版本的 Microsoft Dynamics 导航 2009 SP1

解决方案

修补程序信息

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

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

如果此修补程序未放在网上供公共下载 (指本文中未提供此修复程序的公共 URL),分发需要技术组长、 问题上报小组成员或经理的批准并且以下信息适用︰

  • 要收到此修复程序,客户必须遇到"症状"一节中提到的错误。

  • 您必须跟踪客户向其发送此和可用 (如果发布服务包) 时提供他们的下一个 service pack。

此修补程序不计划将包含在 Microsoft Dynamics 导航服务包。

安装信息

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

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

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

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

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

  • 为系统对象 ID™ 5210对象和系统对象 ID 9015执行权限

    对象。

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

代码更改

注意:始终测试代码修复在受控环境中应用之前与您的生产计算机的修补程序。

若要解决此问题,请执行以下步骤:

  1. 更改全局变量 LSVMgt Codeunit (3010831) 中的代码,如下所示︰
    现有代码

    ...Text11500@1150080 : TextConst 'ENU=Could not find Transaction No. %1 in Debit Direct Order No. %2.';
    FileMgt@1150042 : Codeunit 419;
    FileSystemObject@1150081 : Automation "{420B2830-E718-11CF-893D-00A0C9054228} 1.0:{0D43FE01-F093-11CF-8940-00A0C9054228}:'Microsoft Scripting Runtime'.FileSystemObject";

    PROCEDURE ReleaseCustLedgEntries@1(_GenJnlLine@1150000 : Record 81);
    BEGIN
    ...

    替换代码

    ...Text11500@1150080 : TextConst 'ENU=Could not find Transaction No. %1 in Debit Direct Order No. %2.';
    FileMgt@1150042 : Codeunit 419;
    FileSystemObject@1150081 : Automation "{420B2830-E718-11CF-893D-00A0C9054228} 1.0:{0D43FE01-F093-11CF-8940-00A0C9054228}:'Microsoft Scripting Runtime'.FileSystemObject";

    // Add the following line.
    IsCancellationExist@1150082 : Boolean;
    // End of the added line.

    PROCEDURE ReleaseCustLedgEntries@1(_GenJnlLine@1150000 : Record 81);
    BEGIN
    ...
  2. 更改在 LSVMgt Codeunit (3010831) 中的ImportDebitDirectFile函数中的代码,如下所示︰
    现有代码 1

    ...FeeAmount := 0;
    TotalRecRecords := 0;
    TotalRecRecordsRev := 0;

    // Journal name for no serie
    GlBatchName.GET(ActGenJnlLine."Journal Template Name",ActGenJnlLine."Journal Batch Name");
    ...

    替换代码 1

    ...FeeAmount := 0;
    TotalRecRecords := 0;
    TotalRecRecordsRev := 0;

    // Add the following line.
    IsCancellationExist := FALSE;
    // End of the added line.

    // Journal name for no serie
    GlBatchName.GET(ActGenJnlLine."Journal Template Name",ActGenJnlLine."Journal Batch Name");
    ...

    现有代码 2

    ...// Split File line into fields

    // Delete the following lines.
    FileID := COPYSTR(Line,1,3);
    IF FileID <> '036' THEN
    ERROR(Text049 + Text011);
    TA := COPYSTR(Line,36,2);
    IF NOT (TA = '97') THEN BEGIN
    TotalRecord := FALSE;
    EVALUATE(InvoiceAmt,COPYSTR(Line,54,13));
    EVALUATE(yyCR,COPYSTR(Line,4,2));
    EVALUATE(mmCR,COPYSTR(Line,6,2));
    EVALUATE(ddCR,COPYSTR(Line,8,2));
    IF yyCR > 98 THEN
    PostDate := DMY2DATE(ddCR,mmCR,1900 + yyCR)
    ELSE
    PostDate := DMY2DATE(ddCR,mmCR,2000 + yyCR);

    DebitDirectOrderNo := COPYSTR(Line,34,2);
    EVALUATE(DebitDirectRecordNo,COPYSTR(Line,38,6));
    EVALUATE(RejectionCode,COPYSTR(Line,543,2));
    Currency := COPYSTR(Line,51,3);

    // DEBIT DIRECT
    LsvJour.RESET;
    LsvJour.SETRANGE("Credit Date",PostDate);
    LsvJour.SETRANGE("DebitDirect Orderno.",DebitDirectOrderNo);
    IF NOT LsvJour.FIND('+') THEN
    ERROR(Text059,DebitDirectOrderNo,PostDate);

    LsvJournalLine.RESET;
    //CH0001.begin
    LsvJournalLine.SETCURRENTKEY("LSV Journal No.","Transaction No.");
    LsvJournalLine.SETRANGE("LSV Journal No.",LsvJour."No.");
    //LsvJournalLine.SETRANGE("Line No.",DebitDirectRecordNo);
    LsvJournalLine.SETRANGE("Transaction No.",DebitDirectRecordNo);
    //LsvJournalLine.FIND('-');
    IF NOT LsvJournalLine.FINDFIRST THEN BEGIN
    d.CLOSE;
    ERROR(Text11500, DebitDirectRecordNo, DebitDirectOrderNo);
    END;
    //CH0001.end
    InInvoiceNo := LsvJournalLine."Applies-to Doc. No.";
    // END DEBIT DIRECT

    // Process transaction of credit record
    CASE TA OF
    '81': // Credit
    BEGIN
    Transaction := Transaction::Credit;
    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Open;
    LsvJournalLine."DD Rejection Reason" := LsvJournalLine."DD Rejection Reason"::" ";
    LsvJournalLine.MODIFY;

    IF LSVSetup.READPERMISSION THEN BEGIN
    ClosedByESR(InInvoiceNo);
    END;
    END;
    '84': // Cancellation "Storno"
    BEGIN
    IF RejectionCode <> 2 THEN
    Transaction := Transaction::Correction
    ELSE
    Transaction := Transaction::Cancellation;

    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Rejected;
    LsvJournalLine."DD Rejection Reason" := RejectionCode;
    LsvJournalLine.MODIFY;
    END;
    ELSE
    ERROR(Text023 + Text011);
    END;
    END ELSE BEGIN
    TotalRecord := TRUE;
    EVALUATE(TempAmount,COPYSTR(Line,60,13));
    CreditAmount := CreditAmount + TempAmount / 100;
    EVALUATE(TempAmount,COPYSTR(Line,82,13));
    RejectionAmount := RejectionAmount + TempAmount / 100;
    EVALUATE(TempAmount,COPYSTR(Line,104,13));
    ReversalAmount := ReversalAmount + TempAmount / 100;
    EVALUATE(TempAmount,COPYSTR(Line,120,11));
    FeeAmount := FeeAmount + TempAmount / 100;
    // Credit Count
    EVALUATE(TempAmount,COPYSTR(Line,54,6));
    TotalRecRecords := TotalRecRecords + TempAmount;
    // Rejection Count
    EVALUATE(TempAmount,COPYSTR(Line,76,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    // Reversal Count
    EVALUATE(TempAmount,COPYSTR(Line,98,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    END;
    // END OF SPLIT

    IF NOT (TotalRecord) AND (Transaction <> Transaction::Correction) THEN BEGIN
    // End of the deleted lines.

    // Insert GL line
    GenJournalLine.INIT;
    GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";
    ...

    替换代码 2

    ...// Split File line into fields

    // Add the following lines.
    FileID := COPYSTR(Line,1,3);
    IF FileID <> '036' THEN
    ERROR(Text049 + Text011);
    TA := COPYSTR(Line,36,2);
    IF NOT (TA = '97') THEN BEGIN
    TotalRecord := FALSE;
    EVALUATE(InvoiceAmt,COPYSTR(Line,54,13));
    EVALUATE(yyCR,COPYSTR(Line,4,2));
    EVALUATE(mmCR,COPYSTR(Line,6,2));
    EVALUATE(ddCR,COPYSTR(Line,8,2));
    IF yyCR > 98 THEN
    PostDate := DMY2DATE(ddCR,mmCR,1900 + yyCR)
    ELSE
    PostDate := DMY2DATE(ddCR,mmCR,2000 + yyCR);

    DebitDirectOrderNo := COPYSTR(Line,34,2);
    EVALUATE(DebitDirectRecordNo,COPYSTR(Line,38,6));
    EVALUATE(RejectionCode,COPYSTR(Line,543,2));
    Currency := COPYSTR(Line,51,3);

    // DEBIT DIRECT
    LsvJour.RESET;
    LsvJour.SETRANGE("Credit Date",PostDate);
    LsvJour.SETRANGE("DebitDirect Orderno.",DebitDirectOrderNo);
    IF NOT LsvJour.FIND('+') THEN
    ERROR(Text059,DebitDirectOrderNo,PostDate);

    LsvJournalLine.RESET;
    //CH0001.begin
    LsvJournalLine.SETCURRENTKEY("LSV Journal No.","Transaction No.");
    LsvJournalLine.SETRANGE("LSV Journal No.",LsvJour."No.");
    //LsvJournalLine.SETRANGE("Line No.",DebitDirectRecordNo);
    LsvJournalLine.SETRANGE("Transaction No.",DebitDirectRecordNo);
    //LsvJournalLine.FIND('-');
    IF NOT LsvJournalLine.FINDFIRST THEN BEGIN
    d.CLOSE;
    ERROR(Text11500, DebitDirectRecordNo, DebitDirectOrderNo);
    END;
    //CH0001.end
    InInvoiceNo := LsvJournalLine."Applies-to Doc. No.";
    // END DEBIT DIRECT

    // Process transaction of credit record
    CASE TA OF
    '81': // Credit
    BEGIN
    Transaction := Transaction::Credit;
    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Open;
    LsvJournalLine."DD Rejection Reason" := LsvJournalLine."DD Rejection Reason"::" ";
    LsvJournalLine.MODIFY;

    IF LSVSetup.READPERMISSION THEN BEGIN
    ClosedByESR(InInvoiceNo);
    END;
    END;
    '84': // Cancellation "Storno"
    BEGIN
    IF RejectionCode <> 2 THEN
    Transaction := Transaction::Correction
    ELSE
    Transaction := Transaction::Cancellation;

    LsvJournalLine."LSV Status" := LsvJournalLine."LSV Status"::Rejected;
    LsvJournalLine."DD Rejection Reason" := RejectionCode;
    LsvJournalLine.MODIFY;
    END;
    ELSE
    ERROR(Text023 + Text011);
    END;
    END ELSE BEGIN
    TotalRecord := TRUE;
    EVALUATE(TempAmount,COPYSTR(Line,60,13));
    CreditAmount := CreditAmount + TempAmount / 100;
    EVALUATE(TempAmount,COPYSTR(Line,82,13));
    RejectionAmount := RejectionAmount + TempAmount / 100;
    EVALUATE(TempAmount,COPYSTR(Line,104,13));
    ReversalAmount := ReversalAmount + TempAmount / 100;
    EVALUATE(TempAmount,COPYSTR(Line,120,11));
    FeeAmount := FeeAmount + TempAmount / 100;
    // Credit Count
    EVALUATE(TempAmount,COPYSTR(Line,54,6));
    TotalRecRecords := TotalRecRecords + TempAmount;
    // Rejection Count
    EVALUATE(TempAmount,COPYSTR(Line,76,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    // Reversal Count
    EVALUATE(TempAmount,COPYSTR(Line,98,6));
    TotalRecRecordsRev := TotalRecRecordsRev + TempAmount;
    END;
    // END OF SPLIT

    IF NOT (TotalRecord) AND (Transaction <> Transaction::Correction) THEN BEGIN
    // End of the added lines.

    // Insert GL line
    GenJournalLine.INIT;
    GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";
    ...

    现有代码 3

    ...GenJournalLine.INIT;
    GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";
    GenJournalLine."Journal Batch Name" := ActGenJnlLine."Journal Batch Name";
    LastLineNo := LastLineNo + 10000;
    GenJournalLine."Line No." := LastLineNo;
    GenJournalLine."Document No." := NextDocNo;
    ...

    替换代码 3

    ... GenJournalLine.INIT;
    GenJournalLine."Journal Template Name" := ActGenJnlLine."Journal Template Name";
    GenJournalLine."Journal Batch Name" := ActGenJnlLine."Journal Batch Name";

    // Add the following lines.
    GenJournalLine."Posting Date" := PostDate;
    GenJournalLine."Account Type" := GenJournalLine."Account Type"::Customer;

    IF Transaction = Transaction::Cancellation THEN BEGIN
    IsCancellationExist := TRUE;
    GenJournalLine."Document Type" := GenJournalLine."Document Type"::Refund;
    NextDocNo := NoSeriesMgt.GetNextNo(GlBatchName."No. Series",PostDate,FALSE);
    END ELSE
    GenJournalLine."Document Type" := GenJournalLine."Document Type"::Payment;

    // End of the added lines.

    LastLineNo := LastLineNo + 10000;
    GenJournalLine."Line No." := LastLineNo;
    GenJournalLine."Document No." := NextDocNo;
    ...

    现有代码 4

    ...LastLineNo := LastLineNo + 10000;
    GenJournalLine."Line No." := LastLineNo;
    GenJournalLine."Document No." := NextDocNo;

    // Delete the following lines.
    GenJournalLine."Posting Date" := PostDate;
    GenJournalLine."Account Type" := GenJournalLine."Account Type"::Customer;
    GenJournalLine."Document Type" := GenJournalLine."Document Type"::Payment;
    // End of the deleted lines.

    GeneralLedgerSetup.GET;
    IF GeneralLedgerSetup."LCY Code" <> Currency THEN
    ...

    替换代码 4

    ... LastLineNo := LastLineNo + 10000;
    GenJournalLine."Line No." := LastLineNo;
    GenJournalLine."Document No." := NextDocNo;

    // Add the following lines.

    IF Transaction = Transaction::Cancellation THEN
    NextDocNo := NoSeriesMgt.GetNextNo(GlBatchName."No. Series",PostDate,FALSE);
    // End of the added lines.

    GeneralLedgerSetup.GET;
    IF GeneralLedgerSetup."LCY Code" <> Currency THEN
    ...

    现有代码 5

    ... IF CustLedgerEntry.FIND('-') THEN
    GenJournalLine.VALIDATE("Account No.",CustLedgerEntry."Customer No.");

    // Delete the following lines.
    GenJournalLine."Applies-to Doc. Type" := GenJournalLine."Applies-to Doc. Type"::Invoice;
    GenJournalLine."Applies-to Doc. No." := InInvoiceNo;
    // End of the deleted lines.

    IF GenJournalLine."Currency Code" <> CustLedgerEntry."Currency Code" THEN
    GenJournalLine.VALIDATE("Currency Code",CustLedgerEntry."Currency Code");
    ...

    替换代码 5

    ... IF CustLedgerEntry.FIND('-') THEN
    GenJournalLine.VALIDATE("Account No.",CustLedgerEntry."Customer No.");

    // Add the following lines.
    IF Transaction <> Transaction::Cancellation THEN BEGIN
    GenJournalLine."Applies-to Doc. Type" := GenJournalLine."Applies-to Doc. Type"::Invoice;
    GenJournalLine."Applies-to Doc. No." := InInvoiceNo;
    END;
    // End of the added lines.

    IF GenJournalLine."Currency Code" <> CustLedgerEntry."Currency Code" THEN
    GenJournalLine.VALIDATE("Currency Code",CustLedgerEntry."Currency Code");
    ...

    现有代码 6

    ...// *** Bal account per line or as combined entry

    // Delete the following line.
    IF MultiplePostingDates THEN BEGIN
    // End of the deleted line.

    // Bal Account per line
    IF GenJournalLine.FIND('-') THEN
    REPEAT
    ...

    替换代码 6

    ...// *** Bal account per line or as combined entry

    // Add the following line.
    IF MultiplePostingDates OR IsCancellationExist THEN BEGIN
    // End of the added line.

    // Bal Account per line
    IF GenJournalLine.FIND('-') THEN
    REPEAT
    ...

系统必备组件

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

  • 瑞士版本的 Microsoft Dynamics 导航 2009 R2

  • 瑞士版本的 Microsoft Dynamics 导航 2009 SP1

删除信息

您不能删除此修补程序。

状态

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

参考资料

VSFT DynamicsNAVSE: 354336

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

Author: Andreas.Guenther
Writer: v-luzo
技术审阅︰ Andreas.Guenther
Editor:

需要更多帮助?

扩展你的技能
了解培训
抢先获得新功能
加入 Microsoft 内部人员

此信息是否有帮助?

谢谢您的反馈意见!

谢谢你的反馈! 可能需要转接到 Office 支持专员。

×