---
id: change/bcapps/14283
type: change
title: "#14283 [Master]-Sales or purchase order with 100% prepayment: Prepmt. Line Amount drifts below Prepmt. Amt. Inv. after partial invoices, so the order can't be released or posted"
summary: Prepayment line amount drift is fixed for sales and purchase orders with 100% prepayment by correcting rounding calculations after partial invoicing, allowing orders to be released and posted successfully.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table purchase line
  - table sales line
system: purchasing
review:
  state: reviewed
  by: opus
  at: "2026-11-21T00:56:52.498Z"
  flags: []
generated:
  at: "2026-12-01T00:17:57.990Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3638f623ff090f908023bb06a6a3ff3c92c70caf
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14283
    title: "microsoft/BCApps#14283: [Master]-Sales or purchase order with 100% prepayment: Prepmt. Line Amount drifts below Prepmt. Amt. Inv. after partial invoices, so the order can't be released or posted"
    date: "2026-11-20"
    commit: 3638f623ff090f908023bb06a6a3ff3c92c70caf
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/39
    - object/table/37
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/finance-how-to-create-prepayment-invoices
      title: Create prepayment invoices
      label: possibly related
      why: Create prepayment invoices explains prepayment setup and invoicing for sales orders.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/finance-invoice-prepayments
      title: Invoice prepayments
      label: possibly related
      why: Invoice prepayments covers prepayment invoicing and credit memo processing.
      by: model
number: 14283
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14283
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-20T14:44:09Z"
author: neeleshsinghal
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 30
  additions: 616
  deletions: 116
  al: 26
apps:
  - Base Application
objects_touched:
  - key: table/39
    page: table/39
    type: table
    id: 39
    name: Purchase Line
    app: Base Application
    status: modified
  - key: table/37
    page: table/37
    type: table
    id: 37
    name: Sales Line
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Sales/Document/SalesLine.Table.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 659616
systems:
  - purchasing
  - sales
quote: null
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #14283 [Master]-Sales or purchase order with 100% prepayment: Prepmt. Line Amount drifts below Prepmt. Amt. Inv. after partial invoices, so the order can't be released or posted

> Prepayment line amount drift is fixed for sales and purchase orders with 100% prepayment by correcting rounding calculations after partial invoicing, allowing orders to be released and posted successfully.

[Pull request](https://github.com/microsoft/BCApps/pull/14283) · merged into `main` (BC30) on 2026-11-20 by neeleshsinghal · 30 files (+616 -116), 26 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Prepmt. Line Amount no longer drifts below Prepmt. Amt. Inv. after partial invoices on orders with 100% prepayment
- Such sales and purchase orders can be released and posted again
- Sales Line and Purchase Line tables changed in W1 and many country layers
- Full prepayment rounding tests added for sales and purchases in the W1 and NA layers
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 39 "Purchase Line"](../../objects/table/39.md), Base Application: modified
- [Table 37 "Sales Line"](../../objects/table/37.md), Base Application: modified
- `src/Layers/BE/BaseApp/Sales/Document/SalesLine.Table.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#659616
- Labels: Team: SCM
- Systems: purchasing, sales

## Possibly related

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

- [Create prepayment invoices](https://learn.microsoft.com/dynamics365/business-central/finance-how-to-create-prepayment-invoices) — possibly related: Create prepayment invoices explains prepayment setup and invoicing for sales orders. (model-linked)
- [Invoice prepayments](https://learn.microsoft.com/dynamics365/business-central/finance-invoice-prepayments) — possibly related: Invoice prepayments covers prepayment invoicing and credit memo processing. (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).
