{"title":"Codeunit 6201 Non-Ded. VAT Impl., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/6201-non-ded-vat-impl/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-11-11","object":{"type":"codeunit","id":6201,"name":"Non-Ded. VAT Impl.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/6201-non-ded-vat-impl/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/6201-non-ded-vat-impl/source/","path":"src/Layers/W1/BaseApp/Finance/VAT/Calculation/NonDedVATImpl.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:6200":{"name":"Non-Deductible VAT","url":"https://jonas-paprotka.de/ref/codeunit/6200-non-deductible-vat/"},"table:39":{"name":"Purchase Line","url":"https://jonas-paprotka.de/ref/table/39-purchase-line/"},"table:290":{"name":"VAT Amount Line","url":"https://jonas-paprotka.de/ref/table/290-vat-amount-line/"},"table:81":{"name":"Gen. Journal Line","url":"https://jonas-paprotka.de/ref/table/81-gen-journal-line/"},"table:98":{"name":"General Ledger Setup","url":"https://jonas-paprotka.de/ref/table/98-general-ledger-setup/"},"table:330":{"name":"Currency Exchange Rate","url":"https://jonas-paprotka.de/ref/table/330-currency-exchange-rate/"},"table:38":{"name":"Purchase Header","url":"https://jonas-paprotka.de/ref/table/38-purchase-header/"},"table:4":{"name":"Currency","url":"https://jonas-paprotka.de/ref/table/4-currency/"},"table:189":{"name":"VAT Setup","url":"https://jonas-paprotka.de/ref/table/189-vat-setup/"}},"procs":[{"name":"ShowNonDeductibleVATInLines","line":52,"kind":"procedure","params":0,"steps":[[56,"call","IsNonDeductibleVATEnabled",0]]},{"name":"GetNonDeductibleVATAmount","line":69,"kind":"procedure","params":1,"steps":[[71,"call","IsNonDeductibleVATEnabled",0]]},{"name":"GetNonDeductibleVATPct","line":81,"kind":"procedure","params":3,"steps":[[85,"call","IsNonDeductibleVATEnabled",0]]},{"name":"GetNonDeductibleVATPct","line":92,"kind":"procedure","params":2,"steps":[[96,"call","IsNonDeductibleVATEnabled",0],[98,"ext","codeunit",6200,"OnBeforeGetNonDeductibleVATPct",4]]},{"name":"GetNonDeductibleVATPct","line":108,"kind":"procedure","params":3,"steps":[[112,"ext","codeunit",6200,"OnBeforeGetNonDeductibleVATPctForDeferrals",5],[115,"call","GetGeneralPostingTypeFromDeferralDocType",1]]},{"name":"GetNonDeductibleVATAccForDeferrals","line":118,"kind":"procedure","params":3,"steps":[[122,"call","GetGeneralPostingTypeFromDeferralDocType",1]]},{"name":"SetNonDeductiblePct","line":145,"kind":"procedure","params":1,"steps":[[147,"call","IsNonDeductibleVATEnabled",0],[149,"validate",39,"Non-Deductible VAT %"],[149,"call","GetNonDeductibleVATPct",1]]},{"name":"Update","line":166,"kind":"procedure","params":3,"steps":[[170,"call","IsNonDeductibleVATEnabled",0],[172,"ext","codeunit",6200,"OnBeforeUpdateNonDeductibleAmountsWithRoundingInPurchLine",4],[175,"call","UpdateNonDeductibleAmountsWithRounding",8]]},{"name":"Update","line":180,"kind":"procedure","params":2,"steps":[[184,"call","IsNonDeductibleVATEnabled",0],[186,"ext","codeunit",6200,"OnBeforeUpdateNonDeductibleAmountsInPurchLine",3],[189,"call","UpdateNonDeductibleAmounts",6]]},{"name":"Update","line":194,"kind":"procedure","params":4,"steps":[[199,"ext","codeunit",6200,"OnBeforeUpdateNonDeductibleAmountsWithFactorInPurchLine",5]]},{"name":"DivideNonDeductibleVATInPurchaseLine","line":210,"kind":"procedure","params":6,"steps":[[215,"ext","codeunit",6200,"OnBeforeDivideNonDeductibleVATInPurchaseLine",7]]},{"name":"ValidateVATAmountInVATAmountLine","line":230,"kind":"procedure","params":1,"steps":[[234,"call","IsNonDeductibleVATEnabled",0],[236,"ext","codeunit",6200,"OnBeforeValidateVATAmountInVATAmountLine",2],[240,"validate",290,"Non-Deductible VAT Amount"],[243,"validate",290,"Non-Deductible VAT Amount"]]},{"name":"ValidateNonDeductibleVATInVATAmountLine","line":249,"kind":"procedure","params":1,"steps":[[253,"call","IsNonDeductibleVATEnabled",0],[255,"ext","codeunit",6200,"OnBeforeValidateNonDeductibleVATInVATAmountLine",2]]},{"name":"Update","line":264,"kind":"procedure","params":2,"steps":[[268,"call","IsNonDeductibleVATEnabled",0],[270,"ext","codeunit",6200,"OnBeforeUpdateNonDeductibleAmountsInVATAmountLine",3],[273,"call","UpdateNonDeductibleAmounts",6]]},{"name":"UpdateNonDeductibleAmountsWithDiffInVATAmountLine","line":280,"kind":"procedure","params":2,"steps":[[284,"call","IsNonDeductibleVATEnabled",0],[286,"ext","codeunit",6200,"OnBeforeUpdateNonDeductibleAmountsWithDiffInVATAmountLine",3],[289,"call","UpdateNonDeductibleAmounts",6]]},{"name":"SetNonDedVATAmountInPurchLine","line":296,"kind":"procedure","params":2,"steps":[[300,"call","IsNonDeductibleVATEnabled",0],[302,"ext","codeunit",6200,"OnBeforeSetNonDedVATAmountInPurchLine",3]]},{"name":"SetNonDedVATAmountDiffInPurchLine","line":308,"kind":"procedure","params":7,"steps":[[312,"call","IsNonDeductibleVATEnabled",0],[314,"ext","codeunit",6200,"OnBeforeSetNonDedVATAmountDiffInPurchLine",8]]},{"name":"GetNonDedVATAmountFromVATAmountLine","line":338,"kind":"procedure","params":5,"steps":[[343,"call","IsNonDeductibleVATEnabled",0],[345,"ext","codeunit",6200,"OnBeforeGetNonDedVATAmountFromVATAmountLine",7]]},{"name":"AddNonDedAmountsOfPurchLineToVATAmountLine","line":360,"kind":"procedure","params":6,"steps":[[365,"call","IsNonDeductibleVATEnabled",0],[367,"ext","codeunit",6200,"OnBeforeAddNonDedAmountsOfPurchLineToVATAmountLine",7]]},{"name":"CopyNonDedVATFromPurchInvLineToVATAmountLine","line":402,"kind":"procedure","params":2,"steps":[[406,"call","IsNonDeductibleVATEnabled",0],[408,"ext","codeunit",6200,"OnBeforeCopyNonDedVATFromPurchInvLineToVATAmountLine",3]]},{"name":"CopyNonDedVATFromPurchCrMemoLineToVATAmountLine","line":427,"kind":"procedure","params":2,"steps":[[431,"call","IsNonDeductibleVATEnabled",0],[433,"ext","codeunit",6200,"OnBeforeCopyNonDedVATFromPurchCrMemoLineToVATAmountLine",3]]},{"name":"CopyNonDedVATFromGenJnlLineToJobJnlLine","line":460,"kind":"procedure","params":2,"steps":[[465,"call","UseNonDeductibleVATAmountForJobCost",0],[472,"ext","table",81,"GetGenJnlLineToJobCurrencyFactor",0]]},{"name":"CheckVATPostingSetupChangeIsAllowed","line":509,"kind":"procedure","params":1,"steps":[[514,"call","IsNonDeductibleVATEnabled",0],[516,"ext","codeunit",6200,"OnBeforeCheckVATPostingSetupChangeIsAllowed",2],[529,"call","CheckUnrealizedVATWithNonDeductibleVATInVATPostingSetup",1]]},{"name":"CheckNonDeductibleVATPctIsAllowed","line":532,"kind":"procedure","params":1,"steps":[[536,"call","IsNonDeductibleVATEnabled",0],[538,"ext","codeunit",6200,"OnBeforeCheckNonDeductibleVATPctIsAllowed",2]]},{"name":"CheckNonDeductibleVATAmountDiff","line":551,"kind":"procedure","params":4,"steps":[[556,"call","IsNonDeductibleVATEnabled",0],[562,"ext","table",98,"GetRecordOnce",0]]},{"name":"Reverse","line":604,"kind":"procedure","params":1,"steps":[[606,"call","IsNonDeductibleVATEnabled",0]]},{"name":"Reverse","line":614,"kind":"procedure","params":1,"steps":[[616,"call","IsNonDeductibleVATEnabled",0]]},{"name":"Increment","line":641,"kind":"procedure","params":2,"steps":[[643,"call","IsNonDeductibleVATEnabled",0]]},{"name":"Increment","line":650,"kind":"procedure","params":2,"steps":[[652,"call","IsNonDeductibleVATEnabled",0]]},{"name":"RoundNonDeductibleVAT","line":693,"kind":"procedure","params":4,"steps":[[697,"call","IsNonDeductibleVATEnabled",0],[707,"ext","table",330,"ExchangeAmtFCYToLCY",4],[708,"ext","table",38,"GetUseDate",0],[713,"ext","table",330,"ExchangeAmtFCYToLCY",4],[714,"ext","table",38,"GetUseDate",0]]},{"name":"Update","line":734,"kind":"procedure","params":3,"steps":[[736,"call","IsNonDeductibleVATEnabled",0],[738,"call","GetInvPostBufferAmountRoundingPrecision",1],[740,"call","GetNonDeductibleAmount",4],[743,"call","GetNonDeductibleAmount",4],[746,"call","GetNonDeductibleAmount",4],[749,"call","GetNonDeductibleAmount",4]]},{"name":"ValidateNonDedVATPctInGenJnlLine","line":753,"kind":"procedure","params":1,"steps":[[755,"validate",81,"Non-Deductible VAT %"],[755,"call","GetNonDeductibleVATPct",1]]},{"name":"ValidateBalNonDedVATPctInGenJnlLine","line":758,"kind":"procedure","params":1,"steps":[[760,"validate",81,"Bal. Non-Ded. VAT %"],[760,"call","GetBalNonDeductibleVATPct",1]]},{"name":"Calculate","line":763,"kind":"procedure","params":2,"steps":[[770,"call","IsNonDeductibleVATEnabled",0],[772,"ext","codeunit",6200,"OnBeforeCalcNonDedAmountsInGenJnlLine",3],[779,"validate",81,"Non-Deductible VAT Base"],[780,"call","GetNonDedVATPctFromGenJournalLine",1],[782,"validate",81,"Non-Deductible VAT Amount"],[785,"validate",81,"Non-Deductible VAT Amount"],[786,"call","GetNonDedVATPctFromGenJournalLine",1],[788,"validate",81,"Non-Deductible VAT Base LCY"],[789,"validate",81,"Non-Deductible VAT Amount LCY"],[792,"call","GetNonDedVATPctFromGenJournalLine",1],[793,"validate",81,"Non-Deductible VAT Base LCY"],[795,"call","GetNonDedVATPctFromGenJournalLine",1],[797,"ext","table",4,"InitRoundingPrecision",0],[798,"validate",81,"Non-Deductible VAT Base LCY"],[799,"validate",81,"Non-Deductible VAT Amount LCY"],[802,"ext","table",4,"VATRoundingDirection",0],[804,"validate",81,"Non-Deductible VAT Amount LCY"],[806,"call","GetNonDedVATPctFromGenJournalLine",1],[809,"validate",81,"Non-Deductible VAT Base LCY"],[812,"ext","table",330,"ExchangeAmtFCYToLCY",4],[814,"validate",81,"Non-Deductible VAT Amount LCY"],[817,"ext","table",330,"ExchangeAmtFCYToLCY",4]]},{"name":"CalculateBalAcc","line":821,"kind":"procedure","params":2,"steps":[[828,"call","IsNonDeductibleVATEnabled",0],[830,"ext","codeunit",6200,"OnBeforeCalcBalNonDedAmountsInGenJnlLine",3],[837,"validate",81,"Bal. Non-Ded. VAT Base"],[838,"call","GetBalNonDedVATPctFromGenJournalLine",1],[840,"validate",81,"Bal. Non-Ded. VAT Amount"],[843,"validate",81,"Bal. Non-Ded. VAT Amount"],[844,"call","GetBalNonDedVATPctFromGenJournalLine",1],[846,"validate",81,"Bal. Non-Ded. VAT Base LCY"],[847,"validate",81,"Bal. Non-Ded. VAT Amount LCY"],[850,"call","GetBalNonDedVATPctFromGenJournalLine",1],[851,"validate",81,"Bal. Non-Ded. VAT Base LCY"],[853,"call","GetBalNonDedVATPctFromGenJournalLine",1],[855,"ext","table",4,"InitRoundingPrecision",0],[856,"validate",81,"Bal. Non-Ded. VAT Base LCY"],[857,"validate",81,"Bal. Non-Ded. VAT Amount LCY"],[860,"ext","table",4,"VATRoundingDirection",0],[862,"validate",81,"Bal. Non-Ded. VAT Amount LCY"],[864,"call","GetBalNonDedVATPctFromGenJournalLine",1],[867,"validate",81,"Bal. Non-Ded. VAT Base LCY"],[870,"ext","table",330,"ExchangeAmtFCYToLCY",4],[872,"validate",81,"Bal. Non-Ded. VAT Amount LCY"],[875,"ext","table",330,"ExchangeAmtFCYToLCY",4]]},{"name":"Calculate","line":879,"kind":"procedure","params":1,"steps":[[883,"call","IsNonDeductibleVATEnabled",0],[885,"ext","table",4,"InitRoundingPrecision",0],[886,"call","UpdateNonDeductibleAmounts",6],[889,"call","UpdateNonDeductibleAmounts",6]]},{"name":"Calculate","line":894,"kind":"procedure","params":8,"steps":[[900,"call","IsNonDeductibleVATEnabled",0],[908,"call","CalcRevChargeVATAmountInPurchLine",1],[912,"ext","table",98,"GetRecordOnce",0],[913,"call","AdjustVATAmountsWithNonDeductibleVATPct",8],[919,"ext","table",330,"ExchangeAmtLCYToFCY",4]]},{"name":"CalcRevChargeVATAmountInPurchLine","line":926,"kind":"procedure","access":"local","params":1,"steps":[[932,"ext","table",4,"Initialize",2],[936,"ext","table",4,"VATRoundingDirection",0],[937,"ext","codeunit",6200,"OnAfterCalcRevChargeVATAmountInPurchLine",2]]},{"name":"AdjustVATAmountsFromGenJnlLine","line":998,"kind":"procedure","params":5,"steps":[[1002,"call","IsNonDeductibleVATEnabled",0],[1004,"ext","codeunit",6200,"OnBeforeAdjustVATAmountsFromGenJnlLine",6],[1007,"ext","table",98,"GetRecordOnce",0],[1008,"call","UpdateNonDeductibleAmounts",6],[1008,"call","GetNonDedVATPctFromGenJournalLine",1],[1009,"call","AdjustVATAmounts",4],[1011,"call","IsNormalVATInvoiceForVendor",1],[1013,"call","UpdateNonDeductibleAmounts",6],[1013,"call","GetNonDedVATPctFromGenJournalLine",1],[1014,"call","AdjustVATAmounts",4]]},{"name":"AdjustVATAmountsWithNonDeductibleVATPct","line":1017,"kind":"procedure","access":"local","params":8,"steps":[[1019,"call","IsNonDeductibleVATEnabled",0],[1025,"call","GetNonDeductibleAmount",4],[1028,"call","GetNonDeductibleAmount",4]]},{"name":"AdjustVATAmounts","line":1032,"kind":"procedure","access":"local","params":4,"steps":[[1034,"call","IsNonDeductibleVATEnabled",0]]},{"name":"AdjustRoundingForInvoicePostingBufferUpdate","line":1062,"kind":"procedure","params":2,"steps":[[1064,"call","AdjustRoundingFieldsPair",3],[1066,"call","AdjustRoundingFieldsPair",3]]},{"name":"GetNonDeductibleVATAmountForItemCost","line":1070,"kind":"procedure","params":1,"steps":[[1080,"call","CalcRevChargeVATAmountInPurchLine",1],[1081,"ext","table",4,"Initialize",2],[1082,"call","Update",2]]},{"name":"ApplyRoundingForFinalPostingFromInvoicePostingBuffer","line":1105,"kind":"procedure","params":2,"steps":[[1107,"call","ApplyRoundingValueForFinalPosting",2],[1108,"call","ApplyRoundingValueForFinalPosting",2]]},{"name":"UpdateNonDeductibleAmounts","line":1127,"kind":"procedure","access":"local","params":6,"steps":[[1129,"call","IsNonDeductibleVATEnabled",0]]},{"name":"UpdateNonDeductibleAmountsWithRounding","line":1140,"kind":"procedure","access":"local","params":8,"steps":[[1142,"call","IsNonDeductibleVATEnabled",0],[1148,"call","GetNonDeductibleAmount",4],[1149,"call","GetNonDeductibleAmount",4]]},{"name":"GetNonDeductibleVATPct","line":1152,"kind":"procedure","access":"local","params":1,"steps":[[1157,"ext","codeunit",6200,"OnBeforeGetNonDeductibleVATPctForPurchLine",3]]},{"name":"GetNonDeductibleVATPct","line":1163,"kind":"procedure","access":"local","params":1,"steps":[[1168,"call","IsNonDeductibleVATEnabled",0],[1170,"ext","codeunit",6200,"OnBeforeGetNonDedVATPctForGenJnlLine",3]]},{"name":"GetBalNonDeductibleVATPct","line":1180,"kind":"procedure","access":"local","params":1,"steps":[[1185,"call","IsNonDeductibleVATEnabled",0],[1187,"ext","codeunit",6200,"OnBeforeGetBalNonDedVATPctForGenJnlLine",3],[1194,"call","GetNonDeductibleVATPct",2]]},{"name":"GetInvPostBufferAmountRoundingPrecision","line":1207,"kind":"procedure","access":"local","params":1,"steps":[[1209,"ext","table",98,"GetRecordOnce",0]]},{"name":"CreateVATSetupOnCompanyInitialize","line":1227,"kind":"procedure","access":"local","params":0,"steps":[[1233,"write",189,"Insert",1]]}]}