Class Invoice

java.lang.Object
com.fourjs.report.facturx.AbstractInvoice
com.fourjs.report.facturx.profiles.minimum.Invoice

public class Invoice extends AbstractInvoice
BG-0 Invoice — Cross Industry Invoice

The EN 16931 business terms and groups implemented by this class:

Business terms and groups implemented
RepresentsBG-0
CoversBG-2, BG-4, BG-5, BG-7, BG-13-00, BG-19, BG-22, BG-25-00, BT-1-00, BT-2-00, BT-10-00, BT-24-00
Business terms (value fields)BT-1, BT-2, BT-2-0, BT-3, BT-5, BT-10, BT-23, BT-24, BT-27, BT-30, BT-30-1, BT-40, BT-44, BT-47, BT-47-1, BT-109, BT-112, BT-115
Business groups (object lists)BT-13-00, BT-31-00, BT-110

Documentation of the represented business group:

BG-0 — Invoice
DescriptionENCross Industry Invoice
Since:
1.0.06/2.2
  • Constructor Details

    • Invoice

      public Invoice(String invoiceNumber, Codes.InvoiceTypeCode invoiceTypeCode, LocalDate invoiceIssueDate, String sellerName, Codes.CountryCodeList sellerCountryCode, String buyerName, Codes.Currency invoiceCurrencyCode, Amount invoiceTotalAmountWithoutVAT, Amount invoiceTotalAmountWithVAT, Amount amountDueForPayment)
      Creates a new Invoice carrying the profile's mandatory business terms.
      Parameters:
      invoiceNumber - BT-1 Invoice number — A unique identification of the Invoice.

      Usage: The sequential number required in Article 226(2) of the directive 2006/112/EC [2], to uniquely identify the Invoice within the business context, time-frame, operating systems and records of the Seller . It may be based on one or more series of numbers, which may include alphanumeric characters. No identification scheme is to be used.

      Conditions (CIUS): CHORUSPRO: the invoice number is limited to 20 characters

      Rule: BR-2: An Invoice shall have an Invoice number (BT-1).

      FR: Numéro de facture — Identification unique de la Facture.

      invoiceTypeCode - BT-3 Invoice type code — A code specifying the functional type of the Invoice.

      Usage: Commercial invoices and credit notes are defined according the entries in UNTDID 1001 [6]. Other entries of UNTDID 1001 [6] with specific invoices or credit notes may be used if applicable.

      Conditions (CIUS): The types of documents used are:380: Commercial Invoice381: Credit note384: Corrected invoice389: Self-billied invoice (created by the buyer on behalf of the supplier)261: Self billed credit note (not accepted by CHORUSPRO)386: Prepayment invoice751: Invoice information for accounting purposes (not accepted by CHORUSPRO)

      Rule: BR-4: An Invoice shall have an Invoice type code (BT-3).

      FR: Type de facture en code — Code spécifiant le type fonctionnel de la Facture.

      invoiceIssueDate - BT-2 Invoice issue date — The date when the Invoice was issued.

      Conditions (CIUS): CHORUSPRO: the issue date must be before or equal to the deposit date.

      Rule: BR-3: An Invoice shall have an Invoice issue date (BT-2).

      FR: Date d'émission de la facture — Date à laquelle la Facture a été émise.

      sellerName - BT-27 Seller name — The full formal name by which the Seller is registered in the national registry of legal entities or as a Taxable person or otherwise trades as a person or persons.

      Rule: BR-6: An Invoice shall contain the Seller name (BT-27).

      FR: Raison sociale du vendeur — Dénomination officielle complète sous laquelle le Vendeur est inscrit dans le registre national des personnes morales ou en tant qu'Assujetti, ou alors exerce ses activités en tant que personne ou groupe de personnes.

      sellerCountryCode - BT-40 Seller country code — A code that identifies the country.

      Usage: If no tax representative is specified, this is the country where VAT is liable. The lists of valid countries are registered with the ISO 3166-1 Maintenance agency, "Codes for the representation of names of countries and their subdivisions".

      Rule: BR-9: The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

      FR: Code de pays du vendeur — Code d'identification du pays.

      buyerName - BT-44 Buyer name — The full name of the Buyer.

      Conditions (CIUS): CHORUS PRO: this field is limied to 99 characters.

      Rule: BR-7: An Invoice shall contain the Buyer name (BT-44).

      FR: Raison sociale de l'acheteur — Nom complet de l'Acheteur.

      invoiceCurrencyCode - BT-5 Invoice currency code — The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency.

      Usage: Only one currency shall be used in the Invoice, except for the Total VAT amount in accounting currency (BT-111) in accordance with article 230 of Directive 2006/112/EC on VAT.The lists of valid currencies are registered with the ISO 4217 Maintenance Agency "Codes for the representation of currencies and funds".

      Conditions (CIUS): CHORUS PRO: Invoices and credit notes or Chorus Pro are mono-currencies only.

      Rule: BR-5: An Invoice shall have an Invoice currency code (BT-5).

      FR: Code de devise de facturation — Devise dans laquelle tous les montants de la Facture sont exprimés, à l'exception du montant total de la TVA dans la devise de comptabilisation.

      invoiceTotalAmountWithoutVAT - BT-109 Invoice total amount without VAT — The total amount of the Invoice without VAT.

      Usage: The Invoice total amount without VAT is the Sum of Invoice line net amount minus Sum of allowances on document level plus Sum of charges on document level.

      Rule: BR-13: An Invoice shall have the Invoice total amount without VAT (BT-109).BR-CO-13: Invoice total amount without VAT (BT-109) = ∑ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

      FR: Montant total de la facture hors TVA — Montant total de la Facture, sans la TVA.

      invoiceTotalAmountWithVAT - BT-112 Invoice total amount with VAT — The total amount of the Invoice with VAT.

      Usage: The Invoice total amount with VAT is the Invoice total amount without VAT plus the Invoice total VAT amount.

      Rule: BR-14: An Invoice shall have the Invoice total amount with VAT (BT-112).BR-CO-15: Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).For EXTENDED profile only, BR-CO-15 is replaced by BR-FXEXT-CO-15, which add a tolerance of 0,01 euro per line, document level charge and allowance in calculation.

      FR: Montant total de la facture avec TVA comprise — Montant total de la Facture, avec la TVA.

      amountDueForPayment - BT-115 Amount due for payment — The outstanding amount that is requested to be paid.

      Usage: This amount is the Invoice total amount with VAT minus the paid amount that has been paid in advance. The amount is zero in case of a fully paid Invoice. The amount may be negative; in that case the Seller owes the amount to the Buyer.

      Rule: BR-15: An Invoice shall have the Amount due for payment (BT- 115).BR-CO-16: Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) + Rounding amount (BT-114).

      FR: Montant à payer — Encours dont le paiement est demandé.

      Since:
      1.09.2/2.5.2
  • Method Details

    • setInvoiceNumber

      public Invoice setInvoiceNumber(String value)
      Sets BT-1 Invoice number — A unique identification of the Invoice.

      Usage: The sequential number required in Article 226(2) of the directive 2006/112/EC [2], to uniquely identify the Invoice within the business context, time-frame, operating systems and records of the Seller . It may be based on one or more series of numbers, which may include alphanumeric characters. No identification scheme is to be used.

      Conditions (CIUS): CHORUSPRO: the invoice number is limited to 20 characters

      Rule: BR-2: An Invoice shall have an Invoice number (BT-1).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID

      FR: Numéro de facture — Identification unique de la Facture.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.09.2/2.5.2
    • setBuyerReference

      public Invoice setBuyerReference(String value)
      Sets BT-10 Buyer reference — An identifier assigned by the Buyer used for internal routing purposes.

      Usage: The identifier is defined by the Buyer (e.g. contact ID, department, office id, project code), but provided by the Seller in the Invoice.

      Conditions (CIUS): CHORUS PRO: for the public sector, it is the "Service Exécutant". It is mandatory for some buyers. It must belong to the Chorus Pro repository. It is limited to 100 characters.

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference

      FR: Référence de l’acheteur — Identifiant attribué par l'Acheteur et destiné au routage de la facture en interne.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setInvoiceTotalAmountWithoutVAT

      public Invoice setInvoiceTotalAmountWithoutVAT(Amount value)
      Sets BT-109 Invoice total amount without VAT — The total amount of the Invoice without VAT.

      Usage: The Invoice total amount without VAT is the Sum of Invoice line net amount minus Sum of allowances on document level plus Sum of charges on document level.

      Rule: BR-13: An Invoice shall have the Invoice total amount without VAT (BT-109).BR-CO-13: Invoice total amount without VAT (BT-109) = ∑ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount

      FR: Montant total de la facture hors TVA — Montant total de la Facture, sans la TVA.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setInvoiceTotalAmountWithVAT

      public Invoice setInvoiceTotalAmountWithVAT(Amount value)
      Sets BT-112 Invoice total amount with VAT — The total amount of the Invoice with VAT.

      Usage: The Invoice total amount with VAT is the Invoice total amount without VAT plus the Invoice total VAT amount.

      Rule: BR-14: An Invoice shall have the Invoice total amount with VAT (BT-112).BR-CO-15: Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).For EXTENDED profile only, BR-CO-15 is replaced by BR-FXEXT-CO-15, which add a tolerance of 0,01 euro per line, document level charge and allowance in calculation.

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount

      FR: Montant total de la facture avec TVA comprise — Montant total de la Facture, avec la TVA.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setAmountDueForPayment

      public Invoice setAmountDueForPayment(Amount value)
      Sets BT-115 Amount due for payment — The outstanding amount that is requested to be paid.

      Usage: This amount is the Invoice total amount with VAT minus the paid amount that has been paid in advance. The amount is zero in case of a fully paid Invoice. The amount may be negative; in that case the Seller owes the amount to the Buyer.

      Rule: BR-15: An Invoice shall have the Amount due for payment (BT- 115).BR-CO-16: Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) + Rounding amount (BT-114).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount

      FR: Montant à payer — Encours dont le paiement est demandé.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setInvoiceIssueDate

      public Invoice setInvoiceIssueDate(LocalDate value)
      Sets BT-2 Invoice issue date — The date when the Invoice was issued.

      Conditions (CIUS): CHORUSPRO: the issue date must be before or equal to the deposit date.

      Rule: BR-3: An Invoice shall have an Invoice issue date (BT-2).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString

      FR: Date d'émission de la facture — Date à laquelle la Facture a été émise.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setBusinessProcessType

      public Invoice setBusinessProcessType(String value)
      Sets BT-23 Business process type — Identifies the business process context in which the transaction appears, to enable the Buyer to process the Invoice in an appropriate way.

      Usage: To be specifid by the Buyer.

      Conditions (CIUS): CHORUSPRO: this data makes it possible to inform the "cadre de facturation" (billing framework, which could be invoice from agent, co-contractor, subcontractor, invoicing part of a public works contract, etc.). The codes to be used are defined in the CHORUSPRO specifications: A1 (invoice deposit), A2 (prepaid invoice deposit), ... By default (in the absence of this field), the case A1 is applied.

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID

      FR: Identifiant de type de processus métier — Identifie le contexte de processus métier dans lequel se déroule l'opération. Permet à l'Acheteur de traiter la Facture de manière appropriée.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setSellerName

      public Invoice setSellerName(String value)
      Sets BT-27 Seller name — The full formal name by which the Seller is registered in the national registry of legal entities or as a Taxable person or otherwise trades as a person or persons.

      Rule: BR-6: An Invoice shall contain the Seller name (BT-27).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name

      FR: Raison sociale du vendeur — Dénomination officielle complète sous laquelle le Vendeur est inscrit dans le registre national des personnes morales ou en tant qu'Assujetti, ou alors exerce ses activités en tant que personne ou groupe de personnes.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setInvoiceTypeCode

      public Invoice setInvoiceTypeCode(Codes.InvoiceTypeCode value)
      Sets BT-3 Invoice type code — A code specifying the functional type of the Invoice.

      Usage: Commercial invoices and credit notes are defined according the entries in UNTDID 1001 [6]. Other entries of UNTDID 1001 [6] with specific invoices or credit notes may be used if applicable.

      Conditions (CIUS): The types of documents used are:380: Commercial Invoice381: Credit note384: Corrected invoice389: Self-billied invoice (created by the buyer on behalf of the supplier)261: Self billed credit note (not accepted by CHORUSPRO)386: Prepayment invoice751: Invoice information for accounting purposes (not accepted by CHORUSPRO)

      Rule: BR-4: An Invoice shall have an Invoice type code (BT-3).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode

      FR: Type de facture en code — Code spécifiant le type fonctionnel de la Facture.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setSellerLegalOrganizationIdentifer

      public Invoice setSellerLegalOrganizationIdentifer(String value)
      Sets BT-30 Seller legal registration identifier — An identifier issued by an official registrar that identifies the Seller as a legal entity or person.

      Usage: If no identification scheme is specified, it must be known by Buyer and Seller.

      Rule: BR-CO-26: In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present.

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID

      FR: Identifiant d’enregistrement légal du vendeur — Identifiant délivré par un organisme d’enregistrement officiel, qui identifie le Vendeur comme une entité juridique ou une personne morale.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.09.2/2.5.2
    • setSellerLegalOrganizationSchemeIdentiferAttribute

      public Invoice setSellerLegalOrganizationSchemeIdentiferAttribute(Codes.SchemeIdentifier value)
      Sets BT-30-1 Seller legal registration identifier identification scheme identifier — The identification scheme identifier of the Seller legal registration identifier.

      Usage: If used, the identification scheme shall be chosen from the entries of the list published by the ISO/IEC 6523 maintenance agency.

      Conditions (CIUS): For a SIREN or a SIRET, the value of this field is "0002"

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID

      FR: Identifiant du schéma — Identifiant du schéma de l'identifiant d'enregistrement légal du vendeur.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setSellerCountryCode

      public Invoice setSellerCountryCode(Codes.CountryCodeList value)
      Sets BT-40 Seller country code — A code that identifies the country.

      Usage: If no tax representative is specified, this is the country where VAT is liable. The lists of valid countries are registered with the ISO 3166-1 Maintenance agency, "Codes for the representation of names of countries and their subdivisions".

      Rule: BR-9: The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID

      FR: Code de pays du vendeur — Code d'identification du pays.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setBuyerName

      public Invoice setBuyerName(String value)
      Sets BT-44 Buyer name — The full name of the Buyer.

      Conditions (CIUS): CHORUS PRO: this field is limied to 99 characters.

      Rule: BR-7: An Invoice shall contain the Buyer name (BT-44).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name

      FR: Raison sociale de l'acheteur — Nom complet de l'Acheteur.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setBuyerLegalOrganizationIdentifer

      public Invoice setBuyerLegalOrganizationIdentifer(String value)
      Sets BT-47 Buyer legal registration identifier — An identifier issued by an official registrar that identifies the Buyer as a legal entity or person.

      Usage: If no identification scheme is specified, it should be known by Buyer and Seller, e.g. the identifier that is exclusively used in the applicable legal environment.

      Conditions (CIUS): CHORUSPRO: the identifier of the buyer (public entity) is mandatory and is always a SIRET number

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID

      FR: Identifiant d’enregistrement légal de l'acheteur — Identifiant délivré par un organisme d’enregistrement officiel, qui identifie l'Acheteur comme une entité juridique ou une personne morale.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.09.2/2.5.2
    • setBuyerLegalOrganizationSchemeIdentiferAttribute

      public Invoice setBuyerLegalOrganizationSchemeIdentiferAttribute(Codes.SchemeIdentifier value)
      Sets BT-47-1 scheme identifier attribute — The identification scheme identifier of the Buyer legal registration identifier.

      Usage: If used, the identification scheme shall be chosen from the entries of the list published by the ISO 6523 maintenance agency.

      Conditions (CIUS): For a SIREN or a SIRET, the value of this field is "0002"

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID

      FR: Identifiant d’enregistrement légal de l'acheteur — Identifiant délivré par un organisme d’enregistrement officiel, qui identifie l'Acheteur comme une entité juridique ou une personne morale.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • setInvoiceCurrencyCode

      public Invoice setInvoiceCurrencyCode(Codes.Currency value)
      Sets BT-5 Invoice currency code — The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency.

      Usage: Only one currency shall be used in the Invoice, except for the Total VAT amount in accounting currency (BT-111) in accordance with article 230 of Directive 2006/112/EC on VAT.The lists of valid currencies are registered with the ISO 4217 Maintenance Agency "Codes for the representation of currencies and funds".

      Conditions (CIUS): CHORUS PRO: Invoices and credit notes or Chorus Pro are mono-currencies only.

      Rule: BR-5: An Invoice shall have an Invoice currency code (BT-5).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode

      FR: Code de devise de facturation — Devise dans laquelle tous les montants de la Facture sont exprimés, à l'exception du montant total de la TVA dans la devise de comptabilisation.

      Parameters:
      value - the value to set
      Returns:
      this Invoice for chaining
      Since:
      1.0.06/2.2
    • getInvoiceNumber

      public String getInvoiceNumber()
      Returns BT-1 Invoice number — A unique identification of the Invoice.

      Usage: The sequential number required in Article 226(2) of the directive 2006/112/EC [2], to uniquely identify the Invoice within the business context, time-frame, operating systems and records of the Seller . It may be based on one or more series of numbers, which may include alphanumeric characters. No identification scheme is to be used.

      Conditions (CIUS): CHORUSPRO: the invoice number is limited to 20 characters

      Rule: BR-2: An Invoice shall have an Invoice number (BT-1).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID

      FR: Numéro de facture — Identification unique de la Facture.

      Returns:
      the BT-1 value
      Since:
      1.09.2/2.5.2
    • getBuyerReference

      public String getBuyerReference()
      Returns BT-10 Buyer reference — An identifier assigned by the Buyer used for internal routing purposes.

      Usage: The identifier is defined by the Buyer (e.g. contact ID, department, office id, project code), but provided by the Seller in the Invoice.

      Conditions (CIUS): CHORUS PRO: for the public sector, it is the "Service Exécutant". It is mandatory for some buyers. It must belong to the Chorus Pro repository. It is limited to 100 characters.

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference

      FR: Référence de l’acheteur — Identifiant attribué par l'Acheteur et destiné au routage de la facture en interne.

      Returns:
      the BT-10 value
      Since:
      1.0.06/2.2
    • getInvoiceTotalAmountWithoutVAT

      public Amount getInvoiceTotalAmountWithoutVAT()
      Returns BT-109 Invoice total amount without VAT — The total amount of the Invoice without VAT.

      Usage: The Invoice total amount without VAT is the Sum of Invoice line net amount minus Sum of allowances on document level plus Sum of charges on document level.

      Rule: BR-13: An Invoice shall have the Invoice total amount without VAT (BT-109).BR-CO-13: Invoice total amount without VAT (BT-109) = ∑ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxBasisTotalAmount

      FR: Montant total de la facture hors TVA — Montant total de la Facture, sans la TVA.

      Returns:
      the BT-109 value
      Since:
      1.0.06/2.2
    • getInvoiceTotalAmountWithVAT

      public Amount getInvoiceTotalAmountWithVAT()
      Returns BT-112 Invoice total amount with VAT — The total amount of the Invoice with VAT.

      Usage: The Invoice total amount with VAT is the Invoice total amount without VAT plus the Invoice total VAT amount.

      Rule: BR-14: An Invoice shall have the Invoice total amount with VAT (BT-112).BR-CO-15: Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).For EXTENDED profile only, BR-CO-15 is replaced by BR-FXEXT-CO-15, which add a tolerance of 0,01 euro per line, document level charge and allowance in calculation.

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:GrandTotalAmount

      FR: Montant total de la facture avec TVA comprise — Montant total de la Facture, avec la TVA.

      Returns:
      the BT-112 value
      Since:
      1.0.06/2.2
    • getAmountDueForPayment

      public Amount getAmountDueForPayment()
      Returns BT-115 Amount due for payment — The outstanding amount that is requested to be paid.

      Usage: This amount is the Invoice total amount with VAT minus the paid amount that has been paid in advance. The amount is zero in case of a fully paid Invoice. The amount may be negative; in that case the Seller owes the amount to the Buyer.

      Rule: BR-15: An Invoice shall have the Amount due for payment (BT- 115).BR-CO-16: Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) + Rounding amount (BT-114).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:DuePayableAmount

      FR: Montant à payer — Encours dont le paiement est demandé.

      Returns:
      the BT-115 value
      Since:
      1.0.06/2.2
    • getInvoiceIssueDate

      public LocalDate getInvoiceIssueDate()
      Returns BT-2 Invoice issue date — The date when the Invoice was issued.

      Conditions (CIUS): CHORUSPRO: the issue date must be before or equal to the deposit date.

      Rule: BR-3: An Invoice shall have an Invoice issue date (BT-2).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString

      FR: Date d'émission de la facture — Date à laquelle la Facture a été émise.

      Returns:
      the BT-2 value
      Since:
      1.0.06/2.2
    • getDateFormat

      public Codes.DateFormat getDateFormat() throws ComputationException
      Returns BT-2-0 date format.

      Usage: Only value "102"

      Rule: Only value "102"

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString/@format

      FR: Format de la date

      Returns:
      the BT-2-0 value
      Throws:
      ComputationException
      Since:
      1.0.06/2.2
    • getBusinessProcessType

      public String getBusinessProcessType()
      Returns BT-23 Business process type — Identifies the business process context in which the transaction appears, to enable the Buyer to process the Invoice in an appropriate way.

      Usage: To be specifid by the Buyer.

      Conditions (CIUS): CHORUSPRO: this data makes it possible to inform the "cadre de facturation" (billing framework, which could be invoice from agent, co-contractor, subcontractor, invoicing part of a public works contract, etc.). The codes to be used are defined in the CHORUSPRO specifications: A1 (invoice deposit), A2 (prepaid invoice deposit), ... By default (in the absence of this field), the case A1 is applied.

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID

      FR: Identifiant de type de processus métier — Identifie le contexte de processus métier dans lequel se déroule l'opération. Permet à l'Acheteur de traiter la Facture de manière appropriée.

      Returns:
      the BT-23 value
      Since:
      1.0.06/2.2
    • getSpecificationIdentifier

      public String getSpecificationIdentifier() throws ComputationException
      Returns BT-24 Specification identifier — An identification of the specification containing the total set of rules regarding semantic content, cardinalities and business rules to which the data contained in the instance document conforms.

      Usage: This identifies compiance or conformance to this document. Conformant invoices specify: urn:cen.eu:en16931:2017. Invoices, compliant to a user specification may identify that user specification here. No identification scheme is to be used.

      Conditions (CIUS): For profile Minimum : urn:factur-x.eu:1p0:minimumFor profile BASIC WL : urn:factur-x.eu:1p0:basicwlFor profile BASIC : urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basicFor Profile EN 16931 (Comfort) : urn:cen.eu:en16931:2017For Profile EXTENDED : urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended

      Rule: BR-1: An Invoice shall have a Specification identifier (BT-24).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID

      FR: Identification de spécification — Identification de la spécification contenant la totalité des règles concernant le contenu sémantique, les cardinalités et les règles opérationnelles auxquelles se conforment les données contenues dans l’instance de document.

      Returns:
      the BT-24 value
      Throws:
      ComputationException
      Since:
      1.09.2/2.5.2
    • getSellerName

      public String getSellerName()
      Returns BT-27 Seller name — The full formal name by which the Seller is registered in the national registry of legal entities or as a Taxable person or otherwise trades as a person or persons.

      Rule: BR-6: An Invoice shall contain the Seller name (BT-27).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name

      FR: Raison sociale du vendeur — Dénomination officielle complète sous laquelle le Vendeur est inscrit dans le registre national des personnes morales ou en tant qu'Assujetti, ou alors exerce ses activités en tant que personne ou groupe de personnes.

      Returns:
      the BT-27 value
      Since:
      1.0.06/2.2
    • getInvoiceTypeCode

      public Codes.InvoiceTypeCode getInvoiceTypeCode()
      Returns BT-3 Invoice type code — A code specifying the functional type of the Invoice.

      Usage: Commercial invoices and credit notes are defined according the entries in UNTDID 1001 [6]. Other entries of UNTDID 1001 [6] with specific invoices or credit notes may be used if applicable.

      Conditions (CIUS): The types of documents used are:380: Commercial Invoice381: Credit note384: Corrected invoice389: Self-billied invoice (created by the buyer on behalf of the supplier)261: Self billed credit note (not accepted by CHORUSPRO)386: Prepayment invoice751: Invoice information for accounting purposes (not accepted by CHORUSPRO)

      Rule: BR-4: An Invoice shall have an Invoice type code (BT-3).

      XPath: /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:TypeCode

      FR: Type de facture en code — Code spécifiant le type fonctionnel de la Facture.

      Returns:
      the BT-3 value
      Since:
      1.0.06/2.2
    • getSellerLegalOrganizationIdentifer

      public String getSellerLegalOrganizationIdentifer()
      Returns BT-30 Seller legal registration identifier — An identifier issued by an official registrar that identifies the Seller as a legal entity or person.

      Usage: If no identification scheme is specified, it must be known by Buyer and Seller.

      Rule: BR-CO-26: In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present.

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID

      FR: Identifiant d’enregistrement légal du vendeur — Identifiant délivré par un organisme d’enregistrement officiel, qui identifie le Vendeur comme une entité juridique ou une personne morale.

      Returns:
      the BT-30 value
      Since:
      1.09.2/2.5.2
    • getSellerLegalOrganizationSchemeIdentiferAttribute

      public Codes.SchemeIdentifier getSellerLegalOrganizationSchemeIdentiferAttribute()
      Returns BT-30-1 Seller legal registration identifier identification scheme identifier — The identification scheme identifier of the Seller legal registration identifier.

      Usage: If used, the identification scheme shall be chosen from the entries of the list published by the ISO/IEC 6523 maintenance agency.

      Conditions (CIUS): For a SIREN or a SIRET, the value of this field is "0002"

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID

      FR: Identifiant du schéma — Identifiant du schéma de l'identifiant d'enregistrement légal du vendeur.

      Returns:
      the BT-30-1 value
      Since:
      1.0.06/2.2
    • getSellerCountryCode

      public Codes.CountryCodeList getSellerCountryCode()
      Returns BT-40 Seller country code — A code that identifies the country.

      Usage: If no tax representative is specified, this is the country where VAT is liable. The lists of valid countries are registered with the ISO 3166-1 Maintenance agency, "Codes for the representation of names of countries and their subdivisions".

      Rule: BR-9: The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID

      FR: Code de pays du vendeur — Code d'identification du pays.

      Returns:
      the BT-40 value
      Since:
      1.0.06/2.2
    • getBuyerName

      public String getBuyerName()
      Returns BT-44 Buyer name — The full name of the Buyer.

      Conditions (CIUS): CHORUS PRO: this field is limied to 99 characters.

      Rule: BR-7: An Invoice shall contain the Buyer name (BT-44).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name

      FR: Raison sociale de l'acheteur — Nom complet de l'Acheteur.

      Returns:
      the BT-44 value
      Since:
      1.0.06/2.2
    • getBuyerLegalOrganizationIdentifer

      public String getBuyerLegalOrganizationIdentifer()
      Returns BT-47 Buyer legal registration identifier — An identifier issued by an official registrar that identifies the Buyer as a legal entity or person.

      Usage: If no identification scheme is specified, it should be known by Buyer and Seller, e.g. the identifier that is exclusively used in the applicable legal environment.

      Conditions (CIUS): CHORUSPRO: the identifier of the buyer (public entity) is mandatory and is always a SIRET number

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID

      FR: Identifiant d’enregistrement légal de l'acheteur — Identifiant délivré par un organisme d’enregistrement officiel, qui identifie l'Acheteur comme une entité juridique ou une personne morale.

      Returns:
      the BT-47 value
      Since:
      1.09.2/2.5.2
    • getBuyerLegalOrganizationSchemeIdentiferAttribute

      public Codes.SchemeIdentifier getBuyerLegalOrganizationSchemeIdentiferAttribute()
      Returns BT-47-1 scheme identifier attribute — The identification scheme identifier of the Buyer legal registration identifier.

      Usage: If used, the identification scheme shall be chosen from the entries of the list published by the ISO 6523 maintenance agency.

      Conditions (CIUS): For a SIREN or a SIRET, the value of this field is "0002"

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID/@schemeID

      FR: Identifiant d’enregistrement légal de l'acheteur — Identifiant délivré par un organisme d’enregistrement officiel, qui identifie l'Acheteur comme une entité juridique ou une personne morale.

      Returns:
      the BT-47-1 value
      Since:
      1.0.06/2.2
    • getInvoiceCurrencyCode

      public Codes.Currency getInvoiceCurrencyCode()
      Returns BT-5 Invoice currency code — The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency.

      Usage: Only one currency shall be used in the Invoice, except for the Total VAT amount in accounting currency (BT-111) in accordance with article 230 of Directive 2006/112/EC on VAT.The lists of valid currencies are registered with the ISO 4217 Maintenance Agency "Codes for the representation of currencies and funds".

      Conditions (CIUS): CHORUS PRO: Invoices and credit notes or Chorus Pro are mono-currencies only.

      Rule: BR-5: An Invoice shall have an Invoice currency code (BT-5).

      XPath: /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode

      FR: Code de devise de facturation — Devise dans laquelle tous les montants de la Facture sont exprimés, à l'exception du montant total de la TVA dans la devise de comptabilisation.

      Returns:
      the BT-5 value
      Since:
      1.0.06/2.2
    • appendNewSellerVATIdentifier

      public SellerVATIdentifier appendNewSellerVATIdentifier(Codes.SchemeIdentifierAttribute sellerVATIdentifierSchemeIdentifier, String sellerVATIdentifier)
      Creates, appends and returns a new SellerVATIdentifier (BT-31-00 (SELLER VAT IDENTIFIER)).
      Parameters:
      sellerVATIdentifierSchemeIdentifier - BT-31-0 scheme identifier attribute — Scheme identifier for supplier VAT identifier

      Usage: Value = VA

      Rule: @schemeID="VA"

      FR: Identifiant du schéma — Identifiant du schéma de l'identifiant d'enregistrement à la taxe du vendeur

      sellerVATIdentifier - BT-31 Seller VAT identifier — The Seller's VAT identifier (also known as Seller VAT identification number).

      Usage: VAT number prefixed by a country code. A VAT registered Supplier shall include his VAT ID, except when he uses a tax representative.

      Rule: BR-CO-9: The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’.BR-CO-26: In order for the buyer to automatically identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31) shall be present.

      FR: Identifiant à la TVA du vendeur — Identifiant à la TVA du Vendeur (également appelé Numéro d'identification à la TVA du vendeur).

      Returns:
      the new SellerVATIdentifier
      Since:
      1.09.2/2.5.2
    • appendNewSellerVATIdentifier

      @Deprecated public SellerVATIdentifier appendNewSellerVATIdentifier()
      Deprecated.
    • getSellerVATIdentifiers

      public List<SellerVATIdentifier> getSellerVATIdentifiers()
    • appendNewPurchaseOrderReference

      public PurchaseOrderReference appendNewPurchaseOrderReference(String purchaseOrderReference)
      Creates, appends and returns a new PurchaseOrderReference (BT-13-00 (PURCHASE ORDER REFERENCE)).
      Parameters:
      purchaseOrderReference - BT-13 Purchase order reference — An identifier of a referenced purchase order, issued by the Buyer.

      Conditions (CIUS): CHORUS PRO: for the public sector, this is the "Engagement Juridique" (Legal Commitment). It is mandatory for some buyers. You should refer to the ChorusPro Directory to identify these public entity buyers that make it mandatory.

      FR: Identifiant de bon de commande — Identifiant d'un bon de commande référencé, généré par l'Acheteur.

      Returns:
      the new PurchaseOrderReference
      Since:
      1.09.2/2.5.2
    • appendNewPurchaseOrderReference

      @Deprecated public PurchaseOrderReference appendNewPurchaseOrderReference()
      Deprecated.
    • getPurchaseOrderReferences

      public List<PurchaseOrderReference> getPurchaseOrderReferences()
    • appendNewInvoiceTotalVATAmount

      public InvoiceTotalVATAmount appendNewInvoiceTotalVATAmount(Amount invoiceTotalVATAmount)
      Creates, appends and returns a new InvoiceTotalVATAmount (BT-110 Invoice total VAT amount).
      Parameters:
      invoiceTotalVATAmount - BT-110 Invoice total VAT amount — The total VAT amount for the Invoice.

      Usage: The Invoice total VAT amount is the sum of all VAT category tax amounts.

      Rule: BR-CO-14: Invoice total VAT amount (BT-110) = ∑ VAT category tax amount (BT-117).

      FR: Montant total de TVA — Montant total de la TVA de la Facture.

      Returns:
      the new InvoiceTotalVATAmount
      Since:
      1.09.2/2.5.2
    • getInvoiceTotalVATAmounts

      public List<InvoiceTotalVATAmount> getInvoiceTotalVATAmounts()
    • toXML

      public void toXML(PrintWriter out) throws IOException, FacturXException
      Description copied from class: AbstractInvoice
      Serializes to a Factur-X XML document that matches the profile specific XML Schema.
      Specified by:
      toXML in class AbstractInvoice
      Parameters:
      out - the print stream to write to
      Throws:
      IOException
      FacturXException
    • getProfile

      public AbstractInvoice.Profile getProfile()
      Specified by:
      getProfile in class AbstractInvoice
    • initForUnitTest

      public void initForUnitTest()
    • toJUnitJavaSourceCode

      public void toJUnitJavaSourceCode(PrintStream out, String packageName, String className, String referenceFilesDirectory) throws FacturXException
      Description copied from class: AbstractInvoice
      Creates JUnit Java source code that will construct an Invoice instance identical with this Invoice from API calls and compare the produced XML against a reference file.
      Specified by:
      toJUnitJavaSourceCode in class AbstractInvoice
      Parameters:
      out - the print stream to write to
      packageName - the package name to use in the package declaration
      className - the name to use as class name for the test class
      referenceFilesDirectory - the directory in which the test expects the reference output xml file that is named className+".xml"
      Throws:
      FacturXException