mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-07 18:06:53 +01:00
Correct performance knowledge guidance (#94)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 667c64a8-eb36-4440-bc41-6a97d8fb5542 Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
This commit is contained in:
parent
5706959e4a
commit
0e06485027
31 changed files with 279 additions and 261 deletions
|
|
@ -1,20 +1,26 @@
|
|||
table 50242 "Perf Import Staging Entry"
|
||||
{
|
||||
fields
|
||||
{
|
||||
field(1; "Entry No."; Integer) { }
|
||||
field(2; "Batch ID"; Guid) { }
|
||||
field(3; Processed; Boolean) { }
|
||||
}
|
||||
|
||||
keys
|
||||
{
|
||||
key(PK; "Entry No.") { Clustered = true; }
|
||||
}
|
||||
}
|
||||
|
||||
codeunit 50242 "Perf Sample ModifyAll Good"
|
||||
{
|
||||
procedure ApplyPriceUpdate(NewPrice: Decimal)
|
||||
procedure MarkBatchProcessed(BatchId: Guid)
|
||||
var
|
||||
SalesLine: Record "Sales Line";
|
||||
StagingEntry: Record "Perf Import Staging Entry";
|
||||
begin
|
||||
SalesLine.SetRange(Type, SalesLine.Type::Item);
|
||||
SalesLine.ModifyAll("Unit Price", NewPrice);
|
||||
end;
|
||||
|
||||
procedure ApplyTolerance(DocumentNo: Code[20]; ToleranceAmount: Decimal)
|
||||
var
|
||||
CustLedgerEntry: Record "Cust. Ledger Entry";
|
||||
begin
|
||||
CustLedgerEntry.SetRange("Document No.", DocumentNo);
|
||||
CustLedgerEntry.SetRange(Open, true);
|
||||
CustLedgerEntry.ModifyAll("Accepted Payment Tolerance", ToleranceAmount);
|
||||
CustLedgerEntry.ModifyAll("Accepted Pmt. Disc. Tolerance", false);
|
||||
StagingEntry.SetRange("Batch ID", BatchId);
|
||||
// Processed has no OnValidate logic, and the equivalent loop uses Modify(false).
|
||||
StagingEntry.ModifyAll(Processed, true, false);
|
||||
end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue