Iniciar sesión con Microsoft
Iniciar sesión o crear una cuenta
Hola:
Seleccione una cuenta diferente.
Tiene varias cuentas
Elija la cuenta con la que desea iniciar sesión.

Síntomas

Cuando se importan archivos de LSV DD (débito directo) y pagos rechazados existen en la versión suiza de Microsoft Dynamics NAV 2009, se utiliza un tipo de documento incorrecto. Cuando se canceló el pago, el tipo de documento todavía se establece para el pago. Sin embargo, no puede registrar los movimientos por el signo del importe incorrecto. Siga los pasos descritos en la sección de cambios de código para resolver este problema. Este problema se produce en los siguientes productos:

  • La versión suiza de Microsoft Dynamics NAV 2009 R2

  • La versión suiza de Microsoft Dynamics NAV 2009 SP1

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. Sin embargo, 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 de Microsoft Dynamics NAV han salido del sistema. Esto incluye los servicios de Microsoft Dynamics NAV Application Server (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 Execute para el objeto System Object ID 5210 y el System Object ID 9015 .

    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:

  1. Cambie el código en las Variables globales en la LSVMgt Codeunit (3010831) como sigue:
    Código existente

    ...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
    ...

    Código de sustitución

    ...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. Cambie el código en la función ImportDebitDirectFile de la LSVMgt Codeunit (3010831) como sigue:
    Código existente 1

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

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

    Código nuevo 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");
    ...

    Código existente 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";
    ...

    Código nuevo 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";
    ...

    Código existente 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;
    ...

    Código nuevo 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;
    ...

    Código existente 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
    ...

    Código nuevo 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 el código existente

    ... 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");
    ...

    Código de reemplazo 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 el código existente

    ...// *** 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
    ...

    Código de reemplazo 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
    ...

Requisitos previos

Debe tener uno de los siguientes productos instalados para aplicar esta revisión:

  • La versión suiza de Microsoft Dynamics NAV 2009 R2

  • La versión suiza de Microsoft Dynamics NAV 2009 SP1

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".

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.

¿Necesita más ayuda?

¿Quiere más opciones?

Explore las ventajas de las suscripciones, examine los cursos de aprendizaje, aprenda a proteger su dispositivo y mucho más.

Las comunidades le ayudan a formular y responder preguntas, enviar comentarios y leer a expertos con conocimientos extensos.

¿Le ha sido útil esta información?

¿Cuál es tu grado de satisfacción con la calidad del lenguaje?
¿Qué ha afectado a su experiencia?
Si presiona Enviar, sus comentarios se usarán para mejorar los productos y servicios de Microsoft. El administrador de TI podrá recopilar estos datos. Declaración de privacidad.

¡Gracias por sus comentarios!

×