Skip to content

Class ZugferdDocumentBuilder

HorstOeko edited this page Dec 30, 2024 · 36 revisions

Summary

Class representing the document builder for outgoing documents

Example

  use horstoeko\zugferd\codelists\ZugferdCountryCodes;
  use horstoeko\zugferd\codelists\ZugferdCurrencyCodes;
  use horstoeko\zugferd\codelists\ZugferdElectronicAddressScheme;
  use horstoeko\zugferd\codelists\ZugferdInvoiceType;
  use horstoeko\zugferd\codelists\ZugferdReferenceCodeQualifiers;
  use horstoeko\zugferd\codelists\ZugferdUnitCodes;
  use horstoeko\zugferd\codelists\ZugferdVatCategoryCodes;
  use horstoeko\zugferd\codelists\ZugferdVatTypeCodes;
  use horstoeko\zugferd\ZugferdDocumentBuilder;
  use horstoeko\zugferd\ZugferdProfiles;

  // Create an empty invoice document in the EN16931 profile
  $document = ZugferdDocumentBuilder::CreateNew(ZugferdProfiles::PROFILE_EN16931);

  // Add invoice and position information
  $document
    ->setDocumentInformation('R-2024/00001', ZugferdInvoiceType::INVOICE, DateTime::createFromFormat("Ymd", "20241231"), ZugferdCurrencyCodes::EURO)
    ->addDocumentNote('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, null, 'REG')
    ->setDocumentBillingPeriod(DateTime::createFromFormat("Ymd", "20250101"), DateTime::createFromFormat("Ymd", "20250131"), "01.01.2025 - 31.01.2025")
    ->setDocumentSeller("Lieferant GmbH", "549910")
    ->addDocumentSellerGlobalId("4000001123452", "0088")
    ->addDocumentSellerTaxNumber("201/113/40209")
    ->addDocumentSellerVATRegistrationNumber("DE123456789")
    ->setDocumentSellerAddress("Lieferantenstraße 20", "", "", "80333", "München", ZugferdCountryCodes::GERMANY)
    ->setDocumentSellerContact("H. Müller", "Verkauf", "+49-111-2222222", "+49-111-3333333", "[email protected]")
    ->setDocumentSellerCommunication(ZugferdElectronicAddressScheme::UNECE3155_EM, '[email protected]')
    ->setDocumentBuyer("Kunden AG Mitte", "GE2020211")
    ->setDocumentBuyerAddress("Kundenstraße 15", "", "", "69876", "Frankfurt", ZugferdCountryCodes::GERMANY)
    ->setDocumentBuyerContact("H. Meier", "Einkauf", "+49-333-4444444", "+49-333-5555555", "[email protected]")
    ->setDocumentBuyerCommunication(ZugferdElectronicAddressScheme::UNECE3155_EM, '[email protected]')
    ->setDocumentShipTo("Kunden AG Ost")
    ->setDocumentShipToAddress("Lieferstraße 1", "", "", "04109", "Leipzig", ZugferdCountryCodes::GERMANY)
    ->setDocumentSupplyChainEvent(DateTime::createFromFormat("Ymd", "20250115"))
    ->addDocumentPaymentMeanToDirectDebit("DE12500105170648489890", "R-2024/00001")
    ->addDocumentPaymentTerm('Wird von Konto DE12500105170648489890 abgebucht', DateTime::createFromFormat("Ymd", "20250131"), 'MANDATE-2024/000001')
    ->addNewPosition("1")
    ->setDocumentPositionProductDetails("Trennblätter A4", "50er Pack", "TB100A4")
    ->setDocumentPositionNetPrice(9.9000)
    ->setDocumentPositionQuantity(20, ZugferdUnitCodes::REC20_PIECE)
    ->addDocumentPositionTax(ZugferdVatCategoryCodes::STAN_RATE, ZugferdVatTypeCodes::VALUE_ADDED_TAX, 19)
    ->setDocumentPositionLineSummation(198.0)
    ->addNewPosition("2")
    ->setDocumentPositionProductDetails("Joghurt Banane", "B-Ware", "ARNR2")
    ->setDocumentPositionNetPrice(5.5000)
    ->setDocumentPositionQuantity(50, ZugferdUnitCodes::REC20_PIECE)
    ->addDocumentPositionTax(ZugferdVatCategoryCodes::STAN_RATE, ZugferdVatTypeCodes::VALUE_ADDED_TAX, 7)
    ->setDocumentPositionLineSummation(275.0)
    ->addNewPosition("3")
    ->setDocumentPositionProductDetails("Joghurt Erdbeer", "", "ARNR3")
    ->setDocumentPositionNetPrice(4.0000)
    ->setDocumentPositionQuantity(100, ZugferdUnitCodes::REC20_PIECE)
    ->addDocumentPositionTax(ZugferdVatCategoryCodes::STAN_RATE, ZugferdVatTypeCodes::VALUE_ADDED_TAX, 7)
    ->setDocumentPositionLineSummation(400.0)
    ->addDocumentTax(ZugferdVatCategoryCodes::STAN_RATE, ZugferdVatTypeCodes::VALUE_ADDED_TAX, 198.0, 37.62, 19.0)
    ->addDocumentTax(ZugferdVatCategoryCodes::STAN_RATE, ZugferdVatTypeCodes::VALUE_ADDED_TAX, 675.0, 47.25, 7.0)
    ->setDocumentSummation(957.87, 957.87, 873.00, 0.0, 0.0, 873.00, 84.87)
    ->writeFile(dirname(__FILE__) . "/factur-x.xml");

Methods

__toString

Summary

Receive the content as XML string

Signature

public function __toString(): string
{
}

Returns

Returns a value of type string

createNew [static]

Summary

Creates a new ZugferdDocumentBuilder with profile $profile

Signature

public static function createNew(int $profileId): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
profileId int

Returns

Returns a value of type \ZugferdDocumentBuilder

initNewDocument

Summary

Initialized a new document with profile settings

Signature

public function initNewDocument(): \ZugferdDocumentBuilder
{
}

Returns

Returns a value of type \ZugferdDocumentBuilder

getContent

Summary

Write the content of a CrossIndustryInvoice object to a string

Signature

public function getContent(): string
{
}

Returns

Returns a value of type string

getContentAsDomDocument

Summary

Write the content of a invoice object to a DOMDocument instance

Signature

public function getContentAsDomDocument(): \DOMDocument
{
}

Returns

Returns a value of type \DOMDocument

getContentAsDomXPath

Summary

Write the content of a invoice object to a DOMXpath instance

Signature

public function getContentAsDomXPath(): \DOMXpath
{
}

Returns

Returns a value of type \DOMXpath

writeFile

Summary

Write the content of a CrossIndustryInvoice object to a file

Signature

public function writeFile(string $xmlfilename): \ZugferdDocument
{
}

Parameters

Name Type Allows Null Description
xmlfilename string

Returns

Returns a value of type \ZugferdDocument

setDocumentInformation

Summary

Set main information about this document

Signature

public function setDocumentInformation(
  string $documentNo,
  string $documentTypeCode,
  DateTime $documentDate,
  string $invoiceCurrency,
  ?string $documentName = null,
  ?string $documentLanguage = null,
  ?DateTime $effectiveSpecifiedPeriod = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
documentNo string BT-1, From MINIMUM The document no issued by the seller
documentTypeCode string BT-3, From MINIMUM The type of the document, See \horstoeko\codelists\ZugferdInvoiceType for details
documentDate DateTime BT-2, From MINIMUM Date of invoice. The date when the document was issued by the seller
invoiceCurrency string BT-5, From MINIMUM Code for the invoice currency
documentName string ✔️ BT-X-2, From EXTENDED Document Type. The documenttype (free text)
documentLanguage string ✔️ BT-X-4, From EXTENDED Language indicator. The language code in which the document was written
effectiveSpecifiedPeriod DateTime ✔️ BT-X-6-000, From EXTENDED The contractual due date of the invoice

Returns

Returns a value of type \ZugferdDocumentBuilder

Example

$document = ZugferdDocumentBuilder::CreateNew(ZugferdProfiles::PROFILE_EN16931);
$document->setDocumentInformation('R-2024/00001', ZugferdInvoiceType::INVOICE, DateTime::createFromFormat("Ymd", "20241231"), ZugferdCurrencyCodes::EURO)

setDocumentBusinessProcess

Summary

Set grouping of business process information

Signature

public function setDocumentBusinessProcess(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-23, From MINIMUM Identifies the context of a business process where the transaction is taking place, thus allowing the buyer to process the invoice in an appropriate manner.
Note: These data make it possible to define the purpose of the settlement (invoice of the authorised person, contractual partner, subcontractor, settlement document for a
building contract etc.).

Returns

Returns a value of type \ZugferdDocumentBuilder

setIsDocumentCopy

Summary

Mark document as a copy from the original one (BT-X-3-00, BT-X-3, From EXTENDED)

Signature

public function setIsDocumentCopy(): \ZugferdDocumentBuilder
{
}

Returns

Returns a value of type \ZugferdDocumentBuilder

setIsTestDocument

Summary

Mark document as a test document

Signature

public function setIsTestDocument(): \ZugferdDocumentBuilder
{
}

Returns

Returns a value of type \ZugferdDocumentBuilder

setForeignCurrency

Summary

Sets a foreign currency (code) with the tax amount. The exchange rate
is calculated by tax amounts

Signature

public function setForeignCurrency(
  string $foreignCurrencyCode,
  float $foreignTaxAmount,
  ?float $exchangeRate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
foreignCurrencyCode string BT-6, From BASIC WL Foreign currency code
foreignTaxAmount float BT-X-260, From EXTENDED Tax total amount in the foreign currency
exchangeRate float ✔️ BT-X-260, From EXTENDED Exchange Rate

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentNote

Summary

Add a note to the docuzment

Signature

public function addDocumentNote(
  string $content,
  ?string $contentCode = null,
  ?string $subjectCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
content string BT-22, From BASIC WL A free text containing unstructured information that is relevant to the invoice as a whole
contentCode string ✔️ BT-X-5, From EXTENDED A code to classify the content of the free text of the invoice
subjectCode string ✔️ BT-21, From BASIC WL The qualification of the free text for the invoice from BT-22

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSeller

Summary

Detailed information about the seller (=service provider)

Signature

public function setDocumentSeller(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-27, From MINIMUM The full formal name under which the seller is registered in the National Register of Legal Entities, Taxable Person or otherwise acting as person(s)
id string ✔️ BT-29, From BASIC WL An identifier of the seller. In many systems, seller identification is key information. Multiple seller IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged, buyer-assigned identifier of the seller
description string ✔️ BT-33, From EN 16931 Further legal information that is relevant for the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerId

Summary

Add an id to the document seller

Signature

public function addDocumentSellerId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-29, From BASIC WL An identifier of the seller. In many systems, seller identification is key information. Multiple seller IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged, buyer-assigned identifier of the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerGlobalId

Summary

Add a global id for the seller

Notes

- The Seller's ID identification scheme is a unique identifier
assigned to a seller by a global registration organization

Signature

public function addDocumentSellerGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-29/BT-29-0, From BASIC WL The seller's identifier identification scheme is an identifier uniquely assigned to a seller by a global registration organization.
globalIDType string ✔️ BT-29-1, From BASIC WL If the identifier is used for the identification scheme, it must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerTaxRegistration

Summary

Add detailed information on the seller's tax information

The local identification (defined by the seller's address) of the seller for tax purposes or a reference that enables the seller
to indicate his reporting status for tax purposes The sales tax identification number of the seller
Note: This information may affect how the buyer the invoice settled (such as in relation to social security contributions). So
e.g. In some countries, if the seller is not reported for tax, the buyer will withhold the tax amount and pay it on behalf of the
seller. Sales tax number with a prefixed country code. A supplier registered as subject to VAT must provide his sales tax
identification number, unless he uses a tax agent.

Signature

public function addDocumentSellerTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-31-0/BT-32-0, From MINIMUM/EN 16931 Type of tax number of the seller (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-31/32, From MINIMUM/EN 16931 Tax number of the seller or sales tax identification number of the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerVATRegistrationNumber

Summary

Add information about the seller's VAT Registration Number (Umsatzsteueridentnummer)

Signature

public function addDocumentSellerVATRegistrationNumber(?string $vatRegNo = null): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
vatRegNo string ✔️ BT-31, From MINIMUM/EN 16931 VAT Registration Number (Umsatzsteueridentnummer)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerTaxNumber

Summary

Add information about the seller's Tax Number (Steuernummer)

Signature

public function addDocumentSellerTaxNumber(?string $taxNo = null): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxNo string ✔️ BT-32, From MINIMUM/EN 16931 Tax Number (Steuernummer)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerAddress

Summary

Sets detailed information on the business address of the seller

Signature

public function setDocumentSellerAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-35, From BASIC WL The main line in the sellers address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-36, From BASIC WL Line 2 of the seller's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line used to provide additional details in addition to the main line
lineThree string ✔️ BT-162, From BASIC WL Line 3 of the seller's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-38, From BASIC WL Identifier for a group of properties, such as a zip code
city string ✔️ BT-37, From BASIC WL Usual name of the city or municipality in which the seller's address is located
country string ✔️ BT-40, From MINIMUM Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”
subDivision string ✔️ BT-39, From BASIC WL The sellers state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerLegalOrganisation

Summary

Set Organization details

Signature

public function setDocumentSellerLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-30, From MINIMUM An identifier issued by an official registrar that identifies the seller as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer and seller
legalOrgType string ✔️ BT-30-1, From MINIMUM The identifier for the identification scheme of the legal registration of the seller. If the identification scheme is used, it must be selected from ISO/IEC 6523 list
legalOrgName string ✔️ BT-28, From BASIC WL A name by which the seller is known, if different from the seller's name (also known as the company name). Note: This may be used if different from the seller's name.

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerContact

Summary

Set detailed information on the seller's contact person

Signature

public function setDocumentSellerContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-41, From EN 16931 Such as personal name, name of contact person or department or office
contactDepartmentName string ✔️ BT-41-0, From EN 16931 If a contact person is specified, either the name or the department must be transmitted.
contactPhoneNo string ✔️ BT-42, From EN 16931 A telephone number for the contact point
contactFaxNo string ✔️ BT-X-107, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-43, From EN 16931 An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerContact

Summary

Add an (additional) contact to the seller party (EXTENDED Profile only)

Signature

public function addDocumentSellerContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-41, From EN 16931 Such as personal name, name of contact person or department or office
contactDepartmentName string ✔️ BT-41-0, From EN 16931 If a contact person is specified, either the name or the department must be transmitted.
contactPhoneNo string ✔️ BT-42, From EN 16931 A telephone number for the contact point
contactFaxNo string ✔️ BT-X-107, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-43, From EN 16931 An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerCommunication

Summary

Set the seller's electronic communication information

Signature

public function setDocumentSellerCommunication(?string $uriScheme, ?string $uri): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
uriScheme string ✔️ BT-34-1, From BASIC WL The identifier for the identification scheme of the seller's electronic address
uri string ✔️ BT-34, From BASIC WL Specifies the electronic address of the seller to which the response to the invoice can be sent at application level

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyer

Summary

Detailed information about the buyer (service recipient)

Signature

public function setDocumentBuyer(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-44, From MINIMUM The full name of the buyer
id string ✔️ BT-46, From BASIC WL An identifier of the buyer. In many systems, buyer identification is key information. Multiple buyer IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and buyer, e.g. a previously exchanged, seller-assigned identifier of the buyer
description string ✔️ BT-X-334, From EXTENDED Further legal information about the buyer

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentBuyerId

Summary

Add an id to the document buyer

Signature

public function addDocumentBuyerId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-46, From BASIC WL An identifier of the buyer. In many systems, buyer identification is key information. Multiple buyer IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and buyer, e.g. a previously exchanged, seller-assigned identifier of the buyer

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentBuyerGlobalId

Summary

Add a global id for the buyer

Signature

public function addDocumentBuyerGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-46-0, From BASIC WL The buyers's identifier identification scheme is an identifier uniquely assigned to a buyer by a global registration organization.
globalIDType string ✔️ BT-46-1, From BASIC WL If the identifier is used for the identification scheme, it must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentBuyerTaxRegistration

Summary

Add detailed information on the buyers's tax information

The local identification (defined by the buyers's address) of the buyers for tax purposes or a reference that enables the buyers
to indicate his reporting status for tax purposes The sales tax identification number of the buyers
Note: This information may affect how the buyer the invoice settled (such as in relation to social security contributions). So
e.g. In some countries, if the buyers is not reported for tax, the buyer will withhold the tax amount and pay it on behalf of the
buyers. Sales tax number with a prefixed country code. A supplier registered as subject to VAT must provide his sales tax
identification number, unless he uses a tax agent.

Signature

public function addDocumentBuyerTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-48-0, From BASIC WL Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-48, From BASIC WL Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentBuyerVATRegistrationNumber

Summary

Add information about the buyers's VAT Registration Number (Umsatzsteueridentnummer)

Signature

public function addDocumentBuyerVATRegistrationNumber(?string $vatRegNo = null): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
vatRegNo string ✔️ BT-48, From MINIMUM/EN 16931 VAT Registration Number (Umsatzsteueridentnummer)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentBuyerTaxNumber

Summary

Add information about the buyer's Tax Number (Steuernummer)

Signature

public function addDocumentBuyerTaxNumber(?string $taxNo = null): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxNo string ✔️ BT-48, From MINIMUM/EN 16931 Tax Number (Steuernummer)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyerAddress

Summary

Sets detailed information on the business address of the buyer

Signature

public function setDocumentBuyerAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-50, From BASIC WL The main line in the buyers address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-51, From BASIC WL Line 2 of the buyers address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-163, From BASIC WL Line 3 of the buyers address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-53, From BASIC WL Identifier for a group of properties, such as a zip code
city string ✔️ BT-52, From BASIC WL Usual name of the city or municipality in which the buyers address is located
country string ✔️ BT-55, From BASIC WL Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”
subDivision string ✔️ BT-54, From BASIC WL The buyers state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyerLegalOrganisation

Summary

Set legal organisation of the buyer party

Signature

public function setDocumentBuyerLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-47, From MINIMUM An identifier issued by an official registrar that identifies the buyer as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer and buyer
legalOrgType string ✔️ BT-47-1, From MINIMUM The identifier for the identification scheme of the legal registration of the buyer. If the identification scheme is used, it must be selected from ISO/IEC 6523 list
legalOrgName string ✔️ BT-45, From EN 16931 A name by which the buyer is known, if different from the buyers name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyerContact

Summary

Set contact of the buyer party

Signature

public function setDocumentBuyerContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-56, From EN 16931 Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-56-0, From EN 16931 Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-57, From EN 16931 A telephone number for the contact point
contactFaxNo string ✔️ BT-X-115, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-58, From EN 16931 An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentBuyerContact

Summary

Add an (additional) contact to the buyer party contact person (EXTENDED Profile only)

Signature

public function addDocumentBuyerContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-56, From EN 16931 Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-56-0, From EN 16931 Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-57, From EN 16931 A telephone number for the contact point
contactFaxNo string ✔️ BT-X-115, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-58, From EN 16931 An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyerCommunication

Summary

Set the buyers's electronic communication information

Signature

public function setDocumentBuyerCommunication(?string $uriScheme, ?string $uri): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
uriScheme string ✔️ BT-49-1, From BASIC WL The identifier for the identification scheme of the buyer's electronic address
uri string ✔️ BT-49, From BASIC WL Specifies the buyer's electronic address to which the invoice is sent

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerTaxRepresentativeTradeParty

Summary

Sets the Information about the seller's tax representative

Signature

public function setDocumentSellerTaxRepresentativeTradeParty(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-62, From BASIC WL The full name of the seller's tax agent
id string ✔️ BT-X-116, From EXTENDED An identifier of the sellers tax agent.
description string ✔️ Further legal information that is relevant for the sellers tax agent

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerTaxRepresentativeGlobalId

Summary

Add a global id for the seller's Tax representative party

Signature

public function addDocumentSellerTaxRepresentativeGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-117, From EXTENDED The seller's tax agent identifier identification scheme is an identifier uniquely assigned to a seller by a global registration organization.
globalIDType string ✔️ BT-X-117-1, From EXTENDED If the identifier is used for the identification scheme, it must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerTaxRepresentativeTaxRegistration

Summary

Add Tax registration to seller's tax representative party

Signature

public function addDocumentSellerTaxRepresentativeTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-63-0, From BASIC WL Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-63, From BASIC WL Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerTaxRepresentativeAddress

Summary

Sets the postal address of the seller's tax representative party

Signature

public function setDocumentSellerTaxRepresentativeAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-64, From BASIC WL The main line in the sellers tax agent address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-65, From BASIC WL Line 2 of the sellers tax agent address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-164, From BASIC WL Line 3 of the sellers tax agent address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-67, From BASIC WL Identifier for a group of properties, such as a zip code
city string ✔️ BT-66, From BASIC WL Usual name of the city or municipality in which the sellers tax agent address is located
country string ✔️ BT-69, From BASIC WL Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”
subDivision string ✔️ BT-68, From BASIC WL The sellers tax agent state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerTaxRepresentativeLegalOrganisation

Summary

Set legal organisation of the seller's tax representative party

Signature

public function setDocumentSellerTaxRepresentativeLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ An identifier issued by an official registrar that identifies the seller tax agent as a legal entity or legal person.
legalOrgType string ✔️ The identifier for the identification scheme of the legal registration of the sellers tax agent. If the identification scheme is used, it must be selected from ISO/IEC 6523 list
legalOrgName string ✔️ A name by which the sellers tax agent is known, if different from the sellers tax agent name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerTaxRepresentativeContact

Summary

Set detailed information on the seller's tax representative party contact person

Signature

public function setDocumentSellerTaxRepresentativeContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-120, From EXTENDED Such as personal name, name of contact person or department or office
contactDepartmentName string ✔️ BT-X-121, From EXTENDED If a contact person is specified, either the name or the department must be transmitted.
contactPhoneNo string ✔️ BT-X-122, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-123, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-124, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentSellerTaxRepresentativeContact

Summary

Add an (additional) contact to the seller's tax representative party (EXTENDED Profile only)

Signature

public function addDocumentSellerTaxRepresentativeContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-120, From EXTENDED Such as personal name, name of contact person or department or office
contactDepartmentName string ✔️ BT-X-121, From EXTENDED If a contact person is specified, either the name or the department must be transmitted.
contactPhoneNo string ✔️ BT-X-122, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-123, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-124, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentProductEndUser

Summary

Detailed information on the deviating end user (general informaton)

Signature

public function setDocumentProductEndUser(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-X-128, From EXTENDED Name/company name of the end user
id string ✔️ BT-X-126, From EXTENDED An identifier of the product end user
description string ✔️ Further legal information that is relevant for the product end user

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentProductEndUserGlobalId

Summary

Add a Global identifier of the deviating end user

Signature

public function addDocumentProductEndUserGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-127, From EXTENDED The identifier is uniquely assigned to a party by a global registration organization.
globalIDType string ✔️ BT-X-127-0, From EXTENDED If the identifier is used for the identification scheme, it must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentProductEndUserTaxRegistration

Summary

Add Tax registration to the deviating end user

Signature

public function addDocumentProductEndUserTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentProductEndUserAddress

Summary

Sets the postal address of the Product Enduser party

Signature

public function setDocumentProductEndUserAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-X-397, From EXTENDED The main line in the product end users address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-X-398, From EXTENDED Line 2 of the product end users address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-X-399, From EXTENDED Line 3 of the product end users address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-X-396, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT-X-400, From EXTENDED Usual name of the city or municipality in which the product end users address is located
country string ✔️ BT-X-401, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their
subdivisions”
subDivision string ✔️ BT-X-402, From EXTENDED The product end users state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentProductEndUserLegalOrganisation

Summary

Set legal organisation of the Product Enduser party

Signature

public function setDocumentProductEndUserLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-129, From EXTENDED An identifier issued by an official registrar that identifies the product end user as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to all trade parties
legalOrgType string ✔️ __BT-X-129-0, From EXTENDED__The identifier for the identification scheme of the legal registration of the product end user. If the identification scheme is used, it must be selected from ISO/IEC 6523 list
legalOrgName string ✔️ BT-X-130, From EXTENDED A name by which the product end user is known, if different from the product end users name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentProductEndUserContact

Summary

Set contact of the Product Enduser party

Signature

public function setDocumentProductEndUserContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-131, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-132, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-133, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-134, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-135, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentProductEndUserContact

Summary

Add an (additional) contact to the Product Enduser party (EXTENDED Profile only)

Signature

public function addDocumentProductEndUserContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-131, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-132, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-133, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-134, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-135, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipTo

Summary

Ship-To

Signature

public function setDocumentShipTo(
  ?string $name = null,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string ✔️ BT-70, From BASIC WL The name of the party to whom the goods are being delivered or for whom the services are being performed. Must be used if the recipient of the goods or services is not the same as the buyer.
id string ✔️ BT-71, From BASIC WL An identifier for the place where the goods are delivered or where the services are provided. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipTolId

Summary

Add an id to the Ship-to Trade Party

Signature

public function addDocumentShipTolId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-71, From BASIC WL An identifier for the place where the goods are delivered or where the services are provided. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipToGlobalId

Summary

Add a global id for the Ship-to Trade Party

Signature

public function addDocumentShipToGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-71-0, From BASIC WL Global identifier of the goods recipient
globalIDType string ✔️ BT-71-1, From BASIC WL Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipToTaxRegistration

Summary

Add Tax registration to Ship-To Trade party

Signature

public function addDocumentShipToTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-X-161-0, From EXTENDED Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-X-161, From EXTENDED Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipToAddress

Summary

Sets the postal address of the Ship-To party

Signature

public function setDocumentShipToAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-75, From BASIC WL The main line in the party's address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-76, From BASIC WL Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-165, From BASIC WL Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-78, From BASIC WL Identifier for a group of properties, such as a zip code
city string ✔️ BT-77, From BASIC WL Usual name of the city or municipality in which the party's address is located
country string ✔️ BT-80, From BASIC WL Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”
subDivision string ✔️ BT-79, From BASIC WL The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipToLegalOrganisation

Summary

Set legal organisation of the Ship-To party

Signature

public function setDocumentShipToLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-153, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-X-153-0, From EXTENDED The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-154, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipToContact

Summary

Set contact of the Ship-To party

Signature

public function setDocumentShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-155, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-156, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-157, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-158, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-159, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipToContact

Summary

Add an (additional) contact to the Ship-To party

Signature

public function addDocumentShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-155, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-156, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-157, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-158, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-159, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentUltimateShipTo

Summary

Detailed information on the different end recipient

Signature

public function setDocumentUltimateShipTo(
  ?string $name = null,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string ✔️ BT-X-164, From EXTENDED Name or company name of the different end recipient
id string ✔️ BT-X-162, From EXTENDED Identification of the different end recipient. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes.
description string ✔️ Further legal information that is relevant for the different end recipient

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentUltimateShipToId

Summary

Add an id to the different end recipient

Signature

public function addDocumentUltimateShipToId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-X-162, From EXTENDED Identification of the different end recipient. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentUltimateShipToGlobalId

Summary

Add a global id for the different end recipient

Signature

public function addDocumentUltimateShipToGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-163, From EXTENDED Global identifier of the different end recipient
globalIDType string ✔️ BT-X-163-0, From EXTENDED Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentUltimateShipToTaxRegistration

Summary

Add Tax registration to the different end recipient

Signature

public function addDocumentUltimateShipToTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-X-180-0, From EXTENDED Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-X-180, From EXTENDED Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentUltimateShipToAddress

Summary

Sets the postal address of the different end recipient

Signature

public function setDocumentUltimateShipToAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-X-173, From EXTENDED The main line in the party's address. This is usually the street name and house number or the post office box. For major customer addresses, this field must be filled with "-".
lineTwo string ✔️ BT-X-174, From EXTENDED Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-X-175, From EXTENDED Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-X-172, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT-X-176, From EXTENDED Usual name of the city or municipality in which the party's address is located
country string ✔️ BT-X-177, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”
subDivision string ✔️ BT-X-178, From EXTENDED The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentUltimateShipToLegalOrganisation

Summary

Set legal organisation of the different end recipient

Signature

public function setDocumentUltimateShipToLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-165, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-X-165-0, From EXTENDED The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-166, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentUltimateShipToContact

Summary

Set contact of the different end recipient

Signature

public function setDocumentUltimateShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-167, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-168, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-169, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-170, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-171, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentUltimateShipToContact

Summary

Add an (additional) contact to the different end recipient.

Signature

public function addDocumentUltimateShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-167, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-168, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-169, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-170, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-171, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipFrom

Summary

Set detailed information of the deviating consignor party

Signature

public function setDocumentShipFrom(
  ?string $name = null,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string ✔️ BT-X-183, From EXTENDED The name of the party
id string ✔️ BT-X-181, From EXTENDED An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipFromId

Summary

Add an id to the deviating consignor party

Signature

public function addDocumentShipFromId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-X-181, From EXTENDED An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipFromGlobalId

Summary

Add a global id for the deviating consignor party

Signature

public function addDocumentShipFromGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-182, From EXTENDED Global identifier of the goods recipient
globalIDType string ✔️ BT-X-182-0, From EXTENDED Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipFromTaxRegistration

Summary

Add Tax registration to the deviating consignor party

Signature

public function addDocumentShipFromTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipFromAddress

Summary

Sets the postal address of the deviating consignor party

Signature

public function setDocumentShipFromAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-X-192, From EXTENDED The main line in the party's address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-X-193, From EXTENDED Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-X-194, From EXTENDED Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-X-191, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT-X-195, From EXTENDED Usual name of the city or municipality in which the party's address is located
country string ✔️ BT-X-196, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their
subdivisions”
subDivision string ✔️ BT-X-197, From EXTENDED The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipFromLegalOrganisation

Summary

Set legal organisation of the deviating consignor party

Signature

public function setDocumentShipFromLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-184, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-X-184-0, From EXTENDED The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-185, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentShipFromContact

Summary

Set contact of the deviating consignor party

Signature

public function setDocumentShipFromContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-186, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-187, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-188, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-189, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-190, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentShipFromContact

Summary

Add an (additional) contact to the deviating consignor party

Signature

public function addDocumentShipFromContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-186, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-187, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-188, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-189, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-190, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoicer

Summary

Detailed information about the Invoicer Party

Signature

public function setDocumentInvoicer(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-X-207, From EXTENDED The name of the party
id string ✔️ BT-X-205, From EXTENDED An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoicerId

Summary

Add an id to the Invoicer Party

Signature

public function addDocumentInvoicerId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-X-205, From EXTENDED An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoicerGlobalId

Summary

Add a global id to the Invoicer Party

Signature

public function addDocumentInvoicerGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-206, From EXTENDED Global identifier of the goods recipient
globalIDType string ✔️ BT-X-206-0, From EXTENDED Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoicerTaxRegistration

Summary

Add Tax registration to Invoicer Party

Signature

public function addDocumentInvoicerTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoicerAddress

Summary

Sets the postal address of the Invoicer Party

Signature

public function setDocumentInvoicerAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-X-216, From EXTENDED The main line in the party's address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-X-217, From EXTENDED Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-X-218, From EXTENDED Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-X-215, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT-X-219, From EXTENDED Usual name of the city or municipality in which the party's address is located
country string ✔️ BT-X-220, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”
subDivision string ✔️ BT-X-221, From EXTENDED The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoicerLegalOrganisation

Summary

Set legal organisation of the Invoicer Party

Signature

public function setDocumentInvoicerLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-208, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-X-208-0, From EXTENDED The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN,* 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-209, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoicerContact

Summary

Set contact of the Invoicer Party

Signature

public function setDocumentInvoicerContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-210, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-211, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-212, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-213, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-214, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoicerContact

Summary

Add an (additional) contact to the Invoicer Party

Signature

public function addDocumentInvoicerContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-210, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-211, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-212, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-213, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-214, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoicee

Summary

Set detailed information on the different invoice recipient

Signature

public function setDocumentInvoicee(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-X-226, From EXTENDED The name of the party
id string ✔️ BT-X-224, From EXTENDED An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceeId

Summary

Add an id to the Invoicee Party

Signature

public function addDocumentInvoiceeId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-X-224, From EXTENDED An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceeGlobalId

Summary

Add a global id for the Invoicee Party

Signature

public function addDocumentInvoiceeGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-225, From EXTENDED Global identification number
globalIDType string ✔️ BT-X-225-0, From EXTENDED Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceeTaxRegistration

Summary

Add Tax registration to the Invoicee Party

Signature

public function addDocumentInvoiceeTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-X-242-0, From EXTENDED Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-X-242, From EXTENDED Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoiceeAddress

Summary

Sets the postal address of the Invoicee Party

Signature

public function setDocumentInvoiceeAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-X-235, From EXTENDED The main line in the party's address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-X-236, From EXTENDED Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-X-237, From EXTENDED Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-X-234, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT-X-238, From EXTENDED Usual name of the city or municipality in which the party's address is located
country string ✔️ BT-X-239, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their
subdivisions”
subDivision string ✔️ BT-X-240, From EXTENDED The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoiceeLegalOrganisation

Summary

Set legal organisation of the Invoicee Party

Signature

public function setDocumentInvoiceeLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-227, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-X-227-0, From EXTENDED The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-228, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoiceeContact

Summary

Set contact of the Invoicee Party

Signature

public function setDocumentInvoiceeContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-229, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-230, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-231, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-232, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-233, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceeContact

Summary

Add an (additional) contact to the Invoicee Party

Signature

public function addDocumentInvoiceeContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-229, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-230, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-231, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-232, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-233, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPayee

Summary

Set detailed information about the payee, i.e. about the place that receives the payment.

The role of the payee may also be performed by a party other than the seller, e.g. by a factoring service.

Signature

public function setDocumentPayee(
  string $name,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-59, From BASIC WL The name of the party. Must be used if the payee is not the same as the seller. However, the name of the payee may match the name of the seller.
id string ✔️ BT-60, From BASIC WL An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPayeeId

Summary

Add an id to the payee trade party

Signature

public function addDocumentPayeeId(string $id): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-60, From BASIC WL An identifier for the party. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPayeeGlobalId

Summary

Add a global id for the payee trade party

Signature

public function addDocumentPayeeGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-60-0, From BASIC WL Global identification number
globalIDType string ✔️ BT-60-1, From BASIC WL Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPayeeTaxRegistration

Summary

Add Tax registration to payee trade party

Signature

public function addDocumentPayeeTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-X-257-0, From EXTENDED Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ __BT-X-257, From EXTENDED Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPayeeAddress

Summary

Sets the postal address of the payee trade party

Signature

public function setDocumentPayeeAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT-X-250, From EXTENDED The main line in the party's address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT-X-251, From EXTENDED Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT-X-252, From EXTENDED Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT-X-249, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT-X-253, From EXTENDED Usual name of the city or municipality in which the party's address is located
country string ✔️ BT-X-254, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their
subdivisions”
subDivision string ✔️ BT-X-255, From EXTENDED The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPayeeLegalOrganisation

Summary

Set legal organisation of the payee trade party

Signature

public function setDocumentPayeeLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-61, From BASIC WL An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-61-1, From BASIC WL The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-243, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPayeeContact

Summary

Set contact of the payee trade party

Signature

public function setDocumentPayeeContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-244, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-245, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-246, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-247, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-248, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPayeeContact

Summary

Add an (additional) contact to the payee trade party

Signature

public function addDocumentPayeeContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-244, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-245, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-246, From EXTENDED A telephone number for the contact point
contactFaxNo string ✔️ BT-X-247, From EXTENDED A fax number of the contact point
contactEmailAddress string ✔️ BT-X-248, From EXTENDED An e-mail address of the contact point

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentDeliveryTerms

Summary

Set information on the delivery conditions

Signature

public function setDocumentDeliveryTerms(?string $code): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
code string ✔️ BT-X-145, From EXTENDED The code indicating the type of delivery for these commercial delivery terms. To be selected from the entries in the list UNTDID 4053 + INCOTERMS

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSellerOrderReferencedDocument

Summary

Set details of the associated order confirmation

Signature

public function setDocumentSellerOrderReferencedDocument(
  string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-14, From EN 16931 An identifier issued by the seller for a referenced sales order (Order confirmation number)
issueDate DateTime ✔️ BT-X-146, From EXTENDED Order confirmation date

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyerOrderReferencedDocument

Summary

Set details of the related buyer order

Signature

public function setDocumentBuyerOrderReferencedDocument(
  ?string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string ✔️ BT-13, From MINIMUM An identifier issued by the buyer for a referenced order (order number)
issueDate DateTime ✔️ BT-X-147, From EXTENDED Date of order

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentQuotationReferencedDocument

Summary

Set details of the associated offer

Signature

public function setDocumentQuotationReferencedDocument(
  ?string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string ✔️ BT-X-403, From EXTENDED Offer number
issueDate DateTime ✔️ BT-X-404, From EXTENDED Date of offer

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentContractReferencedDocument

Summary

Set details of the associated contract

Signature

public function setDocumentContractReferencedDocument(
  ?string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string ✔️ BT-12, From BASIC WL The contract reference should be assigned once in the context of the specific trade relationship and for a defined period of time (contract number)
issueDate DateTime ✔️ BT-X-26, From EXTENDED Contract date

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentAdditionalReferencedDocument

Summary

Set information about billing documents that provide evidence of claims made in the bill

Notes
- The documents justifying the invoice can be used to reference a document number, which should be
known to the recipient, as well as an external document (referenced by a URL) or an embedded document (such
as a timesheet as a PDF file). The option of linking to an external document is e.g. required when it comes
to large attachments and / or sensitive information, e.g. for personal services, which must be separated
from the bill

Signature

public function addDocumentAdditionalReferencedDocument(
  string $issuerAssignedId,
  string $typeCode,
  ?string $uriId = null,
  mixed $name = null,
  ?string $refTypeCode = null,
  ?DateTime $issueDate = null,
  ?string $binaryDataFilename = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-122, From EN 16931 The identifier of the tender or lot to which the invoice relates, or an identifier specified by the seller for an object on which the invoice is based, or an identifier of the document on which the invoice is based.
typeCode string BT-122-0, From EN 16931 Type of referenced document (See codelist UNTDID 1001)
- Code 916 "reference paper" is used to reference the identification of the
document on which the invoice is based - Code 50 "Price / sales catalog response"
is used to reference the tender or the lot - Code 130 "invoice data sheet" is used
to reference an identifier for an object specified by the seller.
uriId string ✔️ BT-124, From EN 16931 A means of locating the resource, including the primary access method intended for it, e.g. http:// or ftp://. The storage location of the external document must be used if the buyer requires further information as
supporting documents for the invoiced amounts. External documents are not part of the invoice. Invoice processing should be possible without access to external documents. Access to external documents can entail certain risks.
name mixed BT-123, From EN 16931 A description of the document, e.g. Hourly billing, usage or consumption report, etc.
refTypeCode string ✔️ BT-18-1, From ENN 16931 The identifier for the identification scheme of the identifier of the item invoiced. If it is not clear to the recipient which scheme is used for the identifier, an identifier of the scheme should be used, which must be selected from UNTDID 1153 in accordance with the code list entries.
issueDate DateTime ✔️ BT-X-149, From EXTENDED Document date
binaryDataFilename string ✔️ BT-125, From EN 16931 Contains a file name of an attachment document embedded as a binary object

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceSupportingDocumentWithUri

Summary

Add an invoice supporting additional document reference with an URL which specifies the location where the information can be found
The invoice supporting documents can be used to reference a document number, which should be known to the recipient, as well as an external document (referenced by a URL).

The option of linking to an external document is required, for example, when large attachments and/or sensitive information, e.g. for personal services, are involved,
which must be separated from the invoice.

Signature

public function addDocumentInvoiceSupportingDocumentWithUri(
  string $issuerAssignedId,
  string $uriId,
  mixed $name = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-122, From EN 16931 Identification of the document supporting the invoice
uriId string BT-124, From EN 16931 A means of locating the resource, including the primary access method intended for it, e.g. http:// or ftp://. The storage location of the external document must be used if the buyer requires further information as
name mixed BT-123, From EN 16931 A description of the document, e.g. Hourly billing, usage or consumption report, etc.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceSupportingDocumentWithFile

Summary

Add an invoice supporting additional document reference with an URL which specifies the location where the information can be found
The invoice supporting documents can be used to reference both a document number, which should be known to the recipient, and an embedded file (such as a timesheet as a PDF file).

Signature

public function addDocumentInvoiceSupportingDocumentWithFile(
  string $issuerAssignedId,
  string $binaryDataFilename,
  mixed $name = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-122, From EN 16931 Identification of the document supporting the invoice
binaryDataFilename string BT-125, From EN 16931 Contains a file name of an attachment document embedded as a binary object
name mixed BT-123, From EN 16931 A description of the document, e.g. Hourly billing, usage or consumption report, etc.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentTenderOrLotReferenceDocument

Summary

Add a tender or lot document reference

Signature

public function addDocumentTenderOrLotReferenceDocument(string $issuerAssignedId): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-122, From EN 16931 Tender or lot reference

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoicedObjectReferenceDocument

Summary

Add details of the calculated object

Signature

public function addDocumentInvoicedObjectReferenceDocument(
  string $issuerAssignedId,
  string $refTypeCode,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-122, From EN 16931 Depending on the application, this can be a subscription number, a telephone number, a meter reading, a vehicle, a person, etc.
refTypeCode string BT-18-1, From ENN 16931 The identifier for the identification scheme of the identifier of the item invoiced. If it is not clear to the recipient which scheme is used for the identifier, an identifier of the scheme should be used, which must be selected from UNTDID 1153 in accordance with the code list entries.

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentInvoiceReferencedDocument

Summary

Set a Reference to the previous invoice

To be used if:
- a previous invoice is corrected
- reference is made from a final invoice to previous partial invoices
- reference is made from a final invoice to previous invoices for advance payments. *

Signature

public function setDocumentInvoiceReferencedDocument(
  string $issuerAssignedId,
  ?string $typeCode = null,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-25, From BASIC WL The identification of an invoice previously sent by the seller
typeCode string ✔️ BT-X-555, From EXTENDED Type of previous invoice (code)
issueDate DateTime ✔️ BT-26, From BASIC WL Date of the previous invoice

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentInvoiceReferencedDocument

Summary

Add a Reference to the previous invoice

To be used if:
- a previous invoice is corrected
- reference is made from a final invoice to previous partial invoices
- reference is made from a final invoice to previous invoices for advance payments. *

Signature

public function addDocumentInvoiceReferencedDocument(
  string $issuerAssignedId,
  ?string $typeCode = null,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-25, From BASIC WL The identification of an invoice previously sent by the seller
typeCode string ✔️ BT-X-555, From EXTENDED Type of previous invoice (code)
issueDate DateTime ✔️ BT-26, From BASIC WL Date of the previous invoice

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentProcuringProject

Summary

Set Details of a project reference

Signature

public function setDocumentProcuringProject(string $id, string $name = 'Project Reference'): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-11, From EN 16931 The identifier of the project to which the invoice relates
name string BT-11-0, From EN 16931 The name of the project to which the invoice relates

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentUltimateCustomerOrderReferencedDocument

Summary

Details of the associated end customer order

Signature

public function addDocumentUltimateCustomerOrderReferencedDocument(
  string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-150, From EXTENDED Order number of the end customer
issueDate DateTime ✔️ BT-X-151, From EXTENDED Date of the order issued by the end customer

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSupplyChainEvent

Summary

Set detailed information on the actual delivery

Signature

public function setDocumentSupplyChainEvent(?DateTime $date): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
date DateTime ✔️ BT-72, From BASIC WL Actual delivery time

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentDespatchAdviceReferencedDocument

Summary

Set Detailed information on the actual delivery

Signature

public function setDocumentDespatchAdviceReferencedDocument(
  ?string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string ✔️ BT-16, From BASIC WL Shipping notification reference
issueDate DateTime ✔️ BT-X-200, From EXTENDED Shipping notification date

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentReceivingAdviceReferencedDocument

Summary

Set detailed information on the associated goods receipt notification

Signature

public function setDocumentReceivingAdviceReferencedDocument(
  string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-15, From EN 16931 An identifier for a referenced goods receipt notification (Goods receipt number)
issueDate DateTime ✔️ BT-X-201, From EXTENDED Goods receipt date

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentDeliveryNoteReferencedDocument

Summary

Set detailed information on the associated delivery bill

Signature

public function setDocumentDeliveryNoteReferencedDocument(
  string $issuerAssignedId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-202, From EXTENDED Delivery slip number
issueDate DateTime ✔️ BT-X-203, From EXTENDED Delivery slip date

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentGeneralPaymentInformation

Summary

Set general payment information

Signature

public function setDocumentGeneralPaymentInformation(
  ?string $creditorReferenceID = null,
  ?string $paymentReference = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
creditorReferenceID string ✔️ BT-90, From BASIC WL Identifier of the creditor
paymentReference string ✔️ BT-83, From BASIC WL Intended use for payment

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentMean

Summary

Add detailed information on the payment method

Notes

The SpecifiedTradeSettlementPaymentMeans element can only be repeated for each bank account if
several bank accounts are to be transferred for transfers. The code for the payment method in the Typecode
element must therefore not differ in the repetitions. The elements ApplicableTradeSettlementFinancialCard
and PayerPartyDebtorFinancialAccount must not be specified for bank transfers.

Signature

public function addDocumentPaymentMean(
  string $typeCode,
  ?string $information = null,
  ?string $cardType = null,
  ?string $cardId = null,
  ?string $cardHolderName = null,
  ?string $buyerIban = null,
  ?string $payeeIban = null,
  ?string $payeeAccountName = null,
  ?string $payeePropId = null,
  ?string $payeeBic = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
typeCode string BT-81, From BASIC WL The expected or used means of payment, expressed as a code. The entries from the UNTDID 4461 code list must be used. A distinction should be made between SEPA and non-SEPA payments as well as between credit payments, direct debits, card payments and other means of payment In particular, the following codes can be used:
- 10: cash
- 20: check
- 30: transfer
- 42: Payment to bank account
- 48: Card payment
- 49: direct debit
- 57: Standing order
- 58: SEPA Credit Transfer
- 59: SEPA Direct Debit
- 97: Report
information string ✔️ BT-82, From EN 16931 The expected or used means of payment expressed in text form, e.g. cash, bank transfer, direct debit, credit card, etc.
cardType string ✔️ The type of the card
cardId string ✔️ BT-87, From EN 16931 The primary account number (PAN) to which the card used for payment belongs. In accordance with card payment security standards, an invoice should never contain a full payment card master account number. The following specification of the PCI Security Standards Council currently applies: The first 6 and last 4 digits at most are to be displayed
cardHolderName string ✔️ BT-88, From EN 16931 Name of the payment card holder
buyerIban string ✔️ BT-91, From BASIC WL The account to be debited by the direct debit
payeeIban string ✔️ BT-84, From BASIC WL A unique identifier for the financial account held with a payment service provider to which the payment should be made
payeeAccountName string ✔️ BT-85, From BASIC WL The name of the payment account held with a payment service provider to which the payment should be made
payeePropId string ✔️ BT-84-0, From BASIC WL National account number (not for SEPA)
payeeBic string ✔️ BT-86, From EN 16931 An identifier for the payment service provider with which the payment account is held

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentMeanToCreditTransfer

Summary

Sets the document payment means to SEPA Credit Transfer

Signature

public function addDocumentPaymentMeanToCreditTransfer(
  string $payeeIban,
  ?string $payeeAccountName = null,
  ?string $payeePropId = null,
  ?string $payeeBic = null,
  ?string $paymentReference = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
payeeIban string BT-84, From BASIC WL A unique identifier for the financial account held with a payment service provider to which the payment should be made
payeeAccountName string ✔️ BT-85, From BASIC WL The name of the payment account held with a payment service provider to which the payment should be made
payeePropId string ✔️ BT-BT-84-0, From BASIC WL National account number (not for SEPA)
payeeBic string ✔️ BT-86, From EN 16931 An identifier for the payment service provider with which the payment account is held
paymentReference string ✔️ BT-83, From BASIC WL A text value used to link the payment to the invoice issued by the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentMeanToCreditTransferNonSepa

Summary

Sets the document payment means to Non-SEPA Credit Transfer

Signature

public function addDocumentPaymentMeanToCreditTransferNonSepa(
  string $payeeIban,
  ?string $payeeAccountName = null,
  ?string $payeePropId = null,
  ?string $payeeBic = null,
  ?string $paymentReference = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
payeeIban string BT-84, From BASIC WL A unique identifier for the financial account held with a payment service provider to which the payment should be made
payeeAccountName string ✔️ BT-85, From BASIC WL The name of the payment account held with a payment service provider to which the payment should be made
payeePropId string ✔️ BT-BT-84-0, From BASIC WL National account number (not for SEPA)
payeeBic string ✔️ BT-86, From EN 16931 An identifier for the payment service provider with which the payment account is held
paymentReference string ✔️ BT-83, From BASIC WL A text value used to link the payment to the invoice issued by the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentMeanToDirectDebit

Summary

Sets the document payment means to SEPA Direct Debit

Signature

public function addDocumentPaymentMeanToDirectDebit(
  string $buyerIban,
  ?string $creditorReferenceID = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
buyerIban string BT-91, From BASIC WL The account to be debited by the direct debit
creditorReferenceID string ✔️ BT-90, From BASIC WL Unique bank identifier of the payee or the seller assigned by the bank of the payee or the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentMeanToDirectDebitNonSepa

Summary

Sets the document payment means to Non-SEPA Direct Debit

Signature

public function addDocumentPaymentMeanToDirectDebitNonSepa(
  string $buyerIban,
  ?string $creditorReferenceID = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
buyerIban string BT-91, From BASIC WL The account to be debited by the direct debit
creditorReferenceID string ✔️ BT-90, From BASIC WL Unique bank identifier of the payee or the seller assigned by the bank of the payee or the seller

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentMeanToPaymentCard

Summary

Sets the document payment means to Payment card

Signature

public function addDocumentPaymentMeanToPaymentCard(
  string $cardType,
  string $cardId,
  ?string $cardHolderName = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
cardType string The type of the card
cardId string BT-87, From EN 16931 The primary account number (PAN) to which the card used for payment belongs. In accordance with card payment security standards, an invoice should never contain a full payment card master account number. The following specification of the PCI Security Standards Council currently applies: The first 6 and last 4 digits at most are to be displayed
cardHolderName string ✔️ BT-88, From EN 16931 Name of the payment card holder

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentTax

Summary

Add a VAT breakdown (at document level)

Signature

public function addDocumentTax(
  string $categoryCode,
  string $typeCode,
  float $basisAmount,
  float $calculatedAmount,
  ?float $rateApplicablePercent = null,
  ?string $exemptionReason = null,
  ?string $exemptionReasonCode = null,
  ?float $lineTotalBasisAmount = null,
  ?float $allowanceChargeBasisAmount = null,
  ?DateTime $taxPointDate = null,
  ?string $dueDateTypeCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
categoryCode string BT-118, From BASIC WL Coded description of a sales tax category

The following entries from UNTDID 5305 are used (details in brackets):
- Standard rate (sales tax is due according to the normal procedure)
- Goods to be taxed according to the zero rate (sales tax is charged with a percentage of zero)
- Tax exempt (USt./IGIC/IPSI)
- Reversal of the tax liability (the rules for reversing the tax liability at USt./IGIC/IPSI apply)
- VAT exempt for intra-community deliveries of goods (USt./IGIC/IPSI not levied due to rules on intra-community deliveries)
- Free export item, tax not levied (VAT / IGIC/IPSI not levied due to export outside the EU)
- Services outside the tax scope (sales are not subject to VAT / IGIC/IPSI)
- Canary Islands general indirect tax (IGIC tax applies)
- IPSI (tax for Ceuta / Melilla) applies.

The codes for the VAT category are as follows:
- S = sales tax is due at the normal rate
- Z = goods to be taxed according to the zero rate
- E = tax exempt
- AE = reversal of tax liability
- K = VAT is not shown for intra-community deliveries
- G = tax not levied due to export outside the EU
- O = Outside the tax scope
- L = IGIC (Canary Islands)
- M = IPSI (Ceuta / Melilla)
typeCode string BT-118-0, From BASIC WL Coded description of a sales tax category. Note: Fixed value = "VAT"
basisAmount float BT-116, From BASIC WL Tax base amount, Each sales tax breakdown must show a category-specific tax base amount.
calculatedAmount float BT-117, From BASIC WL The total amount to be paid for the relevant VAT category. Note: Calculated by multiplying the amount to be taxed according to the sales tax category by the sales tax rate applicable for the sales tax category concerned
rateApplicablePercent float ✔️ BT-119, From BASIC WL The sales tax rate, expressed as the percentage applicable to the sales tax category in question. Note: The code of the sales tax category and the category-specific sales tax rate must correspond to one another. The value to be given is the percentage. For example, the value 20 is given for 20% (and not 0.2)
exemptionReason string ✔️ BT-120, From BASIC WL Reason for tax exemption (free text)
exemptionReasonCode string ✔️ BT-121, From BASIC WL Reason given in code form for the exemption of the amount from VAT. Note: Code list issued and maintained by the Connecting Europe Facility.
lineTotalBasisAmount float ✔️ BT-X-262, From EXTENDED An amount used as the basis for calculating sales tax, duty or customs duty
allowanceChargeBasisAmount float ✔️ BT-X-263, From EXTENDED Total amount Additions and deductions to the tax rate at document level
taxPointDate DateTime ✔️ BT-7-00, From EN 16931 Date on which tax is due. This is not used in Germany. Instead, the delivery and service date must be specified.
dueDateTypeCode string ✔️ BT-8, From BASIC WL The code for the date on which the VAT becomes relevant for settlement for the seller and for the buyer

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentTaxSimple

Summary

Add a VAT breakdown (at document level) in a more simple way

Signature

public function addDocumentTaxSimple(
  string $categoryCode,
  string $typeCode,
  float $basisAmount,
  float $calculatedAmount,
  ?float $rateApplicablePercent = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
categoryCode string BT-118, From BASIC WL Coded description of a sales tax category
The following entries from UNTDID 5305 are used (details in
brackets): - Standard rate (sales tax is due according to the
normal procedure) - Goods to be taxed according to the zero rate
(sales tax is charged with a percentage of zero) - Tax exempt
(USt./IGIC/IPSI) - Reversal of the tax liability (the rules for
reversing the tax liability at USt./IGIC/IPSI apply) - VAT exempt
for intra-community deliveries of goods (USt./IGIC/IPSI not levied
due to rules on intra-community deliveries) - Free export item, tax
not levied (VAT / IGIC/IPSI not levied due to export outside the
EU) - Services outside the tax scope (sales are not subject to VAT
/ IGIC/IPSI) - Canary Islands general indirect tax (IGIC tax
applies) - IPSI (tax for Ceuta / Melilla) applies. The codes for
the VAT category are as follows: - S = sales tax is due at the
normal rate - Z = goods to be taxed according to the zero rate - E
= tax exempt - AE = reversal of tax liability - K = VAT is not
shown for intra-community deliveries - G = tax not levied due to
export outside the EU - O = Outside the tax scope - L = IGIC
(Canary Islands) - M = IPSI (Ceuta / Melilla)
typeCode string BT-118-0, From BASIC WL Coded description of a sales tax category. Note: Fixed value = "VAT"
basisAmount float BT-116, From BASIC WL Tax base amount, Each sales tax breakdown must show a category-specific tax base amount.
calculatedAmount float BT-117, From BASIC WL The total amount to be paid for the relevant VAT category. Note: Calculated by multiplying the amount to be taxed according to the sales tax category by the sales tax rate applicable for the sales tax category concerned
rateApplicablePercent float ✔️ BT-119, From BASIC WL The sales tax rate, expressed as the percentage applicable to the sales tax category in question. Note: The code of the sales tax category and the category-specific sales tax rate must correspond to one another. The value to be given is the percentage. For example, the value 20 is given for 20% (and not 0.2)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBillingPeriod

Summary

Get detailed information on the billing period

Signature

public function setDocumentBillingPeriod(
  ?DateTime $startDate,
  ?DateTime $endDate,
  ?string $description,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
startDate DateTime ✔️ BT-73, From BASIC WL Start of the billing period
endDate DateTime ✔️ BT-74, From BASIC WL End of the billing period
description string ✔️ BT-X-264, From EXTENDED Further information of the billing period (Obsolete)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentAllowanceCharge

Summary

Add information about surcharges and charges applicable to the bill as a whole, Deductions,
such as for withheld taxes may also be specified in this group

Signature

public function addDocumentAllowanceCharge(
  float $actualAmount,
  bool $isCharge,
  string $taxCategoryCode,
  string $taxTypeCode,
  ?float $rateApplicablePercent,
  ?float $sequence = null,
  ?float $calculationPercent = null,
  ?float $basisAmount = null,
  ?float $basisQuantity = null,
  ?string $basisQuantityUnitCode = null,
  ?string $reasonCode = null,
  ?string $reason = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
actualAmount float BT-92/BT-99, From BASIC WL Amount of the surcharge or discount at document level
isCharge bool BT-20-1/BT-21-1, From BASIC WL Switch that indicates whether the following data refer to an surcharge or a discount, true means that this an charge
taxCategoryCode string BT-95/BT-102, From BASIC WL A coded indication of which sales tax category applies to the surcharge or deduction at document level

The following entries from UNTDID 5305 are used (details in brackets):
- Standard rate (sales tax is due according to the normal procedure)
- Goods to be taxed according to the zero rate (sales tax is charged with a percentage of zero)
- Tax exempt (USt./IGIC/IPSI)
- Reversal of the tax liability (the rules for reversing the tax liability at USt./IGIC/IPSI apply)
- VAT exempt for intra-community deliveries of goods (USt./IGIC/IPSI not levied due to rules on intra-community deliveries)
- Free export item, tax not levied (VAT / IGIC/IPSI not levied due to export outside the EU)
- Services outside the tax scope (sales are not subject to VAT / IGIC/IPSI)
- Canary Islands general indirect tax (IGIC tax applies)
- IPSI (tax for Ceuta / Melilla) applies.

The codes for the VAT category are as follows:
- S = sales tax is due at the normal rate
- Z = goods to be taxed according to the zero rate
- E = tax exempt
- AE = reversal of tax liability
- K = VAT is not shown for intra-community deliveries
- G = tax not levied due to export outside the EU
- O = Outside the tax scope
- L = IGIC (Canary Islands)
- M = IPSI (Ceuta/Melilla)
taxTypeCode string BT-95-0/BT-102-0, From BASIC WL Code for the VAT category of the surcharge or charge at document level. Note: Fixed value = "VAT"
rateApplicablePercent float ✔️ BT-96/BT-103, From BASIC WL VAT rate for the surcharge or discount on document level. Note: The code of the sales tax category and the category-specific sales tax rate must correspond to one another. The value to be given is the percentage. For example, the value 20 is given for 20% (and not 0.2)
sequence float ✔️ BT-X-265, From EXTENDED Calculation order
calculationPercent float ✔️ BT-94/BT-101, From BASIC WL Percentage surcharge or discount at document level
basisAmount float ✔️ BT-93/BT-100, From BASIC WL The base amount that may be used in conjunction with the percentage of the surcharge or discount at document level to calculate the amount of the discount at document level
basisQuantity float ✔️ BT-X-266, From EXTENDED Base quantity of the discount
basisQuantityUnitCode string ✔️ BT-X-267, From EXTENDED Unit of the price base quantity
reasonCode string ✔️ BT-98/BT-105, From BASIC WL The reason given as a code for the surcharge or discount at document level. Note: Use entries from the UNTDID 5189 code list. The code of the reason for the surcharge or discount at document level and the reason for the surcharge or discount at document level must correspond to each other

Code list: UNTDID 7161 Complete list, code list: UNTDID 5189 Restricted
Include PEPPOL subset:
- 41 - Bonus for works ahead of schedule
- 42 - Other bonus
- 60 - Manufacturer’s consumer discount
- 62 - Due to military status
- 63 - Due to work accident
- 64 - Special agreement
- 65 - Production error discount
- 66 - New outlet discount
- 67 - Sample discount
- 68 - End-of-range discount
- 70 - Incoterm discount
- 71 - Point of sales threshold allowance
- 88 - Material surcharge/deduction
- 95 - Discount
- 100 - Special rebate
- 102 - Fixed long term
- 103 - Temporary
- 104 - Standard
- 105 - Yearly turnover
reason string ✔️ BT-97/BT-104, From BASIC WL The reason given in text form for the surcharge or discount at document level

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentLogisticsServiceCharge

Summary

Add detailed information on logistics service fees

Signature

public function addDocumentLogisticsServiceCharge(
  string $description,
  float $appliedAmount,
  ?array $taxTypeCodes = null,
  ?array $taxCategoryCodes = null,
  ?array $rateApplicablePercents = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
description string BT-X-271, From EXTENDED Identification of the service fee
appliedAmount float BT-X-272, From EXTENDED Amount of the service fee
taxTypeCodes array ✔️ BT-X-273-0, From EXTENDED Code of the Tax type. Note: Fixed value = "VAT"
taxCategoryCodes array ✔️ BT-X-273, From EXTENDED Code of the VAT category
rateApplicablePercents array ✔️ BT-X-274, From EXTENDED The sales tax rate, expressed as the percentage applicable to the sales tax category in question. Note: The code of the sales tax category and the category-specific sales tax rate must correspond to one another. The value to be given is the percentage. For example, the value 20 is given for 20% (and not 0.2)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentTerm

Summary

Add a payment term

Signature

public function addDocumentPaymentTerm(
  ?string $description = null,
  ?DateTime $dueDate = null,
  ?string $directDebitMandateID = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
description string ✔️ _BT-20, From BASIC WL A text description of the payment terms that apply to the payment amount due (including a description of possible penalties). Note: This element can contain multiple lines and multiple conditions.
dueDate DateTime ✔️ BT-9, From BASIC WL The date by which payment is due Note: The payment due date reflects the net payment due date. In the case of partial payments, this indicates the first due date of a net payment. The corresponding description of more complex payment terms can be given in BT-20.
directDebitMandateID string ✔️ BT-89, From BASIC WL Unique identifier assigned by the payee to reference the direct debit authorization.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDiscountTermsToPaymentTerms

Summary

Add discount Terms to last added payment term

Signature

public function addDiscountTermsToPaymentTerms(
  ?float $calculationPercent = null,
  ?DateTime $basisDateTime = null,
  ?float $basisPeriodMeasureValue = null,
  ?string $basisPeriodMeasureUnitCode = null,
  ?float $basisAmount = null,
  ?float $actualDiscountAmount = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
calculationPercent float ✔️ BT-X-286, From EXTENDED Percentage of the down payment
basisDateTime DateTime ✔️ BT-X-282, From EXTENDED Due date reference date
basisPeriodMeasureValue float ✔️ BT-X-284, From EXTENDED Maturity period (basis)
basisPeriodMeasureUnitCode string ✔️ BT-X-284, From EXTENDED Maturity period (unit)
basisAmount float ✔️ BT-X-284, From EXTENDED Base amount of the payment discount
actualDiscountAmount float ✔️ BT-X-287, From EXTENDED Amount of the payment discount

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPaymentTermXRechnung

Summary

Add a payment term in XRechnung-Style (in the Form #SKONTO#TAGE=14#PROZENT=1.00#BASISBETRAG=2.53#)

Signature

public function addDocumentPaymentTermXRechnung(
  string $description,
  array $paymentDiscountDays = [],
  array $paymentDiscountPercents = [],
  array $paymentDiscountBaseAmounts = [],
  ?DateTime $dueDate = null,
  ?string $directDebitMandateID = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
description string _BT-20, From EN 16931 XRECHNUNG Text to add
paymentDiscountDays array _BT-20, BR-DE-18, From EN 16931 XRECHNUNG Array of Payment discount days (array of integer)
paymentDiscountPercents array _BT-20, BR-DE-18, From EN 16931 XRECHNUNG Array of Payment discount percents (array of decimal)
paymentDiscountBaseAmounts array _BT-20, BR-DE-18, From EN 16931 XRECHNUNG Array of Payment discount base amounts (array of decimal)
dueDate DateTime ✔️ BT-9, From EN 16931 XRECHNUNG The date by which payment is due Note: The payment due date reflects the net payment due date. In the case of partial payments, this indicates the first due date of a net payment. The corresponding description of more complex payment terms can be given in BT-20.
directDebitMandateID string ✔️ BT-89, From EN 16931 XRECHNUNG Unique identifier assigned by the payee to reference the direct debit authorization.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentReceivableSpecifiedTradeAccountingAccount

Summary

Add information on the booking reference

Signature

public function addDocumentReceivableSpecifiedTradeAccountingAccount(
  ?string $id,
  ?string $typeCode,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string ✔️ BT-19, From BASIC WL Posting reference of the byuer. If required, this reference shall be provided by the Buyer to the Seller prior to the issuing of the Invoice.
typeCode string ✔️ BT-X-290, From EXTENDED Type of the posting reference

Allowed values:
- 1 Financial
- 2 Subsidiary
- 3 Budget
- 4 Cost Accounting
- 5 Payable
- 6 Job Cose Accounting

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentBuyerReference

Summary

An identifier assigned by the buyer and used for internal routing.

Note: The reference is specified by the buyer (e.g. contact details, department, office ID, project code),
but stated by the seller on the invoice.

Note: The route ID must be specified in the Buyer Reference (BT-10) in the XRechnung. According to the XRechnung
standard, two syntaxes are permitted for displaying electronic invoices: Universal Business Language (UBL) and UN/CEFACT
Cross Industry Invoice (CII).

Signature

public function setDocumentBuyerReference(?string $buyerReference): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
buyerReference string ✔️ BT-10, From MINIMUM An identifier assigned by the buyer and used for internal routing

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentRoutingId

Summary

Set the routing-id (needed for German XRechnung)
This is an alias-method for setDocumentBuyerReference

Note: The route ID must be specified in the Buyer Reference (BT-10) in the XRechnung.

Signature

public function setDocumentRoutingId(string $routingId): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
routingId string BT-10, From MINIMUM An identifier assigned by the buyer and used for internal routing

Returns

Returns a value of type \ZugferdDocumentBuilder

initDocumentSummation

Summary

Initilize the main document summation

Signature

public function initDocumentSummation(): \ZugferdDocumentBuilder
{
}

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentSummation

Summary

Document money summation

Signature

public function setDocumentSummation(
  float $grandTotalAmount,
  float $duePayableAmount,
  ?float $lineTotalAmount = null,
  ?float $chargeTotalAmount = null,
  ?float $allowanceTotalAmount = null,
  ?float $taxBasisTotalAmount = null,
  ?float $taxTotalAmount = null,
  ?float $roundingAmount = null,
  ?float $totalPrepaidAmount = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
grandTotalAmount float BT-112, From MINIMUM Total invoice amount including sales tax
duePayableAmount float BT-115, From MINIMUM Payment amount due
lineTotalAmount float ✔️ BT-106, From BASIC WL Sum of the net amounts of all invoice items
chargeTotalAmount float ✔️ BT-108, From BASIC WL Sum of the surcharges at document level
allowanceTotalAmount float ✔️ BT-107, From BASIC WL Sum of the discounts at document level
taxBasisTotalAmount float ✔️ BT-109, From MINIMUM Total invoice amount excluding sales tax
taxTotalAmount float ✔️ BT-110/111, From MINIMUM/BASIC WL if BT-6 is not null $taxTotalAmount = BT-111. Total amount of the invoice sales tax, Total tax amount in the booking currency
roundingAmount float ✔️ BT-114, From EN 16931 Rounding amount
totalPrepaidAmount float ✔️ BT-113, From BASIC WL Prepayment amount

Returns

Returns a value of type \ZugferdDocumentBuilder

addNewPosition

Summary

Adds a new position (line) to document

Signature

public function addNewPosition(
  string $lineid,
  ?string $lineStatusCode = null,
  ?string $lineStatusReasonCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineid string BT-126, From BASIC Identification of the invoice item
lineStatusCode string ✔️ BT-X-7, From EXTENDED Indicates whether the invoice item contains prices that must be taken into account when calculating the invoice amount or whether only information is included.
lineStatusReasonCode string ✔️ BT-X-8, From EXTENDED Adds the type to specify whether the invoice line is:

- DETAIL: detail (normal position)
- GROUP: Subtotal
- INFORMATION: Information only

Returns

Returns a value of type \ZugferdDocumentBuilder

addNewTextPosition

Caution

Deprecated 1.0.75

Summary

Adds a new text-only position (line) to document

Signature

public function addNewTextPosition(
  string $lineid,
  ?string $lineStatusCode = null,
  ?string $lineStatusReasonCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineid string BT-126, From BASIC Identification of the invoice item
lineStatusCode string ✔️ BT-X-7, From EXTENDED Indicates whether the invoice item contains prices that must be taken into account when calculating the invoice amount or whether only information is included.
lineStatusReasonCode string ✔️ BT-X-8, From EXTENDED Adds the type to specify whether the invoice line is:

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionNote

Summary

Add detailed information on the free text on the position

Signature

public function setDocumentPositionNote(
  ?string $content,
  ?string $contentCode = null,
  ?string $subjectCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
content string ✔️ BT-127, From BASIC A free text that contains unstructured information that is relevant to the invoice item
contentCode string ✔️ BT-X-9, From EXTENDED A code to classify the content of the free text of the invoice. The code is agreed bilaterally and must have the same meaning as BT-127.
subjectCode string ✔️ BT-X-10, From EXTENDED Code for qualifying the free text for the invoice item (Codelist UNTDID 4451)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionProductDetails

Summary

Adds product details to the last created position (line) in the document

Signature

public function setDocumentPositionProductDetails(
  string $name,
  ?string $description = null,
  ?string $sellerAssignedID = null,
  ?string $buyerAssignedID = null,
  ?string $globalIDType = null,
  ?string $globalID = null,
  ?string $industryAssignedID = null,
  ?string $modelID = null,
  ?string $batchID = null,
  ?string $brandName = null,
  ?string $modelName = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-153, From BASIC A name of the item (item name)
description string ✔️ BT-154, From EN 16931 A description of the item, the item description makes it possible to describe the item and its properties in more detail than is possible with the item name.
sellerAssignedID string ✔️ BT-155, From EN 16931 An identifier assigned to the item by the seller
buyerAssignedID string ✔️ BT-156, From EN 16931 An identifier assigned to the item by the buyer. The article number of the buyer is a clear, bilaterally agreed identification of the product. It can, for example, be the customer article number or the article number assigned by the manufacturer.
globalIDType string ✔️ BT-157-1, From BASIC The scheme for $globalID
globalID string ✔️ BT-157, From BASIC Identification of an article according to the registered scheme (Global identifier of the product, GTIN, ...)
industryAssignedID string ✔️ BT-X-309, From EXTENDED ID assigned by the industry to the contained referenced product
modelID string ✔️ BT-X-533, From EXTENDED A unique model identifier for this product
batchID string ✔️ BT-X-534. From EXTENDED Identification of the batch (lot) of the product
brandName string ✔️ BT-X-535. From EXTENDED The brand name, expressed as text, for this product
modelName string ✔️ BT-X-536. From EXTENDED Model designation of the product

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionProductCharacteristic

Summary

Add extra characteristics to the formerly added product.

Contains information about the characteristics of the goods and services invoiced

Signature

public function addDocumentPositionProductCharacteristic(
  string $description,
  string $value,
  ?string $typeCode = null,
  ?float $valueMeasure = null,
  ?string $valueMeasureUnitCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
description string BT-160, From EN 16931 The name of the attribute or property of the product such as "Colour"
value string BT-161, From EN 16931 The value of the attribute or property of the product such as "Red"
typeCode string ✔️ BT-X-11, From EXTENDED Type of product characteristic (code). The codes must be taken from the UNTDID 6313 codelist.
valueMeasure float ✔️ BT-X-12, From EXTENDED Value of the product property (numerical measured variable)
valueMeasureUnitCode string ✔️ BT-X-12-0, From EXTENDED Unit of measurement code

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionProductClassification

Summary

Add detailed information on product classification

Signature

public function addDocumentPositionProductClassification(
  string $classCode,
  ?string $className = null,
  ?string $listId = null,
  ?string $listVersionId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
classCode string BT-158, From EN 16931 Item classification identifier. Classification codes are used for grouping similar items that can serve different purposes, such as public procurement (according to the Common Procurement Vocabulary ([CPV]), e-commerce (UNSPSC), etc.
className string ✔️ BT-X-138, From EXTENDED Name with which an article can be classified according to type or quality.
listId string ✔️ BT-158-1, From EN 16931 The identifier for the identification scheme of the item classification identifier. The identification scheme must be selected from the entries in UNTDID 7143 [6].
listVersionId string ✔️ BT-158-2, From EN 16931 The version of the identification scheme

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionProductOriginTradeCountry

Summary

Sets the detailed information on the product origin

Signature

public function setDocumentPositionProductOriginTradeCountry(string $country): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
country string BT-159, From EN 16931 The code indicating the country the goods came from. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their subdivisions”.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionReferencedProduct

Summary

Add detailed information on included products. This information relates to the product that has just been added

Signature

public function addDocumentPositionReferencedProduct(
  string $name,
  ?string $description = null,
  ?string $sellerAssignedID = null,
  ?string $buyerAssignedID = null,
  ?string $globalID = null,
  ?string $globalIDType = null,
  ?float $unitQuantity = null,
  ?string $unitCode = null,
  ?string $industryAssignedID = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string BT-X-18, From EXTENDED Name of the referenced product contained
description string ✔️ BT-X-19, From EXTENDED Description of the included referenced product
sellerAssignedID string ✔️ BT-X-16, From EXTENDED ID assigned by the seller of the contained referenced product
buyerAssignedID string ✔️ BT-X-17, From EXTENDED ID of the referenced product assigned by the buyer
globalID string ✔️ BT-X-15, From EXTENDED Global ID of the referenced product contained
globalIDType string ✔️ BT-X-15-1, From EXTENDED Identification of the scheme
unitQuantity float ✔️ BT-X-20, From EXTENDED Quantity of the referenced product contained
unitCode string ✔️ BT-X-20-1, From EXTENDED Unit code of Quantity of the referenced product contained
industryAssignedID string ✔️ BT-X-309, From EXTENDED ID of the referenced product contained assigned by the industry

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionSellerOrderReferencedDocument

Summary

Set details of a sales order reference

Signature

public function setDocumentPositionSellerOrderReferencedDocument(
  string $issuerAssignedId,
  string $lineId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-537, From EXTENDED Document number of a sales order reference
lineId string BT-X-538, From EXTENDED An identifier for a position within a sales order.
issueDate DateTime ✔️ BT-X-539, From EXTENDED Date of sales order

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionBuyerOrderReferencedDocument

Summary

Set details of the related buyer order position

Signature

public function setDocumentPositionBuyerOrderReferencedDocument(
  string $issuerAssignedId,
  string $lineId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-21, From EXTENDED An identifier issued by the buyer for a referenced order (order number)
lineId string BT-132, From EN 16931 An identifier for a position within an order placed by the buyer. Note: Reference is made to the order reference at the document level.
issueDate DateTime ✔️ BT-X-22, From EXTENDED Date of order

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionQuotationReferencedDocument

Summary

Set details of the associated offer position

Signature

public function setDocumentPositionQuotationReferencedDocument(
  string $issuerAssignedId,
  string $lineId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-310, From EXTENDED Offer number
lineId string BT-X-311, From EXTENDED Position identifier within the offer
issueDate DateTime ✔️ BT-X-312, From EXTENDED Date of offder

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionContractReferencedDocument

Summary

Set details of the related contract position

Signature

public function setDocumentPositionContractReferencedDocument(
  string $issuerAssignedId,
  string $lineId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-24, From EXTENDED The contract reference should be assigned once in the context of the specific trade relationship and for a defined period of time (contract number)
lineId string BT-X-25, From EXTENDED Identifier of the according contract position
issueDate DateTime ✔️ BT-X-26, From EXTENDED Contract date

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionAdditionalReferencedDocument

Summary

Add an additional Document reference on a position

- The documents justifying the invoice can be used to reference a document number, which should be
known to the recipient, as well as an external document (referenced by a URL) or an embedded document (such
as a timesheet as a PDF file). The option of linking to an external document is e.g. required when it comes
to large attachments and / or sensitive information, e.g. for personal services, which must be separated
from the bill
- Use ZugferdDocumentReader::firstDocumentAdditionalReferencedDocument and
ZugferdDocumentReader::nextDocumentAdditionalReferencedDocument to seek between multiple additional referenced
documents

Signature

public function addDocumentPositionAdditionalReferencedDocument(
  string $issuerAssignedId,
  string $typeCode,
  ?string $uriId = null,
  ?string $lineId = null,
  ?string $name = null,
  ?string $refTypeCode = null,
  ?DateTime $issueDate = null,
  ?string $binaryDataFilename = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-27, From EXTENDED The identifier of the tender or lot to which the invoice relates, or an identifier specified by the seller for an object on which the invoice is based, or an identifier of the document on which the invoice is based.
typeCode string BT-X-30, From EXTENDED Type of referenced document (See codelist UNTDID 1001)
uriId string ✔️ BT-X-28, From EXTENDED The Uniform Resource Locator (URL) at which the external document is available. A means of finding the resource including the primary access method intended for it, e.g. http: // or ftp: //. The location of the external document must be used if the buyer needs additional information to support the amounts billed. External documents are not part of the invoice. Access to external documents can involve certain risks.
lineId string ✔️ BT-X-29, From EXTENDED The referenced position identifier in the additional document
name string ✔️ BT-X-299, From EXTENDED A description of the document, e.g. Hourly billing, usage or consumption report, etc.
refTypeCode string ✔️ BT-X-32, From EXTENDED The identifier for the identification scheme of the identifier of the item invoiced. If it is not clear to the recipient which scheme is used for the identifier, an identifier of the scheme should be used, which must be selected from UNTDID 1153 in accordance with the code list entries.
issueDate DateTime ✔️ BT-X-33, From EXTENDED Document date
binaryDataFilename string ✔️ BT-X-31, From EXTENDED Contains a file name of an attachment document embedded as a binary object

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionUltimateCustomerOrderReferencedDocument

Summary

Add a referennce of a associated end customer order

Signature

public function addDocumentPositionUltimateCustomerOrderReferencedDocument(
  string $issuerAssignedId,
  string $lineId,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-43, From EXTENDED Order number of the end customer
lineId string BT-X-44, From EXTENDED Order item (end customer)
issueDate DateTime ✔️ BT-X-45, From EXTENDED Document date of end customer order

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionGrossPrice

Summary

Set the unit price excluding sales tax before deduction of the discount on the item price.

Signature

public function setDocumentPositionGrossPrice(
  float $amount,
  ?float $basisQuantity = null,
  ?string $basisQuantityUnitCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
amount float BT-148, From BASIC The unit price excluding sales tax before deduction of the discount on the item price. If the price is shown according to the net calculation, the price must also be shown according to the gross calculation.
basisQuantity float ✔️ BT-149-1, From BASIC The number of item units for which the price applies (price base quantity)
basisQuantityUnitCode string ✔️ BT-150-1, From BASIC The unit code of the number of item units for which the price applies (price base quantity)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionGrossPriceAllowanceCharge

Summary

Detailed information on surcharges and discounts on item gross price

Signature

public function addDocumentPositionGrossPriceAllowanceCharge(
  float $actualAmount,
  bool $isCharge,
  ?float $calculationPercent = null,
  ?float $basisAmount = null,
  ?string $reason = null,
  ?string $taxTypeCode = null,
  ?string $taxCategoryCode = null,
  ?float $rateApplicablePercent = null,
  ?float $sequence = null,
  ?float $basisQuantity = null,
  ?string $basisQuantityUnitCode = null,
  ?string $reasonCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
actualAmount float BT-147, From BASIC Discount on the item price. The total discount subtracted from the gross price to calculate the net price. Note: Only applies if the discount is given per unit and is not included in the gross price.
isCharge bool BT-147-02, From BASIC Switch for surcharge/discount, if true then its an charge
calculationPercent float ✔️ __BT-X-34, From EXTENDED__Discount/surcharge in percent. Up to level EN16931, only the final result of the discount (ActualAmount) is transferred
basisAmount float ✔️ BT-X-35, From EXTENDED Base amount of the discount/surcharge
reason string ✔️ BT-X-36, From EXTENDED Reason for surcharge/discount (free text)
taxTypeCode string ✔️ BT-??, From BASIC
taxCategoryCode string ✔️ BT-??, From BASIC
rateApplicablePercent float ✔️ BT-??, From BASIC
sequence float ✔️ BT-??, From BASIC
basisQuantity float ✔️ BT-??, From BASIC
basisQuantityUnitCode string ✔️ BT-??, From BASIC
reasonCode string ✔️ BT-X-313, From EXTENDED Reason code for surcharge/discount

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionNetPrice

Summary

Set detailed information on the net price of the item

Signature

public function setDocumentPositionNetPrice(
  float $amount,
  ?float $basisQuantity = null,
  ?string $basisQuantityUnitCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
amount float BT-146, From BASIC Net price of the item
basisQuantity float ✔️ BT-149, From BASIC Base quantity at the item price
basisQuantityUnitCode string ✔️ BT-150, From BASIC Code of the unit of measurement of the base quantity at the item price

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionNetPriceTax

Summary

Tax included for B2C on position level

Signature

public function setDocumentPositionNetPriceTax(
  string $categoryCode,
  string $typeCode,
  float $rateApplicablePercent,
  float $calculatedAmount,
  ?string $exemptionReason = null,
  ?string $exemptionReasonCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
categoryCode string Coded description of a sales tax category
typeCode string Coded description of a sales tax category. Note: Fixed value = "VAT"
rateApplicablePercent float The sales tax rate, expressed as the percentage applicable to the sales tax category in question. Note: The code of the sales tax category and the category-specific sales tax rate must correspond to one another. The value to be given is the percentage. For example, the value 20 is given for 20% (and not 0.2)
calculatedAmount float The total amount to be paid for the relevant VAT category. Note: Calculated by multiplying the amount to be taxed according to the sales tax category by the sales tax rate applicable for the sales tax category concerned
exemptionReason string ✔️ Reason for tax exemption (free text)
exemptionReasonCode string ✔️ Reason given in code form for the exemption of the amount from VAT. Note: Code list issued and maintained by the Connecting Europe Facility.

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionQuantity

Summary

Set the position Quantity

Signature

public function setDocumentPositionQuantity(
  float $billedQuantity,
  string $billedQuantityUnitCode,
  ?float $chargeFreeQuantity = null,
  ?string $chargeFreeQuantityUnitCpde = null,
  ?float $packageQuantity = null,
  ?string $packageQuantityUnitCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
billedQuantity float BT-129, From BASIC The quantity of individual items (goods or services) billed in the relevant line
billedQuantityUnitCode string BT-130, From BASIC The unit of measure applicable to the amount billed
chargeFreeQuantity float ✔️ BT-X-46, From EXTENDED Quantity, free of charge
chargeFreeQuantityUnitCpde string ✔️ BT-X-46-0, From EXTENDED Unit of measure code for the quantity free of charge
packageQuantity float ✔️ BT-X-47, From EXTENDED Number of packages
packageQuantityUnitCode string ✔️ BT-X-47-0, From EXTENDED Unit of measure code for number of packages

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionShipTo

Summary

Set detailed information on the different ship-to party at position level

Signature

public function setDocumentPositionShipTo(
  ?string $name = null,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string ✔️ BT-X-50, From EXTENDED The name of the party to whom the goods are being delivered or for whom the services are being performed. Must be used if the recipient of the goods or services is not the same as the buyer.
id string ✔️ BT-X-48, From EXTENDED An identifier for the place where the goods are delivered or where the services are provided. Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party (Obsolete)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionShipToGlobalId

Summary

Add a global id for the Ship-to Trade Party at position level

Signature

public function addDocumentPositionShipToGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-49, From EXTENDED The identifier is uniquely assigned to a party by a global registration organization.
globalIDType string ✔️ BT-X-49-0, From EXTENDED If the identifier is used for the identification scheme, it must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionShipToTaxRegistration

Summary

Add Tax registration to Ship-To Trade party at position level

Signature

public function addDocumentPositionShipToTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-X-66-0, From EXTENDED Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-X-66, From EXTENDED Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionShipToAddress

Summary

Sets the postal address of the Ship-To party at position level

Signature

public function setDocumentPositionShipToAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BG-X-59, From EXTENDED The main line in the product end users address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BG-X-60, From EXTENDED Line 2 of the product end users address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BG-X-61, From EXTENDED Line 3 of the product end users address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BG-X-58, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BG-X-62, From EXTENDED Usual name of the city or municipality in which the product end users address is located
country string ✔️ BG-X-63, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their
subdivisions”
subDivision string ✔️ BG-X-64, From EXTENDED The product end users state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionShipToLegalOrganisation

Summary

Set legal organisation of the Ship-To party on position level

Signature

public function setDocumentPositionShipToLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT-X-51, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT-X-51-0, From EXTENDED Registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT-X-52, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionShipToContact

Summary

Set contact of the Ship-To party on position level

Signature

public function setDocumentPositionShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-54, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-54-1, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-55, From EXTENDED Detailed information on the party's phone number
contactFaxNo string ✔️ BT-X-56, From EXTENDED Detailed information on the party's fax number
contactEmailAddress string ✔️ BT-X-57, From EXTENDED Detailed information on the party's email address

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionShipToContact

Summary

Add an additional contact to the Ship-To party on position level

Signature

public function addDocumentPositionShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT-X-54, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT-X-54-1, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT-X-55, From EXTENDED Detailed information on the party's phone number
contactFaxNo string ✔️ BT-X-56, From EXTENDED Detailed information on the party's fax number
contactEmailAddress string ✔️ BT-X-57, From EXTENDED Detailed information on the party's email address

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionUltimateShipTo

Summary

Detailed information on the different end recipient on position level

Signature

public function setDocumentPositionUltimateShipTo(
  ?string $name = null,
  ?string $id = null,
  ?string $description = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
name string ✔️ BT-X-69, From EXTENDED The name of the party to whom the goods are being delivered or for whom the services are being performed. Must be used if the recipient of the goods or services is not the same as the buyer.
id string ✔️ BT-X-67, From EXTENDED An identifier for the party Multiple IDs can be assigned or specified. They can be differentiated by using different identification schemes. If no scheme is given, it should be known to the buyer and seller, e.g. a previously exchanged identifier assigned by the buyer or seller.
description string ✔️ Further legal information that is relevant for the party (Obsolete)

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionUltimateShipToGlobalId

Summary

Add a global id for the Ship-to Trade Party on position level

Signature

public function addDocumentPositionUltimateShipToGlobalId(
  ?string $globalID = null,
  ?string $globalIDType = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
globalID string ✔️ BT-X-68, From EXTENDED Global identifier of the parfty
globalIDType string ✔️ BT-X-68-0, From EXTENDED Type of global identification number, must be selected from the entries in the list published by the ISO / IEC 6523 Maintenance Agency.

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionUltimateShipToTaxRegistration

Summary

Add Tax registration to Ship-To Trade party on position level

Signature

public function addDocumentPositionUltimateShipToTaxRegistration(
  ?string $taxRegType = null,
  ?string $taxRegId = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
taxRegType string ✔️ BT-X-84-0, From EXTENDED Type of tax number (FC = Tax number, VA = Sales tax identification number)
taxRegId string ✔️ BT-X-84, From EXTENDED Tax number or sales tax identification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionUltimateShipToAddress

Summary

Sets the postal address of the Ship-To party on position level

Signature

public function setDocumentPositionUltimateShipToAddress(
  ?string $lineOne = null,
  ?string $lineTwo = null,
  ?string $lineThree = null,
  ?string $postCode = null,
  ?string $city = null,
  ?string $country = null,
  ?string $subDivision = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineOne string ✔️ BT_X-77, From EXTENDED The main line in the party's address. This is usually the street name and house number or the post office box
lineTwo string ✔️ BT_X-78, From EXTENDED Line 2 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
lineThree string ✔️ BT_X-79, From EXTENDED Line 3 of the party's address. This is an additional address line in an address that can be used to provide additional details in addition to the main line
postCode string ✔️ BT_X-76, From EXTENDED Identifier for a group of properties, such as a zip code
city string ✔️ BT_X-80, From EXTENDED Usual name of the city or municipality in which the party's address is located
country string ✔️ BT_X-81, From EXTENDED Code used to identify the country. If no tax agent is specified, this is the country in which the sales tax is due. The lists of approved countries are maintained by the EN ISO 3166-1 Maintenance Agency “Codes for the representation of names of countries and their
subdivisions”
subDivision string ✔️ BT_X-82, From EXTENDED The party's state

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionUltimateShipToLegalOrganisation

Summary

Set legal organisation of the Ship-To party on position level

Signature

public function setDocumentPositionUltimateShipToLegalOrganisation(
  ?string $legalOrgId,
  ?string $legalOrgType,
  ?string $legalOrgName,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
legalOrgId string ✔️ BT_X-70, From EXTENDED An identifier issued by an official registrar that identifies the party as a legal entity or legal person. If no identification scheme ($legalorgtype) is provided, it should be known to the buyer or seller party
legalOrgType string ✔️ BT_X-70-0, From EXTENDED The identifier for the identification scheme of the legal registration of the party. In particular, the following scheme codes are used: 0021 : SWIFT, 0088 : EAN, 0060 : DUNS, 0177 : ODETTE
legalOrgName string ✔️ BT_X-71, From EXTENDED A name by which the party is known, if different from the party's name (also known as the company name)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionUltimateShipToContact

Summary

Set contact of the Ship-To party on position level

Signature

public function setDocumentPositionUltimateShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT_X-72, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT_X-72-1, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT_X-73, From EXTENDED Detailed information on the party's phone number
contactFaxNo string ✔️ BT_X-74, From EXTENDED Detailed information on the party's fax number
contactEmailAddress string ✔️ BT_X-75, From EXTENDED Detailed information on the party's email address

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionUltimateShipToContact

Summary

Add an additional contact of the Ship-To party on position level

Signature

public function addDocumentPositionUltimateShipToContact(
  ?string $contactPersonName,
  ?string $contactDepartmentName,
  ?string $contactPhoneNo,
  ?string $contactFaxNo,
  ?string $contactEmailAddress,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
contactPersonName string ✔️ BT_X-72, From EXTENDED Contact point for a legal entity, such as a personal name of the contact person
contactDepartmentName string ✔️ BT_X-72-1, From EXTENDED Contact point for a legal entity, such as a name of the department or office
contactPhoneNo string ✔️ BT_X-73, From EXTENDED Detailed information on the party's phone number
contactFaxNo string ✔️ BT_X-74, From EXTENDED Detailed information on the party's fax number
contactEmailAddress string ✔️ BT_X-75, From EXTENDED Detailed information on the party's email address

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionSupplyChainEvent

Summary

Detailed information on the actual delivery on item level

Signature

public function setDocumentPositionSupplyChainEvent(?DateTime $date): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
date DateTime ✔️ BT-X-85, From EXTENDED Actual delivery date

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionDespatchAdviceReferencedDocument

Summary

Detailed information on the associated shipping notification on item level

Signature

public function setDocumentPositionDespatchAdviceReferencedDocument(
  string $issuerAssignedId,
  ?string $lineId = null,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-86, From EXTENDED Shipping notification number
lineId string ✔️ BT-X-87, From EXTENDED Shipping notification position
issueDate DateTime ✔️ BT-X-88, From EXTENDED Date of Shipping notification number

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionReceivingAdviceReferencedDocument

Summary

Detailed information on the associated goods receipt notification

Signature

public function setDocumentPositionReceivingAdviceReferencedDocument(
  string $issuerAssignedId,
  ?string $lineId = null,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-89, From EXTENDED Goods receipt number
lineId string ✔️ BT-X-90, From EXTENDED Goods receipt position
issueDate DateTime ✔️ BT-X-91, From EXTENDED Date of Goods receipt

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionDeliveryNoteReferencedDocument

Summary

Detailed information on the associated delivery bill on item level

Signature

public function setDocumentPositionDeliveryNoteReferencedDocument(
  string $issuerAssignedId,
  ?string $lineId = null,
  ?DateTime $issueDate = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
issuerAssignedId string BT-X-92, From EXTENDED Delivery note number
lineId string ✔️ BT-X-93, From EXTENDED Delivery note position
issueDate DateTime ✔️ BT-X-94, From EXTENDED Date of Delivery note

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionTax

Summary

Add information about the sales tax that applies to the goods and services invoiced
in the relevant invoice line

Signature

public function addDocumentPositionTax(
  string $categoryCode,
  string $typeCode,
  ?float $rateApplicablePercent,
  ?float $calculatedAmount = null,
  ?string $exemptionReason = null,
  ?string $exemptionReasonCode = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
categoryCode string BT-151, From BASIC Coded description of a sales tax category
typeCode string BT-151-0, From BASIC In EN 16931 only the tax type “sales tax” with the code “VAT” is supported. Should other types of tax be specified, such as an insurance tax or a mineral oil tax the EXTENDED profile must be used. The code for the tax type must then be taken from the code list UNTDID 5153.
rateApplicablePercent float ✔️ BT-152, From BASIC The VAT rate applicable to the item invoiced and expressed as a percentage. Note: The code of the sales tax category and the category-specific sales tax rate must correspond to one another. The value to be given is the percentage. For example, the value 20 is given for 20% (and not 0.2)
calculatedAmount float ✔️ Tax amount. Information only for taxes that are not VAT (Obsolete)
exemptionReason string ✔️ Reason for tax exemption (free text) (Obsolete)
exemptionReasonCode string ✔️ Reason given in code form for the exemption of the amount from VAT. Note: Code list issued and maintained by the Connecting Europe Facility. (Obsolete)

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionBillingPeriod

Summary

Set information about the period relevant for the invoice item.

Note: Also known as the invoice line delivery period.

Signature

public function setDocumentPositionBillingPeriod(?DateTime $startDate, ?DateTime $endDate): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
startDate DateTime ✔️ BT-134, From BASIC Start of the billing period
endDate DateTime ✔️ BT-135, From BASIC End of the billing period

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionAllowanceCharge

Summary

Add surcharges and discounts on position level

Signature

public function addDocumentPositionAllowanceCharge(
  float $actualAmount,
  bool $isCharge,
  ?float $calculationPercent = null,
  ?float $basisAmount = null,
  ?string $reasonCode = null,
  ?string $reason = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
actualAmount float BT-136/BT-141, From BASIC The surcharge/discount amount excluding sales tax
isCharge bool BT-27-1/BT-28-1, From BASIC (true for BT-/ and false for /BT-) Switch that indicates whether the following data refer to an allowance or a discount, true means that it is a surcharge
calculationPercent float ✔️ BT-138, From BASIC The percentage that may be used in conjunction with the base invoice line discount amount to calculate the invoice line discount amount
basisAmount float ✔️ BT-137, From EN 16931 The base amount that may be used in conjunction with the invoice line discount percentage to calculate the invoice line discount amount
reasonCode string ✔️ BT-140/BT-145, From BASIC The reason given as a code for the invoice line discount
reason string ✔️ BT-139/BT-144, From BASIC The reason given in text form for the invoice item discount/surcharge

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionLineSummation

Summary

Set information on item totals

Signature

public function setDocumentPositionLineSummation(float $lineTotalAmount): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineTotalAmount float BT-131, From BASIC The total amount of the invoice item.

Returns

Returns a value of type \ZugferdDocumentBuilder

setDocumentPositionLineSummationExt

Summary

Set information on item totals (with support for EXTENDED profile)

Signature

public function setDocumentPositionLineSummationExt(
  float $lineTotalAmount,
  ?float $chargeTotalAmount = null,
  ?float $allowanceTotalAmount = null,
  ?float $taxTotalAmount = null,
  ?float $grandTotalAmount = null,
  ?float $totalAllowanceChargeAmount = null,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
lineTotalAmount float BT-131, From BASIC The total amount of the invoice item
chargeTotalAmount float ✔️ BT-X-327, From EXTENDED Total amount of item surcharges
allowanceTotalAmount float ✔️ BT-X-328, From EXTENDED Total amount of item discounts
taxTotalAmount float ✔️ BT-X-329, From EXTENDED Total amount of item taxes
grandTotalAmount float ✔️ BT-X-330, From EXTENDED Total gross amount of the item
totalAllowanceChargeAmount float ✔️ BT-X-98, From EXTENDED Total amount of item surcharges and discounts

Returns

Returns a value of type \ZugferdDocumentBuilder

addDocumentPositionReceivableSpecifiedTradeAccountingAccount

Summary

Add an AccountingAccount on position level

Signature

public function addDocumentPositionReceivableSpecifiedTradeAccountingAccount(
  string $id,
  ?string $typeCode,
): \ZugferdDocumentBuilder
{
}

Parameters

Name Type Allows Null Description
id string BT-133, From COMFORT Posting reference of the byuer. If required, this reference shall be provided by the Buyer to the Seller prior to the issuing of the Invoice.
typeCode string ✔️ BT-X-99, From EXTENDED Type of the posting reference

Allowed values:
- 1 Financial
- 2 Subsidiary
- 3 Budget
- 4 Cost Accounting
- 5 Payable
- 6 Job Cose Accounting

Returns

Returns a value of type \ZugferdDocumentBuilder

Clone this wiki locally