This article applies to Microsoft Dynamics NAV for the following countries and language locales.
- Belgium (French) (fr-be)
- Belgium (Dutch) (nl-be)
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
...
"Job No." := PurchLine."Job No.";
IF (Type = Type::"G/L Account") OR (Type = Type::"Fixed Asset") THEN BEGIN // Delete this line.
"Line No." := PurchLine."Line No.";
"Posting Description" := PurchLine.Description; // Delete this line.
END ELSE BEGIN // Delete this line.
PurchHeader.GET(PurchLine."Document Type",PurchLine."Document No.");
...
...
"Job No." := PurchLine."Job No.";
"Line No." := PurchLine."Line No.";
IF (Type = Type::"G/L Account") OR (Type = Type::"Fixed Asset") THEN // Add this line.
"Posting Description" := PurchLine.Description // Add this line.
ELSE BEGIN // Add this line.
PurchHeader.GET(PurchLine."Document Type",PurchLine."Document No.");
...
...
VATPostingSetup."VAT Calculation Type"::"Reverse Charge VAT":
BEGIN
IF UnrealizedVAT THEN BEGIN
VATPostingSetup.TESTFIELD("Purch. VAT Unreal. Account");
InitGLEntry(
VATPostingSetup."Purch. VAT Unreal. Account",
GLEntryVATAmount,SrcCurrGLEntryVATAmt,TRUE,TRUE);
InsertGLEntry(TRUE);
VATPostingSetup.TESTFIELD("Reverse Chrg. VAT Unreal. Acc.");
InitGLEntry(
VATPostingSetup."Reverse Chrg. VAT Unreal. Acc.",
-GLEntryVATAmount,-SrcCurrGLEntryVATAmt,TRUE,TRUE); // Delete this line.
InsertGLEntry(TRUE);
END ELSE BEGIN
VATPostingSetup.TESTFIELD("Purchase VAT Account");
InitGLEntry(
VATPostingSetup."Purchase VAT Account",
GLEntryVATAmount,SrcCurrGLEntryVATAmt,TRUE,TRUE);
InsertGLEntry(TRUE);
VATPostingSetup.TESTFIELD("Reverse Chrg. VAT Acc.");
InitGLEntry(
VATPostingSetup."Reverse Chrg. VAT Acc.",
-GLEntryVATAmount,-SrcCurrGLEntryVATAmt,TRUE,TRUE); // Delete this line.
InsertGLEntry(TRUE);
...
...
VATPostingSetup."VAT Calculation Type"::"Reverse Charge VAT":
BEGIN
IF "VAT Posting" = "VAT Posting"::"Automatic VAT Entry" THEN // Add this line.
VATAmtWithoutNonDeduct := GLEntryVATAmount; // Add this line.
IF UnrealizedVAT THEN BEGIN
VATPostingSetup.TESTFIELD("Purch. VAT Unreal. Account");
InitGLEntry(
VATPostingSetup."Purch. VAT Unreal. Account",
GLEntryVATAmount,SrcCurrGLEntryVATAmt,TRUE,TRUE);
InsertGLEntry(TRUE);
VATPostingSetup.TESTFIELD("Reverse Chrg. VAT Unreal. Acc.");
InitGLEntry(
VATPostingSetup."Reverse Chrg. VAT Unreal. Acc.",
-VATAmtWithoutNonDeduct,-SrcCurrGLEntryVATAmt,TRUE,TRUE); // Add this line.
InsertGLEntry(TRUE);
END ELSE BEGIN
VATPostingSetup.TESTFIELD("Purchase VAT Account");
InitGLEntry(
VATPostingSetup."Purchase VAT Account",
GLEntryVATAmount,SrcCurrGLEntryVATAmt,TRUE,TRUE);
InsertGLEntry(TRUE);
VATPostingSetup.TESTFIELD("Reverse Chrg. VAT Acc.");
InitGLEntry(
VATPostingSetup."Reverse Chrg. VAT Acc.",
-VATAmtWithoutNonDeduct,-SrcCurrGLEntryVATAmt,TRUE,TRUE); // Add this line.
InsertGLEntry(TRUE);
...
VATAmtWithoutNonDeduct := VATAmtForReverseChargeVAT;
...
PurchLine.CalcVATAmountLines(1,PurchHeader,CombinedPurchLineTemp,TempVATAmountLine);
IF PurchLine.FINDSET THEN
REPEAT
JobPurchLine := PurchLine;
...
...
PurchLine.CalcVATAmountLines(1,PurchHeader,CombinedPurchLineTemp,TempVATAmountLine);
PurchLineForReverseChargeVAT.RESET; // Add this line.
PurchLineForReverseChargeVAT.DELETEALL; // Add this line.
IF PurchLine.FINDSET THEN
REPEAT
JobPurchLine := PurchLine;
...
...
PurchLine.TESTFIELD(Amount,0);
RoundAmount(PurchLine."Qty. to Invoice");
IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN BEGIN
ReverseAmount(PurchLine);
ReverseAmount(PurchLineACY);
END;
RemQtyToBeInvoiced := PurchLine."Qty. to Invoice";
...
...
PurchLine.TESTFIELD(Amount,0);
PurchLineForReverseChargeVAT := PurchLine; // Add this line.
RoundAmount(PurchLine."Qty. to Invoice");
IF "Document Type" IN ["Document Type"::"Return Order","Document Type"::"Credit Memo"] THEN BEGIN
ReverseAmount(PurchLine);
ReverseAmount(PurchLineACY);
ReverseAmount(PurchLineForReverseChargeVAT); // Add this line.
END;
PurchLineForReverseChargeVAT.INSERT; // Add this line.
RemQtyToBeInvoiced := PurchLine."Qty. to Invoice";
...
....
CASE InvPostingBuffer[1]."VAT Calculation Type" OF
InvPostingBuffer[1]."VAT Calculation Type"::"Reverse Charge VAT":
BEGIN // Delete this line.
VATPostingSetup.GET( // Delete this line.
InvPostingBuffer[1]."VAT Bus. Posting Group",InvPostingBuffer[1]."VAT Prod. Posting Group"); // Delete this line.
InvPostingBuffer[1]."VAT Amount" := // Delete this line.
ROUND(// Delete this line.
InvPostingBuffer[1].Amount * VATPostingSetup."VAT %" / 100);// Delete this line.
InvPostingBuffer[1]."VAT Amount (ACY)" := // Delete this line.
ROUND( // Delete this line.
(InvPostingBuffer[1]."Amount (ACY)" * VATPostingSetup."VAT %" / 100),Currency."Amount Rounding Precision");
END; // Delete this line.
InvPostingBuffer[1]."VAT Calculation Type"::"Sales Tax":
...
....
CASE InvPostingBuffer[1]."VAT Calculation Type" OF
InvPostingBuffer[1]."VAT Calculation Type"::"Reverse Charge VAT":
CalcAmtVATForReversechargeVAT; // Add this line.
InvPostingBuffer[1]."VAT Calculation Type"::"Sales Tax":
...
...
GenJnlLine."Base Before Pmt. Disc." := InvPostingBuffer[1]."Base Before Pmt. Disc.";
RunGenJnlPostLine(GenJnlLine,InvPostingBuffer[1]."Dimension Entry No.");
UNTIL InvPostingBuffer[1].NEXT(-1) = 0;
...
...
GenJnlLine."Base Before Pmt. Disc." := InvPostingBuffer[1]."Base Before Pmt. Disc.";
GenJnlPostLine.SetVATAmtWithoutNonDeduct(VATAmtWithoutNonDeduct); // Add this line.
RunGenJnlPostLine(GenJnlLine,InvPostingBuffer[1]."Dimension Entry No.");
UNTIL InvPostingBuffer[1].NEXT(-1) = 0;
...
VATPostingSetup.GET(
InvPostingBuffer[1]."VAT Bus. Posting Group",InvPostingBuffer[1]."VAT Prod. Posting Group");
PurchLineForReverseChargeVAT.RESET;
PurchLineForReverseChargeVAT.SETRANGE("Line No.",InvPostingBuffer[1]."Line No.");
PurchLineForReverseChargeVAT.FINDFIRST;
NonDeductVATForReversChargeVAT :=
ROUND(
InvPostingBuffer[1].Amount *
VATPostingSetup."VAT %" / 100 *
PurchLineForReverseChargeVAT."Non Deductible VAT %" / 100);
NonDeductVATACYForRevsChargVAT :=
ROUND(
InvPostingBuffer[1]."Amount (ACY)" *
VATPostingSetup."VAT %" / 100 *
PurchLineForReverseChargeVAT."Non Deductible VAT %" / 100,
Currency."Amount Rounding Precision");
NonDeductVATFCYForRevsChargVAT :=
ROUND(
PurchLineForReverseChargeVAT.Amount *
VATPostingSetup."VAT %" / 100 *
PurchLineForReverseChargeVAT."Non Deductible VAT %" / 100,
Currency."Amount Rounding Precision");
VATAmtWithoutNonDeduct :=
ROUND(
InvPostingBuffer[1].Amount *
VATPostingSetup."VAT %" / 100);
InvPostingBuffer[1]."VAT Amount" :=
VATAmtWithoutNonDeduct - NonDeductVATForReversChargeVAT;
InvPostingBuffer[1]."VAT Amount (ACY)" :=
ROUND(
InvPostingBuffer[1]."Amount (ACY)" *
VATPostingSetup."VAT %" / 100,
Currency."Amount Rounding Precision") -
NonDeductVATACYForRevsChargVAT;
InvPostingBuffer[1].Amount := InvPostingBuffer[1].Amount + NonDeductVATForReversChargeVAT;
InvPostingBuffer[1]."Amount (ACY)" := InvPostingBuffer[1]."Amount (ACY)" + NonDeductVATACYForRevsChargVAT;
InvPostingBuffer[1]."VAT Base Amount" := InvPostingBuffer[1]."VAT Base Amount" + NonDeductVATForReversChargeVAT;
TotalNonDeductVATForRChargeVAT := TotalNonDeductVATForRChargeVAT + NonDeductVATForReversChargeVAT;
TotalNonDeductVATFCYForRCVAT := TotalNonDeductVATFCYForRCVAT + NonDeductVATFCYForRevsChargVAT;
Keywords: kbnotautohotfix, kbsurveynew, kbnoloc, kbmbsquickpub, kbhotfixserver, kbmbscodefix, kbmbsmigrate, kb, kbqfe, kbmbspartner