[Master] - Slice 640938: [Expense Agent][VENDOR] Adding approval limits (November '26) - #11639
v-rohangarg20 wants to merge 3 commits into
Conversation
| Caption = 'Approval Information'; | ||
| Visible = Rec."Can Approve"; | ||
|
|
||
| field("Approval Limit"; Rec."Approval Limit") |
There was a problem hiding this comment.
Do we need to call this LCY for additional clarity? Not sure what we do for other similar fields.
Also, do we need to add a specific format to the field here?
| exit(ExpenseApprovalSetup."Approver No."); | ||
|
|
||
| ExpenseAgentSetup.GetRecordOnce(); | ||
| exit(ExpenseAgentSetup."Default Approver No."); |
There was a problem hiding this comment.
This changes slightly the semantic of default approver. Double check with PM that they agree with this fallback.
| ApproverExpenseUserNo := GetExpenseUserNo(); | ||
| CheckActorIsNotInterimApprover(ExpenseReportHeader, ApproverExpenseUserNo); | ||
| CheckActorIsActiveApprover(ExpenseReportHeader, ApproverExpenseUserNo); | ||
| CheckApproverApprovalLimit(ExpenseReportHeader, ApproverExpenseUserNo); |
There was a problem hiding this comment.
What would happen if a report is sent for my approval, and then while that's pending, my approval limit is changed?
| ApproverExpenseUser.Get(ExpenseReportHeader."Approver Expense User No."); | ||
| ExpenseReportHeader.CalcFields("Amount (LCY)"); | ||
|
|
||
| while not ApproverExpenseUser."Unlimited Approval" and (ExpenseReportHeader."Amount (LCY)" > ApproverExpenseUser."Approval Limit") do begin |
There was a problem hiding this comment.
In upgraded environments, this means nobody will be able to approve by default because they will all have approval limit 0 and unlimited approval false? Please check with PM that this is acceptable behaviour. It's true that we are in preview, but this might add some friction to customers already using the feature
AB#640938