Interfaces for ZUGFeRD

This is a code example of iText PDF, discover more.

30th August 2015
admin-marketing

Switch code for this example

BasicProfile.java
  1. /*
  2.  *
  3.  * This file is part of the iText (R) project.
  4.     Copyright (c) 1998-2019 iText Group NV
  5.  * Authors: Bruno Lowagie, et al.
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU Affero General Public License version 3
  9.  * as published by the Free Software Foundation with the addition of the
  10.  * following permission added to Section 15 as permitted in Section 7(a):
  11.  * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
  12.  * ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
  13.  * OF THIRD PARTY RIGHTS
  14.  *
  15.  * This program is distributed in the hope that it will be useful, but
  16.  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17.  * or FITNESS FOR A PARTICULAR PURPOSE.
  18.  * See the GNU Affero General Public License for more details.
  19.  * You should have received a copy of the GNU Affero General Public License
  20.  * along with this program; if not, see http://www.gnu.org/licenses or write to
  21.  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22.  * Boston, MA, 02110-1301 USA, or download the license from the following URL:
  23.  * http://itextpdf.com/terms-of-use/
  24.  *
  25.  * The interactive user interfaces in modified source and object code versions
  26.  * of this program must display Appropriate Legal Notices, as required under
  27.  * Section 5 of the GNU Affero General Public License.
  28.  *
  29.  * In accordance with Section 7(b) of the GNU Affero General Public License,
  30.  * a covered work must retain the producer line in every PDF that is created
  31.  * or manipulated using iText.
  32.  *
  33.  * You can be released from the requirements of the license by purchasing
  34.  * a commercial license. Buying such a license is mandatory as soon as you
  35.  * develop commercial activities involving the iText software without
  36.  * disclosing the source code of your own applications.
  37.  * These activities include: offering paid services to customers as an ASP,
  38.  * serving PDFs on the fly in a web application, shipping iText with a closed
  39.  * source product.
  40.  *
  41.  * For more information, please contact iText Software Corp. at this
  42.  * address: sales@itextpdf.com
  43.  */
  44. package com.itextpdf.text.zugferd.profiles;
  45.  
  46. import java.util.Date;
  47.  
  48. /**
  49.  * If you implement this interface correctly, you provide all the data that
  50.  * is necessary for iText to create an XML that can be used in a ZUGFeRD
  51.  * invoice that conforms with the Basic profile.
  52.  */
  53. public interface BasicProfile {
  54.     public boolean getTestIndicator();
  55.     public String getId();
  56.     public String getName();
  57.     public String getTypeCode();
  58.     public Date getDateTime();
  59.     public String getDateTimeFormat();
  60.     public String[][] getNotes();
  61.     public String getSellerName();
  62.     public String getSellerPostcode();
  63.     public String getSellerLineOne();
  64.     public String getSellerLineTwo();
  65.     public String getSellerCityName();
  66.     public String getSellerCountryID();
  67.     public String[] getSellerTaxRegistrationID();
  68.     public String[] getSellerTaxRegistrationSchemeID();
  69.     public String getBuyerName();
  70.     public String getBuyerPostcode();
  71.     public String getBuyerLineOne();
  72.     public String getBuyerLineTwo();
  73.     public String getBuyerCityName();
  74.     public String getBuyerCountryID();
  75.     public String[] getBuyerTaxRegistrationID();
  76.     public String[] getBuyerTaxRegistrationSchemeID();
  77.     public Date getDeliveryDateTime();
  78.     public String getDeliveryDateTimeFormat();
  79.     public String getPaymentReference();
  80.     public String getInvoiceCurrencyCode();
  81.     public String[] getPaymentMeansID();
  82.     public String[] getPaymentMeansSchemeAgencyID();
  83.     public String[] getPaymentMeansPayeeAccountIBAN();
  84.     public String[] getPaymentMeansPayeeAccountAccountName();
  85.     public String[] getPaymentMeansPayeeAccountProprietaryID();
  86.     public String[] getPaymentMeansPayeeFinancialInstitutionBIC();
  87.     public String[] getPaymentMeansPayeeFinancialInstitutionGermanBankleitzahlID();
  88.     public String[] getPaymentMeansPayeeFinancialInstitutionName();
  89.     public String[] getTaxCalculatedAmount();
  90.     public String[] getTaxCalculatedAmountCurrencyID();
  91.     public String[] getTaxTypeCode();
  92.     public String[] getTaxBasisAmount();
  93.     public String[] getTaxBasisAmountCurrencyID();
  94.     public String[] getTaxApplicablePercent();
  95.     public String getLineTotalAmount();
  96.     public String getLineTotalAmountCurrencyID();
  97.     public String getChargeTotalAmount();
  98.     public String getChargeTotalAmountCurrencyID();
  99.     public String getAllowanceTotalAmount();
  100.     public String getAllowanceTotalAmountCurrencyID();
  101.     public String getTaxBasisTotalAmount();
  102.     public String getTaxBasisTotalAmountCurrencyID();
  103.     public String getTaxTotalAmount();
  104.     public String getTaxTotalAmountCurrencyID();
  105.     public String getGrandTotalAmount();
  106.     public String getGrandTotalAmountCurrencyID();
  107.     public String[] getLineItemBilledQuantity();
  108.     public String[] getLineItemBilledQuantityUnitCode();
  109.     public String[] getLineItemSpecifiedTradeProductName();
  110. }
ComfortProfile.java
  1. /*
  2.  *
  3.  * This file is part of the iText (R) project.
  4.     Copyright (c) 1998-2019 iText Group NV
  5.  * Authors: Bruno Lowagie, et al.
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU Affero General Public License version 3
  9.  * as published by the Free Software Foundation with the addition of the
  10.  * following permission added to Section 15 as permitted in Section 7(a):
  11.  * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
  12.  * ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
  13.  * OF THIRD PARTY RIGHTS
  14.  *
  15.  * This program is distributed in the hope that it will be useful, but
  16.  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  17.  * or FITNESS FOR A PARTICULAR PURPOSE.
  18.  * See the GNU Affero General Public License for more details.
  19.  * You should have received a copy of the GNU Affero General Public License
  20.  * along with this program; if not, see http://www.gnu.org/licenses or write to
  21.  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22.  * Boston, MA, 02110-1301 USA, or download the license from the following URL:
  23.  * http://itextpdf.com/terms-of-use/
  24.  *
  25.  * The interactive user interfaces in modified source and object code versions
  26.  * of this program must display Appropriate Legal Notices, as required under
  27.  * Section 5 of the GNU Affero General Public License.
  28.  *
  29.  * In accordance with Section 7(b) of the GNU Affero General Public License,
  30.  * a covered work must retain the producer line in every PDF that is created
  31.  * or manipulated using iText.
  32.  *
  33.  * You can be released from the requirements of the license by purchasing
  34.  * a commercial license. Buying such a license is mandatory as soon as you
  35.  * develop commercial activities involving the iText software without
  36.  * disclosing the source code of your own applications.
  37.  * These activities include: offering paid services to customers as an ASP,
  38.  * serving PDFs on the fly in a web application, shipping iText with a closed
  39.  * source product.
  40.  *
  41.  * For more information, please contact iText Software Corp. at this
  42.  * address: sales@itextpdf.com
  43.  */
  44. package com.itextpdf.text.zugferd.profiles;
  45.  
  46. import java.util.Date;
  47.  
  48. /**
  49.  * If you implement this interface correctly, you provide all the data that
  50.  * is necessary for iText to create an XML that can be used in a ZUGFeRD
  51.  * invoice that conforms with the Comfort profile.
  52.  */
  53. public interface ComfortProfile extends BasicProfile {
  54.     public String[] getNotesCodes();
  55.     public String getBuyerReference();
  56.     public String getSellerID();
  57.     public String[] getSellerGlobalID();
  58.     public String[] getSellerGlobalSchemeID();
  59.     public String getBuyerID();
  60.     public String[] getBuyerGlobalID();
  61.     public String[] getBuyerGlobalSchemeID();
  62.     public Date getBuyerOrderReferencedDocumentIssueDateTime();
  63.     public String getBuyerOrderReferencedDocumentIssueDateTimeFormat();
  64.     public String getBuyerOrderReferencedDocumentID();
  65.     public Date getContractReferencedDocumentIssueDateTime();
  66.     public String getContractReferencedDocumentIssueDateTimeFormat();
  67.     public String getContractReferencedDocumentID();
  68.     public Date getCustomerOrderReferencedDocumentIssueDateTime();
  69.     public String getCustomerOrderReferencedDocumentIssueDateTimeFormat();
  70.     public String getCustomerOrderReferencedDocumentID();
  71.     public Date getDeliveryNoteReferencedDocumentIssueDateTime();
  72.     public String getDeliveryNoteReferencedDocumentIssueDateTimeFormat();
  73.     public String getDeliveryNoteReferencedDocumentID();
  74.     public String getInvoiceeID();
  75.     public String[] getInvoiceeGlobalID();
  76.     public String[] getInvoiceeGlobalSchemeID();
  77.     public String getInvoiceeName();
  78.     public String getInvoiceePostcode();
  79.     public String getInvoiceeLineOne();
  80.     public String getInvoiceeLineTwo();
  81.     public String getInvoiceeCityName();
  82.     public String getInvoiceeCountryID();
  83.     public String[] getInvoiceeTaxRegistrationID();
  84.     public String[] getInvoiceeTaxRegistrationSchemeID();
  85.     public String[] getPaymentMeansTypeCode();
  86.     public String[][] getPaymentMeansInformation();
  87.     public String[] getPaymentMeansPayerAccountIBAN();
  88.     public String[] getPaymentMeansPayerAccountProprietaryID();
  89.     public String[] getPaymentMeansPayerFinancialInstitutionBIC();
  90.     public String[] getPaymentMeansPayerFinancialInstitutionGermanBankleitzahlID();
  91.     public String[] getPaymentMeansPayerFinancialInstitutionName();
  92.     public String[] getTaxExemptionReason();
  93.     public String[] getTaxCategoryCode();
  94.     public Date getBillingStartDateTime();
  95.     public String getBillingStartDateTimeFormat();
  96.     public Date getBillingEndDateTime();
  97.     public String getBillingEndDateTimeFormat();
  98.     public Boolean[] getSpecifiedTradeAllowanceChargeIndicator();
  99.     public String[] getSpecifiedTradeAllowanceChargeActualAmount();
  100.     public String[] getSpecifiedTradeAllowanceChargeActualAmountCurrency();
  101.     public String[] getSpecifiedTradeAllowanceChargeReason();
  102.     public String[][] getSpecifiedTradeAllowanceChargeTaxTypeCode();
  103.     public String[][] getSpecifiedTradeAllowanceChargeTaxCategoryCode();
  104.     public String[][] getSpecifiedTradeAllowanceChargeTaxApplicablePercent();
  105.     public String[][] getSpecifiedLogisticsServiceChargeDescription();
  106.     public String[] getSpecifiedLogisticsServiceChargeAmount();
  107.     public String[] getSpecifiedLogisticsServiceChargeAmountCurrency();
  108.     public String[][] getSpecifiedLogisticsServiceChargeTaxTypeCode();
  109.     public String[][] getSpecifiedLogisticsServiceChargeTaxCategoryCode();
  110.     public String[][] getSpecifiedLogisticsServiceChargeTaxApplicablePercent();
  111.     public String[][] getSpecifiedTradePaymentTermsDescription();
  112.     public Date[] getSpecifiedTradePaymentTermsDueDateTime();
  113.     public String[] getSpecifiedTradePaymentTermsDueDateTimeFormat();
  114.     public String getTotalPrepaidAmount();
  115.     public String getTotalPrepaidAmountCurrencyID();
  116.     public String getDuePayableAmount();
  117.     public String getDuePayableAmountCurrencyID();
  118.     public String[] getLineItemLineID();
  119.     public String[][][] getLineItemIncludedNote();
  120.     public String[] getLineItemGrossPriceChargeAmount();
  121.     public String[] getLineItemGrossPriceChargeAmountCurrencyID();
  122.     public String[] getLineItemGrossPriceBasisQuantity();
  123.     public String[] getLineItemGrossPriceBasisQuantityCode();
  124.     public Boolean[][] getLineItemGrossPriceTradeAllowanceChargeIndicator();
  125.     public String[][] getLineItemGrossPriceTradeAllowanceChargeActualAmount();
  126.     public String[][] getLineItemGrossPriceTradeAllowanceChargeActualAmountCurrencyID();
  127.     public String[][] getLineItemGrossPriceTradeAllowanceChargeReason();
  128.     public String[] getLineItemNetPriceChargeAmount();
  129.     public String[] getLineItemNetPriceChargeAmountCurrencyID();
  130.     public String[] getLineItemNetPriceBasisQuantity();
  131.     public String[] getLineItemNetPriceBasisQuantityCode();
  132.     public String[][] getLineItemSettlementTaxTypeCode();
  133.     public String[][] getLineItemSettlementTaxExemptionReason();
  134.     public String[][] getLineItemSettlementTaxCategoryCode();
  135.     public String[][] getLineItemSettlementTaxApplicablePercent();
  136.     public String[] getLineItemLineTotalAmount();
  137.     public String[] getLineItemLineTotalAmountCurrencyID();
  138.     public String[] getLineItemSpecifiedTradeProductGlobalID();
  139.     public String[] getLineItemSpecifiedTradeProductSchemeID();
  140.     public String[] getLineItemSpecifiedTradeProductSellerAssignedID();
  141.     public String[] getLineItemSpecifiedTradeProductBuyerAssignedID();
  142.     public String[] getLineItemSpecifiedTradeProductDescription();
  143. }
Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now