Table "VAT Posting Setup"
Defines VAT calculation rules and G/L account mappings for specific combinations of VAT business and product posting groups. Core table controlling VAT processing, account assignments, and calculation methods for all VAT transactions.
Remarks
Key functionality: VAT percentage calculation, G/L account mapping, unrealized VAT handling, reverse charge processing. Integration points: General Ledger, VAT Ledger Entries, Sales/Purchase documents, VAT reporting. Extensibility: VAT posting setup validation events and custom calculation method hooks.
Properties
| Name | Value |
|---|---|
| Caption | VAT Posting Setup |
| DrillDownPageID | Page Microsoft.Finance.VAT.Setup."VAT Posting Setup" |
| LookupPageID | Page Microsoft.Finance.VAT.Setup."VAT Posting Setup" |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "VAT Bus. Posting Group" | Code[20] | VAT business posting group code identifying the customer/vendor VAT category. |
| "VAT Prod. Posting Group" | Code[20] | VAT product posting group code identifying the item/service VAT category. |
| "VAT Calculation Type" | Enum Microsoft.Foundation.Enums."Tax Calculation Type" | VAT calculation method determining how VAT amounts are computed for this posting group combination. |
| "VAT %" | Decimal | VAT percentage rate used for standard VAT calculations when VAT Calculation Type is Normal VAT. |
| "Unrealized VAT Type" | Option | Unrealized VAT handling method controlling when VAT is realized for accounting purposes. |
| "Adjust for Payment Discount" | Boolean | Controls whether VAT amounts are adjusted when payment discounts are applied to invoices. |
| "Sales VAT Account" | Code[20] | G/L account for posting sales VAT amounts when VAT is realized. |
| "Sales VAT Unreal. Account" | Code[20] | G/L account for posting unrealized sales VAT amounts before payment is received. |
| "Purchase VAT Account" | Code[20] | G/L account for posting purchase VAT amounts when VAT is realized. |
| "Purch. VAT Unreal. Account" | Code[20] | G/L account for posting unrealized purchase VAT amounts before payment is made. |
| "Reverse Chrg. VAT Acc." | Code[20] | G/L account for posting reverse charge VAT amounts for EU and domestic transactions. |
| "Reverse Chrg. VAT Unreal. Acc." | Code[20] | G/L account for posting unrealized reverse charge VAT amounts before payment is made. |
| "VAT Identifier" | Code[20] | Unique identifier used for VAT reporting and grouping VAT posting setups with identical VAT characteristics. |
| "EU Service" | Boolean | Indicates whether this setup applies to EU services requiring special VAT handling. |
| "VAT Clause Code" | Code[20] | VAT clause code for additional VAT terms and conditions displayed on documents. |
| "Certificate of Supply Required" | Boolean | Indicates whether a Certificate of Supply is required for this VAT posting setup combination. |
| "Tax Category" | Code[10] | Tax category code used for electronic document transmission and VAT reporting purposes. |
| Description | Text[100] | Descriptive text explaining the purpose and usage of this VAT posting setup combination. |
| Blocked | Boolean | Prevents the use of this VAT posting setup in new transactions when enabled. |
| "Sale VAT Reporting Code" | Code[20] | VAT reporting code used for sales VAT return and statistical reporting purposes. |
| "Purch. VAT Reporting Code" | Code[20] | VAT reporting code used for purchase VAT return and statistical reporting purposes. |
| "Non-Deductible VAT %" | Decimal | Percentage of VAT amount that cannot be deducted and must be added to the cost of goods or services. |
| "Non-Ded. Purchase VAT Account" | Code[20] | G/L account for posting non-deductible purchase VAT amounts that are added to asset or expense costs. |
| "Allow Non-Deductible VAT" | Enum Microsoft.Finance.VAT.Setup."Allow Non-Deductible VAT Type" | Controls whether non-deductible VAT functionality is allowed for this VAT posting setup combination. |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemCreatedByUserName | Text[50] | |
| SystemCreatedByFullName | Text[80] | |
| SystemModifiedByUserName | Text[50] | |
| SystemModifiedByFullName | Text[80] | |
| SystemRowVersion | BigInteger |
Methods
CheckGLAcc
Validates that the specified G/L account exists and is properly configured for VAT posting.
procedure CheckGLAcc(AccNo: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| AccNo | Code[20] |
G/L Account number to validate |
TestNotSalesTax
Validates that the specified field is not used when VAT Calculation Type is Sales Tax. Prevents configuration of VAT fields that are incompatible with Sales Tax calculation method.
procedure TestNotSalesTax(FromFieldName: Text[100])
Parameters
| Name | Type | Description |
|---|---|---|
| FromFieldName | Text[100] |
Name of the field being validated for Sales Tax compatibility |
GetSalesAccount
Returns the appropriate sales VAT G/L account based on whether unrealized VAT is being processed. Retrieves either realized or unrealized sales VAT account with validation for required account setup.
procedure GetSalesAccount(Unrealized: Boolean): Code[20]
Parameters
| Name | Type | Description |
|---|---|---|
| Unrealized | Boolean |
Whether to return unrealized VAT account instead of standard VAT account |
Returns
| Type | Description |
|---|---|
| Code[20] |
G/L Account number for sales VAT posting |
GetPurchAccount
Returns the appropriate purchase VAT G/L account based on whether unrealized VAT is being processed. Retrieves either realized or unrealized purchase VAT account with validation for required account setup.
procedure GetPurchAccount(Unrealized: Boolean): Code[20]
Parameters
| Name | Type | Description |
|---|---|---|
| Unrealized | Boolean |
Whether to return unrealized VAT account instead of standard VAT account |
Returns
| Type | Description |
|---|---|
| Code[20] |
G/L Account number for purchase VAT posting |
GetRevChargeAccount
Returns the appropriate reverse charge VAT G/L account based on whether unrealized VAT is being processed. Retrieves either realized or unrealized reverse charge VAT account for EU and domestic reverse charge transactions.
procedure GetRevChargeAccount(Unrealized: Boolean): Code[20]
Parameters
| Name | Type | Description |
|---|---|---|
| Unrealized | Boolean |
Whether to return unrealized VAT account instead of standard VAT account |
Returns
| Type | Description |
|---|---|
| Code[20] |
G/L Account number for reverse charge VAT posting |
SetAccountsVisibility
Sets visibility flags for unrealized VAT and payment discount adjustment based on General Ledger Setup configuration. Controls UI field visibility for VAT posting setup pages based on system-wide VAT settings.
procedure SetAccountsVisibility(var UnrealizedVATVisible: Boolean; var AdjustForPmtDiscVisible: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| UnrealizedVATVisible | Boolean |
Returns true if unrealized VAT fields should be visible |
| AdjustForPmtDiscVisible | Boolean |
Returns true if payment discount adjustment fields should be visible |
SuggestSetupAccounts
Suggests G/L account assignments for VAT posting setup based on existing similar setups and account patterns. Provides automated account suggestion functionality to streamline VAT posting setup configuration.
procedure SuggestSetupAccounts()
Events
OnBeforeGetPurchAccount
Integration event raised before retrieving purchase VAT account to allow custom account selection logic. Enables extensions to override standard purchase VAT account determination based on custom business rules.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetPurchAccount(var VATPostingSetup: Record "VAT Posting Setup"; Unrealized: Boolean; var PurchVATAccountNo: Code[20]; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| VATPostingSetup | Table Microsoft.Finance.VAT.Setup."VAT Posting Setup" |
VAT posting setup record for account determination |
| Unrealized | Boolean |
Whether unrealized VAT account is being requested |
| PurchVATAccountNo | Code[20] |
Custom purchase VAT account number to use |
| IsHandled | Boolean |
Set to true to skip standard account determination |
OnBeforeGetSalesAccount
Integration event raised before retrieving sales VAT account to allow custom account selection logic. Enables extensions to override standard sales VAT account determination based on custom business rules.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetSalesAccount(var VATPostingSetup: Record "VAT Posting Setup"; Unrealized: Boolean; var SalesVATAccountNo: Code[20]; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| VATPostingSetup | Table Microsoft.Finance.VAT.Setup."VAT Posting Setup" |
VAT posting setup record for account determination |
| Unrealized | Boolean |
Whether unrealized VAT account is being requested |
| SalesVATAccountNo | Code[20] |
Custom sales VAT account number to use |
| IsHandled | Boolean |
Set to true to skip standard account determination |
OnBeforeCheckSetupUsage
Integration event raised before checking VAT posting setup usage to allow custom validation logic. Enables extensions to perform additional validation or override standard setup usage checks.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckSetupUsage(var VATPostingSetup: Record "VAT Posting Setup"; var IsHandled: Boolean; VATBusPostingGroup: Code[20]; VATProdPostingGroup: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| VATPostingSetup | Table Microsoft.Finance.VAT.Setup."VAT Posting Setup" |
VAT posting setup record being validated |
| IsHandled | Boolean |
Set to true to skip standard setup usage validation |
| VATBusPostingGroup | Code[20] |
VAT business posting group being validated |
| VATProdPostingGroup | Code[20] |
VAT product posting group being validated |