PHP developer in Barcelona

WordPress for businesses in Barcelona, delivered remotely by one developer.

PHP developer

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.
  • Local WordPress meetup: WordPress Barcelona

My WordPress.org profile

A Barcelona company that invoices other companies is about to move from PDF invoices to structured ones, with status messages on top. The base is a law of 2022, a regulation of 2026 and a ministerial order of October 2026, all in the BOE. I am Mariusz Szatkowski, a PHP developer based in Gdynia who works only remotely and in writing. This page reads those three texts for one purpose: what a custom PHP invoicing module has to produce, store and send. I am not a lawyer, and the dates below are quoted from the BOE, not calculated.

Government square in the Gothic Quarter of Barcelona

The square between the city hall and the Generalitat palace in Barcelona. Image by Herodotptlomeu, licensed CC BY-SA 4.0, via Wikimedia Commons.

#What does Ley Crea y Crece require for invoices?

Ley 18/2022, de 28 de septiembre, changed article 2 bis of Ley 56/2007 in its article 12. The new text says that all empresarios y profesionales must issue, send and receive electronic invoices in their commercial relations with other empresarios y profesionales, and that recipient and issuer must provide information on the invoice statuses.

The same article sets rules that shape a module directly:

  • Solutions and platforms of e-invoicing providers must guarantee free interconnection and interoperability, and so must the in-house solutions of issuers and receivers.
  • Recipients can ask for a copy of an electronic invoice for four years after issue, without extra cost.
  • The receiver cannot force the issuer to use a predetermined solution, platform or provider.
  • Invoices must meet the specific invoicing rules, and the systems that manage invoicing and keep the invoices must respect the requirements of article 29.2.j) of the Ley General Tributaria.

The point about the receiver matters for architecture. A customer cannot make you use its portal as the only route, so a module has to carry its own export and not depend on one vendor’s format.

#When do the deadlines start?

The final provision eighth of Ley 18/2022 gives article 12 effect for businesses with annual billing above eight million euros one year after the approval of the implementing regulation, and for the rest two years after. It also says that the entry into force of article 12 depends on obtaining the EU exemption from articles 218 and 232 of Directive 2006/112/CE. I did not check the exemption separately, and the regulation proceeds on the basis of that provision.

Real Decreto 238/2026, de 25 de marzo, is the regulation. The BOE record gives publication in the BOE num. 79, de 31/03/2026, and entry into force on 20/04/2026. Its final provision fourth defers the effective application and counts from the entry into force of the ministerial order of its final provision third:

  • 12 months after, for businesses whose volume of operations, calculated under article 121 of Ley 37/1992, exceeded 8 million euros in the previous calendar year.
  • 24 months after, for all other empresarios y profesionales.
  • 12 months after that entry into force for the duties of private platforms: sending the faithful copy, interconnection and the requirements to operate as a platform (articles 6, 8, 9 and 13).

Orden HAC/1028/2026, de 2 de octubre, is that order. The BOE record gives publication in the BOE num. 247, de 05/10/2026, and entry into force on 06/10/2026. Its final provision says it enters into force the day after publication and that this starts the periods of the final provision eighth of Ley 18/2022 and of the regulation. The texts do not print calendar end dates, so the counting is something to confirm with a tax adviser.

Two more rules sit in the text. The public e-invoicing solution has to be available at least two months before the first effective application of the regulation, which both the regulation and the order state. And during the first twelve months after the regulation takes effect for businesses above eight million euros, they must attach a PDF to the electronic invoice, unless the recipient voluntarily and expressly accepts the original format. That PDF goes to the recipient by any means and never to the public solution.

#Which formats does the regulation accept?

Article 7.1 of the regulation requires a structured message that follows the EN16931 semantic data model of the European Committee for Standardization, in one of four syntaxes: CII, UBL, an EDIFACT invoice message or a Facturae message.

The public solution of the tax agency is narrower. Under article 11.2 of the regulation and article 3.1 of the order, invoices issued or interconnected through it follow EN16931 in the UBL syntax, with the technical specifications on the electronic office of the tax agency. The order adds that these invoices cannot carry other embedded files, which rules out the habit of attaching a PDF inside the XML.

Other rules from article 7 that touch a data model:

  • Invoices sent through private platforms must carry an advanced electronic signature, signed by the issuer or by an authorised delegate.
  • Every electronic invoice needs a unique code, held in one field or a concatenation of fields, that includes the issuer’s tax identification number, the invoice number and series and the date of issue.
  • Parties can agree on information beyond the minimum content, but a recipient can only require data it sent to the issuer in a reliable way before the date of the operation.

#Which copies and routes exist?

Article 5 of the regulation describes the Spanish system as the set of private invoice exchange platforms that meet the rules plus the public solution run by the tax agency, which also acts as invoice repository. Invoicing can go through private platforms, the public solution or both.

Article 6.2 sets the duty that matters most for a custom module. Platforms and systems that do not use the public solution to issue invoices must send, at the same time as issuing, a faithful electronic copy of each invoice in the UBL syntax to the public solution. The order adds in article 4 that the copy is marked in a field called “indicador de copia”, that it keeps the minimum content, and that it carries no embedded files. If the public solution is used for issuing, no copy is sent, because the invoice is already at the disposal of the administration.

Article 6.3 says that a business receiving through a private platform must publish its invoice entry points in all communications with other businesses. Without a published entry point, the entry point is the public solution.

Access to the public solution uses electronic certificates valid at the electronic office of the tax agency, under article 11 of the order. Article 11.10 of the regulation says that access and the uses it provides are free of charge.

#What status messages are required?

Article 10 of the regulation obliges recipients to inform the issuer of the commercial acceptance or rejection of the invoice with its date, and of the full payment with its date. Article 12 adds that the communication of full payment or rejection to the public solution is mandatory, whichever route the invoice took. Without a rejection or a later corrective invoice, the invoice is presumed accepted.

The deadline is a maximum of four calendar days, excluding Saturdays, Sundays and national holidays, from the date of the event. Recipients also report the due date of payment. The order, in its article 7, sets the syntax of these messages to UBL and says the payment duty counts as fulfilled when the invoice itself, or its copy, carries a payment date that is earlier than or equal to the issue date and equal to the date of the operation, unless the recipient reports the payment status expressly.

For natural persons with annual operations up to eight million euros, the transitional provision third makes reporting the invoice statuses voluntary until twelve months after the date set in the final provision fourth, point b.

#What are the exceptions?

Article 3 applies the duty when the recipient is an empresario or profesional with its seat, a permanent establishment or, failing that, its domicile or habitual residence in Spain. Article 4 exempts operations documented with simplified invoices, unless they are qualified simplified invoices under article 7.2 of the invoicing regulation. The ministry can exclude further operations by order, in principle for a limited time. The additional provision second also excludes certain market-operator activities and operations settled through named airline clearing houses.

#What does this mean for a PHP module?

The texts give no code, so what follows is design reading.

  • Store the structured invoice, not only the PDF. The legal object is the EN16931 message in one of the four syntaxes. A rendered PDF is a view of it.
  • Keep a UBL export even if the main format is another one. The public solution and the copy duty both name UBL.
  • Build the unique code once. Issuer tax number, series and number, and date, written to one place and never recalculated.
  • Model statuses as a table with deadlines. Each received invoice gets a due date for the rejection or payment message.
  • Keep the PDF route for the transition. The first twelve months for large businesses call for a PDF next to the XML, outside the public solution.

The deadline arithmetic is the part that is easy to get wrong. A sketch with the procedural date functions from php.net, where the list of national holidays comes from the caller:

<?php
declare(strict_types=1);

/**
 * Adds a number of working days: Saturdays, Sundays and the given
 * holiday dates (Y-m-d) do not count. Maximum is four per the BOE text.
 */
function statusDeadline(string $eventDate, array $holidays, int $days = 4): string
{
    $d = date_create_immutable($eventDate);
    $left = $days;
    while ($left > 0) {
        $d = date_modify($d, '+1 day');
        $isWeekend = (int) date_format($d, 'N') >= 6;
        $isHoliday = in_array(date_format($d, 'Y-m-d'), $holidays, true);
        if (!$isWeekend && !$isHoliday) {
            $left--;
        }
    }
    return date_format($d, 'Y-m-d');
}

The texts say “four calendar days, excluding Saturdays, Sundays and national holidays”. The sketch counts four days that are neither a weekend nor a holiday, which is one possible reading. If your adviser reads it differently, the function is the only place to change.

#What the sources do not settle

  • The technical specifications and volumes of the public solution are on the electronic office of the tax agency. I did not read them, and the field list in the order’s annex is long. A module needs both before go-live.
  • The BOE texts print periods, not calendar end dates. The counting from 06/10/2026 is for a tax adviser to confirm.
  • Whether a given private platform will be authorised to act for your customers is a matter between the customer and the platform.

#Checklist for a Barcelona team

  • Ask the adviser which period applies to the company: 12 or 24 months.
  • Decide the route: public solution, private platform or both.
  • Keep a structured invoice store with a UBL export.
  • Build the unique code from tax number, series and number, and date.
  • Add the status table with the four-day deadline.
  • Plan the PDF attachment for the first twelve months, if the company is above eight million euros.
  • Read the specifications on the tax agency site before the first test.

#How does a project start?

A few lines are enough: the size band of the company, how invoices are produced today and which platform, if any, the customers use. The first written estimate is free, and it separates the model, the exports and the status messages. The general offer is on the PHP developer page, and the contact page is where the first message goes.

Need this service: PHP developer in Barcelona?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Latest PHP developer articles

Dec 2, 2026

Laravel Rust: what does it mean for PHP apps?

On 1 December 2026 Taylor Otwell shipped the Laravel Rust beta, and Laravel Go followed a day later. What the framework contains, what the 18x benchmark really measures, what happens to Laravel PHP and WordPress, and when a rewrite makes sense.

Explore other WordPress services and knowledge base