An additional RG 23 A Part II entry or an additional RG 23 C Part II entry is created unexpectedly when you post a purchase invoice in the Indian version of Microsoft Dynamics NAV 2009 Service Pack 1

This article applies to Microsoft Dynamics NAV for the Indian (in) language locale.

Symptoms

Consider the following scenario in the Indian version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1):

  • You create a purchase order that uses foreign currency for an item.

  • You attach a structure to the purchase in order to calculate the CVD or to excise on the item.

  • You post the purchase order as receipt.

  • An RG 23 A Part II entry is created.

  • You create a purchase invoice for the purchase order by using the get receipt functionality.

  • You post the purchase invoice.

In this scenario, an additional RG 23 A Part II entry is created unexpectedly.
Additionally, assume that you create another purchase order for a fixed asset or for an item in which the Capital Item check box is selected. In the same scenario, when you post the corresponding purchase invoice that is created for the purchase order, an additional RG 23 C Part II entry is created unexpectedly.

Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV service pack or the next Microsoft Dynamics NAV version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.



Installation information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.

To implement this hotfix, you must have a developer license.

We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:

  • The Modify permission for the object that you will be changing.

  • The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.



Note You do not have to have rights to the data stores unless you have to perform data repair.

Code changes

Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:

  1. Change the code in the fields in the Purchase Line table (39) as follows:
    Existing code 1

    ...
    Currency."Amount Rounding Precision");
    "Inv. Discount Amount" := 0;
    "Inv. Disc. Amount to Invoice" := 0;
    UpdateAmounts;
    UpdateUnitCost;
    END;

    CaptionML=ENU=Line Discount %;
    DecimalPlaces=0:5;
    MinValue=0;
    ...

    Replacement code 1

    ...
    Currency."Amount Rounding Precision");
    "Inv. Discount Amount" := 0;
    "Inv. Disc. Amount to Invoice" := 0;
    UpdateAmounts;
    UpdateUnitCost;

    // Add the following line.
    CheckExciseRegister;

    END;

    CaptionML=ENU=Line Discount %;
    DecimalPlaces=0:5;
    MinValue=0;
    ...

    Existing code 2

    ...
    "Line Discount %" := 0;
    "Inv. Discount Amount" := 0;
    "Inv. Disc. Amount to Invoice" := 0;
    UpdateAmounts;
    UpdateUnitCost;
    END;

    CaptionML=ENU=Line Discount Amount;
    AutoFormatType=1;
    AutoFormatExpr="Currency Code" }
    ...

    Replacement code 2

    ...
    "Line Discount %" := 0;
    "Inv. Discount Amount" := 0;
    "Inv. Disc. Amount to Invoice" := 0;
    UpdateAmounts;
    UpdateUnitCost;

    // Add the following lines.
    GetPurchHeader;
    CheckExciseRegister;
    // End of the lines.

    END;

    CaptionML=ENU=Line Discount Amount;
    AutoFormatType=1;
    AutoFormatExpr="Currency Code" }
    ...
  2. Add a new global variable in the Purchase Line table (39), and then specify the variable as follows:

    • Name: Text16510

    • DataType: TextConst

    • Value: ENU=RG register already created for the receipts. In order to make the changes reflect in the RG registers, please use the ''Get Receipt lines'' functionality from the invoice and then post.


  3. Change the code in the UpdateStruOrdLineDetails function in the Purchase Line table (39) as follows:
    Existing code

    ...
    BEGIN
    GetPurchHeader;
    PurchHeader.TESTFIELD(Structure);
    StructureDetail.SETRANGE(Code, PurchHeader.Structure);
    StructureDetail.SETRANGE(Type,StructureDetail.Type::Excise);
    IF StructureDetail.FIND('-') THEN BEGIN
    StrOrderLineDetails.GET(StrOrderLineDetails.Type::Purchase,StructureDetail."Calculation Order",
    "Document Type","Document No.","No.","Line No.",StructureDetail.Type,'','EXCISE');
    ...

    Replacement code

    ...
    BEGIN
    GetPurchHeader;
    PurchHeader.TESTFIELD(Structure);

    // Add the following line.
    CheckExciseRegister;

    StructureDetail.SETRANGE(Code, PurchHeader.Structure);
    StructureDetail.SETRANGE(Type,StructureDetail.Type::Excise);
    IF StructureDetail.FIND('-') THEN BEGIN
    StrOrderLineDetails.GET(StrOrderLineDetails.Type::Purchase,StructureDetail."Calculation Order",
    "Document Type","Document No.","No.","Line No.",StructureDetail.Type,'','EXCISE');
    ...
  4. Change the code in the ShowSubOrderRcptForm function in the Purchase Line table (39) as follows:
    Existing code

    ...
    FORM.RUNMODAL(FORM::"Order Subcon Details Receipt",PurchaseLine)
    ELSE
    FORM.RUNMODAL(FORM::"Ord. Subcon Details Rcpt. List",PurchaseLine)
    END;

    // Delete the following line.
    BEGIN

    END.
    }
    }
    ...

    Replacement code

    ...
    FORM.RUNMODAL(FORM::"Order Subcon Details Receipt",PurchaseLine)
    ELSE
    FORM.RUNMODAL(FORM::"Ord. Subcon Details Rcpt. List",PurchaseLine)
    END;

    // Add the following lines.
    PROCEDURE CheckExciseRegister@1102601000();
    BEGIN

    IF ((("Document Type" = "Document Type" ::"Return Order") OR ("Document Type" ="Document Type" ::Order)) AND
    ("Quantity Received" <> 0 ) AND ("Excise Amount" <> 0 ))
    THEN BEGIN
    IF NOT PurchHeader.Trading THEN
    IF ("Direct Unit Cost" <> xRec."Direct Unit Cost") OR ("Line Amount" <> xRec."Line Amount") OR
    ("Line Discount %" <> xRec."Line Discount %") OR ("Line Discount Amount" <> xRec."Line Discount Amount") OR
    ("BED Amount" <> xRec."BED Amount") OR ("AED(GSI) Amount" <> xRec."AED(GSI) Amount") OR
    ("SED Amount" <>xRec."SED Amount") OR ("SAED Amount" <> xRec."SAED Amount") OR
    ("CESS Amount" <> xRec."CESS Amount") OR ("NCCD Amount" <> xRec."NCCD Amount") OR
    ("eCess Amount" <> xRec."eCess Amount") OR ("ADET Amount" <> xRec."ADET Amount") OR
    ("ADE Amount"<> xRec."ADE Amount") OR ("SHE Cess Amount" <> xRec."SHE Cess Amount") OR
    ("AED(TTA) Amount" <> "AED(TTA) Amount")
    THEN
    ERROR(Text16510);
    END;
    // End of the lines.

    END;}
    }
    ...
  5. Change the Keys in the RG 23 A Part II table (13720) as follows:
    Existing code

    ...
    { ;Entry No. ;Clustered=Yes }
    { ;Document No.,Posting Date }
    { ;Type }
    { ;Location E.C.C. No. ;SumIndexFields=BED Credit,AED(GSI) Credit,SED Credit,SAED Credit,NCCD Credit,eCess Credit,CESS Debit,ADC VAT Credit,SHE Cess Credit }
    { ;Posting Date,Location E.C.C. No.,Type }

    // Delete the following line.
    { ;Excise as Service Tax Credit,Closed,Remaining Excise Amount,Location E.C.C. No. }

    { ;Location E.C.C. No.,Excise as Service Tax Credit;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Closed,Remaining Excise Amount,Excise as Service Tax Credit,Cenvat Cr. Receivable Account;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Excise as Service Tax Credit,Posting Date;
    ...

    Repalcement code

    ...
    { ;Entry No. ;Clustered=Yes }
    { ;Document No.,Posting Date }
    { ;Type }
    { ;Location E.C.C. No. ;SumIndexFields=BED Credit,AED(GSI) Credit,SED Credit,SAED Credit,NCCD Credit,eCess Credit,CESS Debit,ADC VAT Credit,SHE Cess Credit }
    { ;Posting Date,Location E.C.C. No.,Type }

    // Add the following line.
    { ;Excise as Service Tax Credit,Closed,Location E.C.C. No. }

    { ;Location E.C.C. No.,Excise as Service Tax Credit;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Closed,Remaining Excise Amount,Excise as Service Tax Credit,Cenvat Cr. Receivable Account;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Excise as Service Tax Credit,Posting Date;
    ...
  6. Change the Keys in the RG 23 C Part II table (13722) as follows:
    Existing code

    ...
    { ;Entry No. ;Clustered=Yes }
    { ;Document No.,Posting Date }
    { ;Type }
    { ;Location E.C.C. No. ;SumIndexFields=BED Credit,AED(GSI) Credit,SED Credit,SAED Credit,CESS Credit,NCCD Credit,eCess Credit,SHE Cess Credit,ADC VAT Credit }
    { ;Posting Date,Location E.C.C. No.,Type }

    // Delete the following line.
    { ;Excise as Service Tax Credit,Closed,Remaining Excise Amount,Location E.C.C. No. }

    { ;Location E.C.C. No.,Excise as Service Tax Credit;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Closed,Remaining Excise Amount,Excise as Service Tax Credit;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Excise as Service Tax Credit,Posting Date;
    ...

    Replacement code

    ...
    { ;Entry No. ;Clustered=Yes }
    { ;Document No.,Posting Date }
    { ;Type }
    { ;Location E.C.C. No. ;SumIndexFields=BED Credit,AED(GSI) Credit,SED Credit,SAED Credit,CESS Credit,NCCD Credit,eCess Credit,SHE Cess Credit,ADC VAT Credit }
    { ;Posting Date,Location E.C.C. No.,Type }

    // Add the following line.
    { ;Excise as Service Tax Credit,Closed,Location E.C.C. No. }

    { ;Location E.C.C. No.,Excise as Service Tax Credit;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Closed,Remaining Excise Amount,Excise as Service Tax Credit;
    SumIndexFields=Remaining BED Credit,Remaining AED(GSI) Credit,Remaining SED Credit,Remaining SAED Credit,Remaining NCCD Credit,Remaining eCess Credit,Remaining ADET Credit,Remaining AED(TTA) Credit,Remaining ADE Credit,Remaining ADC VAT Credit,Remaining SHECess Credit }
    { ;Location E.C.C. No.,Excise as Service Tax Credit,Posting Date;
    ...
  7. Add a new local variable in the CheckExciseInvoiceDiff function in the Purch.-Post codeunit (90), and then specify the variable as follows:

    • Name: PurchRcptHead

    • DataType: Record

    • Subtype: Purch. Rcpt. Header (120)

  8. Change the code in the CheckExciseInvoiceDiff function in the Purch.-Post codeunit (90) as follows:
    Existing code 1

    ...
    EXIT;
    IF ("Document Type" = "Document Type"::Invoice) AND ("Receipt No." = '') THEN
    EXIT;
    IF ("Document Type" = "Document Type"::"Credit Memo") AND ("Return Shipment No." = '') THEN
    EXIT;

    // Delete the following lines.
    IF (NOT (Type IN[2,3])) THEN
    EXIT;
    // End of the lines.

    TempPurchLine.INIT;
    TempPurchLine.TRANSFERFIELDS(PurchLine);
    TempPurchLine.INSERT;

    IF ("Receipt No." <> '') THEN BEGIN
    ...

    Replacement code 1

    ...
    EXIT;
    IF ("Document Type" = "Document Type"::Invoice) AND ("Receipt No." = '') THEN
    EXIT;
    IF ("Document Type" = "Document Type"::"Credit Memo") AND ("Return Shipment No." = '') THEN
    EXIT;

    // Add the following lines.
    IF (NOT (Type IN[1,2,3])) THEN
    EXIT;
    // End of the lines.

    TempPurchLine.INIT;
    TempPurchLine.TRANSFERFIELDS(PurchLine);
    TempPurchLine.INSERT;

    IF ("Receipt No." <> '') THEN BEGIN
    ...

    Existing code 2

    ...
    TempPurchLine.INSERT;

    IF ("Receipt No." <> '') THEN BEGIN
    RcptHeader.GET("Receipt No.");
    RcptLine.GET("Receipt No.","Receipt Line No.");
    "BED Amount" -= RcptLine."BED Amount";
    "ADET Amount" -= RcptLine."ADET Amount";
    "ADE Amount" -= RcptLine."ADE Amount";
    "AED(GSI) Amount" -= RcptLine."AED(GSI) Amount";
    "AED(TTA) Amount" -= RcptLine."AED(TTA) Amount";
    ...

    Replacement code 2

    ...
    TempPurchLine.INSERT;

    IF ("Receipt No." <> '') THEN BEGIN
    RcptHeader.GET("Receipt No.");
    RcptLine.GET("Receipt No.","Receipt Line No.");

    // Add the following lines.
    IF RcptHeader."Currency Code" <> '' THEN BEGIN
    "BED Amount" := ("BED Amount" * RcptHeader."Currency Factor") - RcptLine."BED Amount";
    "ADET Amount" := ("ADET Amount" * RcptHeader."Currency Factor") - RcptLine."ADET Amount";
    "ADE Amount" := ("ADE Amount" * RcptHeader."Currency Factor") - RcptLine."ADE Amount";
    "AED(GSI) Amount" := ("AED(GSI) Amount" * RcptHeader."Currency Factor") - RcptLine."AED(GSI) Amount";
    "AED(TTA) Amount" := ("AED(TTA) Amount" * RcptHeader."Currency Factor") - RcptLine."AED(TTA) Amount";
    "CESS Amount" := ("CESS Amount" * RcptHeader."Currency Factor") - RcptLine."CESS Amount";
    "NCCD Amount" := ("NCCD Amount" * RcptHeader."Currency Factor") - RcptLine."NCCD Amount";
    "SAED Amount" := ("SAED Amount" * RcptHeader."Currency Factor") - RcptLine."SAED Amount";
    "SED Amount" := ("SED Amount" * RcptHeader."Currency Factor") - RcptLine."SED Amount";
    "eCess Amount" := ("eCess Amount" * RcptHeader."Currency Factor") - RcptLine."eCess Amount";
    "ADC VAT Amount" := ("ADC VAT Amount" * RcptHeader."Currency Factor") - RcptLine."ADC VAT Amount";
    "SHE Cess Amount" := ("SHE Cess Amount" * RcptHeader."Currency Factor") - RcptLine."SHE Cess Amount";
    "Custom eCess Amount" := ("Custom eCess Amount" * RcptHeader."Currency Factor") - RcptLine."Custom eCess Amount";
    "Custom SHECess Amount" := ("Custom SHECess Amount" * RcptHeader."Currency Factor") - RcptLine."Custom SHECess Amount";
    END ELSE BEGIN
    // End of the lines.

    "BED Amount" -= RcptLine."BED Amount";
    "ADET Amount" -= RcptLine."ADET Amount";
    "ADE Amount" -= RcptLine."ADE Amount";
    "AED(GSI) Amount" -= RcptLine."AED(GSI) Amount";
    "AED(TTA) Amount" -= RcptLine."AED(TTA) Amount";
    ...

    Existing code 3

    ...
    "eCess Amount" -= RcptLine."eCess Amount";
    "ADC VAT Amount" -= RcptLine."ADC VAT Amount";
    "SHE Cess Amount" -= RcptLine."SHE Cess Amount";
    "Custom eCess Amount" -= RcptLine."Custom eCess Amount";
    "Custom SHECess Amount" -= RcptLine."Custom SHECess Amount";

    IF (("BED Amount" <> 0) OR ("ADET Amount" <> 0) OR ("AED(GSI) Amount" <> 0) OR ("AED(TTA) Amount" <> 0) OR
    ("CESS Amount" <> 0) OR("NCCD Amount" <> 0) OR ("SAED Amount" <> 0) OR ("SED Amount" <> 0) OR ("eCess Amount" <> 0) OR
    ("ADE Amount" <> 0) OR ("ADC VAT Amount" <> 0) OR ("SHE Cess Amount" <> 0) OR ("Custom eCess Amount" <> 0) OR
    ("Custom SHECess Amount" <> 0))
    AND ("Excise Loading on Inventory" = FALSE)
    ...

    Replacement code 3

    ...
    "eCess Amount" -= RcptLine."eCess Amount";
    "ADC VAT Amount" -= RcptLine."ADC VAT Amount";
    "SHE Cess Amount" -= RcptLine."SHE Cess Amount";
    "Custom eCess Amount" -= RcptLine."Custom eCess Amount";
    "Custom SHECess Amount" -= RcptLine."Custom SHECess Amount";

    // Add the following line.
    END;

    IF (("BED Amount" <> 0) OR ("ADET Amount" <> 0) OR ("AED(GSI) Amount" <> 0) OR ("AED(TTA) Amount" <> 0) OR
    ("CESS Amount" <> 0) OR("NCCD Amount" <> 0) OR ("SAED Amount" <> 0) OR ("SED Amount" <> 0) OR ("eCess Amount" <> 0) OR
    ("ADE Amount" <> 0) OR ("ADC VAT Amount" <> 0) OR ("SHE Cess Amount" <> 0) OR ("Custom eCess Amount" <> 0) OR
    ("Custom SHECess Amount" <> 0))
    AND ("Excise Loading on Inventory" = FALSE)
    ...

    Existing code 4

    ...
    THEN BEGIN
    "Qty. to Receive (Base)" := RcptLine.Quantity;
    "Line No." := RcptLine."Line No.";
    IF (((Type = Type::Item) AND ("Capital Item" = TRUE)) OR (Type = Type::"Fixed Asset")) THEN
    ExciseInsertRGRegister.InsertRG23CPartIIPurchase(PurchLine,RcptHeader,ReturnShptHeader,TRUE)

    // Delete the following lines.
    ELSE
    ExciseInsertRGRegister.InsertRG23APartIIPurchase(PurchLine,RcptHeader,ReturnShptHeader,TRUE);
    // End of the lines.

    RcptLine."BED Amount" := TempPurchLine."BED Amount";
    RcptLine."ADET Amount" := TempPurchLine."ADET Amount";
    RcptLine."ADE Amount" := TempPurchLine."ADE Amount";
    RcptLine."AED(GSI) Amount" := TempPurchLine."AED(GSI) Amount";
    RcptLine."AED(TTA) Amount" := TempPurchLine."AED(TTA) Amount";
    ...

    Replacement code 4

    ...
    THEN BEGIN
    "Qty. to Receive (Base)" := RcptLine.Quantity;
    "Line No." := RcptLine."Line No.";
    IF (((Type = Type::Item) AND ("Capital Item" = TRUE)) OR (Type = Type::"Fixed Asset")) THEN
    ExciseInsertRGRegister.InsertRG23CPartIIPurchase(PurchLine,RcptHeader,ReturnShptHeader,TRUE)

    // Add the following lines.
    ELSE BEGIN
    IF (PurchLine."Receipt No." <> '') AND (PurchHeader."Currency Code" <> '') THEN BEGIN
    PurchRcptHead.GET(PurchLine."Receipt No.");
    IF PurchRcptHead."Currency Code" <> '' THEN
    ExciseInsertRGRegister.InsertRG23APartIIPurchase(PurchLine,RcptHeader,ReturnShptHeader,TRUE);
    END ELSE
    ExciseInsertRGRegister.InsertRG23APartIIPurchase(PurchLine,RcptHeader,ReturnShptHeader,TRUE);
    END;
    // End of the lines.

    RcptLine."BED Amount" := TempPurchLine."BED Amount";
    RcptLine."ADET Amount" := TempPurchLine."ADET Amount";
    RcptLine."ADE Amount" := TempPurchLine."ADE Amount";
    RcptLine."AED(GSI) Amount" := TempPurchLine."AED(GSI) Amount";
    RcptLine."AED(TTA) Amount" := TempPurchLine."AED(TTA) Amount";
  9. Change the code in the InsertRG23APartIIPurchase function in the Excise Insert RG Registers codeunit (13701) as follows:
    Existing code

    ...
    RG23APartII."Remaining Excise Amount" := RG23APartII."Remaining BED Credit" + RG23APartII."Remaining AED(GSI) Credit" +
    RG23APartII."Remaining SED Credit" + RG23APartII."Remaining SAED Credit" + RG23APartII."Remaining NCCD Credit" +
    RG23APartII."Remaining eCess Credit" + RG23APartII."Remaining ADET Credit" + RG23APartII."Remaining AED(TTA) Credit" +
    RG23APartII."Remaining ADE Credit" + RG23APartII."Remaining ADC VAT Credit" +
    RG23APartII."Remaining SHECess Credit";

    END ELSE BEGIN
    RG23APartII."Posting Date" := ReturnShptHeader."Posting Date";
    RG23APartII."Document No." := ReturnShptHeader."No.";
    IF NOT ExciseDifference THEN BEGIN
    RG23APartII."BED Debit" :=
    ...

    Replacement code

    ...
    RG23APartII."Remaining Excise Amount" := RG23APartII."Remaining BED Credit" + RG23APartII."Remaining AED(GSI) Credit" +
    RG23APartII."Remaining SED Credit" + RG23APartII."Remaining SAED Credit" + RG23APartII."Remaining NCCD Credit" +
    RG23APartII."Remaining eCess Credit" + RG23APartII."Remaining ADET Credit" + RG23APartII."Remaining AED(TTA) Credit" +
    RG23APartII."Remaining ADE Credit" + RG23APartII."Remaining ADC VAT Credit" +
    RG23APartII."Remaining SHECess Credit";

    // Add the following lines.
    IF ExciseDifference THEN
    AdjustCrEntriesRG23A(RG23APartII);
    // End of the lines.

    END ELSE BEGIN
    RG23APartII."Posting Date" := ReturnShptHeader."Posting Date";
    RG23APartII."Document No." := ReturnShptHeader."No.";
    IF NOT ExciseDifference THEN BEGIN
    RG23APartII."BED Debit" :=
    ...
  10. Add a new local variable in the InsertRG23CPartIIPurchase function in the Excise Insert RG Registers codeunit (13701), and then specify the variable as follows:

    • Name: TempRG23CPartII2

    • DataType: TEMPORARY Record

    • Subtype: RG 23 C Part II (13722)

  11. Change the code in the InsertRG23CPartIIPurchase function in the Excise Insert RG Registers codeunit (13701) as follows:
    Existing code

    ...
    RG23CPartII."Remaining Excise Amount" := RG23CPartII."Remaining BED Credit" + RG23CPartII."Remaining AED(GSI) Credit" +
    RG23CPartII."Remaining SED Credit" + RG23CPartII."Remaining SAED Credit" + RG23CPartII."Remaining NCCD Credit" +
    RG23CPartII."Remaining eCess Credit" + RG23CPartII."Remaining ADET Credit" + RG23CPartII."Remaining AED(TTA) Credit" +
    RG23CPartII."Remaining ADE Credit" + RG23CPartII."Remaining ADC VAT Credit" +
    RG23CPartII."Remaining SHECess Credit";

    END ELSE BEGIN
    RG23CPartII."Posting Date" := ReturnShptHeader."Posting Date";
    RG23CPartII."Document No." := ReturnShptHeader."No.";
    IF NOT ExciseDifference THEN BEGIN
    RG23CPartII."BED Debit":=
    ...

    Replacement code

    ...
    RG23CPartII."Remaining Excise Amount" := RG23CPartII."Remaining BED Credit" + RG23CPartII."Remaining AED(GSI) Credit" +
    RG23CPartII."Remaining SED Credit" + RG23CPartII."Remaining SAED Credit" + RG23CPartII."Remaining NCCD Credit" +
    RG23CPartII."Remaining eCess Credit" + RG23CPartII."Remaining ADET Credit" + RG23CPartII."Remaining AED(TTA) Credit" +
    RG23CPartII."Remaining ADE Credit" + RG23CPartII."Remaining ADC VAT Credit" +
    RG23CPartII."Remaining SHECess Credit";

    // Add the following lines.
    IF ExciseDifference THEN BEGIN
    TempRG23CPartII2.INIT;
    TempRG23CPartII2.TRANSFERFIELDS(RG23CPartII);
    TempRG23CPartII2."BED Debit" := ROUND(TempRG23CPartII2."BED Debit" * 0.5);
    TempRG23CPartII2."AED(GSI) Debit" := ROUND(TempRG23CPartII2."AED(GSI) Debit" * 0.5);
    TempRG23CPartII2."SAED Debit" := ROUND(TempRG23CPartII2."SAED Debit" * 0.5);
    TempRG23CPartII2."NCCD Debit" := ROUND(TempRG23CPartII2."NCCD Debit" * 0.5);
    TempRG23CPartII2."eCess Debit" := ROUND(TempRG23CPartII2."eCess Debit" * 0.5);
    TempRG23CPartII2."SED Debit" := ROUND(TempRG23CPartII2."SED Debit" * 0.5);
    TempRG23CPartII2."ADET Debit" := ROUND(TempRG23CPartII2."ADET Debit" * 0.5);
    TempRG23CPartII2."AED(TTA) Debit" := ROUND(TempRG23CPartII2."AED(TTA) Debit" * 0.5);
    TempRG23CPartII2."ADE Debit":= ROUND(TempRG23CPartII2."ADE Debit" * 0.5);
    TempRG23CPartII2."SHE Cess Debit" := ROUND(TempRG23CPartII2."SHE Cess Debit" * 0.5);
    TempRG23CPartII2."ADC VAT Debit" := ROUND(TempRG23CPartII2."ADC VAT Debit" * 0.5);
    AdjustCrEntriesRG23C(TempRG23CPartII2);
    END;
    // End of the lines.

    END ELSE BEGIN
    RG23CPartII."Posting Date" := ReturnShptHeader."Posting Date";
    RG23CPartII."Document No." := ReturnShptHeader."No.";
    IF NOT ExciseDifference THEN BEGIN
    RG23CPartII."BED Debit":=
    ...
  12. Change the code in the AdjustCrEntriesRG23A function in the Excise Insert RG Registers codeunit (13701) as follows:
    Existing code 1

    ...
    BEGIN
    WITH RG23APartII2 DO BEGIN
    RG23APartII3.RESET;

    // Delete the following line.
    RG23APartII3.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Remaining Excise Amount","Location E.C.C. No.");

    IF "Excise Credit Availed as ST" THEN BEGIN
    RG23APartII3.SETRANGE("Excise as Service Tax Credit",TRUE);
    NextEntryNo := 0;
    ExciseAsSTUtilisation2.RESET;
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    ...

    Replacement code 1

    ...
    BEGIN
    WITH RG23APartII2 DO BEGIN
    RG23APartII3.RESET;

    // Add the following line.
    RG23APartII3.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Location E.C.C. No.");

    IF "Excise Credit Availed as ST" THEN BEGIN
    RG23APartII3.SETRANGE("Excise as Service Tax Credit",TRUE);
    NextEntryNo := 0;
    ExciseAsSTUtilisation2.RESET;
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    ...

    Existing code 2

    ...
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    NextEntryNo := ExciseAsSTUtilisation2."Entry No.";
    END;

    RG23APartII3.SETRANGE(Closed,FALSE);

    // Delete the following line.
    RG23APartII3.SETFILTER("Remaining Excise Amount",'>%1',0);

    RG23APartII3.SETRANGE("Location E.C.C. No.","Location E.C.C. No.");
    IF RG23APartII3.FINDSET THEN
    REPEAT
    RG23APartII4 := RG23APartII3;
    CompareAmt(RG23APartII4."Remaining BED Credit","BED Debit",RG23APartII4."Remaining Excise Amount");
    ...

    Replacement code 2

    ...
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    NextEntryNo := ExciseAsSTUtilisation2."Entry No.";
    END;

    RG23APartII3.SETRANGE(Closed,FALSE);

    RG23APartII3.SETRANGE("Location E.C.C. No.","Location E.C.C. No.");
    IF RG23APartII3.FINDSET THEN
    REPEAT
    RG23APartII4 := RG23APartII3;
    CompareAmt(RG23APartII4."Remaining BED Credit","BED Debit",RG23APartII4."Remaining Excise Amount");
    ...
  13. Change the code in the AdjustCrEntriesRG23C function in the Excise Insert RG Registers codeunit (13701) as follows:
    Existing code 1

    ...
    BEGIN
    WITH RG23CPartII2 DO BEGIN
    RG23CPartII3.RESET;

    // Delete the following line.
    RG23CPartII3.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Remaining Excise Amount","Location E.C.C. No.");

    IF "Excise Credit Availed as ST" THEN BEGIN
    RG23CPartII3.SETRANGE("Excise as Service Tax Credit",TRUE);
    NextEntryNo := 0;
    ExciseAsSTUtilisation2.RESET;
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    ...

    Replacement code 1

    ...
    BEGIN
    WITH RG23CPartII2 DO BEGIN
    RG23CPartII3.RESET;

    // Add the following line.
    RG23CPartII3.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Location E.C.C. No.");

    IF "Excise Credit Availed as ST" THEN BEGIN
    RG23CPartII3.SETRANGE("Excise as Service Tax Credit",TRUE);
    NextEntryNo := 0;
    ExciseAsSTUtilisation2.RESET;
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    ...

    Existing code 2

    ...
    ExciseAsSTUtilisation2.RESET;
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    NextEntryNo := ExciseAsSTUtilisation2."Entry No.";
    END;
    RG23CPartII3.SETRANGE(Closed,FALSE);

    // Delete the following line.
    RG23CPartII3.SETFILTER("Remaining Excise Amount",'>%1',0);

    RG23CPartII3.SETRANGE("Location E.C.C. No.","Location E.C.C. No.");
    IF RG23CPartII3.FINDSET THEN
    REPEAT
    RG23CPartII4 := RG23CPartII3;
    CompareAmt(RG23CPartII4."Remaining BED Credit","BED Debit",RG23CPartII4."Remaining Excise Amount");
    ...

    Replacement code 2

    ...
    ExciseAsSTUtilisation2.RESET;
    IF ExciseAsSTUtilisation2.FINDLAST THEN
    NextEntryNo := ExciseAsSTUtilisation2."Entry No.";
    END;
    RG23CPartII3.SETRANGE(Closed,FALSE);

    RG23CPartII3.SETRANGE("Location E.C.C. No.","Location E.C.C. No.");
    IF RG23CPartII3.FINDSET THEN
    REPEAT
    RG23CPartII4 := RG23CPartII3;
    CompareAmt(RG23CPartII4."Remaining BED Credit","BED Debit",RG23CPartII4."Remaining Excise Amount");
    ...
  14. Change the code in the PostRegEntries function in the Service Tax Management codeunit (16471) as follows:
    Existing code 1

    ...
    GenJnlLine.RESET;
    GenJnlLine.SETRANGE("Document No.",DocNo);
    IF GenJnlLine.FINDFIRST THEN BEGIN
    CheckAvailableRGCredit(GenJnlLine);;
    RG23APartII.RESET;

    // Delete the following lines.
    RG23APartII.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Remaining Excise Amount","Location E.C.C. No.");
    RG23APartII.SETRANGE("Excise as Service Tax Credit",TRUE);
    RG23APartII.SETRANGE(Closed,FALSE);
    RG23APartII.SETFILTER("Remaining Excise Amount",'>%1',0);
    // End of the lines.

    RG23APartII.SETRANGE("Location E.C.C. No.",GenJnlLine."E.C.C. No.");
    IF RG23APartII.FINDFIRST THEN BEGIN
    GenJnlLine."Excise Bus. Posting Group" := RG23APartII."Excise Bus. Posting Group";
    GenJnlLine."Excise Prod. Posting Group" := RG23APartII."Excise Prod. Posting Group";
    GenJnlLine.VALIDATE("Account No.",RG23APartII."Cenvat Cr. Receivable Account");
    ...

    Replacement code 1

    ...
    GenJnlLine.RESET;
    GenJnlLine.SETRANGE("Document No.",DocNo);
    IF GenJnlLine.FINDFIRST THEN BEGIN
    CheckAvailableRGCredit(GenJnlLine);;
    RG23APartII.RESET;

    // Add the following lines.
    RG23APartII.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Location E.C.C. No.");
    RG23APartII.SETRANGE("Excise as Service Tax Credit",TRUE);
    RG23APartII.SETRANGE(Closed,FALSE);
    // End of the lines.

    RG23APartII.SETRANGE("Location E.C.C. No.",GenJnlLine."E.C.C. No.");
    IF RG23APartII.FINDFIRST THEN BEGIN
    GenJnlLine."Excise Bus. Posting Group" := RG23APartII."Excise Bus. Posting Group";
    GenJnlLine."Excise Prod. Posting Group" := RG23APartII."Excise Prod. Posting Group";
    GenJnlLine.VALIDATE("Account No.",RG23APartII."Cenvat Cr. Receivable Account");
    ...

    Existing code 2

    ...
    GenJnlLine."Excise Bus. Posting Group" := RG23APartII."Excise Bus. Posting Group";
    GenJnlLine."Excise Prod. Posting Group" := RG23APartII."Excise Prod. Posting Group";
    GenJnlLine.VALIDATE("Account No.",RG23APartII."Cenvat Cr. Receivable Account");
    END ELSE BEGIN
    RG23CPartII.RESET;

    // Delete the following lines.
    RG23CPartII.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Remaining Excise Amount","Location E.C.C. No.");
    RG23CPartII.SETRANGE("Excise as Service Tax Credit",TRUE);
    RG23CPartII.SETRANGE(Closed,FALSE);
    RG23CPartII.SETFILTER("Remaining Excise Amount",'>%1',0);
    // End of the lines.

    RG23CPartII.SETRANGE("Location E.C.C. No.",GenJnlLine."E.C.C. No.");
    IF RG23CPartII.FINDFIRST THEN BEGIN
    GenJnlLine."Excise Bus. Posting Group" := RG23CPartII."Excise Bus. Posting Group";
    GenJnlLine."Excise Prod. Posting Group" := RG23CPartII."Excise Prod. Posting Group";
    GenJnlLine.VALIDATE("Account No.",RG23CPartII."Cenvat Cr. Receivable Acc.");
    ...

    Replacement code 2

    ...
    GenJnlLine."Excise Bus. Posting Group" := RG23APartII."Excise Bus. Posting Group";
    GenJnlLine."Excise Prod. Posting Group" := RG23APartII."Excise Prod. Posting Group";
    GenJnlLine.VALIDATE("Account No.",RG23APartII."Cenvat Cr. Receivable Account");
    END ELSE BEGIN
    RG23CPartII.RESET;

    // Add the following lines.
    RG23CPartII.SETCURRENTKEY("Excise as Service Tax Credit",Closed,"Location E.C.C. No.");
    RG23CPartII.SETRANGE("Excise as Service Tax Credit",TRUE);
    RG23CPartII.SETRANGE(Closed,FALSE);
    // End of the lines.

    RG23CPartII.SETRANGE("Location E.C.C. No.",GenJnlLine."E.C.C. No.");
    IF RG23CPartII.FINDFIRST THEN BEGIN
    GenJnlLine."Excise Bus. Posting Group" := RG23CPartII."Excise Bus. Posting Group";
    GenJnlLine."Excise Prod. Posting Group" := RG23CPartII."Excise Prod. Posting Group";
    GenJnlLine.VALIDATE("Account No.",RG23CPartII."Cenvat Cr. Receivable Acc.");
    ...

Prerequisites

You must have the Indian version of Microsoft Dynamics NAV 2009 Service Pack 1 installed to apply this hotfix.

Removal information

You cannot remove this hotfix.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Meer hulp nodig?

Uw vaardigheden uitbreiden
Training verkennen
Als eerste nieuwe functies krijgen
Deelnemen aan Microsoft insiders

Was deze informatie nuttig?

Wat heeft uw ervaring beïnvloed?

Hebt u aanvullende feedback? (Optioneel)

Bedankt voor uw feedback.

×