Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
    {
      "id": "49206e10-c889-400d-8465-bde6555e00fc",
      "publisher": "Oseberg Solutions AS",
      "name": "E-invoice PEPPOL Bis",
      "version": "1720.0.0.0"
    }

Factoring example

...

Code Block
   [EventSubscriber(ObjectType::Codeunit, Codeunit::"OSB_PEPPOL_Management", 'GetPaymentMeansInfoOnAfterEvent', '', true, true)]
    local procedure "OSB_PEPPOL_Management_GetPaymentMeansInfoOnAfterEvent"
(
    SalesHeader: Record "Sales Header";
    var PaymentCounter: Integer;
    var PaymentCount: Integer;
    var PaymentMeansCode: Text;
    var PaymentMeansListID: text;
    var PaymentChannelCode: text;
    var PaymentID: Text;
    var PrimaryAccountNumberID: Text;
    var NetworkID: Text;
    ProcessedDocType: Enum OSB_Peppol_ProcessedDocType
)
    begin
        PaymentID = GetCustomPaymentId();

    end;


    [EventSubscriber(ObjectType::Codeunit, Codeunit::"OSB_PEPPOL_Management", 'GetPaymentMeansPayeeFinancialAcc_OnAfterEvent', '', true, true)]
    local procedure "OSB_PEPPOL_Management_GetPaymentMeansPayeeFinancialAcc_OnAfterEvent"
    (
        SalesHeader: Record "Sales Header";
        var PaymentCounter: Integer;
        var PaymentCount: integer;
        var PayeeFinancialAccountID: Text;
        var PaymentMeansSchemeID: Text;
        var FinancialInstitutionBranchID: Text;
        var FinancialInstitutionID: Text;
        var FinancialInstitutionSchemeID: Text;
        var FinancialInstitutionName: Text
    )
    begin
        PayeeFinancialAccountID := GetCustomPayeeFinancialAccount();
    end;

AccountingSupplierParty

Altering AccountingSupplierParty nodes is done with these events.

Code Block
[EventSubscriber(ObjectType::Codeunit, Codeunit::OSB_PEPPOL_Management, 'GetAccountingSupplierPartyInfo_OnAfterEvent', '', false, false)]
local procedure OSB_PEPPOL_Management_GetAccountingSupplierPartyInfo_OnAfterEvent(SalesHeader: Record "Sales Header"; var SupplierEndpointID: Text; var SupplierSchemeID: Text; var SupplierName: Text)
begin
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::OSB_PEPPOL_Management, 'GetAccountingSupplierPartyInfoBIS_OnAfterEvent', '', false, false)]
local procedure OSB_PEPPOL_Management_GetAccountingSupplierPartyInfoBIS_OnAfterEvent(SalesHeader: Record "Sales Header"; var SupplierEndpointID: Text; var SupplierSchemeID: Text; var SupplierName: Text)
begin
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::OSB_PEPPOL_Management, 'GetAccountingSupplierPartyPostalAddr_OnAfterEvent', '', false, false)]
local procedure OSB_PEPPOL_Management_GetAccountingSupplierPartyPostalAddr_OnAfterEvent_SetFromPartner(SalesHeader: Record "Sales Header"; var StreetName: Text; var SupplierAdditionalStreetName: Text; var CityName: Text; var PostalZone: Text; var CountrySubentity: Text; var IdentificationCode: Text; var ListID: Text)
begin
end;

[EventSubscriber(ObjectType::Codeunit, Codeunit::OSB_PEPPOL_Management, 'GetAccountingSupplierPartyLegalEntityByFormat_OnAfterEvent_V2', '', false, false)]
local procedure OSB_PEPPOL_Management_GetAccountingSupplierPartyLegalEntityByFormat_OnAfterEvent(SalesHeader: Record "Sales Header"; var PartyLegalEntityRegName: Text; var PartyLegalEntityCompanyID: Text; var PartyLegalEntitySchemeID: Text; var SupplierRegAddrCityName: Text; var SupplierRegAddrCountryIdCode: Text; var SupplRegAddrCountryIdListId: Text; IsBISBilling: Boolean)
begin
end;

AdditionalDocumentReference

When additional information is needed in the xml, use AdditionalDocumentReference tag.

Code Block
languagexml
    [EventSubscriber(ObjectType::Codeunit, Codeunit::OSB_PEPPOL_ExportBis30, 'PDFAttachments_OnBeforeCount', '', false, false)]
    LOCAL PROCEDURE OSB_PEPPOLExportBis30_PDFAttachments_OnBeforeCount(Rec: Variant; VAR Count: Integer; VAR isHandled: Boolean; ProcessedDocType: Enum OSB_PEPPOL_ProcessedDocType);
    BEGIN
        Count := 1; //Specifies how many additional document references to be added
        isHandled := true;
    END;

    [EventSubscriber(ObjectType::Codeunit, Codeunit::OSB_PEPPOL_ExportBis30, 'PDFAttachments_OnBeforeAttachment', '', false, false)]
    LOCAL PROCEDURE OSB_PEPPOLExportBis30_PDFAttachments_OnBeforeAttachment(VAR SalesHeader: Record "Sales Header"; VAR AdditionalDocumentReferenceID: Text; VAR AdditionalDocRefDocumentType: Text; VAR URI: Text; VAR MimeCode: Text; VAR EmbeddedDocumentBinaryObject: BigText; VAR filename: Text; VAR DocId: Integer; VAR isHandled: Boolean; ProcessedDocType: Enum OSB_PEPPOL_ProcessedDocType);
    BEGIN
        GetBirthDate(SalesHeader, AdditionalDocumentReferenceID, AdditionalDocRefDocumentType, URI, MimeCode, EmbeddedDocumentBinaryObject, filename, DocId, isHandled);
    END;

    LOCAL PROCEDURE GetBirthDate(VAR SalesHeader: Record "Sales Header"; VAR AdditionalDocumentReferenceID: Text; VAR AdditionalDocRefDocumentType: Text; VAR URI: Text; VAR MimeCode: Text; VAR EmbeddedDocumentBinaryObject: BigText; VAR filename: Text; VAR DocId: Integer; VAR isHandled: Boolean);
    VAR
    BEGIN
        AdditionalDocumentReferenceID := '';
        AdditionalDocRefDocumentType := '';
        URI := '';
        MimeCode := '';
        filename := '';
        DocId := 0;

        AdditionalDocumentReferenceID := '10.10.1973';
        AdditionalDocRefDocumentType := 'BIRTHDATE';

        isHandled := TRUE;
    END;

Result

Code Block

<cac:AdditionalDocumentReference>
    <cbc:ID>10.10.1973</cbc:ID>
    <cbc:DocumentTypeCode>BIRTHDATE</cbc:DocumentTypeCode>
  </cac:AdditionalDocumentReference>

Role Tailored Client

Implementing the Role Tailored Client is version specific as Microsoft has developed the sending routines in the NAV versions. Please follow the guide regarding your NAV version.

...

OSB_PEPPOLExportBis30.DocumentSendingPrint handles table id’s 112,114,5992,5994

Menu Suite

Add page 15027000 as part of the menu suite.