Skip to content

Commit

Permalink
Merge branch 'main' into dev/pmi/SkipRecordLog
Browse files Browse the repository at this point in the history
  • Loading branch information
GediminasGaubys committed Oct 30, 2024
2 parents 958bdbe + 7ca090c commit 4f0ff2e
Show file tree
Hide file tree
Showing 573 changed files with 24,013 additions and 7,834 deletions.
4 changes: 2 additions & 2 deletions .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"type": "PTE",
"templateUrl": "https://github.com/microsoft/AL-Go-PTE@preview",
"bcContainerHelperVersion": "preview",
"bcContainerHelperVersion": "latest",
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.24649.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/26.0.25961.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "26.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,7 @@ codeunit 11346 IntrastatReportManagementBE
local procedure IsIntrastatExport(DataExchDefCode: Code[20]): Boolean
var
IntrastatReportSetup: Record "Intrastat Report Setup";
IntrastatReportMgt: Codeunit IntrastatReportManagement;
begin
if not IntrastatReportMgt.IsFeatureEnabled() then
exit(false);

if not IntrastatReportSetup.Get() then
exit(false);

Expand Down
17 changes: 4 additions & 13 deletions Apps/BE/IntrastatBE/app/src/IntrastatReportTariffNsBE.PageExt.al
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,13 @@ pageextension 11350 "Intrastat Report Tariff Ns. BE" extends "Tariff Numbers"
{
modify("Conversion Factor")
{
Visible = OldFieldsEnabled;
Enabled = OldFieldsEnabled;
Visible = false;
Enabled = false;
}
modify("Unit of Measure")
{
Visible = OldFieldsEnabled;
Enabled = OldFieldsEnabled;
Visible = false;
Enabled = false;
}
}
trigger OnOpenPage()
begin
OldFieldsEnabled := not IntrastatReportMgt.IsFeatureEnabled();
end;

var
IntrastatReportMgt: Codeunit IntrastatReportManagement;
[InDataSet]
OldFieldsEnabled: Boolean;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if not CLEANSCHEMA24
table 4046 "Stg Data Exch Def CA"
{
ReplicateData = false;
Expand Down Expand Up @@ -25,4 +26,5 @@ table 4046 "Stg Data Exch Def CA"
Clustered = true;
}
}
}
}
#endif
8 changes: 7 additions & 1 deletion Apps/CH/SwissQRBill/app/src/setup/SwissQRBillSetup.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,30 @@ table 11512 "Swiss QR-Bill Setup"

fields
{
field(1; "Primary key"; Code[10]) { }
field(1; "Primary key"; Code[10])
{
}
#if not CLEANSCHEMA23
field(2; "Swiss-Cross Image"; Media)
{
ObsoleteState = Removed;
ObsoleteTag = '23.0';
ObsoleteReason = 'Use W1 codeunit 4113 "Swiss QR Code Helper"';
}
#endif
field(3; "Address Type"; enum "Swiss QR-Bill Address Type")
{
Caption = 'Address Type';
}
#if not CLEANSCHEMA26
field(6; "Umlaut Chars Encode Mode"; Enum "Swiss QR-Bill Umlaut Encoding")
{
Caption = 'German Umlaut Chars Encoding Mode';
ObsoleteReason = 'No need to convert umlauts, because encoding was changed to UTF-8.';
ObsoleteState = Removed;
ObsoleteTag = '26.0';
}
#endif
field(8; "Default Layout"; Code[20])
{
Caption = 'Default QR-Bill Layout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ codeunit 31418 "Cross Application Handler CZZ"
[EventSubscriber(ObjectType::Table, Database::"Cash Document Line CZP", 'OnAfterCollectSuggestedApplication', '', false, false)]
local procedure OnAfterCollectSuggestedApplicationCashDocumentLine(CashDocumentLineCZP: Record "Cash Document Line CZP"; var CrossApplicationBufferCZL: Record "Cross Application Buffer CZL")
begin
if CashDocumentLineCZP."Account Type" <> CashDocumentLineCZP."Account Type"::Vendor then
exit;

CollectSuggestedApplicationForPurchAdvLetter(
CashDocumentLineCZP."Advance Letter No. CZZ", CashDocumentLineCZP, CrossApplicationBufferCZL);
end;

[EventSubscriber(ObjectType::Table, Database::"Payment Order Line CZB", 'OnAfterCollectSuggestedApplication', '', false, false)]
local procedure OnAfterCollectSuggestedApplicationPaymentOrderLine(PaymentOrderLineCZB: Record "Payment Order Line CZB"; var CrossApplicationBufferCZL: Record "Cross Application Buffer CZL")
begin
if PaymentOrderLineCZB.Type <> PaymentOrderLineCZB.Type::Vendor then
exit;

CollectSuggestedApplicationForPurchAdvLetter(
PaymentOrderLineCZB."Purch. Advance Letter No. CZZ", PaymentOrderLineCZB, CrossApplicationBufferCZL);
end;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ page 31216 "Advance Usage FactBox CZZ"
TempAdvanceLetterApplicationCZZ: Record "Advance Letter Application CZZ" temporary;
TempSalesAdvLetterEntryCZZ: Record "Sales Adv. Letter Entry CZZ" temporary;
TempPurchAdvLetterEntryCZZ: Record "Purch. Adv. Letter Entry CZZ" temporary;
DocumentTotalAmount: Decimal;
DocumentTotalAmount, DocumentTotalAmountLCY : Decimal;
AmountToUseVisible, AmountToUseLCYVisible : Boolean;
AmountUsedVisible, AmountUsedLCYVisible : Boolean;
TotalAfterDeductionVisible, TotalAfterDeductionLCYVisible : Boolean;
Expand All @@ -119,44 +119,48 @@ page 31216 "Advance Usage FactBox CZZ"
procedure SetDocument(PurchaseHeader: Record "Purchase Header")
begin
ClearBuffers();
DocumentTotalAmount := CalcDocumentTotalAmount(PurchaseHeader);
DocumentTotalAmountLCY := CalcDocumentTotalAmountLCY(PurchaseHeader);
CollectAssignedAdvances(PurchaseHeader.GetAdvLetterUsageDocTypeCZZ(), PurchaseHeader."No.");
CollectPurchAdvLetterEntries(PurchaseHeader);
DocumentTotalAmount := CalcDocumentTotalAmount(PurchaseHeader);
CurrPage.Update();
end;

procedure SetDocument(SalesHeader: Record "Sales Header")
begin
ClearBuffers();
DocumentTotalAmount := CalcDocumentTotalAmount(SalesHeader);
DocumentTotalAmountLCY := CalcDocumentTotalAmountLCY(SalesHeader);
CollectAssignedAdvances(SalesHeader.GetAdvLetterUsageDocTypeCZZ(), SalesHeader."No.");
CollectSalesAdvLetterEntries(SalesHeader);
DocumentTotalAmount := CalcDocumentTotalAmount(SalesHeader);
CurrPage.Update();
end;

procedure SetDocument(PurchInvHeader: Record "Purch. Inv. Header")
begin
ClearBuffers();
DocumentTotalAmount := CalcDocumentTotalAmount(PurchInvHeader);
DocumentTotalAmountLCY := CalcDocumentTotalAmountLCY(PurchInvHeader);
CollectAssignedAdvances("Adv. Letter Usage Doc.Type CZZ"::"Posted Purchase Invoice", PurchInvHeader."No.");
CollectPurchAdvLetterEntries(PurchInvHeader);
DocumentTotalAmount := CalcDocumentTotalAmount(PurchInvHeader);
CurrPage.Update();
end;

procedure SetDocument(SalesInvoiceHeader: Record "Sales Invoice Header")
begin
ClearBuffers();
DocumentTotalAmount := CalcDocumentTotalAmount(SalesInvoiceHeader);
DocumentTotalAmountLCY := CalcDocumentTotalAmountLCY(SalesInvoiceHeader);
CollectAssignedAdvances("Adv. Letter Usage Doc.Type CZZ"::"Posted Sales Invoice", SalesInvoiceHeader."No.");
CollectSalesAdvLetterEntries(SalesInvoiceHeader);
DocumentTotalAmount := CalcDocumentTotalAmount(SalesInvoiceHeader);
CurrPage.Update();
end;

procedure SetDocument(Job: Record Job)
begin
ClearBuffers();
CollectAssignedAdvances(Job."No.");
DocumentTotalAmount := CalcDocumentTotalAmount(Job);
CollectAssignedAdvances(Job."No.");
JobInLCY := Job."Currency Code" = '';
IsJob := true;
CurrPage.Update();
Expand Down Expand Up @@ -199,8 +203,8 @@ page 31216 "Advance Usage FactBox CZZ"
begin
PurchAdvLetterManagementCZZ.PostAdvancePaymentUsagePreview(
PurchaseHeader,
TempAdvanceLetterApplicationCZZ.Amount,
TempAdvanceLetterApplicationCZZ."Amount (LCY)",
GetAmountUsed(),
GetAmountUsedLCY(),
TempPurchAdvLetterEntryCZZ);
TempPurchAdvLetterEntryCZZ.SetFilter("Entry Type", '<>%1&<>%2&<>%3',
TempPurchAdvLetterEntryCZZ."Entry Type"::"VAT Usage",
Expand Down Expand Up @@ -231,8 +235,8 @@ page 31216 "Advance Usage FactBox CZZ"
begin
SalesAdvLetterManagementCZZ.PostAdvancePaymentUsagePreview(
SalesHeader,
TempAdvanceLetterApplicationCZZ.Amount,
TempAdvanceLetterApplicationCZZ."Amount (LCY)",
GetAmountUsed(),
GetAmountUsedLCY(),
TempSalesAdvLetterEntryCZZ);
TempSalesAdvLetterEntryCZZ.SetFilter("Entry Type", '<>%1&<>%2&<>%3',
TempSalesAdvLetterEntryCZZ."Entry Type"::"VAT Usage",
Expand Down Expand Up @@ -269,6 +273,11 @@ page 31216 "Advance Usage FactBox CZZ"
exit(TempVATAmountLine.GetTotalAmountInclVAT());
end;

local procedure CalcDocumentTotalAmountLCY(PurchaseHeader: Record "Purchase Header"): Decimal
begin
exit(CalcAmountLCY(DocumentTotalAmount, PurchaseHeader."Currency Factor"))
end;

local procedure CalcDocumentTotalAmount(SalesHeader: Record "Sales Header"): Decimal
var
TempSalesLine: Record "Sales Line" temporary;
Expand All @@ -281,18 +290,33 @@ page 31216 "Advance Usage FactBox CZZ"
exit(TempVATAmountLine.GetTotalAmountInclVAT());
end;

local procedure CalcDocumentTotalAmountLCY(SalesHeader: Record "Sales Header"): Decimal
begin
exit(CalcAmountLCY(DocumentTotalAmount, SalesHeader."Currency Factor"))
end;

local procedure CalcDocumentTotalAmount(PurchInvHeader: Record "Purch. Inv. Header"): Decimal
begin
PurchInvHeader.CalcFields("Amount Including VAT");
exit(PurchInvHeader."Amount Including VAT");
end;

local procedure CalcDocumentTotalAmountLCY(PurchInvHeader: Record "Purch. Inv. Header"): Decimal
begin
exit(CalcAmountLCY(DocumentTotalAmount, PurchInvHeader."Currency Factor"))
end;

local procedure CalcDocumentTotalAmount(SalesInvoiceHeader: Record "Sales Invoice Header"): Decimal
begin
SalesInvoiceHeader.CalcFields("Amount Including VAT");
exit(SalesInvoiceHeader."Amount Including VAT");
end;

local procedure CalcDocumentTotalAmountLCY(SalesInvoiceHeader: Record "Sales Invoice Header"): Decimal
begin
exit(CalcAmountLCY(DocumentTotalAmount, SalesInvoiceHeader."Currency Factor"))
end;

local procedure CalcDocumentTotalAmount(Job: Record Job) TotalAmount: Decimal
var
JobPlanningLine: Record "Job Planning Line";
Expand All @@ -307,6 +331,13 @@ page 31216 "Advance Usage FactBox CZZ"
until JobPlanningLine.Next() = 0;
end;

local procedure CalcAmountLCY(Amount: Decimal; CurrencyFactor: Decimal): Decimal
begin
if CurrencyFactor = 0 then
CurrencyFactor := 1;
exit(Amount / CurrencyFactor);
end;

local procedure ClearBuffers()
begin
TempAdvanceLetterApplicationCZZ.Reset();
Expand Down Expand Up @@ -343,12 +374,16 @@ page 31216 "Advance Usage FactBox CZZ"
local procedure GetAmountUsed(): Decimal
begin
TempAdvanceLetterApplicationCZZ.CalcSums(Amount);
if DocumentTotalAmount <= TempAdvanceLetterApplicationCZZ.Amount then
exit(DocumentTotalAmount);
exit(TempAdvanceLetterApplicationCZZ.Amount);
end;

local procedure GetAmountUsedLCY(): Decimal
begin
TempAdvanceLetterApplicationCZZ.CalcSums("Amount (LCY)");
if DocumentTotalAmountLCY <= TempAdvanceLetterApplicationCZZ."Amount (LCY)" then
exit(DocumentTotalAmountLCY);
exit(TempAdvanceLetterApplicationCZZ."Amount (LCY)");
end;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ page 31170 "Sales Advance Letters CZZ"
ToolTip = 'Specifies to pay amount.';
Visible = false;
}
field("To Pay (LCY)"; Rec."To Pay (LCY)")
{
ApplicationArea = Basic, Suite;
ToolTip = 'Specifies to pay (LCY) amount.';
Visible = false;
}
field("To Use"; Rec."To Use")
{
ApplicationArea = Basic, Suite;
Expand Down
Loading

0 comments on commit 4f0ff2e

Please sign in to comment.