---
id: change/bcapps/10347
type: change
title: "#10347 [Bug][Subscription Billing] Wrong number of days on vendor contract deferrals when the billing period lies within a single calendar month"
summary: Vendor subscription contract deferrals now calculate the correct number of days when a billing period falls entirely within a single calendar month, fixing day counts that previously extended to the month's end.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit vendor deferrals mngmt.
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:02:32.369Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: eaddd6b3c518414f372154ea6cedd6c12b287359
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10347
    title: "microsoft/BCApps#10347: [Bug][Subscription Billing] Wrong number of days on vendor contract deferrals when the billing period lies within a single calendar month"
    date: "2026-10-03"
    commit: eaddd6b3c518414f372154ea6cedd6c12b287359
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/8068
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10347
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10347
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-03T00:39:05Z"
author: miljance
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - From Fork
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 2
  additions: 255
  deletions: 6
  al: 1
apps:
  - Subscription Billing
objects_touched:
  - key: codeunit/8068
    page: codeunit/8068
    type: codeunit
    id: 8068
    name: Vendor Deferrals Mngmt.
    app: Subscription Billing
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 12286
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/12286
fixes_issues:
  - 10097
work_items:
  - 651553
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10347 [Bug][Subscription Billing] Wrong number of days on vendor contract deferrals when the billing period lies within a single calendar month

> Vendor subscription contract deferrals now calculate the correct number of days when a billing period falls entirely within a single calendar month, fixing day counts that previously extended to the month's end.

[Pull request](https://github.com/microsoft/BCApps/pull/10347) · merged into `main` (BC30) on 2026-10-03 by miljance (community contribution) · 2 files (+255 -6), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Single-period billing schedules now use the actual billing period date range instead of calendar month days
- Added dedicated logic branch for one-period schedules matching customer deferral handling
- Multi-period schedules remain unaffected with correct partial and full month day counts
- Eight new test cases cover single and multi-period scenarios with various date ranges
- Deferral amounts were already correct; only day count field was wrong
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 8068 "Vendor Deferrals Mngmt."](../../objects/codeunit/8068.md), Subscription Billing: modified

## Also merged into

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

## Context

- Fixes: [#10097 [Bug][Subscription Billing] Wrong number of days on vendor contract deferrals when the billing period lies within a single calendar month](https://github.com/microsoft/BCApps/issues/10097) (closed)
- Work items: AB#651553
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Team: Finance
- Systems: development

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