Skip to content

Commit

Permalink
Added methods for buyers and sellers electronic communication informa…
Browse files Browse the repository at this point in the history
…tion in QuickDescriptors
  • Loading branch information
HorstOeko committed Sep 12, 2023
1 parent 48a4103 commit be78b1b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/En16931SimpleQuick.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
->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)
->doSetBuyer("Kunden AG Mitte", "69876", "Frankfurt", "Lieferantenstraße 20", "DE", "34676-342323")
->doSetBuyerContact("Hans Miller")
->doSetBuyerElectronicCommunication("[email protected]")
->doSetSeller("Lieferant GmbH", "80333", "München", "Lieferantenstraße 20", "DE", null, "4000001123452", "0088")
->doAddSellerTaxRegistration("FC", "201/113/40209")
->doAddSellerTaxRegistration("VA", "DE123456789")
->doSetSellerContact("Horst Meier", null, "[email protected]", "+49-0000-8888888")
->doSetSellerElectronicCommunication("[email protected]")
->doAddTradeLineItem("1", "Zitronensäure 100ml", 1.0, 100.0, "H87", 0.0, "", "S", "VAT", 19.0)
->doAddTradeLineItem("2", "Gelierzucker Extra 250g", 1.45, 50.0, "H87", 0.0, "", "S", "VAT", 7.0)
->doAddTradeLineItem("3", "Gelierzucker Extra 250g", 0.0, 10.0, "H87", 0.0, "", "S", "VAT", 7.0)
Expand Down
2 changes: 2 additions & 0 deletions examples/ExtendedSimpleQuick.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
->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)
->doSetBuyer("Kunden AG Mitte", "69876", "Frankfurt", "Lieferantenstraße 20", "DE", "34676-342323")
->doSetBuyerContact("Hans Miller")
->doSetBuyerElectronicCommunication("[email protected]")
->doSetSeller("Lieferant GmbH", "80333", "München", "Lieferantenstraße 20", "DE", null, "4000001123452", "0088")
->doAddSellerTaxRegistration("FC", "201/113/40209")
->doAddSellerTaxRegistration("VA", "DE123456789")
->doSetSellerContact("Horst Meier", null, "[email protected]", "+49-0000-8888888")
->doSetSellerElectronicCommunication("[email protected]")
->doAddTradeLineItem("1", "Zitronensäure 100ml", 1.0, 100.0, "H87", 0.0, "", "S", "VAT", 19.0)
->doAddTradeLineItem("2", "Gelierzucker Extra 250g", 1.45, 50.0, "H87", 0.0, "", "S", "VAT", 7.0)
->doAddTradeLineItem("3", "Gelierzucker Extra 250g", 0.0, 10.0, "H87", 0.0, "", "S", "VAT", 7.0)
Expand Down
2 changes: 2 additions & 0 deletions examples/XRechnung2SimpleQuick.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
->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)
->doSetBuyer("Kunden AG Mitte", "69876", "Frankfurt", "Lieferantenstraße 20", "DE", "34676-342323")
->doSetBuyerContact("Hans Miller")
->doSetBuyerElectronicCommunication("[email protected]")
->doSetSeller("Lieferant GmbH", "80333", "München", "Lieferantenstraße 20", "DE", null, "4000001123452", "0088")
->doAddSellerTaxRegistration("FC", "201/113/40209")
->doAddSellerTaxRegistration("VA", "DE123456789")
->doSetSellerContact("Horst Meier", null, "[email protected]", "+49-0000-8888888")
->doSetSellerElectronicCommunication("[email protected]")
->doAddTradeLineItem("1", "Zitronensäure 100ml", 1.0, 100.0, "H87", 0.0, "", "S", "VAT", 19.0)
->doAddTradeLineItem("2", "Gelierzucker Extra 250g", 1.45, 50.0, "H87", 0.0, "", "S", "VAT", 7.0)
->doAddTradeLineItem("3", "Gelierzucker Extra 250g", 0.0, 10.0, "H87", 0.0, "", "S", "VAT", 7.0)
Expand Down
2 changes: 2 additions & 0 deletions examples/XRechnung3SimpleQuick.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
->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)
->doSetBuyer("Kunden AG Mitte", "69876", "Frankfurt", "Lieferantenstraße 20", "DE", "34676-342323")
->doSetBuyerContact("Hans Miller")
->doSetBuyerElectronicCommunication("[email protected]")
->doSetSeller("Lieferant GmbH", "80333", "München", "Lieferantenstraße 20", "DE", null, "4000001123452", "0088")
->doAddSellerTaxRegistration("FC", "201/113/40209")
->doAddSellerTaxRegistration("VA", "DE123456789")
->doSetSellerContact("Horst Meier", null, "[email protected]", "+49-0000-8888888")
->doSetSellerElectronicCommunication("[email protected]")
->doAddTradeLineItem("1", "Zitronensäure 100ml", 1.0, 100.0, "H87", 0.0, "", "S", "VAT", 19.0)
->doAddTradeLineItem("2", "Gelierzucker Extra 250g", 1.45, 50.0, "H87", 0.0, "", "S", "VAT", 7.0)
->doAddTradeLineItem("3", "Gelierzucker Extra 250g", 0.0, 10.0, "H87", 0.0, "", "S", "VAT", 7.0)
Expand Down
2 changes: 2 additions & 0 deletions examples/XRechnungSimpleQuick.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
->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)
->doSetBuyer("Kunden AG Mitte", "69876", "Frankfurt", "Lieferantenstraße 20", "DE", "34676-342323")
->doSetBuyerContact("Hans Miller")
->doSetBuyerElectronicCommunication("[email protected]")
->doSetSeller("Lieferant GmbH", "80333", "München", "Lieferantenstraße 20", "DE", null, "4000001123452", "0088")
->doAddSellerTaxRegistration("FC", "201/113/40209")
->doAddSellerTaxRegistration("VA", "DE123456789")
->doSetSellerContact("Horst Meier", null, "[email protected]", "+49-0000-8888888")
->doSetSellerElectronicCommunication("[email protected]")
->doAddTradeLineItem("1", "Zitronensäure 100ml", 1.0, 100.0, "H87", 0.0, "", "S", "VAT", 19.0)
->doAddTradeLineItem("2", "Gelierzucker Extra 250g", 1.45, 50.0, "H87", 0.0, "", "S", "VAT", 7.0)
->doAddTradeLineItem("3", "Gelierzucker Extra 250g", 0.0, 10.0, "H87", 0.0, "", "S", "VAT", 7.0)
Expand Down
26 changes: 26 additions & 0 deletions src/quick/ZugferdQuickDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,19 @@ public function doAddBuyerTaxRegistration(string $no, string $schemeID): Zugferd
return $this;
}

/**
* Set Buyers electronic communication information
*
* @param string $uri
* @param string $uriScheme
* @return ZugferdQuickDescriptor
*/
public function doSetBuyerElectronicCommunication(string $uri, string $uriScheme = "EM"): ZugferdQuickDescriptor
{
$this->setDocumentBuyerCommunication($uriScheme, $uri);
return $this;
}

/**
* Detailed information about the seller (=service provider)
*
Expand Down Expand Up @@ -543,6 +556,19 @@ public function doAddSellerTaxRegistration(string $no, string $schemeID): Zugfer
return $this;
}

/**
* Set Sellers electronic communication information
*
* @param string $uri
* @param string $uriScheme
* @return ZugferdQuickDescriptor
*/
public function doSetSellerElectronicCommunication(string $uri, string $uriScheme = "EM"): ZugferdQuickDescriptor
{
$this->setDocumentSellerCommunication($uriScheme, $uri);
return $this;
}

/**
* Add a new text position
*
Expand Down

0 comments on commit be78b1b

Please sign in to comment.