Class Invoice
BG-0 Invoice — Cross Industry Invoice
The EN 16931 business terms and groups implemented by this class:
| Represents | BG-0 |
|---|---|
| Covers | BG-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:
| Description | EN | Cross Industry Invoice |
|---|
- Since:
- 1.0.06/2.2
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractInvoice
AbstractInvoice.Profile -
Field Summary
Fields inherited from class AbstractInvoice
computeBT131, debug -
Constructor Summary
ConstructorsConstructorDescriptionInvoice(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 newInvoicecarrying the profile's mandatory business terms. -
Method Summary
Modifier and TypeMethodDescriptionappendNewInvoiceTotalVATAmount(Amount invoiceTotalVATAmount) Creates, appends and returns a newInvoiceTotalVATAmount(BT-110 Invoice total VAT amount).Deprecated.appendNewPurchaseOrderReference(String purchaseOrderReference) Creates, appends and returns a newPurchaseOrderReference(BT-13-00 (PURCHASE ORDER REFERENCE)).Deprecated.appendNewSellerVATIdentifier(Codes.SchemeIdentifierAttribute sellerVATIdentifierSchemeIdentifier, String sellerVATIdentifier) Creates, appends and returns a newSellerVATIdentifier(BT-31-00 (SELLER VAT IDENTIFIER)).Returns BT-115 Amount due for payment — The outstanding amount that is requested to be paid.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.Returns BT-47 Buyer legal registration identifier — An identifier issued by an official registrar that identifies the Buyer as a legal entity or person.Returns BT-47-1 scheme identifier attribute — The identification scheme identifier of the Buyer legal registration identifier.Returns BT-44 Buyer name — The full name of the Buyer.Returns BT-10 Buyer reference — An identifier assigned by the Buyer used for internal routing purposes.Returns BT-2-0 date format.Returns BT-5 Invoice currency code — The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency.Returns BT-2 Invoice issue date — The date when the Invoice was issued.Returns BT-1 Invoice number — A unique identification of the Invoice.Returns BT-109 Invoice total amount without VAT — The total amount of the Invoice without VAT.Returns BT-112 Invoice total amount with VAT — The total amount of the Invoice with VAT.Returns BT-3 Invoice type code — A code specifying the functional type of the Invoice.Returns BT-40 Seller country code — A code that identifies the country.Returns BT-30 Seller legal registration identifier — An identifier issued by an official registrar that identifies the Seller as a legal entity or person.Returns BT-30-1 Seller legal registration identifier identification scheme identifier — The identification scheme identifier of the Seller legal registration identifier.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.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.voidsetAmountDueForPayment(Amount value) Sets BT-115 Amount due for payment — The outstanding amount that is requested to be paid.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.Sets BT-47 Buyer legal registration identifier — An identifier issued by an official registrar that identifies the Buyer as a legal entity or person.Sets BT-47-1 scheme identifier attribute — The identification scheme identifier of the Buyer legal registration identifier.setBuyerName(String value) Sets BT-44 Buyer name — The full name of the Buyer.setBuyerReference(String value) Sets BT-10 Buyer reference — An identifier assigned by the Buyer used for internal routing purposes.Sets BT-5 Invoice currency code — The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency.setInvoiceIssueDate(LocalDate value) Sets BT-2 Invoice issue date — The date when the Invoice was issued.setInvoiceNumber(String value) Sets BT-1 Invoice number — A unique identification of the Invoice.Sets BT-109 Invoice total amount without VAT — The total amount of the Invoice without VAT.Sets BT-112 Invoice total amount with VAT — The total amount of the Invoice with VAT.Sets BT-3 Invoice type code — A code specifying the functional type of the Invoice.Sets BT-40 Seller country code — A code that identifies the country.Sets BT-30 Seller legal registration identifier — An identifier issued by an official registrar that identifies the Seller as a legal entity or person.Sets BT-30-1 Seller legal registration identifier identification scheme identifier — The identification scheme identifier of the Seller legal registration identifier.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.voidtoJUnitJavaSourceCode(PrintStream out, String packageName, String className, String referenceFilesDirectory) 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.voidtoXML(PrintWriter out) Serializes to a Factur-X XML document that matches the profile specific XML Schema.Methods inherited from class AbstractInvoice
fromPDFFile, fromXMLFile, getXMLAsDataURL, joinVeryLongString, main, parseDate, setRecompute, toXML
-
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 newInvoicecarrying 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
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:IDFR: Numéro de facture — Identification unique de la Facture.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.09.2/2.5.2
-
setBuyerReference
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:BuyerReferenceFR: 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
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setInvoiceTotalAmountWithoutVAT
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:TaxBasisTotalAmountFR: Montant total de la facture hors TVA — Montant total de la Facture, sans la TVA.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setInvoiceTotalAmountWithVAT
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:GrandTotalAmountFR: Montant total de la facture avec TVA comprise — Montant total de la Facture, avec la TVA.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setAmountDueForPayment
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:DuePayableAmountFR: Montant à payer — Encours dont le paiement est demandé.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setInvoiceIssueDate
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:DateTimeStringFR: Date d'émission de la facture — Date à laquelle la Facture a été émise.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setBusinessProcessType
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:IDFR: 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
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setSellerName
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:NameFR: 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
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setInvoiceTypeCode
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:TypeCodeFR: Type de facture en code — Code spécifiant le type fonctionnel de la Facture.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setSellerLegalOrganizationIdentifer
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:IDFR: 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
Invoicefor chaining - Since:
- 1.09.2/2.5.2
-
setSellerLegalOrganizationSchemeIdentiferAttribute
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/@schemeIDFR: 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
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setSellerCountryCode
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:CountryIDFR: Code de pays du vendeur — Code d'identification du pays.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setBuyerName
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:NameFR: Raison sociale de l'acheteur — Nom complet de l'Acheteur.
- Parameters:
value- the value to set- Returns:
- this
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setBuyerLegalOrganizationIdentifer
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:IDFR: 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
Invoicefor chaining - Since:
- 1.09.2/2.5.2
-
setBuyerLegalOrganizationSchemeIdentiferAttribute
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/@schemeIDFR: 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
Invoicefor chaining - Since:
- 1.0.06/2.2
-
setInvoiceCurrencyCode
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:InvoiceCurrencyCodeFR: 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
Invoicefor chaining - Since:
- 1.0.06/2.2
-
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:IDFR: Numéro de facture — Identification unique de la Facture.
- Returns:
- the
BT-1value - Since:
- 1.09.2/2.5.2
-
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:BuyerReferenceFR: Référence de l’acheteur — Identifiant attribué par l'Acheteur et destiné au routage de la facture en interne.
- Returns:
- the
BT-10value - Since:
- 1.0.06/2.2
-
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:TaxBasisTotalAmountFR: Montant total de la facture hors TVA — Montant total de la Facture, sans la TVA.
- Returns:
- the
BT-109value - Since:
- 1.0.06/2.2
-
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:GrandTotalAmountFR: Montant total de la facture avec TVA comprise — Montant total de la Facture, avec la TVA.
- Returns:
- the
BT-112value - Since:
- 1.0.06/2.2
-
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:DuePayableAmountFR: Montant à payer — Encours dont le paiement est demandé.
- Returns:
- the
BT-115value - Since:
- 1.0.06/2.2
-
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:DateTimeStringFR: Date d'émission de la facture — Date à laquelle la Facture a été émise.
- Returns:
- the
BT-2value - Since:
- 1.0.06/2.2
-
getDateFormat
Returns BT-2-0 date format.Usage: Only value "102"
Rule: Only value "102"
XPath:
/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString/@formatFR: Format de la date
- Returns:
- the
BT-2-0value - Throws:
ComputationException- Since:
- 1.0.06/2.2
-
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:IDFR: 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-23value - Since:
- 1.0.06/2.2
-
getSpecificationIdentifier
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:IDFR: 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-24value - Throws:
ComputationException- Since:
- 1.09.2/2.5.2
-
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:NameFR: 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-27value - Since:
- 1.0.06/2.2
-
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:TypeCodeFR: Type de facture en code — Code spécifiant le type fonctionnel de la Facture.
- Returns:
- the
BT-3value - Since:
- 1.0.06/2.2
-
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:IDFR: 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-30value - Since:
- 1.09.2/2.5.2
-
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/@schemeIDFR: Identifiant du schéma — Identifiant du schéma de l'identifiant d'enregistrement légal du vendeur.
- Returns:
- the
BT-30-1value - Since:
- 1.0.06/2.2
-
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:CountryIDFR: Code de pays du vendeur — Code d'identification du pays.
- Returns:
- the
BT-40value - Since:
- 1.0.06/2.2
-
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:NameFR: Raison sociale de l'acheteur — Nom complet de l'Acheteur.
- Returns:
- the
BT-44value - Since:
- 1.0.06/2.2
-
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:IDFR: 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-47value - Since:
- 1.09.2/2.5.2
-
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/@schemeIDFR: 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-1value - Since:
- 1.0.06/2.2
-
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:InvoiceCurrencyCodeFR: 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-5value - Since:
- 1.0.06/2.2
-
appendNewSellerVATIdentifier
public SellerVATIdentifier appendNewSellerVATIdentifier(Codes.SchemeIdentifierAttribute sellerVATIdentifierSchemeIdentifier, String sellerVATIdentifier) Creates, appends and returns a newSellerVATIdentifier(BT-31-00 (SELLER VAT IDENTIFIER)).- Parameters:
sellerVATIdentifierSchemeIdentifier- BT-31-0 scheme identifier attribute — Scheme identifier for supplier VAT identifierUsage: 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. -
getSellerVATIdentifiers
-
appendNewPurchaseOrderReference
Creates, appends and returns a newPurchaseOrderReference(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. -
getPurchaseOrderReferences
-
appendNewInvoiceTotalVATAmount
Creates, appends and returns a newInvoiceTotalVATAmount(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
-
toXML
Description copied from class:AbstractInvoiceSerializes to a Factur-X XML document that matches the profile specific XML Schema.- Specified by:
toXMLin classAbstractInvoice- Parameters:
out- the print stream to write to- Throws:
IOExceptionFacturXException
-
getProfile
- Specified by:
getProfilein classAbstractInvoice
-
initForUnitTest
public void initForUnitTest() -
toJUnitJavaSourceCode
public void toJUnitJavaSourceCode(PrintStream out, String packageName, String className, String referenceFilesDirectory) throws FacturXException Description copied from class:AbstractInvoiceCreates 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:
toJUnitJavaSourceCodein classAbstractInvoice- Parameters:
out- the print stream to write topackageName- the package name to use in the package declarationclassName- the name to use as class name for the test classreferenceFilesDirectory- the directory in which the test expects the reference output xml file that is namedclassName+".xml"- Throws:
FacturXException
-