From fe84c3a2505af3c228c02015f6e31c5852d5ec9a Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Tue, 26 Nov 2024 18:26:40 +0100 Subject: [PATCH] Added ZugferdQuickDescriptor::doSetSupplyChainEvent --- examples/XRechnung3SimpleQuick.php | 1 + src/quick/ZugferdQuickDescriptor.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/XRechnung3SimpleQuick.php b/examples/XRechnung3SimpleQuick.php index 1df65e66..0c2303d1 100644 --- a/examples/XRechnung3SimpleQuick.php +++ b/examples/XRechnung3SimpleQuick.php @@ -7,6 +7,7 @@ $document = (ZugferdQuickDescriptorXRechnung3::doCreateNew()) ->doCreateInvoice("471102", \DateTime::createFromFormat("Ymd", "20180305"), "EUR") + ->doSetSupplyChainEvent(new \DateTime()) ->doSetPaymentTerms("Zahlbar sofort", new \DateTime('+3 days')) ->doAddNote('Rechnung gemäß Bestellung vom 01.03.2018.') ->doAddNote('Lieferant GmbH' . PHP_EOL . 'Lieferantenstraße 20' . PHP_EOL . '80333 München' . PHP_EOL . 'Deutschland' . PHP_EOL . 'Geschäftsführer: Hans Muster' . PHP_EOL . 'Handelsregisternummer: H A 123' . PHP_EOL . PHP_EOL, ZugferdTextSubjectCodeQualifiers::UNTDID_4451_REG) diff --git a/src/quick/ZugferdQuickDescriptor.php b/src/quick/ZugferdQuickDescriptor.php index ffd2a1be..8b28f127 100644 --- a/src/quick/ZugferdQuickDescriptor.php +++ b/src/quick/ZugferdQuickDescriptor.php @@ -22,7 +22,7 @@ * Creating them in a simple and common way in EN16931 profile * This class is slightly inspired by the invoicedescriptor of the * __https://github.com/stephanstapel/ZUGFeRD-csharp__ project - * + * * This class contains only basic functionality * * @category Zugferd @@ -385,6 +385,18 @@ public function doSetSpecifiedProcuringProject(string $id, string $name): Zugfer return $this; } + /** + * Set detailed information on the actual delivery + * + * @param DateTime|null $date __BT-72, From BASIC WL__ Actual delivery time + * @return ZugferdQuickDescriptor + */ + public function doSetSupplyChainEvent(?DateTime $date): ZugferdQuickDescriptor + { + $this->setDocumentSupplyChainEvent($date); + return $this; + } + /** * Detailed information about the buyer (service recipient) *