Skip to content

Commit 7d1c821

Browse files
[Backport] [27.x] Only Append Asterisk for Quote and Order (#5306)
#### Summary Only append an asterisk to the Line Amount for Document Type Quote and Order. #### Work Item(s) Fixes #5285 Fixes [AB#611363](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/611363) Co-authored-by: Jesper Schulz-Wedde <JesperSchulz@users.noreply.github.com>
1 parent 1d6eb01 commit 7d1c821

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

src/Apps/W1/Subscription Billing/App/Service Commitments/Codeunits/SalesReportPrintoutMgmt.Codeunit.al

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
namespace Microsoft.SubscriptionBilling;
22

33
using System.Text;
4-
using System.Reflection;
54
using Microsoft.Utilities;
65
using Microsoft.Sales.Document;
76
using Microsoft.Inventory.Item;
@@ -191,28 +190,11 @@ codeunit 8073 "Sales Report Printout Mgmt."
191190
end;
192191
end;
193192

194-
local procedure CheckAppendAsteriskToFormattedLineAmount(SourceRecord: Variant): Boolean
193+
local procedure CheckAppendAsteriskToFormattedLineAmount(SalesLine: Record "Sales Line"): Boolean
195194
begin
196-
exit(IsServiceCommitmentItem(SourceRecord));
197-
end;
198-
199-
local procedure IsServiceCommitmentItem(SourceRecord: Variant): Boolean
200-
var
201-
SalesLine: Record "Sales Line";
202-
DataTypeManagement: Codeunit "Data Type Management";
203-
RecRef: RecordRef;
204-
SourceRecordNotDefinedForProcessingErr: Label 'Table %1 %2 has not been defined for processing.', Comment = '%1 = Table ID, %2 = Table Name';
205-
begin
206-
DataTypeManagement.GetRecordRef(SourceRecord, RecRef);
207-
case RecRef.Number of
208-
Database::"Sales Line":
209-
begin
210-
RecRef.SetTable(SalesLine);
211-
exit(SalesLine.IsServiceCommitmentItem());
212-
end;
213-
else
214-
Error(SourceRecordNotDefinedForProcessingErr, RecRef.Number, RecRef.Caption());
215-
end;
195+
if not (SalesLine."Document Type" in [SalesLine."Document Type"::Quote, SalesLine."Document Type"::Order]) then
196+
exit(false);
197+
exit(SalesLine.IsServiceCommitmentItem());
216198
end;
217199

218200
local procedure AppendAsteriskToText(var TextToAppendAsterisk: Text)

0 commit comments

Comments
 (0)