---
id: object/codeunit/18143-in
type: object
title: Codeunit 18143 "GST Sales Validation" (IN)
summary: Codeunit 18143 "GST Sales Validation" (IN) in the IN country layer (Microsoft.Finance.GST.Sales). 5 public procedures, 7 events, 68 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - in layer
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 1fb9c45fa66ce03931099d2dcedbc8a974f481ab1553ee0c7be24cf87e38d6a7
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/IN/INGST/app/GSTSales/src/Codeunit/GSTSalesValidation.Codeunit.al
    title: src/Apps/IN/INGST/app/GSTSales/src/Codeunit/GSTSalesValidation.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/in
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 18143
name: GST Sales Validation
namespace: Microsoft.Finance.GST.Sales
app: INGST
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
country: IN
counts:
  fields: 0
  procedures: 152
  events: 7
  subscribers: 68
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
---

# Codeunit 18143 "GST Sales Validation" (IN)

> Codeunit 18143 "GST Sales Validation" (IN) in the IN country layer (Microsoft.Finance.GST.Sales). 5 public procedures, 7 events, 68 event subscribers. Introduced in BC29, still in BC30.

IN country layer · Microsoft.Finance.GST.Sales · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/IN/INGST/app/GSTSales/src/Codeunit/GSTSalesValidation.Codeunit.al) · facts from BC29

An object of the [IN localization](../../localizations/in.md), not part of W1.

## Events published

- `OnBeforeSalesLineHSNSACEditable(SalesLine: Record "Sales Line"; var IsEditable: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateReferenceInvoiceNo(var RecVar: Variant; var xRecVar: Variant; var FieldNo: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckHeaderLocation(SalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration)
- `OnValidateShipToCodeForUpdateShipToAddress(var SalesHeader: Record "Sales Header")` (integration)
- `OnBeforeShipToAddrfields(var SalesHeader: Record "Sales Header"; ShipToAddress: Record "Ship-to Address"; var IsHandled: Boolean)` (integration)
- `OnAfterShipToAddrfields(var SalesHeader: Record "Sales Header"; ShipToAddress: Record "Ship-to Address")` (integration)
- `OnBeforeCheckcustomerGSTRegistrationNo(RegistrationNo: Code[20]; var IsHandled: Boolean)` (integration)

## Event subscriptions

- CallTaxEngineOnAfterCopySalesLineFromSalesLineBuffer subscribes to Codeunit "Copy Document Mgt." OnAfterCopySalesLineFromSalesLineBuffer
- OnCopySalesDocOnAfterCopySalesDocUpdateHeader subscribes to Codeunit "Copy Document Mgt." OnCopySalesDocOnAfterTransferPostedInvoiceFields
- AssignUnitPricePIT subscribes to Codeunit "Calculate Tax" OnAfterValidateSalesLineFields
- UpdateTotalUPITAmount subscribes to Table "Sales Line" OnAfterUpdateAmountsDone
- CheckAccountignPeriod subscribes to Codeunit "Sales-Post (Yes/No)" OnAfterConfirmPost
- CheckAccountignPeriodPostPreview subscribes to Codeunit "Sales-Post (Yes/No)" OnRunPreviewOnAfterSetPostingFlags
- CopyInfotoSalesOrder subscribes to Codeunit "Sales-Quote to Order" OnBeforeModifySalesOrderHeader
- ReCalculateGST subscribes to Codeunit "Sales - Calc Discount By Type" OnAfterResetRecalculateInvoiceDisc
- UpdateInvoieType subscribes to Table "Sales Header" OnAfterValidateEvent (GST Customer Type)
- ValidateGSTWithoutPaymentOfDuty subscribes to Table "Sales Header" OnAfterValidateEvent (GST Without Payment Of Duty)
- ValidateInvoiceType subscribes to Table "Sales Header" OnAfterValidateEvent (Invoice Type)
- validateEcommerceMerchantId subscribes to Table "Sales Header" OnAfterValidateEvent (E-Comm. Merchant Id)
- ValidateLocationGSTRegNo subscribes to Table "Sales Header" OnAfterValidateEvent (Location GST Reg. No.)
- validateBillOfExportDate subscribes to Table "Sales Header" OnAfterValidateEvent (Bill Of Export Date)
- validateBillOfExportNo subscribes to Table "Sales Header" OnAfterValidateEvent (Bill Of Export No.)
- ValidatePOSOutOfIndia subscribes to Table "Sales Header" OnAfterValidateEvent (POS Out Of India)
- UpdateTradingInfo subscribes to Table "Sales Header" OnBeforeInitRecord
- UpdateInvoiceType subscribes to Table "Sales Header" OnAfterInitRecord
- UpdateSelltoStateCode subscribes to Table "Sales Header" OnAfterCopySellToCustomerAddressFieldsFromCustomer
- ValidateSelltoCustNo subscribes to Table "Sales Header" OnAfterValidateEvent (Sell-to Customer No.)
- UpdateBilltoCustinfo subscribes to Table "Sales Header" OnAfterCheckBillToCust
- UpdateBilltoNatureOfSupply subscribes to Table "Sales Header" OnAfterSetFieldsBilltoCustomer
- UpdateShipToAddrfields subscribes to Table "Sales Header" OnAfterCopyShipToCustomerAddressFieldsFromShipToAddr
- UpdateCustomerFields subscribes to Table "Sales Header" OnAfterCopyShipToCustomerAddressFieldsFromCustomer
- UpdateLocationinfo subscribes to Table "Sales Header" OnAfterValidateEvent (Location Code)
- OnAfterValidateEventShipToCustomer subscribes to Table "Sales Header" OnAfterValidateEvent (Ship-to Customer)
- OnValidateShipToCodeOnBeforeCopy subscribes to Table "Sales Header" OnValidateShipToCodeOnBeforeCopyShipToAddress
- OnValidatePostGSTtoCustomer subscribes to Table "Sales Header" OnAfterValidateEvent (Post GST to Customer)
- ValidateGSTPlaceOfSupply subscribes to Table "Sales line" OnAfterValidateEvent (GST Place Of Supply)
- AssignGSTAssessableValueFCY subscribes to table "Sales line" onaftervalidateevent (GST Assessable Value (LCY))
- ValidateGSTGroupCode subscribes to Table "Sales line" OnAfterValidateEvent (GST Group Code)
- ValidateExepmted subscribes to Table "Sales line" OnAfterValidateEvent (Exempted)
- ValidateGSTOnAssessableValue subscribes to Table "Sales line" OnAfterValidateEvent (GST On Assessable Value)
- ValidateGSTAssessableValueLCY subscribes to Table "Sales line" OnAfterValidateEvent (GST Assessable Value (LCY))
- ValidateNonGSTLine subscribes to Table "Sales line" OnAfterValidateEvent (Non-GST Line)
- AssignGLAccValue subscribes to Table "Sales Line" OnAfterAssignGLAccountValues
- AssignItemValue subscribes to Table "Sales Line" OnAfterCopyFromItem
- AssignResourceValue subscribes to Table "Sales Line" OnAfterAssignResourceValues
- AssignFAValue subscribes to Table "Sales Line" OnAfterAssignFixedAssetValues
- AssignItemChargeValue subscribes to Table "Sales Line" OnAfterAssignItemChargeValues
- ValidateState subscribes to Table "Ship-to Address" OnAfterValidateEvent (State)
- validateShiptoAddGSTRegistrationNo subscribes to Table "Ship-to Address" OnAfterValidateEvent (GST Registration No.)
- ValidateGSTRegistrationNo subscribes to Table "Customer" OnAfterValidateEvent (GST Registration No.)
- ValidateCustGSTRegistrationType subscribes to Table "Customer" OnAfterValidateEvent (GST Registration Type)
- ValidateCustGSTCustomerType subscribes to Table "Customer" OnAfterValidateEvent (GST Customer Type)
- ValidateCustGSTGovtUndertaking subscribes to Table "Customer" OnAfterValidateEvent (Govt. Undertaking)
- ValidateCustARNNo subscribes to Table "Customer" OnAfterValidateEvent (ARN No.)
- ValidateCustPANNo subscribes to Table "Customer" OnAfterValidateEvent (P.A.N. No.)
- validateStateCode subscribes to Table "Customer" OnAfterValidateEvent (State Code)
- OnAfterValidateEventLocationCode subscribes to Table "Sales Line" OnAfterValidateEvent (Location Code)
- OnAfterValidateEventCurrencyFactor subscribes to Table "Sales Header" OnAfterValidateEvent (Currency Factor)
- OnAfterValidateEventPIT subscribes to Table "Sales Line" OnAfterValidateEvent (Price Inclusive of Tax)
- OnAfterValidateEventUPIT subscribes to Table "Sales Line" OnAfterValidateEvent (Unit Price Incl. of Tax)
- OnAfterValidateEventLineDiscountPercent subscribes to Table "Sales Line" OnAfterValidateEvent (Line Discount %)
- OnAfterValidateEventLineDiscountAmount subscribes to Table "Sales Line" OnAfterValidateEvent (Line Discount Amount)
- OnBeforeValidateEvenetGSTDependencyType subscribes to Table "Sales & Receivables Setup" OnBeforeValidateEvent (GST Dependency Type)
- OnBeforeUpdateShipToAddress subscribes to Table "Sales Header" OnBeforeValidateEvent (Ship-To Code)
- OnAfterUpdateShipToAddress subscribes to Table "Sales Header" OnAfterValidateEvent (Ship-To Code)
- OnBeforeUpdateLineDiscPct subscribes to Table "Sales Line" OnBeforeUpdateLineDiscPct
- OnUpdateAmountsOnAfterCalcLineAmount subscribes to Table "Sales Line" OnUpdateAmountsOnAfterCalcLineAmount
- OnAfterAppliesToDocNoOnLookup subscribes to Table "Sales Header" OnAfterAppliesToDocNoOnLookup
- OnAfterValidateQuantity subscribes to Table "Sales line" OnAfterValidateEvent (Quantity)
- OnAfterOnRun subscribes to Codeunit "Sales-Quote to Invoice" OnAfterOnRun
- UpdateReferenceInvoiceNo subscribes to Codeunit "Correct Posted Sales Invoice" OnAfterCreateCorrectiveSalesCrMemo
- SetGstHsnEditableforAllType subscribes to Codeunit "GST Sales Validation" OnBeforeSalesLineHSNSACEditable
- OnAfterGetLineAmountToHandle subscribes to Table "Sales Line" OnAfterGetLineAmountToHandle
- UpdateLocationOnSalesHeader subscribes to Codeunit "Job Create-Invoice" OnBeforeModifySalesHeader
- OnPostedSalesInvoiceFullyOpen subscribes to Table "Sales Invoice Header" OnPostedSalesInvoiceFullyOpen

## Procedures

- `GetPostInvoiceNoSeries(var SalesHeader: Record "Sales Header")`
- `UpdateGSTJurisdictionTypeFromPlaceOfSupply(SalesHeader: Record "Sales Header")`
- `CallTaxEngineOnSalesHeader(SalesHeader: Record "Sales Header")`
- `SetHSNSACEditable(SalesLine: Record "Sales Line"; var IsEditable: Boolean)`
- `ValidateGSTWithoutPaymentOfDutyOnPost(var Rec: Record "Sales Header")`

Plus 72 local procedures.

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "GST Sales Validation")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.

A IN country object, not part of W1: the default corpus does not have it; `bcatlas_list_countries` shows which countries the atlas has.
