Invoice address: Fix broken autofill for Peppol ID (Z#23224796) (#5971)

* Invoice address: Fix broken autofill for Peppol ID (Z#23224796)

* Fix wrong prefix
This commit is contained in:
Raphael Michel
2026-03-10 09:54:54 +01:00
committed by GitHub
parent 4f449ce6b4
commit 7b296107c5

View File

@@ -173,8 +173,8 @@ $(function () {
if (!dependents.transmission_peppol_participant_id.val()) {
const fill_peppol_id = function () {
const vatId = dependents.vat_id.val();
if (vatId && vatId.startsWith("BE") && dependents.transmission_type.val() === "peppol" && autofill_peppol_id) {
dependents.transmission_peppol_participant_id.val("0201:" + vatId.substring(2))
if (vatId && vatId.startsWith("BE") && dependents.transmission_type.val() === "peppol") {
dependents.transmission_peppol_participant_id.val("0208:" + vatId.substring(2))
}
}
dependents.vat_id.add(dependents.transmission_type).on("change", fill_peppol_id);