---
id: change/bcapps/14884
type: change
title: "#14884 [Expense Agent] Replace the receipt of a corporate card expense"
summary: The Expense Agent now supports replacing receipts on corporate card expenses that already have one through an API-only feature, allowing users to swap receipts without removing the expense from reports or losing line edits.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - table ea card expense match buffer
  - page ea card expense matches api
  - table ea card receipt data
  - page ea card receipt data api
  - codeunit expense capabilities provider
  - enum expense capability
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-12-06T00:54:11.813Z"
  flags: []
generated:
  at: "2026-12-06T00:14:19.053Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 590145fabce884f8b660a9c75f1adefcda43af00
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/14884
    title: "microsoft/BCApps#14884: [Expense Agent] Replace the receipt of a corporate card expense"
    date: "2026-12-05"
    commit: 590145fabce884f8b660a9c75f1adefcda43af00
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/7420
    - object/page/7425
    - object/table/7427
    - object/page/7421
    - object/codeunit/6906
    - object/enum/6984
    - object/codeunit/7450
    - object/codeunit/7438
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 14884
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/14884
kind: pr
base_branch: main
major: "30"
merged_at: "2026-12-05T10:47:58Z"
author: claudiuciumedean
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - ExpenseManagement
  - "Team: Finance"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 10
  additions: 804
  deletions: 27
  al: 8
apps:
  - ExpenseAgent
objects_touched:
  - key: table/7420
    page: table/7420
    type: table
    id: 7420
    name: EA Card Expense Match Buffer
    app: ExpenseAgent
    status: modified
  - key: page/7425
    page: page/7425
    type: page
    id: 7425
    name: EA Card Expense Matches API
    app: ExpenseAgent
    status: modified
  - key: table/7427
    page: table/7427
    type: table
    id: 7427
    name: EA Card Receipt Data
    app: ExpenseAgent
    status: modified
  - key: page/7421
    page: page/7421
    type: page
    id: 7421
    name: EA Card Receipt Data API
    app: ExpenseAgent
    status: modified
  - key: codeunit/6906
    page: codeunit/6906
    type: codeunit
    id: 6906
    name: Expense Capabilities Provider
    app: ExpenseAgent
    status: modified
  - key: enum/6984
    page: enum/6984
    type: enum
    id: 6984
    name: Expense Capability
    app: ExpenseAgent
    status: modified
  - key: codeunit/7450
    page: codeunit/7450
    type: codeunit
    id: 7450
    name: EA Card Receipt Data Apply
    app: ExpenseAgent
    status: modified
  - key: codeunit/7438
    page: codeunit/7438
    type: codeunit
    id: 7438
    name: EA Receipt Expense Match
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 630366
systems:
  - copilot
quote: null
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #14884 [Expense Agent] Replace the receipt of a corporate card expense

> The Expense Agent now supports replacing receipts on corporate card expenses that already have one through an API-only feature, allowing users to swap receipts without removing the expense from reports or losing line edits.

[Pull request](https://github.com/microsoft/BCApps/pull/14884) · merged into `main` (BC30) on 2026-12-05 by claudiuciumedean · 10 files (+804 -27), 8 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New replaceReceipt boolean flag on cardReceiptData and cardExpenseMatches API endpoints
- Replace flow deletes Lost Receipt declarations, removes old itemization and VAT lines, and swaps receipt in place with updated metadata
- Expenses with receipts, Lost Receipt declarations, or waiting for receipts can be matched or applied with the flag
- New CardReceiptReplace capability value lets clients detect backend support for receipt replacement
- Expense and report line status preserved through the operation with line IDs unchanged
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 7420 "EA Card Expense Match Buffer"](../../objects/table/7420.md), ExpenseAgent: modified
- [Page 7425 "EA Card Expense Matches API"](../../objects/page/7425.md), ExpenseAgent: modified
- [Table 7427 "EA Card Receipt Data"](../../objects/table/7427.md), ExpenseAgent: modified
- [Page 7421 "EA Card Receipt Data API"](../../objects/page/7421.md), ExpenseAgent: modified
- [Codeunit 6906 "Expense Capabilities Provider"](../../objects/codeunit/6906.md), ExpenseAgent: modified
- [Enum 6984 "Expense Capability"](../../objects/enum/6984.md), ExpenseAgent: modified
- [Codeunit 7450 "EA Card Receipt Data Apply"](../../objects/codeunit/7450.md), ExpenseAgent: modified
- [Codeunit 7438 "EA Receipt Expense Match"](../../objects/codeunit/7438.md), ExpenseAgent: modified

## Context

- Work items: AB#630366
- Labels: AL: Apps (W1), ExpenseManagement, Team: Finance
- Systems: copilot

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).
