Skip to content

Commit

Permalink
Merge pull request #3 from finnpedersenkazes/clean-up
Browse files Browse the repository at this point in the history
codeCleanupActions implemented
  • Loading branch information
finnpedersenkazes authored Jan 2, 2024
2 parents 68b95b0 + 185bc2b commit eac5fe3
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 132 deletions.
10 changes: 10 additions & 0 deletions .vscode/AfterConversion.ruleset.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@
"id": "AS0011",
"action": "Error",
"justification": "AppSourceCop Error. An affix is required. INVESTIGATE IF NEEDED IN YOUR PROJECT."
},
{
"id": "AA0221",
"action": "Error",
"justification": "You must specify a OptionCaption property for all fields which source expressions is not a table field."
},
{
"id": "AL0604",
"action": "Error",
"justification": "Use of implicit 'with' will be removed in the future. Qualify with '{0}'."
}
]
}
59 changes: 57 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,65 @@
"al-xml-doc.InitializeALObjectCacheOnStartUp": false,
"al.enableCodeAnalysis": true,
"al.codeAnalyzers": [
"${CodeCop}",
"${UICop}",
"${CodeCop}"
"${PerTenantExtensionCop}"
],
"al.backgroundCodeAnalysis": "Project",
"al.browser": "Edge",
"al.ruleSetPath": "./.vscode/AfterConversion.ruleset.json"
"al.ruleSetPath": "./.vscode/AfterConversion.ruleset.json",
"xml.validation.namespaces.enabled": "onNamespaceEncountered",
"xml.validation.schema.enabled": "onValidSchema",
"CRS.FileNamePattern": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.FileNamePatternPageCustomizations": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.ExtensionObjectNamePattern": "",
"CRS.AlSubFolderName": "None",
"CRS.OnSaveAlFileAction": "Rename",
"alOutline.codeCleanupActions": [
"AddApplicationAreas",
"AddEnumValuesCaptions",
"AddMissingParentheses",
"AddObjectCaptions",
"AddTableFieldCaptions",
"AddToolTips",
"CollapseEmptyBrackets",
"ConvertObjectIdsToNames",
"FixIdentifiersCase",
"FixKeywordsCase",
"FormatDocument",
"LockRemovedFieldCaptions",
"MakeFlowFieldsReadOnly",
"OneStatementPerLine",
"RefreshToolTips",
"RemoveBeginEnd",
"RemoveEmptyLines",
"RemoveEmptySections",
"RemoveEmptyTriggers",
"RemoveRedundantAppAreas",
"RemoveRedundantDataClassification",
"RemoveStrSubstNoFromError",
"RemoveUnusedVariables",
"RemoveWithStatements",
"SortCustomizations",
"SortPermissionSetList",
"SortPermissions",
"SortProperties",
"SortReportColumns",
"SortTableFields",
"SortVariables",
"TrimTrailingWhitespace"
],
"alOutline.defaultAddPageFieldCaptionsSettings": {},
"alOutline.webClientPort": 0,
"alOutline.useTableFieldDescriptionAsToolTip": true,
"alOutline.triggersNaturalOrder": [],
"alOutline.fixCodeCopMissingParenthesesOnSave": true,
"alOutline.fixCaseRemovesQuotesFromDataTypeIdentifiers": true,
"alOutline.defaultRemoveEmptySectionsSettings": {
"removeActionGroups": true,
"removeActions": true,
"ignoreComments": false
},
"linterCop.autoDownload": true
}
7 changes: 4 additions & 3 deletions App/Enums/SubscriptionEnum.Enum.al
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ enum 50140 "Subscription Enum"
Extensible = true;

value(0; " ")
{
{
Caption = ' ';
}
value(1; "Recurring")
value(1; Recurring)
{
Caption = 'Recurring';
}
value(2; "Stop")
value(2; Stop)
{
Caption = 'Stop';
}
Expand Down
25 changes: 8 additions & 17 deletions App/MakeOrdersBatch.Report.al
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ using Microsoft.Sales.Document;

report 50142 "Make Orders Batch"
{
ApplicationArea = All;
Caption = 'Make Orders from Blanket Order Lines ready to ship';
ProcessingOnly = true;
UsageCategory = None;
UsageCategory = None;

dataset
{
Expand All @@ -20,7 +21,7 @@ report 50142 "Make Orders Batch"
begin
Counter := Counter + 1;
WindowDialog.Update(1, "No.");
WindowDialog.Update(2, ROUND(Counter / CounterTotal * 10000, 1));
WindowDialog.Update(2, Round(Counter / CounterTotal * 10000, 1));
Clear(BlanketSalesOrdertoOrder);
if BlanketSalesOrdertoOrder.Run("Sales Header") then begin
CounterOK := CounterOK + 1;
Expand All @@ -47,30 +48,20 @@ report 50142 "Make Orders Batch"
{
SaveValues = true;

layout
{
area(content)
{
}
}
actions { }

actions
{
}
}

labels
{
}
labels { }

var
BlanketSalesOrdertoOrder: Codeunit "Blanket Sales Order to Order";
UpdatingBlanketOrdersLbl: label 'Updating Blanket Orders #1########## @2@@@@@@@@@@@@@', Comment = '%1 = Order Number; %2 = Counter';
CounterLbl: label '%1 blanket orders out of a total of %2 have now been evaluated.', Comment = '%1 = Counter; %2 = Counter Total';
WindowDialog: Dialog;
CounterTotal: Integer;
Counter: Integer;
CounterOK: Integer;
CounterTotal: Integer;
CounterLbl: Label '%1 blanket orders out of a total of %2 have now been evaluated.', Comment = '%1 = Counter; %2 = Counter Total';
UpdatingBlanketOrdersLbl: Label 'Updating Blanket Orders #1########## @2@@@@@@@@@@@@@', Comment = '%1 = Order Number; %2 = Counter';

procedure InitializeRequest()
begin
Expand Down
26 changes: 8 additions & 18 deletions App/NextPeriodeCalcBatch.Report.al
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ using Microsoft.Sales.Document;

report 50140 "Next Periode Calc Batch"
{
ApplicationArea = All;
Caption = 'Calculate Next Subscription Period';
ProcessingOnly = true;
UsageCategory = None;
UsageCategory = None;

dataset
{
Expand All @@ -20,7 +21,7 @@ report 50140 "Next Periode Calc Batch"
begin
Counter := Counter + 1;
WindowDialog.Update(1, "No.");
WindowDialog.Update(2, ROUND(Counter / CounterTotal * 10000, 1));
WindowDialog.Update(2, Round(Counter / CounterTotal * 10000, 1));
Clear(SubscriptionManagement);
SubscriptionManagement.CalculateNextSubscriptionPeriodOne("Sales Header");
CounterOK := CounterOK + 1;
Expand All @@ -46,33 +47,22 @@ report 50140 "Next Periode Calc Batch"
{
SaveValues = true;

layout
{
area(content)
{
}
}
actions { }

actions
{
}
}

labels
{
}
labels { }

var
SubscriptionManagement: Codeunit "Subscription Management";
UpdatingBlanketOrdersLbl: label 'Updating Blanket Orders #1########## @2@@@@@@@@@@@@@', Comment = '%1 = Order Number; %2 = Counter';
CounterLbl: label '%1 blanket orders out of a total of %2 have now been evaluated.', Comment = '%1 = Counter; %2 = Counter Total';
WindowDialog: Dialog;
CounterTotal: Integer;
Counter: Integer;
CounterOK: Integer;
CounterTotal: Integer;
CounterLbl: Label '%1 blanket orders out of a total of %2 have now been evaluated.', Comment = '%1 = Counter; %2 = Counter Total';
UpdatingBlanketOrdersLbl: Label 'Updating Blanket Orders #1########## @2@@@@@@@@@@@@@', Comment = '%1 = Order Number; %2 = Counter';

procedure InitializeRequest()
begin
end;
}

28 changes: 9 additions & 19 deletions App/QtyToShipCalcBatch.Report.al
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ namespace FinnPedersenFrance.App.BasicSubscriptionManagement;

using Microsoft.Sales.Document;

report 50141 "Qty to Ship Calc Batch"
report 50141 "Qty To Ship Calc Batch"
{
ApplicationArea = All;
Caption = 'Calculate Quantity to Ship';
ProcessingOnly = true;
UsageCategory = None;
UsageCategory = None;

dataset
{
Expand All @@ -20,7 +21,7 @@ report 50141 "Qty to Ship Calc Batch"
begin
Counter := Counter + 1;
WindowDialog.Update(1, "No.");
WindowDialog.Update(2, ROUND(Counter / CounterTotal * 10000, 1));
WindowDialog.Update(2, Round(Counter / CounterTotal * 10000, 1));
Clear(SubscriptionManagement);
SubscriptionManagement.CalculateQuantityToShipOne("Sales Header");
CounterOK := CounterOK + 1;
Expand All @@ -46,33 +47,22 @@ report 50141 "Qty to Ship Calc Batch"
{
SaveValues = true;

layout
{
area(content)
{
}
}
actions { }

actions
{
}
}

labels
{
}
labels { }

var
SubscriptionManagement: Codeunit "Subscription Management";
UpdatingBlanketOrdersLbl: label 'Updating Blanket Orders #1########## @2@@@@@@@@@@@@@', Comment = '%1 = Order Number; %2 = Counter';
CounterLbl: label '%1 blanket orders out of a total of %2 have now been evaluated.', Comment = '%1 = Counter; %2 = Counter Total';
WindowDialog: Dialog;
CounterTotal: Integer;
Counter: Integer;
CounterOK: Integer;
CounterTotal: Integer;
CounterLbl: Label '%1 blanket orders out of a total of %2 have now been evaluated.', Comment = '%1 = Counter; %2 = Counter Total';
UpdatingBlanketOrdersLbl: Label 'Updating Blanket Orders #1########## @2@@@@@@@@@@@@@', Comment = '%1 = Order Number; %2 = Counter';

procedure InitializeRequest()
begin
end;
}

1 change: 0 additions & 1 deletion App/StandardEventSubscribers/EventSubscribers.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ codeunit 50141 "Event Subscribers"
begin
IsHandled := true;
end;

}
6 changes: 2 additions & 4 deletions App/StandardPageExtensions/SubOrderSubform.PageExt.al
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ pageextension 50142 "Sub. Order Subform" extends "Blanket Sales Order Subform"
{
field("Subscription Type"; Rec."Subscription Type")
{
ToolTip = 'Subscription Type';
ApplicationArea = All;
ToolTip = 'Subscription Type';
}

field("Subscription Periodicity"; Rec."Subscription Periodicity")
{
ToolTip = 'Subscription Periodicity';
ApplicationArea = All;
ToolTip = 'Subscription Periodicity';
}

}
}
}

7 changes: 3 additions & 4 deletions App/StandardPageExtensions/SubscriptionItemCard.PageExt.al
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ pageextension 50140 "Subscription Item Card" extends "Item Card"
{
group(Subscription)
{
field("Subscription type"; Rec."Subscription type")
field("Subscription type"; Rec."Subscription Type")
{
ToolTip = 'Subscription Type';
ApplicationArea = All;
ToolTip = 'Subscription Type';
}

field("Subscription Periodicity"; Rec."Subscription Periodicity")
{
ToolTip = 'Subscription Periodicity';
ApplicationArea = All;
ToolTip = 'Subscription Periodicity';
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions App/StandardPageExtensions/SubscriptionItemList.PageExt.al
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ pageextension 50141 "Subscription Item List" extends "Item List"
{
field("Subscription Type"; Rec."Subscription Type")
{
ToolTip = 'Subscription Type';
ApplicationArea = All;
ToolTip = 'Subscription Type';
}

field("Subscription Periodicity"; Rec."Subscription Periodicity")
{
ToolTip = 'Subscription Periodicity';
ApplicationArea = All;
ToolTip = 'Subscription Periodicity';
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions App/StandardPageExtensions/SubscriptionOrder.PageExt.al
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ pageextension 50143 "Subscription Order" extends "Blanket Sales Order"
Caption = 'Subscription';
action("Calculate Quantity to Ship")
{
ToolTip = 'Calculate Quantity to Ship';
ApplicationArea = All;
Caption = 'Calculate Quantity to Ship';
Image = CalculatePlan;
ToolTip = 'Calculate Quantity to Ship';

trigger OnAction()
var
Expand All @@ -27,10 +27,10 @@ pageextension 50143 "Subscription Order" extends "Blanket Sales Order"
}
action(MakeOrders)
{
ToolTip = 'Make Orders';
ApplicationArea = All;
Caption = 'Make Order';
Image = MakeOrder;
ToolTip = 'Make Orders';

trigger OnAction()
var
Expand All @@ -41,10 +41,10 @@ pageextension 50143 "Subscription Order" extends "Blanket Sales Order"
}
action("Calculate Next Subscription Period")
{
ToolTip = 'Calculate Next Subscription Period';
ApplicationArea = All;
Caption = 'Calculate Next Subscription Period';
Image = CalculatePlan;
ToolTip = 'Calculate Next Subscription Period';

trigger OnAction()
var
Expand Down
Loading

0 comments on commit eac5fe3

Please sign in to comment.