[master]-[BE] [PEPPOL] There is a problem between the totals on the invoice printout and the XML PEPPOL with Payment discount#9648
Conversation
| exit(CountryRegion."ISO Code" = 'DK'); | ||
| end; | ||
|
|
||
| local procedure IsBelgianCompany(): Boolean |
There was a problem hiding this comment.
Dont we have a BE localization of PEPPOL?
There was a problem hiding this comment.
@Groenbech96 Peppol BE, do not have this codeunit.
Below is the call stack-

There was a problem hiding this comment.
You need to use different service code in BE env. ("PEPPOL 3.0 - BE Sales")
and do changes in
https://github.com/microsoft/BCApps/tree/main/src/Apps/BE/PeppolBE/App
There was a problem hiding this comment.
@Groenbech96 @djukicmilica
I have made the suggested changes, can you please have a look.
|
|
||
| if TempVATAmtLine.FindSet() then | ||
| repeat | ||
| if TempVATAmtLine."Pmt. Discount Amount" <> 0 then begin |
There was a problem hiding this comment.
Can we use ModifyAll instead of the loop?
|
Recommendation: implement this through the This module currently has no integration events — all format-specific behavior goes through the enum-implements-interface pattern (the BE format values in
1. Add a BE codeunit implementing procedure GetTaxTotals(SalesLine: Record "Sales Line"; var VATAmtLine: Record "VAT Amount Line")
begin
SalesLine."Pmt. Discount Amount" := 0; // BE: exclude payment discount from PEPPOL totals
PEPPOL30.GetTaxTotals(SalesLine, VATAmtLine);
end;2. Point the BE format values at it in Implementation = ... , "PEPPOL Tax Info Provider" = "PEPPOL30 BE Tax Info";3. Remove the Because This keeps all format-specific logic behind the interface, avoids mutating shared state through an event, and needs no new publisher. |
|
Also, add some tests. |
Bug 643204: [ALL-E] [BE] [PEPPOL] There is a problem between the totals on the invoice printout and the XML PEPPOL file that is generated when using a discount % in the payment condtions. So in Belgium we calc the taxable amount on the total amount - discount%
Fixes AB#643204