Skip to content

feat: add fecEntregaBienes property and XML template support#270

Open
lecano wants to merge 1 commit into
thegreenter:masterfrom
lecano:master
Open

feat: add fecEntregaBienes property and XML template support#270
lecano wants to merge 1 commit into
thegreenter:masterfrom
lecano:master

Conversation

@lecano
Copy link
Copy Markdown

@lecano lecano commented Jun 6, 2026

This pull request adds support for handling the delivery date of goods to the carrier in the shipment despatch process. The main changes include introducing a new property to the Shipment model, providing getter and setter methods for it, and updating the XML template to include this date if present.

Shipment model enhancements:

  • Added a new property fecEntregaBienes to the Shipment class to store the delivery date of goods to the carrier.
  • Implemented getter and setter methods for the fecEntregaBienes property in the Shipment class.

XML template update:

  • Modified despatch2022.xml.twig to include a <cac:LoadingTransportEvent> section with the fecEntregaBienes date if it is available.
image

Copilot AI review requested due to automatic review settings June 6, 2026 16:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for an optional “fecha de entrega de bienes al transportista” on despatch shipments and emits it in the generated Despatch 2022 XML.

Changes:

  • Introduces fecEntregaBienes in the Shipment model with getter/setter.
  • Emits a <cac:LoadingTransportEvent> with <cbc:OccurrenceDate> when envio.fecEntregaBienes is present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/xml/src/Xml/Templates/despatch2022.xml.twig Conditionally outputs LoadingTransportEvent/OccurrenceDate from envio.fecEntregaBienes.
packages/core/src/Core/Model/Despatch/Shipment.php Adds fecEntregaBienes property plus accessor methods to carry the new date field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +88 to +93
/**
* Fecha de entrega de bienes al transportista.
*
* @var DateTime
*/
private $fecEntregaBienes;
Comment on lines +361 to +364
/**
* @return DateTime
*/
public function getFecEntregaBienes(): ?DateTime
Comment on lines +369 to +374
/**
* @param DateTime $fecEntregaBienes
*
* @return Shipment
*/
public function setFecEntregaBienes(?DateTime $fecEntregaBienes): Shipment
Comment on lines +131 to +135
{% if envio.fecEntregaBienes %}
<cac:LoadingTransportEvent>
<cbc:OccurrenceDate>{{ envio.fecEntregaBienes|date('Y-m-d') }}</cbc:OccurrenceDate>
</cac:LoadingTransportEvent>
{% endif %}
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 6, 2026

@giansalex
Copy link
Copy Markdown
Member

La ultima version de twig exige cambio de PHP minimo a 8.1, por ahora se podria fijar la dependencia a "twig/twig": "~3.11.0" , en los archivos composer.json que lo tengan como dependencia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error: INFO: errorCode 3617 (nodo: "/" valor: "")

3 participants