Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"runs-on": "windows-latest",
"cacheImageName": "",
"UsePsSession": false,
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/27.0.36535.0/base",
"artifact": "https://bcinsider-fvh2ekdjecfjd6gk.b02.azurefd.net/sandbox/27.0.36667.0/base",
"country": "base",
"useProjectDependencies": true,
"repoVersion": "27.0",
Expand Down
2 changes: 1 addition & 1 deletion Apps/APAC/EDocumentFormats/PINT A-NZ/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/APAC/EDocumentFormats/PINT A-NZ/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/AT/ContosoCoffeeDemoDatasetAT/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"allowDownloadingSource": false,
"includeSourceInSymbolFile": false
}
}
}
2 changes: 1 addition & 1 deletion Apps/AT/HybridBCLast_AT/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/AT/IntrastatAT/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/AU/ContosoCoffeeDemoDatasetAU/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"allowDownloadingSource": false,
"includeSourceInSymbolFile": false
}
}
}
2 changes: 1 addition & 1 deletion Apps/AU/EDocument_AU/demo data/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
"resourceFolders": [
".resources"
]
}
}
2 changes: 1 addition & 1 deletion Apps/AU/HybridBCLast_AU/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/AU/Onprem Permissions AU/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/BE/ContosoCoffeeDemoDatasetBE/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
"allowDownloadingSource": false,
"includeSourceInSymbolFile": false
}
}
}
2 changes: 1 addition & 1 deletion Apps/BE/HybridBCLast_BE/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/BE/IntrastatBE/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CA/ContosoCoffeeDemoDatasetCA/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"includeSourceInSymbolFile": false
},
"target": "OnPrem"
}
}
2 changes: 1 addition & 1 deletion Apps/CA/HybridBCLast_CA/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CH/ContosoCoffeeDemoDatasetCH/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"allowDownloadingSource": false,
"includeSourceInSymbolFile": false
}
}
}
2 changes: 1 addition & 1 deletion Apps/CH/HybridBCLast_CH/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CH/SwissQRBill/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CH/SwissQRBill/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/AdvancePaymentsLocalization/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
}
],
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/AdvancePaymentsLocalization/demo data/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/AdvancePaymentsLocalization/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/AdvancedLocalizationPack/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/AdvancedLocalizationPack/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/BankingDocumentsLocalization/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/BankingDocumentsLocalization/demo data/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/BankingDocumentsLocalization/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CashDeskLocalization/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CashDeskLocalization/demo data/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CashDeskLocalization/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CompensationLocalization/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CompensationLocalization/demo data/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CompensationLocalization/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/ContosoCoffeeDemoDatasetCZ/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"resourceFolders": [
".resources"
]
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CoreLocalizationPack/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/CoreLocalizationPack/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/FixedAssetLocalization/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/FixedAssetLocalization/demo data/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/FixedAssetLocalization/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/HybridBCLast_CZ/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/IntrastatCZ/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
},
"application": "27.0.0.0",
"target": "Cloud"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/IntrastatCZ/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
"includeSourceInSymbolFile": true
},
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/CZ/Onprem Permissions CZ/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/DACH/Onprem Permissions DACH/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
},
"target": "OnPrem",
"application": "27.0.0.0"
}
}
2 changes: 1 addition & 1 deletion Apps/DE/ContosoCoffeeDemoDatasetDE/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"includeSourceInSymbolFile": false
},
"target": "OnPrem"
}
}
2 changes: 1 addition & 1 deletion Apps/DE/EDocumentDE/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@
"features": [
"TranslationFile"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ codeunit 13917 "Export ZUGFeRD Document"
{
TableNo = "Record Export Buffer";
EventSubscriberInstance = Manual;
Access = Internal;
InherentEntitlements = X;
InherentPermissions = X;

Expand Down Expand Up @@ -82,7 +81,12 @@ codeunit 13917 "Export ZUGFeRD Document"
procedure GenerateSalesInvoicePDFAttachment(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempBlob: Codeunit "Temp Blob"): Boolean
var
ReportSelections: Record "Report Selections";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeGenerateSalesInvoicePDFAttachment(SalesInvoiceHeader, TempBlob, IsHandled);
if IsHandled then
exit(TempBlob.HasValue());
SalesInvoiceHeader.SetRange("No.", SalesInvoiceHeader."No.");
ReportSelections.GetPdfReportForCust(
TempBlob, "Report Selection Usage"::"S.Invoice",
Expand All @@ -93,7 +97,12 @@ codeunit 13917 "Export ZUGFeRD Document"
procedure GenerateSalesCrMemoPDFAttachment(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempBlob: Codeunit "Temp Blob"): Boolean
var
ReportSelections: Record "Report Selections";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeGenerateSalesCrMemoPDFAttachment(SalesCrMemoHeader, TempBlob, IsHandled);
if IsHandled then
exit(TempBlob.HasValue());
SalesCrMemoHeader.SetRange("No.", SalesCrMemoHeader."No.");
ReportSelections.GetPdfReportForCust(
TempBlob, "Report Selection Usage"::"S.Cr.Memo",
Expand Down Expand Up @@ -541,8 +550,9 @@ codeunit 13917 "Export ZUGFeRD Document"
ApplicableTradeTaxElement.Add(XmlElement.Create('RateApplicablePercent', XmlNamespaceRAM, FormatFourDecimal(SalesInvoiceLine."VAT %")));
SpecifiedLineTradeSettlementElement.Add(ApplicableTradeTaxElement);

InsertAllowanceCharge(SpecifiedLineTradeSettlementElement, 'Line Discount', GetTaxCategoryID(SalesInvoiceLine."Tax Category", SalesInvoiceLine."VAT Bus. Posting Group",
SalesInvoiceLine."VAT Prod. Posting Group"), SalesInvoiceLine."Line Discount Amount", SalesInvoiceLine."VAT %", false);
if SalesInvoiceLine."Line Discount Amount" <> 0 then
InsertAllowanceCharge(SpecifiedLineTradeSettlementElement, 'Line Discount', GetTaxCategoryID(SalesInvoiceLine."Tax Category", SalesInvoiceLine."VAT Bus. Posting Group",
SalesInvoiceLine."VAT Prod. Posting Group"), SalesInvoiceLine."Line Discount Amount", SalesInvoiceLine."VAT %", false);

SpecifiedTradeSettlementLineMonetarySummationElement := XmlElement.Create('SpecifiedTradeSettlementLineMonetarySummation', XmlNamespaceRAM);
SpecifiedTradeSettlementLineMonetarySummationElement.Add(XmlElement.Create('LineTotalAmount', XmlNamespaceRAM, FormatDecimal(SalesInvoiceLine.Amount + SalesInvoiceLine."Inv. Discount Amount")));
Expand Down Expand Up @@ -610,8 +620,9 @@ codeunit 13917 "Export ZUGFeRD Document"
ApplicableTradeTaxElement.Add(XmlElement.Create('RateApplicablePercent', XmlNamespaceRAM, FormatFourDecimal(SalesCrMemoLine."VAT %")));
SpecifiedLineTradeSettlementElement.Add(ApplicableTradeTaxElement);

InsertAllowanceCharge(SpecifiedLineTradeSettlementElement, 'Line Discount', GetTaxCategoryID(SalesCrMemoLine."Tax Category", SalesCrMemoLine."VAT Bus. Posting Group",
SalesCrMemoLine."VAT Prod. Posting Group"), SalesCrMemoLine."Line Discount Amount", SalesCrMemoLine."VAT %", false);
if SalesCrMemoLine."Line Discount Amount" <> 0 then
InsertAllowanceCharge(SpecifiedLineTradeSettlementElement, 'Line Discount', GetTaxCategoryID(SalesCrMemoLine."Tax Category", SalesCrMemoLine."VAT Bus. Posting Group",
SalesCrMemoLine."VAT Prod. Posting Group"), SalesCrMemoLine."Line Discount Amount", SalesCrMemoLine."VAT %", false);
SpecifiedTradeSettlementLineMonetarySummationElement := XmlElement.Create('SpecifiedTradeSettlementLineMonetarySummation', XmlNamespaceRAM);
SpecifiedTradeSettlementLineMonetarySummationElement.Add(XmlElement.Create('LineTotalAmount', XmlNamespaceRAM, FormatDecimal(SalesCrMemoLine.Amount + SalesCrMemoLine."Inv. Discount Amount")));
SpecifiedLineTradeSettlementElement.Add(SpecifiedTradeSettlementLineMonetarySummationElement);
Expand Down Expand Up @@ -957,6 +968,16 @@ codeunit 13917 "Export ZUGFeRD Document"
begin
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeGenerateSalesInvoicePDFAttachment(SalesInvoiceHeader: Record "Sales Invoice Header"; var TempBlob: Codeunit "Temp Blob"; var IsHandled: Boolean)
begin
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeGenerateSalesCrMemoPDFAttachment(SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var TempBlob: Codeunit "Temp Blob"; var IsHandled: Boolean)
begin
end;

[EventSubscriber(ObjectType::Report, Report::"Standard Sales - Invoice", 'OnPreReportOnBeforeInitializePDF', '', false, false)]
local procedure OnBeforeInitializePDFSalesInvoice(SalesInvHeader: Record "Sales Invoice Header"; var CreateZUGFeRDXML: Boolean)
begin
Expand Down
Loading
Loading