---
id: change/bcapps/13721
type: change
title: "#13721 [Expense Agent] Create per diem line when approving travel requests with Per Diem Included"
summary: When approving travel requests with Per Diem Included, the system now automatically creates a per diem expense line for each traveler based on matching expense rules, with blocking validation if no appropriate rule is found.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - query expense per diem locations
  - tableextension expense spend request
  - table expense report header
  - page expense rule card
  - table expense rule header
  - codeunit expense event subscriber
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-11-07T01:03:56.773Z"
  flags: []
generated:
  at: "2026-11-11T00:15:47.902Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: f4fc7027e6e4b3270963f26e016a446107369823
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13721
    title: "microsoft/BCApps#13721: [Expense Agent] Create per diem line when approving travel requests with Per Diem Included"
    date: "2026-11-06"
    commit: f4fc7027e6e4b3270963f26e016a446107369823
    t: null
    quote: When a travel request with Per Diem Included is approved, each traveler's newly created expense report now gets a per diem line automatically.
links:
  learn: []
  objects:
    - object/query/7082
    - object/tableextension/6908
    - object/table/6906
    - object/page/6901
    - object/table/6927
    - object/codeunit/6908
    - object/codeunit/6902
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-categories-rules
      title: Set Up Expense Categories, Rules, and Policies
      label: possibly related
      why: touches Page 6901 "Expense Rule Card"
      by: code
    - to: https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-travel-requisitions
      title: Manage Travel Requests in Business Central
      label: possibly related
      why: Documents travel request management and approval workflows.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-per-diem-mileage
      title: Set Up Per Diem and Mileage Allowances
      label: possibly related
      why: Documents per diem allowances setup and calculation in expense management.
      by: model
number: 13721
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13721
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-06T18:37:32Z"
author: claudiuciumedean
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 11
  additions: 1179
  deletions: 30
  al: 7
apps:
  - ExpenseAgent
objects_touched:
  - key: query/7082
    page: query/7082
    type: query
    id: 7082
    name: Expense Per Diem Locations
    app: ExpenseAgent
    status: modified
  - key: tableextension/6908
    page: tableextension/6908
    type: tableextension
    id: 6908
    name: Expense Spend Request
    app: ExpenseAgent
    status: modified
  - key: table/6906
    page: table/6906
    type: table
    id: 6906
    name: Expense Report Header
    app: ExpenseAgent
    status: modified
  - key: page/6901
    page: page/6901
    type: page
    id: 6901
    name: Expense Rule Card
    app: ExpenseAgent
    status: modified
  - key: table/6927
    page: table/6927
    type: table
    id: 6927
    name: Expense Rule Header
    app: ExpenseAgent
    status: modified
  - key: codeunit/6908
    page: codeunit/6908
    type: codeunit
    id: 6908
    name: Expense Event Subscriber
    app: ExpenseAgent
    status: modified
  - key: codeunit/6902
    page: codeunit/6902
    type: codeunit
    id: 6902
    name: Expense Rule Validation
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 13788
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/13788
fixes_issues: []
work_items:
  - 656076
systems:
  - copilot
quote: When a travel request with Per Diem Included is approved, each traveler's newly created expense report now gets a per diem line automatically.
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13721 [Expense Agent] Create per diem line when approving travel requests with Per Diem Included

> When approving travel requests with Per Diem Included, the system now automatically creates a per diem expense line for each traveler based on matching expense rules, with blocking validation if no appropriate rule is found.

[Pull request](https://github.com/microsoft/BCApps/pull/13721) · merged into `main` (BC30) on 2026-11-06 by claudiuciumedean · 11 files (+1179 -30), 7 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Approving a Per Diem Included travel request adds a per diem line to each traveler's newly created expense report; existing reports are untouched
- The category is the first active Per Diem category whose rule matches the expense location and is effective on the trip start date
- Approval fails with an error, leaving the request Released, if no rule matches or the rule has no Daily Rate condition
- A per diem calculation of None still creates a zero-amount line
- Per diem lines are exempt from receipt and merchant requirements like Mileage, via ExpenseRuleValidation.IsMerchantReceiptRequirementApplicable
- Behaviour changes for users or extensions.

## AL objects touched

- [Query 7082 "Expense Per Diem Locations"](../../objects/query/7082.md), ExpenseAgent: modified
- [Table extension 6908 "Expense Spend Request"](../../objects/tableextension/6908.md), ExpenseAgent: modified
- [Table 6906 "Expense Report Header"](../../objects/table/6906.md), ExpenseAgent: modified
- [Page 6901 "Expense Rule Card"](../../objects/page/6901.md), ExpenseAgent: modified
- [Table 6927 "Expense Rule Header"](../../objects/table/6927.md), ExpenseAgent: modified
- [Codeunit 6908 "Expense Event Subscriber"](../../objects/codeunit/6908.md), ExpenseAgent: modified
- [Codeunit 6902 "Expense Rule Validation"](../../objects/codeunit/6902.md), ExpenseAgent: modified

## Also merged into

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

## Context

- Work items: AB#656076
- Labels: AL: Apps (W1), Team: Finance
- Systems: copilot
- From the description: "When a travel request with Per Diem Included is approved, each traveler's newly created expense report now gets a per diem line automatically."

## Possibly related

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

- [Set Up Expense Categories, Rules, and Policies](https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-categories-rules) — possibly related: touches Page 6901 "Expense Rule Card"
- [Manage Travel Requests in Business Central](https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-travel-requisitions) — possibly related: Documents travel request management and approval workflows. (model-linked)
- [Set Up Per Diem and Mileage Allowances](https://learn.microsoft.com/dynamics365/business-central/expense-management/expense-management-per-diem-mileage) — possibly related: Documents per diem allowances setup and calculation in expense management. (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).
