Why do you need this change?
We have identified an issue in the standard SII XML generation logic within codeunit 10750 “SII XML Creator”.
The system incorrectly generates the XML node:
for purchase invoices classified as: Customs – Complementary Settlement (LC)
These documents are posted using Reverse Charge VAT. However, according to the validation behavior received from AEAT, the presence of the InversionSujetoPasivo node causes the SII submission to be rejected.
Current standard logic identified in codeunit 10750:
local procedure UseReverseChargeNotIntracommunity(
VATCalcType: Enum "Tax Calculation Type";
VendNo: Code[20];
PostingDate: Date;
InvoiceType: Text): Boolean
var
VATEntry: Record "VAT Entry";
SIIInitialDocUpload: Codeunit "SII Initial Doc. Upload";
begin
exit(
(VATCalcType = VATEntry."VAT Calculation Type"::"Reverse Charge VAT") and
(not SIIManagement.VendorIsIntraCommunity(VendNo)) and
(InvoiceType <> GetF5InvoiceType()) and
(not SIIInitialDocUpload.DateWithinInitialUploadPeriod(PostingDate)));
end;
The exception currently implemented only excludes invoice type F5:
local procedure GetF5InvoiceType(): Text[2]
begin
exit('F5');
end;
Because of this implementation, LC invoice types are also considered valid for InversionSujetoPasivo generation.
Steps to reproduce
- Create a purchase invoice
- Use invoice type “Customs – Complementary Settlement (LC)”
- Configure VAT as Reverse Charge VAT
- Post the invoice
- Generate SII XML
- Verify that is generated
- Submit XML to AEAT
- AEAT rejects the submission
Expected result
should not be generated for LC invoice types.
Actual result
is generated and the SII submission is rejected by AEAT.
Technical object involved
Codeunit 10750 – “SII XML Creator”
Procedure: UseReverseChargeNotIntracommunity
Describe the request
Expected behavior:
For invoice type: Customs – Complementary Settlement (LC) Business Central should NOT generate even when Reverse Charge VAT is used.
Current behavior:
XML includes InversionSujetoPasivo --> AEAT rejects the SII submission
The issue appears to originate from missing LC handling in the Reverse Charge exclusion logic implemented in codeunit 10750 – SII XML Creator.
Why do you need this change?
We have identified an issue in the standard SII XML generation logic within codeunit 10750 “SII XML Creator”.
The system incorrectly generates the XML node:
for purchase invoices classified as: Customs – Complementary Settlement (LC)
These documents are posted using Reverse Charge VAT. However, according to the validation behavior received from AEAT, the presence of the InversionSujetoPasivo node causes the SII submission to be rejected.
Current standard logic identified in codeunit 10750:
Because of this implementation, LC invoice types are also considered valid for InversionSujetoPasivo generation.
Steps to reproduce
Expected result
should not be generated for LC invoice types.
Actual result
is generated and the SII submission is rejected by AEAT.
Technical object involved
Codeunit 10750 – “SII XML Creator”
Procedure: UseReverseChargeNotIntracommunity
Describe the request
Expected behavior:
For invoice type: Customs – Complementary Settlement (LC) Business Central should NOT generate even when Reverse Charge VAT is used.
Current behavior:
XML includes InversionSujetoPasivo --> AEAT rejects the SII submission
The issue appears to originate from missing LC handling in the Reverse Charge exclusion logic implemented in codeunit 10750 – SII XML Creator.