Skip to content

Commit

Permalink
Syncing with version 26.0.28476.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstrup1 committed Jan 7, 2025
1 parent a1f3920 commit 0b8a1c1
Show file tree
Hide file tree
Showing 138 changed files with 15,212 additions and 11,700 deletions.
2 changes: 1 addition & 1 deletion .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.28000.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.28476.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "26.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
codeunit 11189 "Create VAT Statement NameAT"
codeunit 11189 "Create VAT Statement Name AT"
{
InherentEntitlements = X;
InherentPermissions = X;

trigger OnRun()
var
CreateVATStatement: Codeunit "Create VAT Statement";
ContosoVatStatmentES: Codeunit "Contoso Vat Statment ES";
ContosoVATStatement: Codeunit "Contoso VAT Statement";
begin
ContosoVatStatmentES.InsertVATStatementName(CreateVATStatement.VATTemplateName(), StatementUstvaLbl, VATStatementGermanyDescLbl);
ContosoVATStatement.InsertVATStatementName(CreateVATStatement.VATTemplateName(), StatementUstvaLbl, VATStatementGermanyDescLbl);
end;

var
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ codeunit 11157 "Contoso AT Localization"
Codeunit.Run(Codeunit::"Create Currency Ex. Rate AT");
Codeunit.Run(Codeunit::"Create Resource AT");
Codeunit.Run(Codeunit::"Create VAT Template AT");
Codeunit.Run(Codeunit::"Create VAT Statement NameAT");
Codeunit.Run(Codeunit::"Create VAT Statement Name AT");
Codeunit.Run(Codeunit::"Create VAT Statement Line AT");
end;
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2621,6 +2621,7 @@ Cstr(Fields!PageLbl.Value)</Value>
</Style>
</Tablix>
<Textbox Name="QRCode">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
Expand All @@ -2637,9 +2638,9 @@ Cstr(Fields!PageLbl.Value)</Value>
</Paragraph>
</Paragraphs>
<rd:DefaultName>QRCode</rd:DefaultName>
<Top>11.31545cm</Top>
<Left>14.3081cm</Left>
<Height>3.3441cm</Height>
<Top>11.00293cm</Top>
<Left>14.30806cm</Left>
<Height>3.6919cm</Height>
<Width>3.6919cm</Width>
<ZIndex>3</ZIndex>
<Visibility>
Expand Down Expand Up @@ -2696,7 +2697,6 @@ Cstr(Fields!PageLbl.Value)</Value>
</Border>
</Style>
</Rectangle>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
Expand Down Expand Up @@ -2930,7 +2930,6 @@ Cstr(Fields!PageLbl.Value)</Value>
<Style />
</Paragraph>
</Paragraphs>
<Top>0in</Top>
<Height>0.5cm</Height>
<Width>12cm</Width>
<Style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4559,7 +4559,6 @@ Cstr(Fields!PageLbl.Value)</Value>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
</TablixCells>
Expand Down Expand Up @@ -6145,6 +6144,7 @@ Cstr(Fields!PageLbl.Value)</Value>
</Style>
</Tablix>
<Textbox Name="QRCode">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
Expand All @@ -6161,9 +6161,9 @@ Cstr(Fields!PageLbl.Value)</Value>
</Paragraph>
</Paragraphs>
<rd:DefaultName>QRCode</rd:DefaultName>
<Top>16.48437cm</Top>
<Left>14.30813cm</Left>
<Height>3.3441cm</Height>
<Top>16.13657cm</Top>
<Left>14.30806cm</Left>
<Height>3.6919cm</Height>
<Width>3.6919cm</Width>
<ZIndex>7</ZIndex>
<Visibility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ report 31018 "Sales - Invoice with Adv. CZZ"
column(PrepaymentAmt_SalesInvoiceHeader; PrepaymentAmt)
{
}
column(TotalAfterPrepayed_SalesInvoiceHeader; TotalAfterPrepayed)
column(TotalAfterPrepayed_SalesInvoiceHeader; Format(TotalAfterPrepayed, 0, AutoFormat.ResolveAutoFormat(Enum::"Auto Format"::AmountFormat, "Sales Invoice Header"."Currency Code")))
{
}
column(CalculatedExchRate; CalculatedExchRate)
Expand Down Expand Up @@ -816,6 +816,7 @@ report 31018 "Sales - Invoice with Adv. CZZ"
ReasonCode: Record "Reason Code";
ShipmentMethod: Record "Shipment Method";
TempVATAmountLine: Record "VAT Amount Line" temporary;
AutoFormat: Codeunit "Auto Format";
CompanyAddr: array[8] of Text[100];
CustAddr: array[8] of Text[100];
ShipToAddr: array[8] of Text[100];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,17 @@ page 31276 "Compensation Proposal CZC"
FilteredCustLedgerEntry.SetRange(Open, true);
FilteredCustLedgerEntry.SetRange(Prepayment, false);
FilteredCustLedgerEntry.SetRange("Compensation Amount (LCY) CZC", 0);
FilteredCustLedgerEntry.SetRange("On Hold", '');
if not CompensationsSetupCZC."Including Entries with On Hold" then
FilteredCustLedgerEntry.SetRange("On Hold", '');
FilteredCustLedgerEntry.SetFilter("Posting Date", '<=%1', PostingDate);
OnApplyFilterOnAfterSetCustLedgerEntryFilter(PostingDate, FilteredCustLedgerEntry);

Clear(FilteredVendorLedgerEntry);
FilteredVendorLedgerEntry.SetRange(Open, true);
FilteredVendorLedgerEntry.SetRange(Prepayment, false);
FilteredVendorLedgerEntry.SetRange("Compensation Amount (LCY) CZC", 0);
FilteredVendorLedgerEntry.SetRange("On Hold", '');
if not CompensationsSetupCZC."Including Entries with On Hold" then
FilteredVendorLedgerEntry.SetRange("On Hold", '');
FilteredVendorLedgerEntry.SetFilter("Posting Date", '<=%1', PostingDate);
OnApplyFilterOnAfterSetVendLedgerEntryFilter(PostingDate, FilteredVendorLedgerEntry);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ page 31270 "Compensations Setup CZC"
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies which customer/vendor entries to display if the system does not find any. If the value in the field is set to "NO", the entries of all other partners will be displayed, if set to "YES", the page will be blank.';
}
field("Including Entries with On Hold"; Rec."Including Entries with On Hold")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies if the entries with On Hold status will be included in the compensation proposal.';
}
}
group(Numbering)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,20 @@ table 31273 "Compensation Line CZC"

trigger OnLookup()
var
CompensationsSetup: Record "Compensations Setup CZC";
CustLedgerEntry: Record "Cust. Ledger Entry";
VendorLedgerEntry: Record "Vendor Ledger Entry";
begin
CompensationsSetup.Get();
case "Source Type" of
"Source Type"::Customer:
begin
CustLedgerEntry.SetCurrentKey(Open);
CustLedgerEntry.SetRange(Open, true);
CustLedgerEntry.SetRange(Prepayment, false);
CustLedgerEntry.SetRange("Compensation Amount (LCY) CZC", 0);
CustLedgerEntry.SetRange("On Hold", '');
if not CompensationsSetup."Including Entries with On Hold" then
CustLedgerEntry.SetRange("On Hold", '');
OnSourceEntryNoLookupOnAfterCustLedgerEntryFilter(CustLedgerEntry);
if CustLedgerEntry.FindSet() then
repeat
Expand All @@ -126,7 +129,8 @@ table 31273 "Compensation Line CZC"
VendorLedgerEntry.SetRange(Open, true);
VendorLedgerEntry.SetRange(Prepayment, false);
VendorLedgerEntry.SetRange("Compensation Amount (LCY) CZC", 0);
VendorLedgerEntry.SetRange("On Hold", '');
if not CompensationsSetup."Including Entries with On Hold" then
VendorLedgerEntry.SetRange("On Hold", '');
OnSourceEntryNoLookupOnAfterCustLedgerEntryFilter(CustLedgerEntry);
if VendorLedgerEntry.FindSet() then
repeat
Expand Down Expand Up @@ -612,38 +616,44 @@ table 31273 "Compensation Line CZC"

local procedure CheckCustLedgerEntry(var CustLedgerEntry: Record "Cust. Ledger Entry")
var
CompensationsSetup: Record "Compensations Setup CZC";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeCheckCustLedgerEntry(Rec, CustLedgerEntry, IsHandled);
if IsHandled then
exit;

CompensationsSetup.Get();
if CustLedgerEntry."Entry No." = 0 then
exit;
CustLedgerEntry.TestField(Open, true);
CustLedgerEntry.TestField(Prepayment, false);
CustLedgerEntry.TestField("On Hold", '');
CustLedgerEntry.TestField("Compensation Amount (LCY) CZC", 0);
if not CompensationsSetup."Including Entries with On Hold" then
CustLedgerEntry.TestField("On Hold", '');
if CustLedgerEntry.RelatedToAdvanceLetterCZL() then
Error(RelatedToAdvanceLetterErr, CustLedgerEntry.TableCaption(), CustLedgerEntry."Entry No.");
end;

local procedure CheckVendorLedgerEntry(var VendorLedgerEntry: Record "Vendor Ledger Entry")
var
CompensationsSetup: Record "Compensations Setup CZC";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeCheckVendorLedgerEntry(Rec, VendorLedgerEntry, IsHandled);
if IsHandled then
exit;

CompensationsSetup.Get();
if VendorLedgerEntry."Entry No." = 0 then
exit;
VendorLedgerEntry.TestField(Open, true);
VendorLedgerEntry.TestField(Prepayment, false);
VendorLedgerEntry.TestField("On Hold", '');
VendorLedgerEntry.TestField("Compensation Amount (LCY) CZC", 0);
if not CompensationsSetup."Including Entries with On Hold" then
VendorLedgerEntry.TestField("On Hold", '');
if VendorLedgerEntry.RelatedToAdvanceLetterCZL() then
Error(RelatedToAdvanceLetterErr, VendorLedgerEntry.TableCaption(), VendorLedgerEntry."Entry No.");
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ table 31270 "Compensations Setup CZC"
Caption = 'Show Empty when not Found';
DataClassification = CustomerContent;
}
field(45; "Including Entries with On Hold"; Boolean)
{
Caption = 'Including Entries with On Hold';
DataClassification = CustomerContent;
}
}

keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ codeunit 31072 "User Setup Adv. Management CZL"
LocationQtyIncreaseErr: Label 'You have no right to post Location (quantity increase) with Location Code: %1. Check User Setup!', Comment = '%1 = Location Code';
LocationQtyDecreaseErr: Label 'You have no right to post Location (quantity decrease) with Location Code: %1. Check User Setup!', Comment = '%1 = Location Code';
begin
if not CheckWorkDocDate(ItemJournalLine."Document Date") then
ItemJournalLine.TestField("Document Date", WorkDate());
if not CheckSysDocDate(ItemJournalLine."Document Date") then
ItemJournalLine.TestField("Document Date", Today);
if not CheckWorkPostingDate(ItemJournalLine."Posting Date") then
ItemJournalLine.TestField("Posting Date", WorkDate());
if not CheckSysPostingDate(ItemJournalLine."Posting Date") then
ItemJournalLine.TestField("Posting Date", Today);
if not IsUndoPosting(ItemJournalLine) then begin
if not CheckWorkDocDate(ItemJournalLine."Document Date") then
ItemJournalLine.TestField("Document Date", WorkDate());
if not CheckSysDocDate(ItemJournalLine."Document Date") then
ItemJournalLine.TestField("Document Date", Today);
if not CheckWorkPostingDate(ItemJournalLine."Posting Date") then
ItemJournalLine.TestField("Posting Date", WorkDate());
if not CheckSysPostingDate(ItemJournalLine."Posting Date") then
ItemJournalLine.TestField("Posting Date", Today);
end;

// Location checks
if ItemJournalLine."Value Entry Type" <> ItemJournalLine."Value Entry Type"::Revaluation then begin
Expand Down Expand Up @@ -135,6 +137,15 @@ codeunit 31072 "User Setup Adv. Management CZL"
end;
end;

local procedure IsUndoPosting(ItemJournalLine: Record "Item Journal Line"): Boolean
begin
exit(ItemJournalLine.Correction and
(ItemJournalLine."Document Type" in [
ItemJournalLine."Document Type"::"Purchase Receipt",
ItemJournalLine."Document Type"::"Sales Shipment",
ItemJournalLine."Document Type"::"Transfer Shipment"]));
end;

[TryFunction]
procedure CheckJobJournalLine(JobJournalLine: Record "Job Journal Line")
begin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ codeunit 31140 "VAT Statement Handler CZL"
Parantheses, i, OperatorNo, VATStmtLineID : Integer;
Operator: Char;
LeftOperand, RightOperand : Text;
LineTotalAmount, LineTotalBase : Decimal;
LineTotalAmount, LineTotalBase : Decimal;
LeftAmount, RightAmount : Decimal;
LeftBase, RightBase : Decimal;
ResultAmount, ResultBase : Decimal;
Expand Down Expand Up @@ -175,12 +175,14 @@ codeunit 31140 "VAT Statement Handler CZL"
begin
if RightAmount = 0 then begin
ResultAmount := 0;
Error(DivideByZeroErr);
if LeftAmount <> 0 then
Error(DivideByZeroErr);
end else
ResultAmount := LeftAmount / RightAmount;
if RightBase = 0 then begin
ResultBase := 0;
Error(DivideByZeroErr);
if LeftBase <> 0 then
Error(DivideByZeroErr);
end else
ResultBase := LeftBase / RightBase;
end;
Expand Down
Loading

0 comments on commit 0b8a1c1

Please sign in to comment.