-
Notifications
You must be signed in to change notification settings - Fork 317
Add BE Peppol localization with Enterprise No. support #6268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add BE Peppol localization with Enterprise No. support #6268
Conversation
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
src/Apps/BE/Peppol/App/src/PEPPOL30BESalesValidation.Codeunit.al
Outdated
Show resolved
Hide resolved
Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
|
@copilot try again |
|
@copilot try again |
|
@copilot try again |
|
Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234' |
PR #6268 implements BE-specific PEPPOL export (Enterprise No. formatting/validation) but only for Sales documents. Service documents would fall through to W1 implementation, missing Belgium Enterprise No. support entirely. ## Changes - **Added** `PEPPOL30 BE Service Validation` codeunit (37312) - delegates to BE Sales validation via service→sales conversion (mirrors W1 pattern) - **Extended** `PEPPOL 3.0 Format BE` enum with `"PEPPOL 3.0 - BE Service"` value (37311) implementing BE Party Info Provider + BE Service Validation - **Updated** subscriber to set both `"PEPPOL 3.0 Sales Format"` and `"PEPPOL 3.0 Service Format"` on setup insert ## Format Selection Flow ```al // Export codeunits read setup and dispatch to format implementation Exp. Sales Inv. PEPPOL30 → Setup."PEPPOL 3.0 Sales Format" → PEPPOL30 BE → FormatEnterpriseNo ✓ Exp. Serv.Inv. PEPPOL30 → Setup."PEPPOL 3.0 Service Format" → PEPPOL30 BE → FormatEnterpriseNo ✓ (was: PEPPOL30 W1 → No Enterprise No.) ``` Both document types now apply BE-specific: - `FormatEnterpriseNo`: Prepends ISO code to numeric-only enterprise numbers - Validation: Accepts GLN **OR** VAT Reg No. **OR** Enterprise No. (W1 only accepts first two) <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > Pull Request: #6268 > > Please analyse how/if this app correctly overrides behaviour of the W1 app when user executes the export of sales or services docs. > </details> <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Groenbech96 <17690329+Groenbech96@users.noreply.github.com>
|
@copilot Error: Clashing object IDs detected: codeunit 37312 |
Belgium PEPPOL requires two deviations from W1: VAT registration numbers must use
FormatEnterpriseNofor BE companies, and document validation must accept "Enterprise No." as alternative to GLN/VAT Registration No.Changes
New App:
src/Apps/BE/PeppolPEPPOL Party Info Provider Implementation (
PEPPOL30 BE)FormatVATRegistrationNoto use BE-specific logicFormatEnterpriseNowhich prepends ISO code only to numeric-only enterprise numbersValidation Implementation (
PEPPOL30 BE Sales Validation)OnCheckSalesDocumentOnBeforeCheckCompanyVATRegNo,OnCheckSalesDocumentOnBeforeCheckCustomerVATRegNoEnum Extension (
PEPPOL 3.0 Format BE)PEPPOL 3.0 - BE SalesandPEPPOL 3.0 - BE Servicewith BE implementations