Commissions and Rebates
Release: Commissions and Rebates – 27.2.9775.57587
Description
This release delivers critical bug fixes for the Commissions and Rebates extension. The key improvements address two main areas:
-
Locale-independent date handling — The date filter generation in agreement entries has been rewritten to use culture-invariant ISO 8601 date format (
yyyy-mm-dd), eliminating API errors (HTTP 400) that occurred when the session locale produced non-standard date strings (e.g.,C31/01/26). An upgrade routine automatically corrects all existing entry records affected by this issue. -
Credit memo / payment calculation based on reference date balance — The payment generation logic for customers, vendors, and employees now computes the outstanding amount as the balance at the reference date (period ending date), rather than the full cumulative payment history. This ensures that credit memos and payment documents reflect the correct period-scoped balance, fixing scenarios where amounts were incorrectly doubled or overstated.
Additionally, Portuguese translations have been reviewed and updated.
User Stories
No User Story developed in this release.
Bugs
| Title | Description | Impact on previous version |
|---|---|---|
| [24513] – Error when calling API Commissions and Rebates | When calling the Commissions and Rebates API from Power BI or other OData consumers, a 400 Bad Request error was returned with message “The format of the Date ‘C31/01/26’ does not match your device’s date settings”. Root cause: The MakeDateFilter procedure in isaREB_Entry (Table 8004408) used locale-dependent Format(Date, 9) which produced date strings in the session’s regional format. Fix: Replaced with Format(Date, 0, 9) which always produces ISO 8601 yyyy-mm-dd output regardless of locale. The Filter Tokens codeunit dependency was removed. A new RefreshDateFilters() procedure was added, and an upgrade codeunit (isaREB_Update, Codeunit 8004401) runs a one-time data fix to rebuild the Totaling Period and Upper Limit fields on all existing isaREB_Entry records. Impacted objects: Table 8004408 (isaREB_Entry), Codeunit 8004401 (isaREB_Update). |
Existing entry records with locale-dependent date filters will be automatically corrected during upgrade. The upgrade performs a full-table locked scan of isaREB_Entry; large installations may experience brief contention during the upgrade window. No manual action required. |
| [24561] – Credit memo amount must use period balance, not cumulative amount | When generating a payment (credit memo) for a monthly deferred agreement, the system was using the cumulative payment amount instead of the balance at the reference date. This caused the credit memo to show an incorrect (overstated) amount. Additionally, the period boundaries were incorrect: the situation date entered by the user was not properly propagated, and the Last Period Posted field was not used as the starting boundary for subsequent payment runs. Root cause: The CreateLineGlobal and CreateLineWithDetails procedures in PaymentTypeCustomer (Codeunit 8004413), PaymentTypeVendor (Codeunit 8004412), and PaymentTypeEmployee (Codeunit 8004414) used Cumulative Payment Amount / Payment Amount FlowFields instead of the reference-date-scoped equivalents. The CreatePayment report (Report 8004400) passed EndingDate instead of SituationDate as the period end, and always used the agreement’s static Starting Date instead of Last Period Posted. Fix: (1) FlowFields changed to Cum. Paym Amt. (Ref. Date) and Payment Amt. (Ref. Date) so outstanding balance is scoped to the reference date. (2) CreatePaymentDocument now receives SituationDate as the period end (DateTo). (3) CreatePayment report now uses Last Period Posted as starting boundary for subsequent runs. (4) UpdateLastPeriodPosted in isaREB_Agreement (Table 8004401) now uses the Reference Date instead of deriving from entries. (5) A new field isaREB_Reference Date (Field 8004403) was added to Gen. Journal Line table extension and General Journal page for employee payment traceability. Impacted objects: Table 8004401 (isaREB_Agreement), Table 8004408 (isaREB_Entry), TableExt 8004400 (isaREB_GenJournalLine), Codeunit 8004413 (isaREB_PaymentType_Customer), Codeunit 8004412 (isaREB_PaymentType_Vendor), Codeunit 8004414 (isaREB_PaymentType_Employee), Report 8004400 (isaREB_Create Payment), PageExt 8004400 (isaREB_GeneralJournal). |
Breaking behavior change: Payment amounts will now differ from previous versions for agreements with multiple posted periods. The outstanding balance is now correctly computed as the period balance rather than cumulative. Users should verify open/pending payment documents created before the upgrade. The Last Period Posted field will be correctly maintained going forward; agreements that have never been posted will continue to use Starting Date. |
| [24231] – REB Portuguese Translations | Portuguese translation files were updated for the Commissions and Rebates extension to fix missing or incorrect translations. | No functional impact. Display labels only. |
Events
No event added or updated in this release.