---
id: change/bcapps/13342
type: change
title: "#13342 [Main] Incorrect Buyer/Seller Registration No. Written to Detailed GST Ledger Entry When Posting Purchase Invoice Without Order Address"
summary: Fixed incorrect registration numbers appearing in GST ledger entries when purchase invoices are posted without order addresses by resetting cached values between postings.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit gst purchase subscribers
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-30T01:10:02.802Z"
  flags: []
generated:
  at: "2026-10-31T00:15:35.028Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 792135fef9fcb93f272c1cf6312549553a3b37fc
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13342
    title: "microsoft/BCApps#13342: [Main] Incorrect Buyer/Seller Registration No. Written to Detailed GST Ledger Entry When Posting Purchase Invoice Without Order Address"
    date: "2026-10-29"
    commit: 792135fef9fcb93f272c1cf6312549553a3b37fc
    t: null
    quote: Reset cached Pay-to Vendor No., Buyer/Seller Registration No., and State Code before initializing each purchase document's posting values.
links:
  learn: []
  objects:
    - object/codeunit/18080-in
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/India/GST-Advance-Normal-Payment-and-Purchase-Invoice-Goods-Application
      title: GST on Advance Payment or Normal Payment Application with Purchase Invoice
      label: possibly related
      why: Documents how vendor registration details apply to purchase invoices under India's GST rules.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/India/GST-001-Basic-Setup
      title: Set Up Goods and Services Tax
      label: possibly related
      why: Covers GST setup in India including vendor registration details required for ledger entry posting.
      by: model
number: 13342
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13342
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-29T09:23:01Z"
author: v-ajaztabrez
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 1
  additions: 5
  deletions: 0
  al: 1
apps:
  - INGST
objects_touched:
  - key: codeunit/18080
    page: codeunit/18080-in
    type: codeunit
    id: 18080
    name: GST Purchase Subscribers
    app: INGST
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 13343
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/13343
fixes_issues: []
work_items:
  - 656985
systems:
  - finance
quote: Reset cached Pay-to Vendor No., Buyer/Seller Registration No., and State Code before initializing each purchase document's posting values.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13342 [Main] Incorrect Buyer/Seller Registration No. Written to Detailed GST Ledger Entry When Posting Purchase Invoice Without Order Address

> Fixed incorrect registration numbers appearing in GST ledger entries when purchase invoices are posted without order addresses by resetting cached values between postings.

[Pull request](https://github.com/microsoft/BCApps/pull/13342) · merged into `main` (BC30) on 2026-10-29 by v-ajaztabrez · 1 file (+5 -0), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Detailed GST Ledger Entries showed previous invoice's registration number when subsequent invoice had no Order Address
- Root cause was single-instance codeunit retaining values between postings in the same session
- Solution resets cached Pay-to Vendor No., Buyer/Seller Registration No., and State Code before each document posting
- Affects Indian GST purchase posting workflow
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 18080 "GST Purchase Subscribers"](../../objects/codeunit/18080-in.md), INGST (IN layer): modified

## Also merged into

- [#13343](https://github.com/microsoft/BCApps/pull/13343) into `releases/29.x` on 2026-10-29

## Context

- Work items: AB#656985
- Labels: Team: SCM
- Systems: finance
- From the description: "Reset cached Pay-to Vendor No., Buyer/Seller Registration No., and State Code before initializing each purchase document's posting values."

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [GST on Advance Payment or Normal Payment Application with Purchase Invoice](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/India/GST-Advance-Normal-Payment-and-Purchase-Invoice-Goods-Application) — possibly related: Documents how vendor registration details apply to purchase invoices under India's GST rules. (model-linked)
- [Set Up Goods and Services Tax](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/India/GST-001-Basic-Setup) — possibly related: Covers GST setup in India including vendor registration details required for ledger entry posting. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
