Updated on 23 September 2026

Incorrect country code in the CIF/NIF in Sage

Understand why Sage assigns a wrong country code to the CIF/NIF and where the problem comes from.

If an incorrect country code linked to the CIF/NIF appears when working with Ubyquo and Sage, the problem originates in Sage's internal data.

Ubyquo does not assign or modify the SiglaNacion (country code) that Sage uses in journal entries.

SAGE - Incorrect country code in CIF/NIF

What happens with the SiglaNacion?

When a CIF/NIF has several country codes linked to it, Sage uses the information from line 1 by default.

For example:

  • Line 1: B8 → incorrect
  • Line 2: ES → correct

In this case, Sage will use B8 when generating journal entries, even though a second line with the correct code exists.

Ubyquo does not assign the SiglaNacion

The SiglaNacion used in journal entries is assigned by Sage from its own internal tables.

Ubyquo is not responsible for determining this information during the export.

Where does Sage get the information from?

The information Sage uses comes from its internal tables, including:

  • Proveedores (Suppliers)
  • ClientesProveedores (CustomersSuppliers)

Sage uses the CIF/NIF to find the corresponding information and takes the country code from line 1.

How to fix the incorrect code

1

Verify the data in Sage

In Sage, find the affected customer or supplier and check the information linked to the CIF/NIF.

Check whether there are several country lines for the same CIF/NIF and which of them is in line 1.

2

Contact Sage

If line 1 contains an incorrect code, contact Sage support and ask them to correct the corresponding records.

Specifically, ask them to review and delete the erroneous records, especially the incorrect line 1, in the tables:

  • Proveedores
  • ClientesProveedores
3

Check the correction

Once the change has been made:

  • Check that line 1 contains the correct country code.
  • Review or regenerate the affected journal entries, if necessary.
  • Check that the code Sage uses is the correct one.

Important

Until the data in Sage's internal tables is corrected, Sage will keep using the incorrect code from line 1.

Therefore, exporting again from Ubyquo does not fix the problem, since the SiglaNacion depends on the information stored in Sage.