---
id: change/bcapps/11998
type: change
title: "#11998 [main] It should not be possible to post invoices with a non-existing Posting Setup combination because it creates trouble with Adjust for Payment Discount."
summary: The system now validates that a General Posting Setup combination exists before posting journal invoices, preventing issues that arise later when processing payment discounts.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit gen. jnl.-check line
system: finance
review:
  state: reviewed
  by: opus
  at: "2026-10-20T08:48:28.015Z"
  flags: []
generated:
  at: "2026-11-24T00:13:35.655Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: d307d9e3cb2b4ef1ddcd7b8aef308116c1629166
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11998
    title: "microsoft/BCApps#11998: [main] It should not be possible to post invoices with a non-existing Posting Setup combination because it creates trouble with Adjust for Payment Discount."
    date: "2026-10-19"
    commit: d307d9e3cb2b4ef1ddcd7b8aef308116c1629166
    t: null
    quote: Validate that the General Posting Setup row exists for the pair before posting.
links:
  learn: []
  objects:
    - object/codeunit/11
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/check-purchase-amounts
      title: Check amounts on purchase invoices and credit memos
      label: possibly related
      why: Validates purchase invoice amounts and posting setup combinations before posting.
      by: model
number: 11998
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11998
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-19T11:40:47Z"
author: Shikhverma
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 13
  additions: 515
  deletions: 22
  al: 11
apps:
  - Base Application
objects_touched:
  - key: codeunit/11
    page: codeunit/11
    type: codeunit
    id: 11
    name: Gen. Jnl.-Check Line
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports:
  - number: 12431
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/12431
fixes_issues: []
work_items:
  - 651675
systems:
  - finance
quote: Validate that the General Posting Setup row exists for the pair before posting.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #11998 [main] It should not be possible to post invoices with a non-existing Posting Setup combination because it creates trouble with Adjust for Payment Discount.

> The system now validates that a General Posting Setup combination exists before posting journal invoices, preventing issues that arise later when processing payment discounts.

[Pull request](https://github.com/microsoft/BCApps/pull/11998) · merged into `main` (BC30) on 2026-10-19 by Shikhverma · 13 files (+515 -22), 11 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Gen. Jnl.-Check Line now checks that a General Posting Setup row exists for the business/product posting group pair
- Combinations set up with a blank business posting group are still allowed; missing combinations are rejected
- G/L journal invoices can no longer post with a product posting group that has no matching General Posting Setup
- Prevents the failure that used to show up later when posting a payment discount
- The check is added in W1 and several country layers, with tests in W1 and CZ
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 11 "Gen. Jnl.-Check Line"](../../objects/codeunit/11.md), Base Application: modified
- `src/Layers/APAC/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/CH/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/FI/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/FR/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/NL/BaseApp/Finance/GeneralLedger/Journal/GenJnlCheckLine.Codeunit.al`: modified, not in the BC30 snapshot

## Also merged into

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

## Context

- Work items: AB#651675
- Labels: Team: Finance
- Systems: finance
- From the description: "Validate that the General Posting Setup row exists for the pair before posting."

## Possibly related

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

- [Check amounts on purchase invoices and credit memos](https://learn.microsoft.com/dynamics365/business-central/check-purchase-amounts) — possibly related: Validates purchase invoice amounts and posting setup combinations before 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).
