Skip to main content

🇪🇸 Spain

This document describes all necessary configuration for a compliant setup in Spain.

Configuration

In order to configure your store in Spain to be compliant, the following configurations need to take place.

Settings

All settings below should be set on the most convenient level possible. In other words, if your organization structure has a country organization which houses all Spanish stores, then that's where they should go.

SettingValueOrganization unitDescription
Auditing:ProviderESES on store OU's when go-live is in phases or on country level when big bang go live.Sets the certified aspects
UseInvoiceOutputFacadetrueRoot level or container levelAttaches the Certified Invoice PDF when emailing the Invoice from POS &/or Companion App. This setting enables the use of the CertifiedInvoice stencil with destination Mail
Auditing:UseInvoiceCloningtrueRoot level or container levelUsed to create a duplicate of an original invoice whenever a customer is attached or mutated
Auditing:PublicKeyBlobID-Root level or container levelID of the blob that was uploaded that contains the public key. Note: we can provide a service to generate it for you
Auditing:PrivateKeyBlobID-Root level or container levelPart of the key-pair used in your public key blob setting
note

Once you're done with all configuration steps. Make sure to run the service: AuditingValidateConfiguration which should return any step(s) that you may have missed or possibly undocumented.

Public and private key

To generate the public and private key one of our developers will help you. Or if you’re savvy enough with this command line:

openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -out public.pem -outform PEM -pubout
Private key

To set the private key the service AuditingSetPrivateKey can be used. This will upload the private key file and also increment the version setting automagically. It will also update the setting Auditing:PrivateKeyBlobID. We will have this setup done for you at the start of the project.

Public key

The public key should be uploaded to EVA via the StoreBlob service. Please note that the blob needs to have an "OriginalName" otherwise, it'll expire immediately. We will get this done for you at the start.

The public key should be shared with the authorities whenever they ask for it, so they can verify signatures.

Infrastructure

Cosmos DB will be setup by us, as this is required to keep track of the technical event log and the X/Z reports. If this is not set up, you won't be able to see any details in de technical event log section of EVA Admin.

Company

When configuring your Spanish organization unit(s), a company needs to be attached. If there is no Spanish company present yet on EVA, a new one should be created within Admin Suite under the Companies chapter. The following fields need to be filled:

  • Name
  • VatNumber
  • RegistrationNumber
  • Address (VisitorAddress)
    • Street
    • HouseNumber
    • ZipCode
    • City
    • CountryID

Organization unit(s)

Once a company is in place, you need to attach it to an organization unit(s).

Make sure the following fields are filled when creating an organization unit:

  • Name
  • BackendID (store number)
  • RegistrationNumber
  • VatNumber (aka TaxRegistrationNumber)
  • BranchNumber
  • Address
    • Street
    • ZipCode
    • City
    • CountryID
  • CompanyID
note

It is crucial that you have the CompanyID field filled when creating the organization unit. You can retrieve this ID from the Spanish company you created/have. This is the legal entity under which this OU/store is operating and will be referred to when filling in the details on the invoices and receipts.

Further, please make sure to fill all the auditing fields for your respective Spanish OU's.

Stations

You can find steps on adding a new station here.

When creating a station, make sure the following fields are filled in:

  • Station name.
  • The checkmark This station is a fiscal station and will be used for transactions needs to be checked.
note

All payment types must have a category, otherwise the payment can't be correctly mapped, and Ship Orders would fail.

Tasks

The following two tasks need be set up under Management Tasks.

Financial period audit

The CreateFinancialPeriodAuditTask should be configured every second day of the month at 04:00. This task will basically do an automated generation of an audit file, which you can also trigger manually.

The following fields need to be set:

  • Name - (can be any unique name you want).
  • Cron: 0 4 2 * *
  • Arguments
    • Type - (can be left blank).
    • Organization unit - (the ID of the country of the Spanish OU).
    • Email address - (In case of task failures the email address you mention here will receive a notification. This is an optional field but quite handy).

Financial reporting period

The CloseFinancialReportingPeriodsTask should be configured every night at 03:00. This task will check and close reporting periods (months, years, fiscal years).

The following fields need to be set:

  • Name - (can be any unique name you want).
  • Cron: 0 3 * * *
  • Type - (1 for shops 2 for webshops)
  • Email address - (Again, this is an optional field but quite handy in case the task run fails).
note

Unlike the financial period audit task, this task does not require an organization unit. It will simply look at all the automatically opened reporting periods and make sure to close them.