Upstream Patch for Core

This commit is contained in:
Parthiv Patel
2023-08-20 06:16:33 +00:00
parent 60791ac529
commit c773799bb8
386 changed files with 18833 additions and 792 deletions

View File

@@ -1,10 +1,14 @@
Contributing to Flectra
========================
====================
[Full contribution guidelines](https://github.com/flectra/flectra/wiki/Contributing)
TL;DR
* If you make a pull request do not create an issue! Use the PR description for that
* If you [make a pull request](https://github.com/flectra/flectra/wiki/Contributing#making-pull-requests),
do not create an issue! Use the PR description for that
* Issues are handled with a much lower priority than pull requests
* Use this [template](https://gitlab.com/flectra-hq/flectra/blob/master/.gitlab/issue_templates/Bug.md)
* Use this [template](https://github.com/flectra/flectra/tree/14.0/.github/ISSUE_TEMPLATE.md)
when reporting issues. Please search for duplicates first!
* Pull requests must be made against the correct version.
* Pull requests must be made against the [correct version](https://github.com/flectra/flectra/wiki/Contributing#against-which-version-should-i-submit-a-patch)
* There are restrictions on the kind of [changes allowed in stable series](https://github.com/flectra/flectra/wiki/Contributing#what-does-stable-mean)

View File

@@ -1,7 +1,7 @@
Most of the files are
Copyright (c) 2004-2015 Odoo S.A.
Copyright (c) 2004-2015 FlectraHQ, Inc.
Many files also contain contributions from third
parties. In this case the original copyright of

View File

@@ -1,12 +1,12 @@
For copyright information, please see the COPYRIGHT file.
Odoo is published under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3
Flectra is published under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3
(LGPLv3), as included below. Since the LGPL is a set of additional
permissions on top of the GPL, the text of the GPL is included at the
bottom as well.
Some external libraries and contributions bundled with Odoo may be published
Some external libraries and contributions bundled with Flectra may be published
under other GPL-compatible licenses. For these, please refer to the relevant
source files and/or license files, in the source code tree.

View File

@@ -1,49 +1,6 @@
include requirements.txt
include LICENSE
include README.md
include flectra/addons/mail/static/scripts/flectra-mailgate.py
recursive-include flectra *.css
recursive-include flectra *.csv
recursive-include flectra *.doc
recursive-include flectra *.docx
recursive-include flectra *.eml
recursive-include flectra *.eot
recursive-include flectra *.gif
recursive-include flectra *.html
recursive-include flectra *.ico
recursive-include flectra *.jpeg
recursive-include flectra *.jpg
recursive-include flectra *.js
recursive-include flectra *.md
recursive-include flectra *.mp3
recursive-include flectra *.ogg
recursive-include flectra *.ods
recursive-include flectra *.odt
recursive-include flectra *.otf
recursive-include flectra *.pdf
recursive-include flectra *.png
recursive-include flectra *.po
recursive-include flectra *.pot
recursive-include flectra *.rml
recursive-include flectra *.rng
recursive-include flectra *.rst
recursive-include flectra *.scss
recursive-include flectra *.sql
recursive-include flectra *.svg
recursive-include flectra *.template
recursive-include flectra *.txt
recursive-include flectra *.ttf
recursive-include flectra *.woff
recursive-include flectra *.woff2
recursive-include flectra *.wsdl
recursive-include flectra *.xls
recursive-include flectra *.xsd
recursive-include flectra *.xsl
recursive-include flectra *.xlsx
recursive-include flectra *.xml
recursive-include flectra *.yml
recursive-include flectra *.zip
recursive-include flectra/addons/l10n_mx_edi *.xslt *.key *.cer *.txt
recursive-include flectra/addons/l10n_mx_reports *.xslt
graft flectra
recursive-exclude * *.py[co]
recursive-exclude * *.hg*
recursive-exclude .git *

View File

@@ -1,20 +1,33 @@
[![pipeline status](https://gitlab.com/flectra-hq/flectra/badges/master/pipeline.svg)](https://gitlab.com/flectra-hq/flectra/commits/master) [![coverage report](https://gitlab.com/flectra-hq/flectra/badges/master/coverage.svg)](https://gitlab.com/flectra-hq/flectra/commits/master)
[![Build Status](https://runbot.flectrahq.com/runbot/badge/flat/1/master.svg)](https://runbot.flectrahq.com/runbot)
[![Tech Doc](https://img.shields.io/badge/master-docs-875A7B.svg?style=flat&colorA=8F8F8F)](https://www.flectrahq.com/documentation/master)
[![Help](https://img.shields.io/badge/master-help-875A7B.svg?style=flat&colorA=8F8F8F)](https://www.flectrahq.com/forum/help-1)
[![Nightly Builds](https://img.shields.io/badge/master-nightly-875A7B.svg?style=flat&colorA=8F8F8F)](https://nightly.flectrahq.com/)
Flectra
=======
----
Flectra is a suite of web based open source business apps forked from Odoo.
Flectra is a suite of web based open source business apps.
The main Flectra Apps include an Open Source CRM,Website Builder,eCommerce,Warehouse Management,
Project Management,Billing & Accounting,Point of Sale,Human Resources,Marketing,Manufacturing,
Purchase Management and many more.
The main Flectra Apps include an <a href="https://www.flectrahq.com/page/crm">Open Source CRM</a>,
<a href="https://www.flectrahq.com/page/website-builder">Website Builder</a>,
<a href="https://www.flectrahq.com/page/e-commerce">eCommerce</a>,
<a href="https://www.flectrahq.com/page/warehouse">Warehouse Management</a>,
<a href="https://www.flectrahq.com/page/project-management">Project Management</a>,
<a href="https://www.flectrahq.com/page/accounting">Billing &amp; Accounting</a>,
<a href="https://www.flectrahq.com/page/point-of-sale">Point of Sale</a>,
<a href="https://www.flectrahq.com/page/employees">Human Resources</a>,
<a href="https://www.flectrahq.com/page/lead-automation">Marketing</a>,
<a href="https://www.flectrahq.com/page/manufacturing">Manufacturing</a>,
<a href="https://www.flectrahq.com/#apps">...</a>
Flectra Apps can be used as stand-alone applications, but they also integrate seamlessly so you get
a full-featured <a href="https://www.flectrahq.com">Open Source ERP</a> when
you install several Apps.
a full-featured <a href="https://www.flectrahq.com">Open Source ERP</a> when you install several Apps.
Additional Apps for Flectra are available here : https://gitlab.com/flectra-hq/extra-addons
Getting started with Flectra
----------------------------
For a standard installation please follow this <a href="https://gitlab.com/flectra-hq/flectra/snippets/1694169">snippet</a>.
-------------------------
For a standard installation please follow the <a href="https://www.flectrahq.com/documentation/14.0/administration/install.html">Setup instructions</a>
from the documentation.
To learn the software, we recommend the <a href="https://www.flectrahq.com/slides">Flectra eLearning</a>, or <a href="https://www.flectrahq.com/page/scale-up-business-game">Scale-up</a>, the <a href="https://www.flectrahq.com/page/scale-up-business-game">business game</a>. Developers can start with <a href="https://www.flectrahq.com/documentation/14.0/developer/howtos.html">the developer tutorials</a>

40
SECURITY.md Normal file
View File

@@ -0,0 +1,40 @@
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| 14.0 | :white_check_mark: |
| 13.0 | :white_check_mark: |
| 12.0 | :white_check_mark: |
| <=11.0 | :x: |
## Reporting a Vulnerability
Please share privately the details of your security vulnerability by contacting our Security Team:
[Contact Info](https://www.flectrahq.com/security-report)
Make sure to include as much information as possible, with the detailed steps to reproduce the problem,
the versions that are affected, the expected results and actual results, and any other information that
might help us react faster and more efficiently.
We tend to prefer _text-based descriptions_ accompanied with a proof-of-concept script/exploit, rather
than screenshots and videos.
Our [Responsible Disclosure](https://www.flectrahq.com/security-report) page gives an overview of the
process, including:
- Our Incident Response Procedure (what will happen after you report an issue)
- Our Rules (what you can and cannot do while researching security issues)
- Guidelines with **DO REPORT** and **DO NOT REPORT** issues
(what kind of issues will be accepted/rejected)
## Important note
We receive a majority of security reports that have little to no impact on the security of Flectra or
the Flectra Cloud, and we ultimately have to reject them. To avoid a disappointing experience when
contacting us, please try to put together a proof-of-concept attack and take a critical look at
what's really at risk.
If the proposed attack scenario turns out unrealistic, your report will probably be rejected.
Also be sure to review our list of [non-qualifying issues](https://www.flectrahq.com/security-report#what).

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Flectra. See LICENSE file for full copyright and licensing details.
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from flectra import api, models
from flectra.addons.base_import.models.base_import import FIELDS_RECURSION_LIMIT

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
{
'name': "Import/Export electronic invoices with UBL/CII",
'version': '1.0',
'category': 'Accounting/Accounting',
'description': """
Electronic invoicing module
===========================
Allows to export and import formats: E-FFF, UBL Bis 3, EHF3, Factur-X (CII), XRechnung (UBL).
When generating the PDF on the invoice, the PDF will be embedded inside the xml for all UBL formats. This allows the
receiver to retrieve the PDF with only the xml file. Note that **EHF3 is fully implemented by UBL Bis 3** (`reference
<https://anskaffelser.dev/postaward/g3/spec/current/billing-3.0/norway/#_implementation>`_).
The formats can be chosen from the journal (Journal > Advanced Settings) linked to the invoice.
Note that E-FFF and XRechnung (UBL) are only available for Belgian and German companies,
respectively. UBL Bis 3 is only available for companies which country is present in the `EAS list
<https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/>`_.
Note also that you need to activate PDF A in order to be able to submit a Factur-X pdf on Chorus Pro:
go to Settings > Technical (debug mode) > System Parameters > select/create one with Key: edi.use_pdfa, Value: true.
With this setting, Chorus Pro will automatically detect the "PDF/A-3 (Factur-X)" format.
""",
'depends': ['account_edi'],
'data': [
'data/account_edi_data.xml',
'data/cii_22_templates.xml',
'data/ubl_20_templates.xml',
'data/ubl_21_templates.xml',
],
'installable': True,
'application': False,
'auto_install': False,
'license': 'LGPL-3',
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data>
<record id="ubl_bis3" model="account.edi.format">
<field name="name">Peppol BIS Billing 3.0</field>
<field name="code">ubl_bis3</field>
</record>
<record id="ubl_de" model="account.edi.format">
<field name="name">XRechnung UBL (Germany)</field>
<field name="code">ubl_de</field>
</record>
</data>
</flectra>

View File

@@ -0,0 +1,388 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data>
<template id="account_invoice_line_facturx_export_22">
<t t-set="line" t-value="line_vals['line']"/>
<t xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<ram:IncludedSupplyChainTradeLineItem>
<!-- Line number. -->
<ram:AssociatedDocumentLineDocument>
<ram:LineID t-esc="line_vals.get('index')"/>
</ram:AssociatedDocumentLineDocument>
<!-- Product. -->
<ram:SpecifiedTradeProduct>
<ram:GlobalID
schemeID="0160"
t-if="line.product_id and line.product_id.barcode"
t-esc="line.product_id.barcode"/>
<ram:SellerAssignedID
t-if="line.product_id and line.product_id.default_code"
t-esc="line.product_id.default_code"/>
<ram:Name t-esc="line.name"/>
</ram:SpecifiedTradeProduct>
<!-- Amounts. -->
<ram:SpecifiedLineTradeAgreement>
<!-- Line information: unit_price
NB: the gross_price_unit should be the price tax excluded !
if price_unit = 100 and tax 10% price_include -> then the gross_price_unit is 91
-->
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount t-esc="format_monetary(line_vals['gross_price_total_unit'], 2)"/>
<!-- Discount. -->
<ram:AppliedTradeAllowanceCharge t-if="line.discount">
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount t-esc="format_monetary(line_vals['price_discount_unit'], 2)"/>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<!-- Line unit price, with discount applied -->
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount
t-esc="format_monetary(line_vals['price_subtotal_unit'], 2)"/>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<!-- Quantity. -->
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity
t-att-unitCode="line_vals.get('unece_uom_code')"
t-esc="line.quantity"/> <!-- /!\ The quantity is the line.quantity since we keep the unece_uom_code ! -->
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<t t-foreach="tax_details['invoice_line_tax_details'][line]['tax_details'].values()"
t-as="tax_detail_vals">
<ram:ApplicableTradeTax t-if="tax_detail_vals['amount_type'] == 'percent'">
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode t-esc="tax_detail_vals['tax_category_code']"/>
<ram:RateApplicablePercent t-esc="tax_detail_vals['amount']"/>
</ram:ApplicableTradeTax>
</t>
<!-- Allowance/Charge on the line -->
<t t-foreach="line_vals.get('allowance_charge_vals_list')" t-as="allowance_charge_vals">
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator t-esc="allowance_charge_vals['indicator']"/>
</ram:ChargeIndicator>
<ram:ActualAmount t-esc="format_monetary(allowance_charge_vals['amount'], 2)"/>
<ram:ReasonCode t-esc="allowance_charge_vals['reason_code']"/>
<ram:Reason t-esc="allowance_charge_vals['reason']"/>
</ram:SpecifiedTradeAllowanceCharge>
</t>
<!-- Subtotal. -->
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount t-esc="format_monetary(line_vals['line_total_amount'], 2)"/>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
</t>
</template>
<template id="account_invoice_partner_facturx_export_22">
<t xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<!-- Contact. -->
<ram:Name t-esc="partner.name"/>
<ram:SpecifiedLegalOrganization t-if="specified_legal_organization_val">
<ram:ID t-att-schemeID="str('0002')"
t-esc="specified_legal_organization_val"/>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact t-if="not hide_dtc">
<ram:PersonName t-esc="partner.name"/>
<ram:TelephoneUniversalCommunication t-if="partner.phone or partner.mobile">
<ram:CompleteNumber t-esc="partner.phone or partner.mobile"/>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication t-if="partner.email">
<ram:URIID schemeID='SMTP' t-esc="partner.email"/>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<!-- Address. -->
<t t-call="account_edi_ubl_cii.account_invoice_address_facturx_export_22"/>
</t>
</template>
<template id="account_invoice_address_facturx_export_22">
<t xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<!-- Address. -->
<ram:PostalTradeAddress>
<ram:PostcodeCode t-esc="partner.zip"/>
<ram:LineOne t-esc="partner.street"/>
<ram:LineTwo t-esc="partner.street2"/>
<ram:CityName t-esc="partner.city"/>
<ram:CountryID t-esc="partner.country_id.code"/>
</ram:PostalTradeAddress>
</t>
</template>
<template id="account_invoice_facturx_export_22">
<t t-set="currency" t-value="record.currency_id or record.company_currency_id"/>
<rsm:CrossIndustryInvoice
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<!-- Factur-x level:
* minimum or basicwl: urn:factur-x.eu:1p0...
* basic: urn:cen.eu:en16931:2017:compliant:factur-x.eu:1p0:basic
* en16931: urn:cen.eu:en16931:2017
-->
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID t-esc="document_context_id"/>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<!-- Document Headers. -->
<rsm:ExchangedDocument>
<ram:ID t-esc="ExchangedDocument_vals.get('id')"/>
<ram:TypeCode t-esc="ExchangedDocument_vals.get('type_code')"/>
<ram:IssueDateTime t-if="ExchangedDocument_vals.get('issue_date_time')">
<udt:DateTimeString format="102" t-esc="format_date(ExchangedDocument_vals.get('issue_date_time'))"/>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content t-esc="ExchangedDocument_vals.get('included_note')"/>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<!-- Invoice lines. -->
<t t-foreach="invoice_line_vals_list" t-as="line_vals">
<t t-call="account_edi_ubl_cii.account_invoice_line_facturx_export_22"/>
</t>
<!-- Partners. -->
<ram:ApplicableHeaderTradeAgreement>
<!-- "Service Exécutant" (Used by Chorus Pro) -->
<ram:BuyerReference t-esc="buyer_reference"/>
<!-- Seller. -->
<ram:SellerTradeParty>
<!-- Address. -->
<t t-call="account_edi_ubl_cii.account_invoice_partner_facturx_export_22">
<t t-set="partner" t-value="record.company_id.partner_id"/>
<t t-set="specified_legal_organization_val" t-value="seller_specified_legal_organization"/>
</t>
<!-- VAT. -->
<ram:SpecifiedTaxRegistration t-if="record.company_id.vat">
<ram:ID schemeID="VA" t-esc="record.company_id.vat"/>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<!-- Customer. -->
<ram:BuyerTradeParty>
<!-- Address. -->
<t t-call="account_edi_ubl_cii.account_invoice_partner_facturx_export_22">
<t t-set="partner" t-value="record.commercial_partner_id"/>
<t t-set="specified_legal_organization_val" t-value="buyer_specified_legal_organization"/>
</t>
<!-- VAT. -->
<ram:SpecifiedTaxRegistration t-if="record.commercial_partner_id.vat">
<ram:ID schemeID="VA" t-esc="record.commercial_partner_id.vat"/>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<!-- Reference. -->
<ram:BuyerOrderReferencedDocument>
<!-- "Engagement Juridique" (used by Chorus Pro) -->
<ram:IssuerAssignedID t-esc="purchase_order_reference"/>
</ram:BuyerOrderReferencedDocument>
<ram:ContractReferencedDocument>
<!-- "Numéro de Marché" (Used by Chorus Pro) -->
<ram:IssuerAssignedID t-esc="contract_reference"/>
</ram:ContractReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<!-- Delivery -->
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<t t-call="account_edi_ubl_cii.account_invoice_partner_facturx_export_22">
<t t-set="partner"
t-value="ship_to_trade_party"/>
<t t-set="hide_dtc" t-value="document_context_id == 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2'"/>
</t>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent t-if="scheduled_delivery_time">
<ram:OccurrenceDateTime>
<udt:DateTimeString t-att-format="102"
t-esc="format_date(scheduled_delivery_time)"/>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<!-- Taxes. -->
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference t-esc="record.payment_reference"/>
<ram:InvoiceCurrencyCode t-esc="currency.name"/>
<!-- Bank account. -->
<ram:SpecifiedTradeSettlementPaymentMeans t-if="record.partner_bank_id.sanitized_acc_number">
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID
t-if="record.partner_bank_id.sanitized_acc_number == 'iban'"
t-esc="record.partner_bank_id.sanitized_acc_number"/>
<ram:ProprietaryID
t-if="record.partner_bank_id.sanitized_acc_number != 'iban'"
t-esc="record.partner_bank_id.sanitized_acc_number"/>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<!-- Tax Summary. -->
<t t-foreach="tax_details.get('tax_details', {}).values()" t-as="tax_detail_vals">
<ram:ApplicableTradeTax>
<ram:CalculatedAmount
t-esc="format_monetary(tax_detail_vals.get('calculated_amount'), 2)"/>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:ExemptionReason t-esc="tax_detail_vals.get('tax_exemption_reason')"/>
<ram:BasisAmount
t-esc="format_monetary(balance_multiplicator * tax_detail_vals['base_amount_currency'], 2)"/>
<ram:CategoryCode t-esc="tax_detail_vals['tax_category_code']"/>
<ram:ExemptionReasonCode t-esc="tax_detail_vals['tax_exemption_reason_code']"/>
<!-- 5 = Tax is exigible on the date on the invoice -->
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent
t-if="tax_detail_vals['amount_type'] == 'percent'"
t-esc="tax_detail_vals['amount']"/>
</ram:ApplicableTradeTax>
</t>
<!-- Billing Period -->
<ram:BillingSpecifiedPeriod t-if="billing_start and billing_end">
<ram:StartDateTime>
<udt:DateTimeString format="102" t-esc="format_date(billing_start)"/>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString format="102" t-esc="format_date(billing_end)"/>
</ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
<!-- Payment Term. -->
<ram:SpecifiedTradePaymentTerms>
<ram:Description t-if="record.invoice_payment_term_id" t-esc="record.invoice_payment_term_id.name"/>
<ram:DueDateDateTime t-if="record.invoice_date_due">
<udt:DateTimeString format="102" t-esc="format_date(record.invoice_date_due)"/>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<!-- Summary. -->
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount
t-esc="format_monetary(tax_basis_total_amount, 2)"/>
<ram:TaxBasisTotalAmount
t-esc="format_monetary(tax_basis_total_amount, 2)"/>
<ram:TaxTotalAmount
t-att-currencyID="currency.name"
t-esc="format_monetary(tax_total_amount, 2)"/>
<ram:GrandTotalAmount
t-esc="format_monetary(record.amount_total, 2)"/>
<ram:TotalPrepaidAmount
t-esc="format_monetary(record.amount_total - record.amount_residual, 2)"/>
<ram:DuePayableAmount
t-esc="format_monetary(record.amount_residual, 2)"/>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
</template>
<template id="account_invoice_pdfa_3_facturx_metadata">
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" rdf:about="">
<pdfaid:part>3</pdfaid:part>
<pdfaid:conformance>B</pdfaid:conformance>
</rdf:Description>
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
<dc:title>
<rdf:Alt>
<rdf:li t-att="{'xml:lang': 'x-default'}" t-esc="title"/>
</rdf:Alt>
</dc:title>
<dc:creator>
<rdf:Seq>
<rdf:li>Flectra</rdf:li>
</rdf:Seq>
</dc:creator>
<dc:description>
<rdf:Alt>
<rdf:li t-att="{'xml:lang': 'x-default'}">Invoice generated by Flectra</rdf:li>
</rdf:Alt>
</dc:description>
</rdf:Description>
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
<pdf:Producer>Flectra</pdf:Producer>
</rdf:Description>
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
<xmp:CreatorTool>Flectra</xmp:CreatorTool>
<xmp:CreateDate t-esc="date"/>
<xmp:ModifyDate t-esc="date"/>
</rdf:Description>
<rdf:Description xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#" rdf:about="">
<pdfaExtension:schemas>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<pdfaSchema:schema>Factur-X PDFA Extension Schema</pdfaSchema:schema>
<pdfaSchema:namespaceURI>urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
<pdfaSchema:prefix>fx</pdfaSchema:prefix>
<pdfaSchema:property>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentFileName</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentType</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>INVOICE</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>Version</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The actual version of the Factur-X XML schema</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The conformance level of the embedded Factur-X data</pdfaProperty:description>
</rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
</rdf:Bag>
</pdfaExtension:schemas>
</rdf:Description>
<rdf:Description xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#" rdf:about="">
<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>
<fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
<fx:DocumentType>INVOICE</fx:DocumentType>
<fx:Version>1.0</fx:Version>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
</template>
</data>
</flectra>

View File

@@ -0,0 +1,411 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<template id="ubl_20_AddressType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:StreetName t-esc="vals.get('street_name')"/>
<cbc:AdditionalStreetName t-esc="vals.get('additional_street_name')"/>
<cbc:CityName t-esc="vals.get('city_name')"/>
<cbc:PostalZone t-esc="vals.get('postal_zone')"/>
<cbc:CountrySubentity t-esc="vals.get('country_subentity')"/>
<cbc:CountrySubentityCode t-esc="vals.get('country_subentity_code')"/>
<cac:Country>
<t t-set="country_vals" t-value="vals.get('country_vals', {})"/>
<cbc:IdentificationCode
t-att="country_vals.get('identification_code_attrs', {})"
t-esc="country_vals.get('identification_code')"/>
<cbc:Name t-esc="country_vals.get('name')"/>
</cac:Country>
</t>
</template>
<template id="ubl_20_PartyType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<t t-set="partner" t-value="vals.get('partner') or builder.env['res.partner']"/>
<cbc:EndpointID
t-att="vals.get('endpoint_id_attrs', {})"
t-esc="vals.get('endpoint_id')"/>
<t t-foreach="vals.get('party_identification_vals', [])" t-as="party_vals">
<cac:PartyIdentification>
<cbc:ID
t-att="party_vals.get('id_attrs', {})"
t-esc="party_vals.get('id')"/>
</cac:PartyIdentification>
</t>
<t t-foreach="vals.get('party_name_vals', [])" t-as="party_vals">
<cac:PartyName>
<cbc:Name t-esc="party_vals.get('name')"/>
</cac:PartyName>
</t>
<cac:PostalAddress>
<t t-call="{{AddressType_template}}">
<t t-set="vals" t-value="vals.get('postal_address_vals', {})"/>
</t>
</cac:PostalAddress>
<t t-foreach="vals.get('party_tax_scheme_vals', [])" t-as="foreach_vals">
<cac:PartyTaxScheme>
<cbc:RegistrationName t-esc="foreach_vals.get('registration_name')"/>
<cbc:CompanyID
t-att="foreach_vals.get('company_id_attrs', {})"
t-esc="foreach_vals.get('company_id')"/>
<cac:RegistrationAddress>
<t t-call="{{AddressType_template}}">
<t t-set="vals" t-value="foreach_vals.get('registration_address_vals', {})"/>
</t>
</cac:RegistrationAddress>
<cac:TaxScheme>
<cbc:ID t-esc="foreach_vals.get('tax_scheme_id')"/>
</cac:TaxScheme>
</cac:PartyTaxScheme>
</t>
<t t-foreach="vals.get('party_legal_entity_vals', [])" t-as="foreach_vals">
<cac:PartyLegalEntity>
<cbc:RegistrationName t-esc="foreach_vals.get('registration_name')"/>
<cbc:CompanyID
t-att="foreach_vals.get('company_id_attrs', {})"
t-esc="foreach_vals.get('company_id')"/>
<cac:RegistrationAddress>
<t t-call="{{AddressType_template}}">
<t t-set="vals" t-value="foreach_vals.get('registration_address_vals', {})"/>
</t>
</cac:RegistrationAddress>
</cac:PartyLegalEntity>
</t>
<cac:Contact>
<t t-set="contact_vals" t-value="vals.get('contact_vals', {})"/>
<cbc:ID t-esc="contact_vals.get('id')"/>
<cbc:Name t-esc="contact_vals.get('name')"/>
<cbc:Telephone t-esc="contact_vals.get('telephone')"/>
<cbc:ElectronicMail t-esc="contact_vals.get('electronic_mail')"/>
</cac:Contact>
</t>
</template>
<template id="ubl_20_PaymentMeansType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:PaymentMeansCode
t-att="vals.get('payment_means_code_attrs', {})"
t-esc="vals.get('payment_means_code')"/>
<cbc:PaymentDueDate t-esc="vals.get('payment_due_date')"/>
<cbc:InstructionID t-esc="vals.get('instruction_id')"/>
<t t-foreach="vals.get('payment_id_vals', [])" t-as="payment_id">
<cbc:PaymentID t-esc="payment_id"/>
</t>
<cac:PayeeFinancialAccount>
<t t-set="payee_financial_account_vals" t-value="vals.get('payee_financial_account_vals', {})"/>
<cbc:ID
t-att="payee_financial_account_vals.get('id_attrs', {})"
t-esc="payee_financial_account_vals.get('id')"/>
<cac:FinancialInstitutionBranch>
<t t-set="financial_institution_branch_vals" t-value="payee_financial_account_vals.get('financial_institution_branch_vals', {})"/>
<cbc:ID
t-att="financial_institution_branch_vals.get('id_attrs', {})"
t-esc="financial_institution_branch_vals.get('id')"/>
<cac:FinancialInstitution>
<t t-set="financial_institution_vals" t-value="financial_institution_branch_vals.get('financial_institution_vals', {})"/>
<cbc:ID
t-att="financial_institution_vals.get('id_attrs', {})"
t-esc="financial_institution_vals.get('id')"/>
<cbc:Name t-esc="financial_institution_vals.get('name')"/>
<cac:Address>
<t t-call="{{AddressType_template}}">
<t t-set="vals" t-value="financial_institution_vals.get('address_vals', {})"/>
</t>
</cac:Address>
</cac:FinancialInstitution>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</t>
</template>
<template id="ubl_20_TaxCategoryType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID
t-att="vals.get('id_attrs', {})"
t-esc="vals.get('id')"/>
<cbc:Name t-esc="vals.get('name')"/>
<cbc:Percent t-esc="vals.get('percent')"/>
<cbc:TaxExemptionReasonCode
t-esc="vals.get('tax_exemption_reason_code')"/>
<cbc:TaxExemptionReason
t-esc="vals.get('tax_exemption_reason')"/>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</t>
</template>
<template id="ubl_20_TaxTotalType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:TaxAmount
t-att-currencyID="vals['currency'].name"
t-esc="format_float(vals.get('tax_amount'), vals.get('currency_dp'))"/>
<t t-foreach="vals.get('tax_subtotal_vals', [])" t-as="foreach_vals">
<cac:TaxSubtotal>
<cbc:TaxableAmount
t-att-currencyID="foreach_vals['currency'].name"
t-esc="format_float(foreach_vals.get('taxable_amount'), foreach_vals.get('currency_dp'))"/>
<cbc:TaxAmount
t-att-currencyID="foreach_vals['currency'].name"
t-esc="format_float(foreach_vals.get('tax_amount'), foreach_vals.get('currency_dp'))"/>
<cbc:Percent t-esc="foreach_vals.get('percent')"/>
<cac:TaxCategory>
<t t-call="{{TaxCategoryType_template}}">
<t t-set="vals" t-value="foreach_vals.get('tax_category_vals', {})"/>
</t>
</cac:TaxCategory>
</cac:TaxSubtotal>
</t>
</t>
</template>
<template id="ubl_20_AllowanceChargeType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ChargeIndicator t-esc="vals.get('charge_indicator')"/>
<cbc:AllowanceChargeReasonCode t-esc="vals.get('allowance_charge_reason_code')"/>
<cbc:AllowanceChargeReason t-esc="vals.get('allowance_charge_reason')"/>
<cbc:MultiplierFactorNumeric t-esc="vals.get('multiplier_factor')"/>
<cbc:Amount
t-att-currencyID="vals.get('currency_name')"
t-esc="format_float(vals.get('amount'), vals.get('currency_dp'))"/>
<t t-foreach="vals.get('tax_category_vals', [])" t-as="foreach_vals">
<cac:TaxCategory>
<t t-call="{{TaxCategoryType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:TaxCategory>
</t>
</t>
</template>
<template id="ubl_20_InvoiceLineType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:ID t-esc="vals.get('id')"/>
<cbc:Note t-esc="vals.get('note')"/>
<cbc:InvoicedQuantity
t-if="invoice.move_type == 'out_invoice'"
t-att="vals.get('invoiced_quantity_attrs', {})"
t-esc="vals.get('invoiced_quantity')"/>
<cbc:CreditedQuantity
t-if="invoice.move_type == 'out_refund'"
t-att="vals.get('invoiced_quantity_attrs', {})"
t-esc="vals.get('invoiced_quantity')"/>
<cbc:LineExtensionAmount
t-att-currencyID="vals['currency'].name"
t-esc="format_float(vals.get('line_extension_amount'), vals.get('currency_dp'))"/>
<!-- AllowanceCharge is only present for InvoiceLine, not for CreditNoteLine in UBL 2.0
(they are both present in UBL 2.1 and next)
http://www.datypic.com/sc/ubl20/e-cac_CreditNoteLine.html
http://www.datypic.com/sc/ubl20/e-cac_InvoiceLine.html
-->
<t t-if="invoice.move_type == 'out_invoice'">
<t t-foreach="vals.get('allowance_charge_vals', [])" t-as="foreach_vals">
<cac:AllowanceCharge>
<t t-call="{{AllowanceChargeType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:AllowanceCharge>
</t>
</t>
<t t-foreach="vals.get('tax_total_vals', [])" t-as="foreach_vals">
<cac:TaxTotal>
<t t-call="{{TaxTotalType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:TaxTotal>
</t>
<cac:Item>
<t t-set="item_vals" t-value="vals.get('item_vals', {})"/>
<cbc:Description t-esc="item_vals.get('description')"/>
<cbc:Name t-esc="item_vals.get('name')"/>
<cac:SellersItemIdentification>
<cbc:ID t-esc="item_vals.get('sellers_item_identification_vals', {}).get('id')"/>
</cac:SellersItemIdentification>
<t t-foreach="item_vals.get('classified_tax_category_vals', [])" t-as="foreach_vals">
<cac:ClassifiedTaxCategory>
<t t-call="{{TaxCategoryType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:ClassifiedTaxCategory>
</t>
</cac:Item>
<cac:Price>
<t t-set="vals" t-value="vals.get('price_vals', {})"/>
<cbc:PriceAmount
t-att-currencyID="vals['currency'].name"
t-esc="format_float(vals.get('price_amount'), vals.get('product_price_dp'))"/>
<!-- nbr of item units to which the price applies), i.e.: 1 Dozen = 12 units, not mandatory -->
<cbc:BaseQuantity
t-att="vals.get('base_quantity_attrs', {})"
t-esc="vals.get('base_quantity')"/>
</cac:Price>
</t>
</template>
<template id="ubl_20_InvoiceType">
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:UBLVersionID t-esc="vals.get('ubl_version_id')"/>
<cbc:CustomizationID t-esc="vals.get('customization_id')"/>
<cbc:ProfileID t-esc="vals.get('profile_id')"/>
<cbc:ID t-esc="vals.get('id')"/>
<cbc:IssueDate t-esc="vals.get('issue_date')"/>
<cbc:InvoiceTypeCode
t-if="invoice.move_type == 'out_invoice'"
t-att="vals.get('invoice_type_code_attrs', {})"
t-esc="vals.get('invoice_type_code')"
/>
<t t-foreach="vals.get('note_vals', [])" t-as="note">
<cbc:Note t-esc="note"/>
</t>
<cbc:DocumentCurrencyCode
t-att="vals.get('document_currency_code_attrs', {})"
t-esc="invoice.currency_id.name.upper()"/>
<t t-foreach="vals.get('invoice_period_vals_list', [])" t-as="foreach_vals">
<cac:InvoicePeriod>
<cbc:StartDate t-esc="foreach_vals.get('start_date')"/>
<cbc:EndDate t-esc="foreach_vals.get('end_date')"/>
</cac:InvoicePeriod>
</t>
<cac:OrderReference>
<cbc:ID t-esc="vals.get('order_reference')"/>
<cbc:SalesOrderID t-esc="vals.get('sales_order_id')"/>
</cac:OrderReference>
<cac:BillingReference t-if="vals.get('billing_reference_vals')">
<cac:InvoiceDocumentReference>
<cbc:ID t-esc="vals['billing_reference_vals'].get('id')"/>
<cbc:IssueDate t-esc="vals['billing_reference_vals'].get('issue_date')"/>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
<cac:AccountingSupplierParty>
<t t-set="accounting_supplier_vals" t-value="vals.get('accounting_supplier_party_vals', {})"/>
<cac:Party>
<t t-call="{{PartyType_template}}">
<t t-set="vals" t-value="accounting_supplier_vals.get('party_vals', {})"/>
</t>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<t t-set="accounting_customer_vals" t-value="vals.get('accounting_customer_party_vals', {})"/>
<cac:Party>
<t t-call="{{PartyType_template}}">
<t t-set="vals" t-value="accounting_customer_vals.get('party_vals', {})"/>
</t>
</cac:Party>
</cac:AccountingCustomerParty>
<t id="delivery_foreach" t-foreach="vals.get('delivery_vals_list', [])" t-as="foreach_vals">
<cac:Delivery>
<cbc:ActualDeliveryDate t-esc="foreach_vals.get('actual_delivery_date')"/>
<cac:DeliveryLocation>
<cac:Address>
<t t-call="{{AddressType_template}}">
<t t-set="vals"
t-value="foreach_vals.get('delivery_location_vals', {}).get('delivery_address_vals', {})"/>
</t>
</cac:Address>
</cac:DeliveryLocation>
</cac:Delivery>
</t>
<!-- In UBL 2.0 PaymentMeans is only present for Invoice
while in UBL 2.1, it is present for Invoice and CreditNote
http://www.datypic.com/sc/ubl20/e-ns19_Invoice.html
http://www.datypic.com/sc/ubl20/e-ns14_CreditNote.html -->
<t t-if="invoice.move_type == 'out_invoice'">
<t t-foreach="vals.get('payment_means_vals_list', [])" t-as="foreach_vals">
<cac:PaymentMeans>
<t t-call="{{PaymentMeansType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:PaymentMeans>
</t>
</t>
<t t-foreach="vals.get('payment_terms_vals', [])" t-as="foreach_vals">
<cac:PaymentTerms>
<t t-foreach="foreach_vals.get('note_vals', [])" t-as="note">
<cbc:Note t-esc="note"/>
</t>
</cac:PaymentTerms>
</t>
<t t-foreach="vals.get('allowance_charge_vals', [])" t-as="foreach_vals">
<cac:AllowanceCharge>
<t t-call="{{AllowanceChargeType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:AllowanceCharge>
</t>
<t t-foreach="vals.get('tax_total_vals', [])" t-as="foreach_vals">
<cac:TaxTotal>
<t t-call="{{TaxTotalType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:TaxTotal>
</t>
<cac:LegalMonetaryTotal>
<t t-set="monetary_tot_vals" t-value="vals.get('legal_monetary_total_vals', {})"/>
<cbc:LineExtensionAmount
t-att-currencyID="monetary_tot_vals['currency'].name"
t-esc="format_float(monetary_tot_vals.get('line_extension_amount'), monetary_tot_vals.get('currency_dp'))"/>
<cbc:TaxExclusiveAmount
t-att-currencyID="monetary_tot_vals['currency'].name"
t-esc="format_float(monetary_tot_vals.get('tax_exclusive_amount'), monetary_tot_vals.get('currency_dp'))"/>
<cbc:TaxInclusiveAmount
t-att-currencyID="monetary_tot_vals['currency'].name"
t-esc="format_float(monetary_tot_vals.get('tax_inclusive_amount'), monetary_tot_vals.get('currency_dp'))"/>
<cbc:AllowanceTotalAmount
t-att-currencyID="monetary_tot_vals['currency'].name"
t-esc="format_float(monetary_tot_vals.get('allowance_total_amount'), monetary_tot_vals.get('currency_dp'))"/>
<cbc:PrepaidAmount
t-att-currencyID="monetary_tot_vals['currency'].name"
t-esc="format_float(monetary_tot_vals.get('prepaid_amount'), monetary_tot_vals.get('currency_dp'))"/>
<cbc:PayableAmount
t-att-currencyID="monetary_tot_vals['currency'].name"
t-esc="format_float(monetary_tot_vals.get('payable_amount'), monetary_tot_vals.get('currency_dp'))"/>
</cac:LegalMonetaryTotal>
<t t-foreach="vals.get('invoice_line_vals', [])" t-as="foreach_vals">
<cac:InvoiceLine t-if="invoice.move_type == 'out_invoice'">
<t t-call="{{InvoiceLineType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:InvoiceLine>
<cac:CreditNoteLine t-if="invoice.move_type == 'out_refund'">
<t t-call="{{InvoiceLineType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:CreditNoteLine>
</t>
</t>
</template>
<template id="ubl_20_Invoice">
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<t t-call="{{InvoiceType_template}}"/>
</Invoice>
</template>
<template id="ubl_20_CreditNote">
<CreditNote xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<t t-call="{{InvoiceType_template}}"/>
</CreditNote>
</template>
</flectra>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<template id="ubl_21_InvoiceLineType" inherit_id="account_edi_ubl_cii.ubl_20_InvoiceLineType" primary="True">
<xpath expr="//*[local-name()='Item']" position="before">
<t t-if="invoice.move_type == 'out_refund'">
<!-- AllowanceCharge and TaxTotal are swapped in the CreditLine
w.r.t InvoiceLine. see: http://www.datypic.com/sc/ubl21/e-cac_InvoiceLine.html
vs http://www.datypic.com/sc/ubl21/e-cac_CreditNoteLine.html-->
<t t-foreach="vals.get('allowance_charge_vals', [])" t-as="foreach_vals">
<cac:AllowanceCharge
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<t t-call="{{AllowanceChargeType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:AllowanceCharge>
</t>
</t>
</xpath>
</template>
<template id="ubl_21_InvoiceType" inherit_id="account_edi_ubl_cii.ubl_20_InvoiceType" primary="True">
<xpath expr="//*[local-name()='IssueDate']" position="after">
<cbc:DueDate
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
t-if="invoice.move_type == 'out_invoice'"
t-esc="vals.get('due_date')"/>
<cbc:CreditNoteTypeCode
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
t-if="invoice.move_type == 'out_refund'"
t-att="vals.get('invoice_type_code_attrs', {})"
t-esc="vals.get('credit_note_type_code')"
/>
</xpath>
<xpath expr="//*[local-name()='DocumentCurrencyCode']" position="after">
<cbc:BuyerReference
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
t-esc="vals.get('buyer_reference')"/>
</xpath>
<xpath expr="//*[@id='delivery_foreach']" position="after">
<t t-if="invoice.move_type == 'out_refund'">
<t t-foreach="vals.get('payment_means_vals_list', [])" t-as="foreach_vals">
<cac:PaymentMeans
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<t t-call="{{PaymentMeansType_template}}">
<t t-set="vals" t-value="foreach_vals"/>
</t>
</cac:PaymentMeans>
</t>
</t>
</xpath>
</template>
</flectra>

View File

@@ -0,0 +1,436 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_edi_ubl_cii
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-15 09:16+0000\n"
"PO-Revision-Date: 2022-06-15 09:16+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "1.0"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_facturx_export_22
msgid "42"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_line_facturx_export_22
msgid "95"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "<strong>Format used to import the invoice: %s</strong>"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid ""
"<strong>Format used to import the invoice: %s</strong> <p><li> %s </li></p>"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "A payment of %s was detected."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Articles 226 items 11 to 15 Directive 2006/112/EN"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "At least one of the following fields %s is required on %s."
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_ubl_de
msgid "BIS3 DE (XRechnung)"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_common
msgid ""
"Common functions for EDI documents: generate the data, the constraints, etc"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "ConformanceLevel"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py:0
#, python-format
msgid ""
"Could not retrieve currency: %s. Did you enable the multicurrency option and"
" activate the currency ?"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py:0
#, python-format
msgid "Could not retrieve the %s."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Could not retrieve the tax: %s %% for line '%s'."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Could not retrieve the unit of measure for line with label '%s'."
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "DocumentFileName"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "DocumentType"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Down Payment"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Down Payments"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_ubl_efff
msgid "E-FFF (BE)"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_format
msgid "EDI format"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "EN 16931"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid "Each invoice line shall have one and only one tax."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Each invoice line should have at least one tax."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_format.py:0
#, python-format
msgid ""
"Errors occured while creating the EDI document (format: %s). The receiver "
"might refuse it."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Export outside the EU"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "Factur-X PDFA Extension Schema"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_cii
msgid "Factur-x/XRechnung CII 2.2.0"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid ""
"For intracommunity supply, the actual delivery date or the invoicing period "
"should be included."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid "For intracommunity supply, the delivery address should be included."
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "INVOICE"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Intra-Community supply"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "Invoice generated by Odoo"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid "No Electronic Address Scheme (EAS) could be found for %s."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid ""
"No gross price, net price nor line subtotal amount found for line in xml"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "Odoo"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Output VAT, reduced rate, low"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Output VAT, reduced rate, middle"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Output VAT, reduced rate, raw fish"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Output VAT, regular rate"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_ir_actions_report
msgid "Report Action"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "Tax '%s' is invalid: %s"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_ubl_nl
msgid "SI-UBL 2.0 (NLCIUS)"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "Text"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid ""
"The VAT number of the supplier does not seem to be valid. It should be of "
"the form: NO179728982MVA."
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "The actual version of the Factur-X XML schema"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "The conformance level of the embedded Factur-X data"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py:0
#, python-format
msgid "The currency '%s' is not active."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid "The customer %s must have a KVK or OIN number."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "The element %s is required on %s."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_common.py:0
#, python-format
msgid "The field %s is required on %s."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#, python-format
msgid ""
"The field 'Sanitized Account Number' is required on the Recipient Bank."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py:0
#, python-format
msgid ""
"The invoice has been converted into a credit note and the quantities have "
"been reverted."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid "The supplier %s must have a Bronnoysund company registry."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_bis3.py:0
#, python-format
msgid "The supplier %s must have a KVK or OIN number."
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_ubl_20
msgid "UBL 2.0"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_ubl_21
msgid "UBL 2.1"
msgstr ""
#. module: account_edi_ubl_cii
#: model:ir.model,name:account_edi_ubl_cii.model_account_edi_xml_ubl_bis3
msgid "UBL BIS Billing 3.0.12"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_facturx_export_22
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_line_facturx_export_22
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.ubl_20_TaxCategoryType
msgid "VAT"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "Version"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#, python-format
msgid ""
"When the Canary Island General Indirect Tax (IGIC) applies, the tax rate on "
"each invoice line should be greater than 0."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#, python-format
msgid ""
"You should include at least one tax per invoice line. [BR-CO-04]-Each "
"Invoice line (BG-25) shall be categorized with an Invoiced item VAT category"
" code (BT-151)."
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py:0
#, python-format
msgid "customer"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "external"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "factur-x.xml"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_line_facturx_export_22
msgid "false"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "fx"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "name of the embedded XML invoice file"
msgstr ""
#. module: account_edi_ubl_cii
#: model_terms:ir.ui.view,arch_db:account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata
msgid "urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#"
msgstr ""
#. module: account_edi_ubl_cii
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py:0
#: code:addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py:0
#, python-format
msgid "vendor"
msgstr ""

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from . import account_edi_common
from . import account_edi_format
from . import account_edi_xml_cii_facturx
from . import account_edi_xml_ubl_20
from . import account_edi_xml_ubl_21
from . import account_edi_xml_ubl_bis3
from . import account_edi_xml_ubl_xrechnung
from . import account_edi_xml_ubl_efff
from . import ir_actions_report

View File

@@ -0,0 +1,739 @@
# -*- coding: utf-8 -*-
from flectra import _, models
from flectra.tools import float_repr
from flectra.tests.common import Form
from flectra.exceptions import UserError, ValidationError
from flectra.tools.float_utils import float_round
from flectra.tools.misc import formatLang
from zeep import Client
# -------------------------------------------------------------------------
# UNIT OF MEASURE
# -------------------------------------------------------------------------
UOM_TO_UNECE_CODE = {
'uom.product_uom_unit': 'C62',
'uom.product_uom_dozen': 'DZN',
'uom.product_uom_kgm': 'KGM',
'uom.product_uom_gram': 'GRM',
'uom.product_uom_day': 'DAY',
'uom.product_uom_hour': 'HUR',
'uom.product_uom_ton': 'TNE',
'uom.product_uom_meter': 'MTR',
'uom.product_uom_km': 'KTM',
'uom.product_uom_cm': 'CMT',
'uom.product_uom_litre': 'LTR',
'uom.product_uom_cubic_meter': 'MTQ',
'uom.product_uom_lb': 'LBR',
'uom.product_uom_oz': 'ONZ',
'uom.product_uom_inch': 'INH',
'uom.product_uom_foot': 'FOT',
'uom.product_uom_mile': 'SMI',
'uom.product_uom_floz': 'OZA',
'uom.product_uom_qt': 'QT',
'uom.product_uom_gal': 'GLL',
'uom.product_uom_cubic_inch': 'INQ',
'uom.product_uom_cubic_foot': 'FTQ',
}
# -------------------------------------------------------------------------
# ELECTRONIC ADDRESS SCHEME (EAS), see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
# -------------------------------------------------------------------------
COUNTRY_EAS = {
'HU': 9910,
'AT': 9915,
'ES': 9920,
'AD': 9922,
'AL': 9923,
'BA': 9924,
'BE': 9925,
'BG': 9926,
'CH': 9927,
'CY': 9928,
'CZ': 9929,
'DE': 9930,
'DK': '0184',
'EE': 9931,
'GB': 9932,
'GR': 9933,
'HR': 9934,
'IE': 9935,
'IT': '0211',
'LI': 9936,
'LT': 9937,
'LU': 9938,
'LV': 9939,
'MC': 9940,
'ME': 9941,
'MK': 9942,
'MT': 9943,
'NL': 9944,
'PL': 9945,
'PT': 9946,
'RO': 9947,
'RS': 9948,
'SI': 9949,
'SK': 9950,
'SM': 9951,
'TR': 9952,
'VA': 9953,
'SE': 9955,
'FR': 9957,
'NO': '0192',
'SG': '0195',
'AU': '0151',
'FI': '0213',
}
class AccountEdiCommon(models.AbstractModel):
_name = "account.edi.common"
_description = "Common functions for EDI documents: generate the data, the constraints, etc"
# -------------------------------------------------------------------------
# HELPERS
# -------------------------------------------------------------------------
def format_float(self, amount, precision_digits):
if amount is None:
return None
return float_repr(float_round(amount, precision_digits), precision_digits)
def _get_uom_unece_code(self, line):
"""
list of codes: https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/
or https://unece.org/fileadmin/DAM/cefact/recommendations/bkup_htm/add2c.htm (sorted by letter)
"""
xmlid = line.product_uom_id.get_external_id()
if xmlid and line.product_uom_id.id in xmlid:
return UOM_TO_UNECE_CODE.get(xmlid[line.product_uom_id.id], 'C62')
return 'C62'
# -------------------------------------------------------------------------
# TAXES
# -------------------------------------------------------------------------
def _validate_taxes(self, invoice):
""" Validate the structure of the tax repartition lines (invalid structure could lead to unexpected results)
"""
for tax in invoice.invoice_line_ids.tax_ids:
try:
tax._validate_repartition_lines()
except ValidationError as e:
error_msg = _("Tax '%s' is invalid: %s", tax.name, e.args[0]) # args[0] gives the error message
raise ValidationError(error_msg)
def _get_tax_unece_codes(self, invoice, tax):
"""
Source: doc of Peppol (but the CEF norm is also used by factur-x, yet not detailed)
https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-TaxTotal/cac-TaxSubtotal/cac-TaxCategory/cbc-TaxExemptionReasonCode/
https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/
https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
:returns: {
tax_category_code: str,
tax_exemption_reason_code: str,
tax_exemption_reason: str,
}
"""
def create_dict(tax_category_code=None, tax_exemption_reason_code=None, tax_exemption_reason=None):
return {
'tax_category_code': tax_category_code,
'tax_exemption_reason_code': tax_exemption_reason_code,
'tax_exemption_reason': tax_exemption_reason,
}
supplier = invoice.company_id.partner_id.commercial_partner_id
customer = invoice.commercial_partner_id
# add Norway, Iceland, Liechtenstein
european_economic_area = self.env.ref('base.europe').country_ids.mapped('code') + ['NO', 'IS', 'LI']
if customer.country_id.code == 'ES' and customer.zip:
if customer.zip[:2] in ('35', '38'): # Canary
# [BR-IG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT
# exemption reason code (BT-121) or VAT exemption reason text (BT-120).
return create_dict(tax_category_code='L')
if customer.zip[:2] in ('51', '52'):
return create_dict(tax_category_code='M') # Ceuta & Mellila
# see: https://anskaffelser.dev/postaward/g3/spec/current/billing-3.0/norway/#_value_added_tax_norwegian_mva
if customer.country_id.code == 'NO':
if tax.amount == 25:
return create_dict(tax_category_code='S', tax_exemption_reason=_('Output VAT, regular rate'))
if tax.amount == 15:
return create_dict(tax_category_code='S', tax_exemption_reason=_('Output VAT, reduced rate, middle'))
if tax.amount == 11.11:
return create_dict(tax_category_code='S', tax_exemption_reason=_('Output VAT, reduced rate, raw fish'))
if tax.amount == 12:
return create_dict(tax_category_code='S', tax_exemption_reason=_('Output VAT, reduced rate, low'))
if supplier.country_id == customer.country_id:
if not tax or tax.amount == 0:
# in theory, you should indicate the precise law article
return create_dict(tax_category_code='E', tax_exemption_reason=_('Articles 226 items 11 to 15 Directive 2006/112/EN'))
else:
return create_dict(tax_category_code='S') # standard VAT
if supplier.country_id.code in european_economic_area:
if tax.amount != 0:
# otherwise, the validator will complain because G and K code should be used with 0% tax
return create_dict(tax_category_code='S')
if customer.country_id.code not in european_economic_area:
return create_dict(
tax_category_code='G',
tax_exemption_reason_code='VATEX-EU-G',
tax_exemption_reason=_('Export outside the EU'),
)
if customer.country_id.code in european_economic_area:
return create_dict(
tax_category_code='K',
tax_exemption_reason_code='VATEX-EU-IC',
tax_exemption_reason=_('Intra-Community supply'),
)
if tax.amount != 0:
return create_dict(tax_category_code='S')
else:
return create_dict(tax_category_code='E', tax_exemption_reason=_('Articles 226 items 11 to 15 Directive 2006/112/EN'))
def _get_tax_category_list(self, invoice, taxes):
""" Full list: https://unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5305.htm
Subset: https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
:param taxes: account.tax records.
:return: A list of values to fill the TaxCategory foreach template.
"""
res = []
for tax in taxes:
tax_unece_codes = self._get_tax_unece_codes(invoice, tax)
res.append({
'id': tax_unece_codes.get('tax_category_code'),
'percent': tax.amount if tax.amount_type == 'percent' else False,
'name': tax_unece_codes.get('tax_exemption_reason'),
**tax_unece_codes,
})
return res
# -------------------------------------------------------------------------
# CONSTRAINTS
# -------------------------------------------------------------------------
def _check_required_fields(self, record, field_names, custom_warning_message=""):
"""
This function check that a field exists on a record or dictionaries
returns a generic error message if it's not the case or a custom one if specified
"""
if not record:
return custom_warning_message or _("The element %s is required on %s.", record, ', '.join(field_names))
if not isinstance(field_names, list):
field_names = [field_names]
has_values = any(record[field_name] for field_name in field_names)
# field is present
if has_values:
return
# field is not present
if custom_warning_message or isinstance(record, dict):
return custom_warning_message or _("The element %s is required on %s.", record, ', '.join(field_names))
display_field_names = record.fields_get(field_names)
if len(field_names) == 1:
display_field = f"'{display_field_names[field_names[0]]['string']}'"
return _("The field %s is required on %s.", display_field, record.display_name)
else:
display_fields = ', '.join(f"'{display_field_names[x]['string']}'" for x in display_field_names)
return _("At least one of the following fields %s is required on %s.", display_fields, record.display_name)
# -------------------------------------------------------------------------
# COMMON CONSTRAINTS
# -------------------------------------------------------------------------
def _invoice_constraints_common(self, invoice):
# check that there is a tax on each line
for line in invoice.invoice_line_ids.filtered(lambda x: not x.display_type):
if not line.tax_ids:
return {'tax_on_line': _("Each invoice line should have at least one tax.")}
return {}
# -------------------------------------------------------------------------
# Import invoice
# -------------------------------------------------------------------------
def _import_invoice(self, journal, filename, tree, existing_invoice=None):
move_types, qty_factor = self._get_import_document_amount_sign(filename, tree)
if not move_types:
return
if journal.type == 'purchase':
move_type = move_types[0]
elif journal.type == 'sale':
move_type = move_types[1]
else:
return
if existing_invoice and existing_invoice.move_type != move_type:
# with an email alias to create account_move, first the move is created (using alias_defaults, which
# contains move_type = 'out_invoice') then the attachment is decoded, if it represents a credit note,
# the move type needs to be changed to 'out_refund'
types = {move_type, existing_invoice.move_type}
if types == {'out_invoice', 'out_refund'} or types == {'in_invoice', 'in_refund'}:
existing_invoice.move_type = move_type
else:
return
invoice = existing_invoice or self.env['account.move']
invoice_form = Form(invoice.with_context(
account_predictive_bills_disable_prediction=True,
default_move_type=move_type,
default_journal_id=journal.id,
))
invoice_form, logs = self._import_fill_invoice_form(journal, tree, invoice_form, qty_factor)
invoice = invoice_form.save()
if invoice:
if logs:
body = _(
"<strong>Format used to import the invoice: %s</strong> <p><li> %s </li></p>",
str(self._description), "</li><li>".join(logs)
)
else:
body = _("<strong>Format used to import the invoice: %s</strong>", str(self._description))
invoice.with_context(no_new_invoice=True).message_post(body=body)
# === Import the embedded PDF in the xml if some are found ===
attachments = self.env['ir.attachment']
additional_docs = tree.findall('./{*}AdditionalDocumentReference')
for document in additional_docs:
attachment_name = document.find('{*}ID')
attachment_data = document.find('{*}Attachment/{*}EmbeddedDocumentBinaryObject')
if attachment_name is not None \
and attachment_data is not None \
and attachment_data.attrib.get('mimeCode') == 'application/pdf':
text = attachment_data.text
# Normalize the name of the file : some e-fff emitters put the full path of the file
# (Windows or Linux style) and/or the name of the xml instead of the pdf.
# Get only the filename with a pdf extension.
name = attachment_name.text.split('\\')[-1].split('/')[-1].split('.')[0] + '.pdf'
attachment = self.env['ir.attachment'].create({
'name': name,
'res_id': invoice.id,
'res_model': 'account.move',
'datas': text + '=' * (len(text) % 3), # Fix incorrect padding
'type': 'binary',
'mimetype': 'application/pdf',
})
# Upon receiving an email (containing an xml) with a configured alias to create invoice, the xml is
# set as the main_attachment. To be rendered in the form view, the pdf should be the main_attachment.
if invoice.message_main_attachment_id and \
invoice.message_main_attachment_id.name.endswith('.xml') and \
'pdf' not in invoice.message_main_attachment_id.mimetype:
invoice.message_main_attachment_id = attachment
attachments |= attachment
if attachments:
invoice.with_context(no_new_invoice=True).message_post(attachment_ids=attachments.ids)
return invoice
def _import_retrieve_and_fill_partner(self, invoice, name, phone, mail, vat):
""" Retrieve the partner, if no matching partner is found, create it (only if he has a vat and a name)
"""
invoice.partner_id = self.env['account.edi.format']._retrieve_partner(name=name, phone=phone, mail=mail, vat=vat)
if not invoice.partner_id and name and vat:
invoice.partner_id = self.env['res.partner'].create({'name': name, 'email': mail, 'phone': phone})
# an invalid VAT will throw a ValidationError (see 'check_vat' in base_vat)
try:
invoice.partner_id.vat = vat
except ValidationError:
invoice.partner_id.vat = False
def _import_fill_invoice_allowance_charge(self, tree, invoice_form, journal, qty_factor):
logs = []
if '{urn:oasis:names:specification:ubl:schema:xsd' in tree.tag:
is_ubl = True
elif '{urn:un:unece:uncefact:data:standard:' in tree.tag:
is_ubl = False
else:
return
xpath = './{*}AllowanceCharge' if is_ubl else './{*}SupplyChainTradeTransaction/{*}ApplicableHeaderTradeSettlement/{*}SpecifiedTradeAllowanceCharge'
allowance_charge_nodes = tree.findall(xpath)
for allow_el in allowance_charge_nodes:
with invoice_form.invoice_line_ids.new() as invoice_line_form:
invoice_line_form.sequence = 0 # be sure to put these lines above the 'real' invoice lines
charge_factor = -1 # factor is -1 for discount, 1 for charge
if is_ubl:
charge_indicator_node = allow_el.find('./{*}ChargeIndicator')
else:
charge_indicator_node = allow_el.find('./{*}ChargeIndicator/{*}Indicator')
if charge_indicator_node is not None:
charge_factor = -1 if charge_indicator_node.text == 'false' else 1
name = ""
reason_code_node = allow_el.find('./{*}AllowanceChargeReasonCode' if is_ubl else './{*}ReasonCode')
if reason_code_node is not None:
name += reason_code_node.text + " "
reason_node = allow_el.find('./{*}AllowanceChargeReason' if is_ubl else './{*}Reason')
if reason_node is not None:
name += reason_node.text
invoice_line_form.name = name
amount_node = allow_el.find('./{*}Amount' if is_ubl else './{*}ActualAmount')
base_amount_node = allow_el.find('./{*}BaseAmount' if is_ubl else './{*}BasisAmount')
# Since there is no quantity associated for the allowance/charge on document level,
# if we have an invoice with negative amounts, the price was multiplied by -1 and not the quantity
# See the file in test_files: 'base-negative-inv-correction.xml' VS 'base-example.xml' for 'Insurance'
if base_amount_node is not None:
invoice_line_form.price_unit = float(base_amount_node.text) * charge_factor * qty_factor
percent_node = allow_el.find('./{*}MultiplierFactorNumeric' if is_ubl else './{*}CalculationPercent')
if percent_node is not None:
invoice_line_form.quantity = float(percent_node.text) / 100
elif amount_node is not None:
invoice_line_form.price_unit = float(amount_node.text) * charge_factor * qty_factor
invoice_line_form.tax_ids.clear() # clear the default taxes applied to the line
tax_xpath = './{*}TaxCategory/{*}Percent' if is_ubl else './{*}CategoryTradeTax/{*}RateApplicablePercent'
for tax_categ_percent_el in allow_el.findall(tax_xpath):
tax = self.env['account.tax'].search([
('company_id', '=', journal.company_id.id),
('amount', '=', float(tax_categ_percent_el.text)),
('amount_type', '=', 'percent'),
('type_tax_use', '=', journal.type),
], limit=1)
if tax:
invoice_line_form.tax_ids.add(tax)
else:
logs.append(
_("Could not retrieve the tax: %s %% for line '%s'.",
float(tax_categ_percent_el.text),
name)
)
return logs
def _import_fill_invoice_down_payment(self, invoice_form, prepaid_node, qty_factor):
"""
DEPRECATED: removed in master
Creates a down payment line on the invoice at import if prepaid_node (TotalPrepaidAmount in CII,
PrepaidAmount in UBL) exists.
qty_factor -1 if the xml is labelled as an invoice but has negative amounts -> conversion into a credit note
needed, so we need this multiplier. Otherwise, qty_factor is 1.
"""
if prepaid_node is not None and float(prepaid_node.text) != 0:
# create a section
with invoice_form.invoice_line_ids.new() as invoice_line_form:
invoice_line_form.sequence = 998
invoice_line_form.display_type = 'line_section'
invoice_line_form.name = _("Down Payments")
invoice_line_form.price_unit = 0
invoice_line_form.quantity = 0
invoice_line_form.account_id = self.env['account.account']
# create the line with the down payment
with invoice_form.invoice_line_ids.new() as invoice_line_form:
invoice_line_form.sequence = 999
invoice_line_form.name = _("Down Payment")
invoice_line_form.price_unit = float(prepaid_node.text)
invoice_line_form.quantity = qty_factor * -1
invoice_line_form.tax_ids.clear()
def _import_log_prepaid_amount(self, invoice_form, prepaid_node, qty_factor):
"""
Log a message in the chatter at import if prepaid_node (TotalPrepaidAmount in CII, PrepaidAmount in UBL) exists.
"""
prepaid_amount = float(prepaid_node.text) if prepaid_node is not None else 0.0
if not invoice_form.currency_id.is_zero(prepaid_amount):
amount = prepaid_amount * qty_factor
formatted_amount = formatLang(self.env, amount, currency_obj=invoice_form.currency_id)
return [
_("A payment of %s was detected.", formatted_amount)
]
return []
def _import_fill_invoice_line_values(self, tree, xpath_dict, invoice_line_form, qty_factor):
"""
Read the xml invoice, extract the invoice line values, compute the flectra values
to fill an invoice line form: quantity, price_unit, discount, product_uom_id.
The way of computing invoice line is quite complicated:
https://docs.peppol.eu/poacc/billing/3.0/bis/#_calculation_on_line_level (same as in factur-x documentation)
line_net_subtotal = ( gross_unit_price - rebate ) * (billed_qty / basis_qty) - allow_charge_amount
with (UBL | CII):
* net_unit_price = 'Price/PriceAmount' | 'NetPriceProductTradePrice' (mandatory) (BT-146)
* gross_unit_price = 'Price/AllowanceCharge/BaseAmount' | 'GrossPriceProductTradePrice' (optional) (BT-148)
* basis_qty = 'Price/BaseQuantity' | 'BasisQuantity' (optional, either below net_price node or
gross_price node) (BT-149)
* billed_qty = 'InvoicedQuantity' | 'BilledQuantity' (mandatory) (BT-129)
* allow_charge_amount = sum of 'AllowanceCharge' | 'SpecifiedTradeAllowanceCharge' (same level as Price)
ON THE LINE level (optional) (BT-136 / BT-141)
* line_net_subtotal = 'LineExtensionAmount' | 'LineTotalAmount' (mandatory) (BT-131)
* rebate = 'Price/AllowanceCharge' | 'AppliedTradeAllowanceCharge' below gross_price node ! (BT-147)
"item price discount" which is different from the usual allow_charge_amount
gross_unit_price (BT-148) - rebate (BT-147) = net_unit_price (BT-146)
In Flectra, we obtain:
(1) = price_unit = gross_price_unit / basis_qty = (net_price_unit + rebate) / basis_qty
(2) = quantity = billed_qty
(3) = discount (converted into a percentage) = 100 * (1 - price_subtotal / (billed_qty * price_unit))
(4) = price_subtotal
Alternatively, we could also set: quantity = billed_qty/basis_qty
WARNING, the basis quantity parameter is annoying, for instance, an invoice with a line:
item A | price per unit of measure/unit price: 30 | uom = 3 pieces | billed qty = 3 | rebate = 2 | untaxed total = 28
Indeed, 30 $ / 3 pieces = 10 $ / piece => 10 * 3 (billed quantity) - 2 (rebate) = 28
UBL ROUNDING: "the result of Item line net
amount = ((Item net price (BT-146)÷Item price base quantity (BT-149))×(Invoiced Quantity (BT-129))
must be rounded to two decimals, and the allowance/charge amounts are also rounded separately."
It is not possible to do it in Flectra.
:params tree
:params xpath_dict dict: {
'basis_qty': list of str,
'gross_price_unit': str,
'rebate': str,
'net_price_unit': str,
'billed_qty': str,
'allowance_charge': str, to be used in a findall !,
'allowance_charge_indicator': str, relative xpath from allowance_charge,
'allowance_charge_amount': str, relative xpath from allowance_charge,
'line_total_amount': str,
}
:params: invoice_line_form
:params: qty_factor
:returns: {
'quantity': float,
'product_uom_id': (optional) uom.uom,
'price_unit': float,
'discount': float,
}
"""
# basis_qty (optional)
basis_qty = 1
for xpath in xpath_dict['basis_qty']:
basis_quantity_node = tree.find(xpath)
if basis_quantity_node is not None:
basis_qty = float(basis_quantity_node.text)
# gross_price_unit (optional)
gross_price_unit = None
gross_price_unit_node = tree.find(xpath_dict['gross_price_unit'])
if gross_price_unit_node is not None:
gross_price_unit = float(gross_price_unit_node.text)
# rebate (optional)
# Discount. /!\ as no percent discount can be set on a line, need to infer the percentage
# from the amount of the actual amount of the discount (the allowance charge)
rebate = 0
rebate_node = tree.find(xpath_dict['rebate'])
net_price_unit_node = tree.find(xpath_dict['net_price_unit'])
if rebate_node is not None:
rebate = float(rebate_node.text)
elif net_price_unit_node is not None and gross_price_unit_node is not None:
rebate = float(gross_price_unit_node.text) - float(net_price_unit_node.text)
# net_price_unit (mandatory)
net_price_unit = None
if net_price_unit_node is not None:
net_price_unit = float(net_price_unit_node.text)
# billed_qty (mandatory)
billed_qty = 1
product_uom_id = None
quantity_node = tree.find(xpath_dict['billed_qty'])
if quantity_node is not None:
billed_qty = float(quantity_node.text)
uom_xml = quantity_node.attrib.get('unitCode')
if uom_xml:
uom_infered_xmlid = [
flectra_xmlid for flectra_xmlid, uom_unece in UOM_TO_UNECE_CODE.items() if uom_unece == uom_xml
]
if uom_infered_xmlid:
product_uom_id = self.env.ref(uom_infered_xmlid[0], raise_if_not_found=False)
# allow_charge_amount
fixed_taxes_list = []
allow_charge_amount = 0 # if positive: it's a discount, if negative: it's a charge
allow_charge_nodes = tree.findall(xpath_dict['allowance_charge'])
for allow_charge_el in allow_charge_nodes:
charge_indicator = allow_charge_el.find(xpath_dict['allowance_charge_indicator'])
if charge_indicator.text and charge_indicator.text.lower() == 'false':
discount_factor = 1 # it's a discount
else:
discount_factor = -1 # it's a charge
amount = allow_charge_el.find(xpath_dict['allowance_charge_amount'])
reason_code = allow_charge_el.find(xpath_dict['allowance_charge_reason_code'])
reason = allow_charge_el.find(xpath_dict['allowance_charge_reason'])
if amount is not None:
if reason_code is not None and reason_code.text == 'AEO' and reason is not None:
# Handle Fixed Taxes: when exporting from Flectra, we use the allowance_charge node
fixed_taxes_list.append({
'tax_name': reason.text,
'tax_amount': float(amount.text),
})
else:
allow_charge_amount += float(amount.text) * discount_factor
# line_net_subtotal (mandatory)
price_subtotal = None
line_total_amount_node = tree.find(xpath_dict['line_total_amount'])
if line_total_amount_node is not None:
price_subtotal = float(line_total_amount_node.text)
####################################################
# Setting the values on the invoice_line_form
####################################################
# quantity
quantity = billed_qty * qty_factor
# price_unit
if gross_price_unit is not None:
price_unit = gross_price_unit / basis_qty
elif net_price_unit is not None:
price_unit = (net_price_unit + rebate) / basis_qty
elif price_subtotal is not None:
price_unit = (price_subtotal + allow_charge_amount) / billed_qty
else:
raise UserError(_("No gross price, net price nor line subtotal amount found for line in xml"))
# discount
discount = 0
amount_fixed_taxes = sum(d['tax_amount'] for d in fixed_taxes_list)
if billed_qty * price_unit != 0 and price_subtotal is not None:
discount = 100 * (1 - (price_subtotal - amount_fixed_taxes) / (billed_qty * price_unit))
# Sometimes, the xml received is very bad: unit price = 0, qty = 1, but price_subtotal = -200
# for instance, when filling a down payment as an invoice line. The equation in the docstring is not
# respected, and the result will not be correct, so we just follow the simple rule below:
if net_price_unit == 0 and price_subtotal != net_price_unit * (billed_qty / basis_qty) - allow_charge_amount:
price_unit = price_subtotal / (billed_qty or 1)
return {
'quantity': quantity,
'price_unit': price_unit,
'discount': discount,
'product_uom_id': product_uom_id,
'fixed_taxes_list': fixed_taxes_list,
}
def _import_retrieve_fixed_tax(self, invoice_line_form, fixed_tax_vals):
""" Retrieve the fixed tax at import, iteratively search for a tax:
1. not price_include matching the name and the amount
2. not price_include matching the amount
3. price_include matching the name and the amount
4. price_include matching the amount
"""
base_domain = [
('company_id', '=', invoice_line_form.company_id.id),
('amount_type', '=', 'fixed'),
('amount', '=', fixed_tax_vals['tax_amount']),
]
for price_include in (False, True):
for name in (fixed_tax_vals['tax_name'], False):
domain = base_domain + [('price_include', '=', price_include)]
if name:
domain.append(('name', '=', name))
tax = self.env['account.tax'].search(domain, limit=1)
if tax:
return tax
return self.env['account.tax']
def _import_fill_invoice_line_taxes(self, journal, tax_nodes, invoice_line_form, inv_line_vals, logs):
# Taxes: all amounts are tax excluded, so first try to fetch price_include=False taxes,
# if no results, try to fetch the price_include=True taxes. If results, need to adapt the price_unit.
inv_line_vals['taxes'] = []
for tax_node in tax_nodes:
amount = float(tax_node.text)
domain = [
('company_id', '=', journal.company_id.id),
('amount_type', '=', 'percent'),
('type_tax_use', '=', journal.type),
('amount', '=', amount),
]
tax_excl = self.env['account.tax'].search(domain + [('price_include', '=', False)], limit=1)
tax_incl = self.env['account.tax'].search(domain + [('price_include', '=', True)], limit=1)
if tax_excl:
inv_line_vals['taxes'].append(tax_excl)
elif tax_incl:
inv_line_vals['taxes'].append(tax_incl)
inv_line_vals['price_unit'] *= (1 + tax_incl.amount / 100)
else:
logs.append(_("Could not retrieve the tax: %s %% for line '%s'.", amount, invoice_line_form.name))
# Handle Fixed Taxes
for fixed_tax_vals in inv_line_vals['fixed_taxes_list']:
tax = self._import_retrieve_fixed_tax(invoice_line_form, fixed_tax_vals)
if not tax:
# Nothing found: fix the price_unit s.t. line subtotal is matching the original invoice
inv_line_vals['price_unit'] += fixed_tax_vals['tax_amount']
elif tax.price_include:
inv_line_vals['taxes'].append(tax)
inv_line_vals['price_unit'] += tax.amount
else:
inv_line_vals['taxes'].append(tax)
# Set the values on the line_form
invoice_line_form.quantity = inv_line_vals['quantity']
if inv_line_vals.get('product_uom_id'):
invoice_line_form.product_uom_id = inv_line_vals['product_uom_id']
else:
logs.append(
_("Could not retrieve the unit of measure for line with label '%s'.", invoice_line_form.name))
invoice_line_form.price_unit = inv_line_vals['price_unit']
invoice_line_form.discount = inv_line_vals['discount']
invoice_line_form.tax_ids.clear()
for tax in inv_line_vals['taxes']:
invoice_line_form.tax_ids.add(tax)
return logs
# -------------------------------------------------------------------------
# Check xml using the free API from Ph. Helger, don't abuse it !
# -------------------------------------------------------------------------
def _check_xml_ecosio(self, invoice, xml_content, ecosio_formats):
# see https://peppol.helger.com/public/locale-en_US/menuitem-validation-ws2
if not ecosio_formats:
return
soap_client = Client('https://peppol.helger.com/wsdvs?wsdl')
if invoice.move_type == 'out_invoice':
ecosio_format = ecosio_formats['invoice']
elif invoice.move_type == 'out_refund':
ecosio_format = ecosio_formats['credit_note']
else:
invoice.with_context(no_new_invoice=True).message_post(
body="ECOSIO: could not validate xml, formats only exist for invoice or credit notes"
)
return
if not ecosio_format:
return
response = soap_client.service.validate(xml_content, ecosio_format)
report = []
errors_cnt = 0
for item in response['Result']:
if item['artifactPath']:
report.append(
"<li><font style='color:Blue;'><strong>" + item['artifactPath'] + "</strong></font></li>")
for detail in item['Item']:
if detail['errorLevel'] == 'WARN':
errors_cnt += 1
report.append(
"<li><font style='color:Orange;'><strong>" + detail['errorText'] + "</strong></font></li>")
elif detail['errorLevel'] == 'ERROR':
errors_cnt += 1
report.append(
"<li><font style='color:Tomato;'><strong>" + detail['errorText'] + "</strong></font></li>")
if errors_cnt == 0:
invoice.with_context(no_new_invoice=True).message_post(
body=f"<font style='color:Green;'><strong>ECOSIO: All clear for format {ecosio_format}!</strong></font>"
)
else:
invoice.with_context(no_new_invoice=True).message_post(
body=f"<font style='color:Tomato;'><strong>ECOSIO ERRORS/WARNINGS for format {ecosio_format}</strong></font>: <ul> "
+ "\n".join(report) + " </ul>"
)
return response

View File

@@ -0,0 +1,205 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from flectra import models, fields, _
from flectra.tools import str2bool
from flectra.addons.account_edi_ubl_cii.models.account_edi_common import COUNTRY_EAS
import logging
_logger = logging.getLogger(__name__)
FORMAT_CODES = [
'facturx_1_0_05',
'ubl_bis3',
'ubl_de',
'nlcius_1',
'efff_1',
'ubl_2_1',
'ehf_3',
]
class AccountEdiFormat(models.Model):
_inherit = 'account.edi.format'
####################################################
# Helpers
####################################################
def _infer_xml_builder_from_tree(self, tree):
self.ensure_one()
ubl_version = tree.find('{*}UBLVersionID')
customization_id = tree.find('{*}CustomizationID')
if tree.tag == '{urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100}CrossIndustryInvoice':
return self.env['account.edi.xml.cii']
if ubl_version is not None:
if ubl_version.text == '2.0':
return self.env['account.edi.xml.ubl_20']
if ubl_version.text in ('2.1', '2.2', '2.3'):
return self.env['account.edi.xml.ubl_21']
if customization_id is not None:
if 'xrechnung' in customization_id.text:
return self.env['account.edi.xml.ubl_de']
if customization_id.text == 'urn:cen.eu:en16931:2017#compliant#urn:fdc:nen.nl:nlcius:v1.0':
return self.env['account.edi.xml.ubl_nl']
# Allow to parse any format derived from the european semantic norm EN16931
if 'urn:cen.eu:en16931:2017' in customization_id.text:
return self.env['account.edi.xml.ubl_bis3']
return
def _get_xml_builder(self, company):
# see https://communaute.chorus-pro.gouv.fr/wp-content/uploads/2017/08/20170630_Solution-portail_Dossier_Specifications_Fournisseurs_Chorus_Facture_V.1.pdf
# page 45 -> ubl 2.1 for France seems also supported
if self.code == 'facturx_1_0_05':
return self.env['account.edi.xml.cii']
# if the company's country is not in the EAS mapping, nothing is generated
if self.code == 'ubl_bis3' and company.country_id.code in COUNTRY_EAS:
return self.env['account.edi.xml.ubl_bis3']
# the EDI option will only appear on the journal of german companies
if self.code == 'ubl_de' and company.country_id.code == 'DE':
return self.env['account.edi.xml.ubl_de']
# the EDI option will only appear on the journal of belgian companies
if self.code == 'efff_1' and company.country_id.code == 'BE':
return self.env['account.edi.xml.ubl_efff']
def _is_ubl_cii_available(self, company):
"""
Returns a boolean indicating whether it is possible to generate an xml file using one of the formats from this
module or not
"""
return self._get_xml_builder(company) is not None
####################################################
# Export: Account.edi.format override
####################################################
def _is_required_for_invoice(self, invoice):
# EXTENDS account_edi
self.ensure_one()
if self.code not in FORMAT_CODES:
return super()._is_required_for_invoice(invoice)
return self._is_ubl_cii_available(invoice.company_id) and invoice.move_type in ('out_invoice', 'out_refund')
def _is_compatible_with_journal(self, journal):
# EXTENDS account_edi
# the formats appear on the journal only if they are compatible (e.g. NLCIUS only appear for dutch companies)
self.ensure_one()
if self.code not in FORMAT_CODES:
return super()._is_compatible_with_journal(journal)
return self._is_ubl_cii_available(journal.company_id) and journal.type == 'sale'
def _is_enabled_by_default_on_journal(self, journal):
# EXTENDS account_edi
# only facturx is enabled by default, the other formats aren't
self.ensure_one()
if self.code not in FORMAT_CODES:
return super()._is_enabled_by_default_on_journal(journal)
return self.code == 'facturx_1_0_05'
def _post_invoice_edi(self, invoices, test_mode=False):
# EXTENDS account_edi
self.ensure_one()
if self.code not in FORMAT_CODES:
return super()._post_invoice_edi(invoices, test_mode=test_mode)
res = {}
for invoice in invoices:
builder = self._get_xml_builder(invoice.company_id)
# For now, the errors are not displayed anywhere, don't want to annoy the user
xml_content, errors = builder._export_invoice(invoice)
# DEBUG: send directly to the test platform (the one used by ecosio)
#response = self.env['account.edi.common']._check_xml_ecosio(invoice, xml_content, builder._export_invoice_ecosio_schematrons())
attachment_create_vals = {
'name': builder._export_invoice_filename(invoice),
'raw': xml_content,
'mimetype': 'application/xml',
}
# we don't want the Factur-X, E-FFF and NLCIUS xml to appear in the attachment of the invoice when confirming it
# E-FFF and NLCIUS will appear after the pdf is generated, Factur-X will never appear (it's contained in the PDF)
if self.code not in ['facturx_1_0_05', 'efff_1', 'nlcius_1']:
attachment_create_vals.update({'res_id': invoice.id, 'res_model': 'account.move'})
attachment = self.env['ir.attachment'].create(attachment_create_vals)
res[invoice] = {
'success': True,
'attachment': attachment,
}
return res
def _is_embedding_to_invoice_pdf_needed(self):
# EXTENDS account_edi
self.ensure_one()
if self.code == 'facturx_1_0_05':
return True
return super()._is_embedding_to_invoice_pdf_needed()
def _prepare_invoice_report(self, pdf_writer, edi_document):
# EXTENDS account_edi
self.ensure_one()
if self.code != 'facturx_1_0_05':
return super()._prepare_invoice_report(pdf_writer, edi_document)
if not edi_document.attachment_id:
return
pdf_writer.embed_flectra_attachment(edi_document.attachment_id, subtype='text/xml')
if not pdf_writer.is_pdfa and str2bool(
self.env['ir.config_parameter'].sudo().get_param('edi.use_pdfa', 'False')):
try:
pdf_writer.convert_to_pdfa()
except Exception as e:
_logger.exception("Error while converting to PDF/A: %s", e)
metadata_template = self.env.ref('account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata',
raise_if_not_found=False)
if metadata_template:
content = self.env['ir.qweb']._render('account_edi_ubl_cii.account_invoice_pdfa_3_facturx_metadata', {
'title': edi_document.move_id.name,
'date': fields.Date.context_today(self),
})
pdf_writer.add_file_metadata(content)
####################################################
# Import: Account.edi.format override
####################################################
def _create_invoice_from_xml_tree(self, filename, tree, journal=None):
# EXTENDS account_edi
self.ensure_one()
journal = journal or self.env['account.move']._get_default_journal()
if not self._is_ubl_cii_available(journal.company_id):
return super()._create_invoice_from_xml_tree(filename, tree, journal=journal)
# infer the xml builder
invoice_xml_builder = self._infer_xml_builder_from_tree(tree)
if invoice_xml_builder is not None:
invoice = invoice_xml_builder._import_invoice(journal, filename, tree)
if invoice:
return invoice
return super()._create_invoice_from_xml_tree(filename, tree, journal=journal)
def _update_invoice_from_xml_tree(self, filename, tree, invoice):
# EXTENDS account_edi
self.ensure_one()
if not self._is_ubl_cii_available(invoice.company_id):
return super()._update_invoice_from_xml_tree(filename, tree, invoice)
# infer the xml builder
invoice_xml_builder = self._infer_xml_builder_from_tree(tree)
if invoice_xml_builder is not None:
invoice = invoice_xml_builder._import_invoice(invoice.journal_id, filename, tree, invoice)
if invoice:
return invoice
return super()._update_invoice_from_xml_tree(filename, tree, invoice)

View File

@@ -0,0 +1,402 @@
# -*- coding: utf-8 -*-
from flectra import models, _
from flectra.tools import DEFAULT_SERVER_DATE_FORMAT, float_repr, is_html_empty, html2plaintext, cleanup_xml_node
from lxml import etree
from datetime import datetime
import logging
_logger = logging.getLogger(__name__)
DEFAULT_FACTURX_DATE_FORMAT = '%Y%m%d'
class AccountEdiXmlCII(models.AbstractModel):
_name = "account.edi.xml.cii"
_inherit = 'account.edi.common'
_description = "Factur-x/XRechnung CII 2.2.0"
def _export_invoice_filename(self, invoice):
return "factur-x.xml"
def _export_invoice_ecosio_schematrons(self):
return {
'invoice': 'de.xrechnung:cii:2.2.0',
'credit_note': 'de.xrechnung:cii:2.2.0',
}
def _export_invoice_constraints(self, invoice, vals):
constraints = self._invoice_constraints_common(invoice)
constraints.update({
# [BR-08]-An Invoice shall contain the Seller postal address (BG-5).
# [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40).
'seller_postal_address': self._check_required_fields(
vals['record']['company_id']['partner_id']['commercial_partner_id'], 'country_id'
),
# [BR-DE-9] The element "Buyer post code" (BT-53) must be transmitted. (only mandatory in Germany ?)
'buyer_postal_address': self._check_required_fields(
vals['record']['commercial_partner_id'], 'zip'
),
# [BR-DE-4] The element "Seller post code" (BT-38) must be transmitted. (only mandatory in Germany ?)
'seller_post_code': self._check_required_fields(
vals['record']['company_id']['partner_id']['commercial_partner_id'], 'zip'
),
# [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.
'seller_identifier': self._check_required_fields(
vals['record']['company_id'], ['vat'] # 'siret'
),
# [BR-DE-1] An Invoice must contain information on "PAYMENT INSTRUCTIONS" (BG-16)
# first check that a partner_bank_id exists, then check that there is an account number
'seller_payment_instructions_1': self._check_required_fields(
vals['record'], 'partner_bank_id'
),
'seller_payment_instructions_2': self._check_required_fields(
vals['record']['partner_bank_id'], 'sanitized_acc_number',
_("The field 'Sanitized Account Number' is required on the Recipient Bank.")
),
# [BR-DE-6] The element "Seller contact telephone number" (BT-42) must be transmitted.
'seller_phone': self._check_required_fields(
vals['record']['company_id']['partner_id']['commercial_partner_id'], ['phone', 'mobile'],
),
# [BR-DE-7] The element "Seller contact email address" (BT-43) must be transmitted.
'seller_email': self._check_required_fields(
vals['record']['company_id'], 'email'
),
# [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).
'tax_invoice_line': self._check_required_tax(vals),
# [BR-IC-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151)
# is "Intra-community supply" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative
# VAT identifier (BT-63) and the Buyer VAT identifier (BT-48).
'intracom_seller_vat': self._check_required_fields(vals['record']['company_id'], 'vat') if vals['intracom_delivery'] else None,
'intracom_buyer_vat': self._check_required_fields(vals['record']['commercial_partner_id'], 'vat') if vals['intracom_delivery'] else None,
# [BR-IG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the
# invoiced item VAT rate (BT-152) shall be greater than 0 (zero).
'igic_tax_rate': self._check_non_0_rate_tax(vals)
if vals['record']['commercial_partner_id']['country_id']['code'] == 'ES'
and vals['record']['commercial_partner_id']['zip']
and vals['record']['commercial_partner_id']['zip'][:2] in ['35', '38'] else None,
})
return constraints
def _check_required_tax(self, vals):
for line_vals in vals['invoice_line_vals_list']:
line = line_vals['line']
if not vals['tax_details']['invoice_line_tax_details'][line]['tax_details']:
return _("You should include at least one tax per invoice line. [BR-CO-04]-Each Invoice line (BG-25) "
"shall be categorized with an Invoiced item VAT category code (BT-151).")
def _check_non_0_rate_tax(self, vals):
for line_vals in vals['invoice_line_vals_list']:
tax_rate_list = line_vals['line'].tax_ids.flatten_taxes_hierarchy().mapped("amount")
if not any([rate > 0 for rate in tax_rate_list]):
return _("When the Canary Island General Indirect Tax (IGIC) applies, the tax rate on "
"each invoice line should be greater than 0.")
def _get_scheduled_delivery_time(self, invoice):
# don't create a bridge only to get line.sale_line_ids.order_id.picking_ids.date_done
# line.sale_line_ids.order_id.picking_ids.scheduled_date or line.sale_line_ids.order_id.commitment_date
return invoice.invoice_date
def _get_invoicing_period(self, invoice):
# get the Invoicing period (BG-14): a list of dates covered by the invoice
# don't create a bridge to get the date range from the timesheet_ids
return [invoice.invoice_date]
def _get_exchanged_document_vals(self, invoice):
return {
'id': invoice.name,
'type_code': '380' if invoice.move_type == 'out_invoice' else '381',
'issue_date_time': invoice.invoice_date,
'included_note': html2plaintext(invoice.narration) if invoice.narration else "",
}
def _export_invoice_vals(self, invoice):
def format_date(dt):
# Format the date in the Factur-x standard.
dt = dt or datetime.now()
return dt.strftime(DEFAULT_FACTURX_DATE_FORMAT)
def format_monetary(number, decimal_places=2):
# Facturx requires the monetary values to be rounded to 2 decimal values
return float_repr(number, decimal_places)
def grouping_key_generator(tax_values):
tax = tax_values['tax_id']
grouping_key = {
**self._get_tax_unece_codes(invoice, tax),
'amount': tax.amount,
'amount_type': tax.amount_type,
}
# If the tax is fixed, we want to have one group per tax
# s.t. when the invoice is imported, we can try to guess the fixed taxes
if tax.amount_type == 'fixed':
grouping_key['tax_name'] = tax.name
return grouping_key
# Validate the structure of the taxes
self._validate_taxes(invoice)
# Create file content.
tax_details = invoice._prepare_edi_tax_details(grouping_key_generator=grouping_key_generator)
# Fixed Taxes: filter them on the document level, and adapt the totals
# Fixed taxes are not supposed to be taxes in real live. However, this is the way in Flectra to manage recupel
# taxes in Belgium. Since only one tax is allowed, the fixed tax is removed from totals of lines but added
# as an extra charge/allowance.
fixed_taxes_keys = [k for k in tax_details['tax_details'] if k['amount_type'] == 'fixed']
for key in fixed_taxes_keys:
fixed_tax_details = tax_details['tax_details'].pop(key)
tax_details['tax_amount_currency'] -= fixed_tax_details['tax_amount_currency']
tax_details['tax_amount'] -= fixed_tax_details['tax_amount']
tax_details['base_amount_currency'] += fixed_tax_details['tax_amount_currency']
tax_details['base_amount'] += fixed_tax_details['tax_amount']
if 'siret' in invoice.company_id._fields and invoice.company_id.siret:
seller_siret = invoice.company_id.siret
else:
seller_siret = invoice.company_id.company_registry
buyer_siret = False
if 'siret' in invoice.commercial_partner_id._fields and invoice.commercial_partner_id.siret:
buyer_siret = invoice.commercial_partner_id.siret
template_values = {
**invoice._prepare_edi_vals_to_export(),
'tax_details': tax_details,
'format_date': format_date,
'format_monetary': format_monetary,
'is_html_empty': is_html_empty,
'scheduled_delivery_time': self._get_scheduled_delivery_time(invoice),
'intracom_delivery': False,
'ExchangedDocument_vals': self._get_exchanged_document_vals(invoice),
'seller_specified_legal_organization': seller_siret,
'buyer_specified_legal_organization': buyer_siret,
'ship_to_trade_party': invoice.partner_shipping_id if 'partner_shipping_id' in invoice._fields and invoice.partner_shipping_id
else invoice.commercial_partner_id,
# Chorus Pro fields
'buyer_reference': invoice.buyer_reference if 'buyer_reference' in invoice._fields
and invoice.buyer_reference else invoice.commercial_partner_id.ref,
'purchase_order_reference': invoice.purchase_order_reference if 'purchase_order_reference' in invoice._fields
and invoice.purchase_order_reference else invoice.ref or invoice.name,
'contract_reference': invoice.contract_reference if 'contract_reference' in invoice._fields
and invoice.contract_reference else '',
}
# data used for IncludedSupplyChainTradeLineItem / SpecifiedLineTradeSettlement
for line_vals in template_values['invoice_line_vals_list']:
line = line_vals['line']
line_vals['unece_uom_code'] = self._get_uom_unece_code(line)
# data used for ApplicableHeaderTradeSettlement / ApplicableTradeTax (at the end of the xml)
for tax_detail_vals in template_values['tax_details']['tax_details'].values():
# /!\ -0.0 == 0.0 in python but not in XSLT, so it can raise a fatal error when validating the XML
# if 0.0 is expected and -0.0 is given.
amount_currency = tax_detail_vals['tax_amount_currency']
tax_detail_vals['calculated_amount'] = template_values['balance_multiplicator'] * amount_currency \
if not invoice.currency_id.is_zero(amount_currency) else 0
if tax_detail_vals.get('tax_category_code') == 'K':
template_values['intracom_delivery'] = True
# [BR - IC - 11] - In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is
# "Intra-community supply" the Actual delivery date (BT-72) or the Invoicing period (BG-14) shall not be blank.
if tax_detail_vals.get('tax_category_code') == 'K' and not template_values['scheduled_delivery_time']:
date_range = self._get_invoicing_period(invoice)
template_values['billing_start'] = min(date_range)
template_values['billing_end'] = max(date_range)
# One of the difference between XRechnung and Facturx is the following. Submitting a Facturx to XRechnung
# validator raises a warning, but submitting a XRechnung to Facturx raises an error.
supplier = invoice.company_id.partner_id.commercial_partner_id
if supplier.country_id.code == 'DE':
template_values['document_context_id'] = "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2"
else:
template_values['document_context_id'] = "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended"
# Fixed taxes: add them as charges on the invoice lines
balance_sign = -1 if invoice.is_inbound() else 1
for line_vals in template_values['invoice_line_vals_list']:
line_vals['allowance_charge_vals_list'] = []
for grouping_key, tax_detail in tax_details['invoice_line_tax_details'][line_vals['line']]['tax_details'].items():
if grouping_key['amount_type'] == 'fixed':
line_vals['allowance_charge_vals_list'].append({
'indicator': 'true',
'reason': tax_detail['group_tax_details'][0]['tax_id'].name,
'reason_code': 'AEO',
'amount': balance_sign * tax_detail['tax_amount_currency'],
})
sum_fixed_taxes = sum(x['amount'] for x in line_vals['allowance_charge_vals_list'])
line_vals['line_total_amount'] = line_vals['line'].price_subtotal + sum_fixed_taxes
# Fixed taxes: set the total adjusted amounts on the document level
template_values['tax_basis_total_amount'] = balance_sign * tax_details['base_amount_currency']
template_values['tax_total_amount'] = balance_sign * tax_details['tax_amount_currency']
return template_values
def _export_invoice(self, invoice):
vals = self._export_invoice_vals(invoice)
errors = [constraint for constraint in self._export_invoice_constraints(invoice, vals).values() if constraint]
xml_content = self.env['ir.qweb']._render('account_edi_ubl_cii.account_invoice_facturx_export_22', vals)
return etree.tostring(cleanup_xml_node(xml_content), xml_declaration=True, encoding='UTF-8'), set(errors)
# -------------------------------------------------------------------------
# IMPORT
# -------------------------------------------------------------------------
def _import_fill_invoice_form(self, journal, tree, invoice_form, qty_factor):
def _find_value(xpath, element=tree):
return self.env['account.edi.format']._find_value(xpath, element, tree.nsmap)
logs = []
if qty_factor == -1:
logs.append(_("The invoice has been converted into a credit note and the quantities have been reverted."))
# ==== partner_id ====
role = invoice_form.journal_id.type == 'purchase' and 'SellerTradeParty' or 'BuyerTradeParty'
name = _find_value(f"//ram:{role}/ram:Name")
mail = _find_value(f"//ram:{role}//ram:URIID[@schemeID='SMTP']")
vat = _find_value(f"//ram:{role}/ram:SpecifiedTaxRegistration/ram:ID")
phone = _find_value(f"//ram:{role}/ram:DefinedTradeContact/ram:TelephoneUniversalCommunication/ram:CompleteNumber")
self._import_retrieve_and_fill_partner(invoice_form, name=name, phone=phone, mail=mail, vat=vat)
# ==== currency_id ====
currency_code_node = tree.find('.//{*}InvoiceCurrencyCode')
if currency_code_node is not None:
currency = self.env['res.currency'].with_context(active_test=False).search([
('name', '=', currency_code_node.text),
], limit=1)
if currency:
if not currency.active:
logs.append(_("The currency '%s' is not active.", currency.name))
invoice_form.currency_id = currency
else:
logs.append(_("Could not retrieve currency: %s. Did you enable the multicurrency option and "
"activate the currency ?", currency_code_node.text))
# ==== Reference ====
ref_node = tree.find('./{*}ExchangedDocument/{*}ID')
if ref_node is not None:
invoice_form.ref = ref_node.text
# === Note/narration ====
narration = ""
note_node = tree.find('./{*}ExchangedDocument/{*}IncludedNote/{*}Content')
if note_node is not None and note_node.text:
narration += note_node.text + "\n"
payment_terms_node = tree.find('.//{*}SpecifiedTradePaymentTerms/{*}Description')
if payment_terms_node is not None and payment_terms_node.text:
narration += payment_terms_node.text + "\n"
invoice_form.narration = narration
# ==== payment_reference ====
payment_reference_node = tree.find('.//{*}BuyerOrderReferencedDocument/{*}IssuerAssignedID')
if payment_reference_node is not None:
invoice_form.payment_reference = payment_reference_node.text
# ==== invoice_date ====
invoice_date_node = tree.find('./{*}ExchangedDocument/{*}IssueDateTime/{*}DateTimeString')
if invoice_date_node is not None and invoice_date_node.text:
date_str = invoice_date_node.text
date_obj = datetime.strptime(date_str, DEFAULT_FACTURX_DATE_FORMAT)
invoice_form.invoice_date = date_obj.strftime(DEFAULT_SERVER_DATE_FORMAT)
# ==== invoice_date_due ====
invoice_date_due_node = tree.find('.//{*}SpecifiedTradePaymentTerms/{*}DueDateDateTime/{*}DateTimeString')
if invoice_date_due_node is not None and invoice_date_due_node.text:
date_str = invoice_date_due_node.text
date_obj = datetime.strptime(date_str, DEFAULT_FACTURX_DATE_FORMAT)
invoice_form.invoice_date_due = date_obj.strftime(DEFAULT_SERVER_DATE_FORMAT)
# ==== invoice_line_ids: AllowanceCharge (document level) ====
logs += self._import_fill_invoice_allowance_charge(tree, invoice_form, journal, qty_factor)
# ==== Prepaid amount ====
prepaid_node = tree.find('.//{*}ApplicableHeaderTradeSettlement/'
'{*}SpecifiedTradeSettlementHeaderMonetarySummation/{*}TotalPrepaidAmount')
logs += self._import_log_prepaid_amount(invoice_form, prepaid_node, qty_factor)
# ==== invoice_line_ids ====
line_nodes = tree.findall('./{*}SupplyChainTradeTransaction/{*}IncludedSupplyChainTradeLineItem')
if line_nodes is not None:
for i, invl_el in enumerate(line_nodes):
with invoice_form.invoice_line_ids.new() as invoice_line_form:
invoice_line_form.sequence = i
invl_logs = self._import_fill_invoice_line_form(journal, invl_el, invoice_form, invoice_line_form, qty_factor)
logs += invl_logs
return invoice_form, logs
def _import_fill_invoice_line_form(self, journal, tree, invoice_form, invoice_line_form, qty_factor):
logs = []
def _find_value(xpath, element=tree):
return self.env['account.edi.format']._find_value(xpath, element, tree.nsmap)
# Product.
name = _find_value('.//ram:SpecifiedTradeProduct/ram:Name', tree)
invoice_line_form.product_id = self.env['account.edi.format']._retrieve_product(
default_code=_find_value('.//ram:SpecifiedTradeProduct/ram:SellerAssignedID', tree),
name=_find_value('.//ram:SpecifiedTradeProduct/ram:Name', tree),
barcode=_find_value('.//ram:SpecifiedTradeProduct/ram:GlobalID', tree)
)
# force original line description instead of the one copied from product's Sales Description
if name:
invoice_line_form.name = name
xpath_dict = {
'basis_qty': [
'./{*}SpecifiedLineTradeAgreement/{*}GrossPriceProductTradePrice/{*}BasisQuantity',
'./{*}SpecifiedLineTradeAgreement/{*}NetPriceProductTradePrice/{*}BasisQuantity'
],
'gross_price_unit': './{*}SpecifiedLineTradeAgreement/{*}GrossPriceProductTradePrice/{*}ChargeAmount',
'rebate': './{*}SpecifiedLineTradeAgreement/{*}GrossPriceProductTradePrice/{*}AppliedTradeAllowanceCharge/{*}ActualAmount',
'net_price_unit': './{*}SpecifiedLineTradeAgreement/{*}NetPriceProductTradePrice/{*}ChargeAmount',
'billed_qty': './{*}SpecifiedLineTradeDelivery/{*}BilledQuantity',
'allowance_charge': './/{*}SpecifiedLineTradeSettlement/{*}SpecifiedTradeAllowanceCharge',
'allowance_charge_indicator': './{*}ChargeIndicator/{*}Indicator',
'allowance_charge_amount': './{*}ActualAmount',
'allowance_charge_reason': './{*}Reason',
'allowance_charge_reason_code': './{*}ReasonCode',
'line_total_amount': './{*}SpecifiedLineTradeSettlement/{*}SpecifiedTradeSettlementLineMonetarySummation/{*}LineTotalAmount',
}
inv_line_vals = self._import_fill_invoice_line_values(tree, xpath_dict, invoice_line_form, qty_factor)
# retrieve tax nodes
tax_nodes = tree.findall('.//{*}ApplicableTradeTax/{*}RateApplicablePercent')
return self._import_fill_invoice_line_taxes(journal, tax_nodes, invoice_line_form, inv_line_vals, logs)
# -------------------------------------------------------------------------
# IMPORT : helpers
# -------------------------------------------------------------------------
def _get_import_document_amount_sign(self, filename, tree):
"""
In factur-x, an invoice has code 380 and a credit note has code 381. However, a credit note can be expressed
as an invoice with negative amounts. For this case, we need a factor to take the opposite of each quantity
in the invoice.
"""
move_type_code = tree.find('.//{*}ExchangedDocument/{*}TypeCode')
if move_type_code is None:
return None, None
if move_type_code.text == '381':
return ('in_refund', 'out_refund'), 1
if move_type_code.text == '380':
amount_node = tree.find('.//{*}SpecifiedTradeSettlementHeaderMonetarySummation/{*}TaxBasisTotalAmount')
if amount_node is not None and float(amount_node.text) < 0:
return ('in_refund', 'out_refund'), -1
return ('in_invoice', 'out_invoice'), 1

View File

@@ -0,0 +1,726 @@
# -*- coding: utf-8 -*-
from flectra import models, _
from flectra.osv import expression
from flectra.tools import html2plaintext, cleanup_xml_node
from lxml import etree
class AccountEdiXmlUBL20(models.AbstractModel):
_name = "account.edi.xml.ubl_20"
_inherit = 'account.edi.common'
_description = "UBL 2.0"
# -------------------------------------------------------------------------
# EXPORT
# -------------------------------------------------------------------------
def _export_invoice_filename(self, invoice):
return f"{invoice.name.replace('/', '_')}_ubl_20.xml"
def _export_invoice_ecosio_schematrons(self):
return {
'invoice': 'org.oasis-open:invoice:2.0',
'credit_note': 'org.oasis-open:creditnote:2.0',
}
def _get_country_vals(self, country):
return {
'country': country,
'identification_code': country.code,
'name': country.name,
}
def _get_partner_party_identification_vals_list(self, partner):
return []
def _get_partner_address_vals(self, partner):
return {
'street_name': partner.street,
'additional_street_name': partner.street2,
'city_name': partner.city,
'postal_zone': partner.zip,
'country_subentity': partner.state_id.name,
'country_subentity_code': partner.state_id.code,
'country_vals': self._get_country_vals(partner.country_id),
}
def _get_partner_party_tax_scheme_vals_list(self, partner, role):
return [{
'registration_name': partner.name,
'company_id': partner.vat,
'registration_address_vals': self._get_partner_address_vals(partner),
'TaxScheme_vals': {},
'tax_scheme_id': 'VAT',
}]
def _get_partner_party_legal_entity_vals_list(self, partner):
commercial_partner = partner.commercial_partner_id
return [{
'commercial_partner': commercial_partner,
'registration_name': commercial_partner.name,
'company_id': commercial_partner.vat,
'registration_address_vals': self._get_partner_address_vals(commercial_partner),
}]
def _get_partner_contact_vals(self, partner):
return {
'id': partner.id,
'name': partner.name,
'telephone': partner.phone or partner.mobile,
'electronic_mail': partner.email,
}
def _get_partner_party_vals(self, partner, role):
return {
'partner': partner,
'party_identification_vals': self._get_partner_party_identification_vals_list(partner),
'party_name_vals': [{'name': partner.name}],
'postal_address_vals': self._get_partner_address_vals(partner),
'party_tax_scheme_vals': self._get_partner_party_tax_scheme_vals_list(partner, role),
'party_legal_entity_vals': self._get_partner_party_legal_entity_vals_list(partner),
'contact_vals': self._get_partner_contact_vals(partner),
}
def _get_invoice_period_vals_list(self, invoice):
"""
For now, we cannot fill this data from an invoice
This corresponds to the 'delivery or invoice period'. For UBL Bis 3, in the case of intra-community supply,
the Actual delivery date (BT-72) or the Invoicing period (BG-14) should be present under the form:
{
'start_date': str,
'end_date': str,
}.
"""
return []
def _get_delivery_vals_list(self, invoice):
# the data is optional, except for ubl bis3 (see the override, where we need to set a default delivery address)
if 'partner_shipping_id' in invoice._fields:
return [{
'actual_delivery_date': None,
'delivery_location_vals': {
'delivery_address_vals': self._get_partner_address_vals(invoice.partner_shipping_id),
},
}]
else:
return []
def _get_bank_address_vals(self, bank):
return {
'street_name': bank.street,
'additional_street_name': bank.street2,
'city_name': bank.city,
'postal_zone': bank.zip,
'country_subentity': bank.state.name,
'country_subentity_code': bank.state.code,
'country_vals': self._get_country_vals(bank.country),
}
def _get_financial_institution_vals(self, bank):
return {
'bank': bank,
'id': bank.bic,
'id_attrs': {'schemeID': 'BIC'},
'name': bank.name,
'address_vals': self._get_bank_address_vals(bank),
}
def _get_financial_institution_branch_vals(self, bank):
return {
'bank': bank,
'id': bank.bic,
'id_attrs': {'schemeID': 'BIC'},
'financial_institution_vals': self._get_financial_institution_vals(bank),
}
def _get_financial_account_vals(self, partner_bank):
vals = {
'bank_account': partner_bank,
'id': partner_bank.acc_number.replace(' ', ''),
}
if partner_bank.bank_id:
vals['financial_institution_branch_vals'] = self._get_financial_institution_branch_vals(partner_bank.bank_id)
return vals
def _get_invoice_payment_means_vals_list(self, invoice):
vals = {
'payment_means_code': 30,
'payment_means_code_attrs': {'name': 'credit transfer'},
'payment_due_date': invoice.invoice_date_due or invoice.invoice_date,
'instruction_id': invoice.payment_reference,
'payment_id_vals': [invoice.payment_reference or invoice.name],
}
if invoice.partner_bank_id:
vals['payee_financial_account_vals'] = self._get_financial_account_vals(invoice.partner_bank_id)
return [vals]
def _get_invoice_payment_terms_vals_list(self, invoice):
payment_term = invoice.invoice_payment_term_id
if payment_term:
return [{'note_vals': [payment_term.name]}]
else:
return []
def _get_invoice_tax_totals_vals_list(self, invoice, taxes_vals):
balance_sign = -1 if invoice.is_inbound() else 1
tax_totals_vals = {
'currency': invoice.currency_id,
'currency_dp': invoice.currency_id.decimal_places,
'tax_amount': balance_sign * taxes_vals['tax_amount_currency'],
'tax_subtotal_vals': [],
}
for grouping_key, vals in taxes_vals['tax_details'].items():
if grouping_key['tax_amount_type'] != 'fixed':
tax_totals_vals['tax_subtotal_vals'].append({
'currency': invoice.currency_id,
'currency_dp': invoice.currency_id.decimal_places,
'taxable_amount': balance_sign * vals['base_amount_currency'],
'tax_amount': balance_sign * vals['tax_amount_currency'],
'percent': vals['_tax_category_vals_']['percent'],
'tax_category_vals': vals['_tax_category_vals_'],
})
return [tax_totals_vals]
def _get_invoice_line_item_vals(self, line, taxes_vals):
""" Method used to fill the cac:InvoiceLine/cac:Item node.
It provides information about what the product you are selling.
:param line: An invoice line.
:param taxes_vals: The tax details for the current invoice line.
:return: A python dictionary.
"""
product = line.product_id
taxes = line.tax_ids.flatten_taxes_hierarchy().filtered(lambda t: t.amount_type != 'fixed')
tax_category_vals_list = self._get_tax_category_list(line.move_id, taxes)
description = line.name and line.name.replace('\n', ', ')
return {
# Simple description about what you are selling.
'description': description,
# The name of the item.
'name': product.name,
# Identifier of the product.
'sellers_item_identification_vals': {'id': product.code},
# The main tax applied. Only one is allowed.
'classified_tax_category_vals': tax_category_vals_list,
}
def _get_document_allowance_charge_vals_list(self, invoice):
"""
https://docs.peppol.eu/poacc/billing/3.0/bis/#_document_level_allowance_or_charge
"""
return []
def _get_invoice_line_allowance_vals_list(self, line, tax_values_list=None):
""" Method used to fill the cac:InvoiceLine>cac:AllowanceCharge node.
Allowances are distinguished from charges using the ChargeIndicator node with 'false' as value.
Note that allowance charges do not exist for credit notes in UBL 2.0, so if we apply discount in Flectra
the net price will not be consistent with the unit price, but we cannot do anything about it
:param line: An invoice line.
:return: A list of python dictionaries.
"""
fixed_tax_charge_vals_list = []
balance_sign = -1 if line.move_id.is_inbound() else 1
for grouping_key, tax_details in tax_values_list['tax_details'].items():
if grouping_key['tax_amount_type'] == 'fixed':
fixed_tax_charge_vals_list.append({
'currency_name': line.currency_id.name,
'currency_dp': line.currency_id.decimal_places,
'charge_indicator': 'true',
'allowance_charge_reason_code': 'AEO',
'allowance_charge_reason': tax_details['group_tax_details'][0]['tax_id'].name,
'amount': balance_sign * tax_details['tax_amount_currency'],
})
if not line.discount:
return fixed_tax_charge_vals_list
# Price subtotal without discount:
net_price_subtotal = line.price_subtotal
# Price subtotal with discount:
if line.discount == 100.0:
gross_price_subtotal = 0.0
else:
gross_price_subtotal = line.currency_id.round(net_price_subtotal / (1.0 - (line.discount or 0.0) / 100.0))
allowance_vals = {
'currency_name': line.currency_id.name,
'currency_dp': line.currency_id.decimal_places,
# Must be 'false' since this method is for allowances.
'charge_indicator': 'false',
# A reason should be provided. In Flectra, we only manage discounts.
# Full code list is available here:
# https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/
'allowance_charge_reason_code': 95,
# The discount should be provided as an amount.
'amount': gross_price_subtotal - net_price_subtotal,
}
return [allowance_vals] + fixed_tax_charge_vals_list
def _get_invoice_line_price_vals(self, line):
""" Method used to fill the cac:InvoiceLine/cac:Price node.
It provides information about the price applied for the goods and services invoiced.
:param line: An invoice line.
:return: A python dictionary.
"""
# Price subtotal without discount:
net_price_subtotal = line.price_subtotal
# Price subtotal with discount:
if line.discount == 100.0:
gross_price_subtotal = 0.0
else:
gross_price_subtotal = net_price_subtotal / (1.0 - (line.discount or 0.0) / 100.0)
# Price subtotal with discount / quantity:
gross_price_unit = gross_price_subtotal / line.quantity if line.quantity else 0.0
uom = super()._get_uom_unece_code(line)
return {
'currency': line.currency_id,
'currency_dp': line.currency_id.decimal_places,
# The price of an item, exclusive of VAT, after subtracting item price discount.
'price_amount': gross_price_unit,
'product_price_dp': self.env['decimal.precision'].precision_get('Product Price'),
# The number of item units to which the price applies.
# setting to None -> the xml will not comprise the BaseQuantity (it's not mandatory)
'base_quantity': None,
'base_quantity_attrs': {'unitCode': uom},
}
def _get_invoice_line_vals(self, line, taxes_vals):
""" Method used to fill the cac:InvoiceLine node.
It provides information about the invoice line.
:param line: An invoice line.
:return: A python dictionary.
"""
allowance_charge_vals_list = self._get_invoice_line_allowance_vals_list(line, taxes_vals)
uom = super()._get_uom_unece_code(line)
total_fixed_tax_amount = sum([
vals['amount']
for vals in allowance_charge_vals_list
if vals['allowance_charge_reason_code'] == 'AEO'
])
return {
'currency': line.currency_id,
'currency_dp': line.currency_id.decimal_places,
# The requirement is the id has to be unique by invoice line.
'id': line.id,
'invoiced_quantity': line.quantity,
'invoiced_quantity_attrs': {'unitCode': uom},
'line_extension_amount': line.price_subtotal + total_fixed_tax_amount,
'allowance_charge_vals': allowance_charge_vals_list,
'tax_total_vals': self._get_invoice_tax_totals_vals_list(line.move_id, taxes_vals),
'item_vals': self._get_invoice_line_item_vals(line, taxes_vals),
'price_vals': self._get_invoice_line_price_vals(line),
}
def _export_invoice_vals(self, invoice):
def grouping_key_generator(tax_values):
tax = tax_values['tax_id']
tax_category_vals = self._get_tax_category_list(invoice, tax)[0]
grouping_key = {
'tax_category_id': tax_category_vals['id'],
'tax_category_percent': tax_category_vals['percent'],
'_tax_category_vals_': tax_category_vals,
'tax_amount_type': tax.amount_type,
}
# If the tax is fixed, we want to have one group per tax
# s.t. when the invoice is imported, we can try to guess the fixed taxes
if tax.amount_type == 'fixed':
grouping_key['tax_name'] = tax.name
return grouping_key
# Validate the structure of the taxes
self._validate_taxes(invoice)
# Compute the tax details for the whole invoice and each invoice line separately.
taxes_vals = invoice._prepare_edi_tax_details(grouping_key_generator=grouping_key_generator)
# Fixed Taxes: filter them on the document level, and adapt the totals
# Fixed taxes are not supposed to be taxes in real live. However, this is the way in Flectra to manage recupel
# taxes in Belgium. Since only one tax is allowed, the fixed tax is removed from totals of lines but added
# as an extra charge/allowance.
fixed_taxes_keys = [k for k in taxes_vals['tax_details'] if k['tax_amount_type'] == 'fixed']
for key in fixed_taxes_keys:
fixed_tax_details = taxes_vals['tax_details'].pop(key)
taxes_vals['tax_amount_currency'] -= fixed_tax_details['tax_amount_currency']
taxes_vals['tax_amount'] -= fixed_tax_details['tax_amount']
taxes_vals['base_amount_currency'] += fixed_tax_details['tax_amount_currency']
taxes_vals['base_amount'] += fixed_tax_details['tax_amount']
# Compute values for invoice lines.
line_extension_amount = 0.0
invoice_lines = invoice.invoice_line_ids.filtered(lambda line: not line.display_type)
document_allowance_charge_vals_list = self._get_document_allowance_charge_vals_list(invoice)
invoice_line_vals_list = []
for line in invoice_lines:
line_taxes_vals = taxes_vals['invoice_line_tax_details'][line]
line_vals = self._get_invoice_line_vals(line, line_taxes_vals)
invoice_line_vals_list.append(line_vals)
line_extension_amount += line_vals['line_extension_amount']
# Compute the total allowance/charge amounts.
allowance_total_amount = 0.0
for allowance_charge_vals in document_allowance_charge_vals_list:
if allowance_charge_vals['charge_indicator'] == 'false':
allowance_total_amount += allowance_charge_vals['amount']
supplier = invoice.company_id.partner_id.commercial_partner_id
customer = invoice.commercial_partner_id
# OrderReference/SalesOrderID (sales_order_id) is optional
sales_order_id = 'sale_line_ids' in invoice.invoice_line_ids._fields \
and ",".join(invoice.invoice_line_ids.sale_line_ids.order_id.mapped('name'))
# OrderReference/ID (order_reference) is mandatory inside the OrderReference node !
order_reference = invoice.ref or invoice.name if sales_order_id else invoice.ref
balance_sign = -1 if invoice.is_inbound() else 1
vals = {
'builder': self,
'invoice': invoice,
'supplier': supplier,
'customer': customer,
'taxes_vals': taxes_vals,
'format_float': self.format_float,
'AddressType_template': 'account_edi_ubl_cii.ubl_20_AddressType',
'ContactType_template': 'account_edi_ubl_cii.ubl_20_ContactType',
'PartyType_template': 'account_edi_ubl_cii.ubl_20_PartyType',
'PaymentMeansType_template': 'account_edi_ubl_cii.ubl_20_PaymentMeansType',
'TaxCategoryType_template': 'account_edi_ubl_cii.ubl_20_TaxCategoryType',
'TaxTotalType_template': 'account_edi_ubl_cii.ubl_20_TaxTotalType',
'AllowanceChargeType_template': 'account_edi_ubl_cii.ubl_20_AllowanceChargeType',
'InvoiceLineType_template': 'account_edi_ubl_cii.ubl_20_InvoiceLineType',
'InvoiceType_template': 'account_edi_ubl_cii.ubl_20_InvoiceType',
'vals': {
'ubl_version_id': 2.0,
'id': invoice.name,
'issue_date': invoice.invoice_date,
'due_date': invoice.invoice_date_due,
'note_vals': [html2plaintext(invoice.narration)] if invoice.narration else [],
'order_reference': order_reference,
'sales_order_id': sales_order_id,
'accounting_supplier_party_vals': {
'party_vals': self._get_partner_party_vals(supplier, role='supplier'),
},
'accounting_customer_party_vals': {
'party_vals': self._get_partner_party_vals(customer, role='customer'),
},
'invoice_period_vals_list': self._get_invoice_period_vals_list(invoice),
'delivery_vals_list': self._get_delivery_vals_list(invoice),
'payment_means_vals_list': self._get_invoice_payment_means_vals_list(invoice),
'payment_terms_vals': self._get_invoice_payment_terms_vals_list(invoice),
# allowances at the document level, the allowances on invoices (eg. discount) are on invoice_line_vals
'allowance_charge_vals': document_allowance_charge_vals_list,
'tax_total_vals': self._get_invoice_tax_totals_vals_list(invoice, taxes_vals),
'legal_monetary_total_vals': {
'currency': invoice.currency_id,
'currency_dp': invoice.currency_id.decimal_places,
'line_extension_amount': line_extension_amount,
'tax_exclusive_amount': balance_sign * taxes_vals['base_amount_currency'],
'tax_inclusive_amount': invoice.amount_total,
'allowance_total_amount': allowance_total_amount or None,
'prepaid_amount': invoice.amount_total - invoice.amount_residual,
'payable_amount': invoice.amount_residual,
},
'invoice_line_vals': invoice_line_vals_list,
'currency_dp': invoice.currency_id.decimal_places, # currency decimal places
},
}
if invoice.move_type == 'out_invoice':
vals['main_template'] = 'account_edi_ubl_cii.ubl_20_Invoice'
vals['vals']['invoice_type_code'] = 380
else:
vals['main_template'] = 'account_edi_ubl_cii.ubl_20_CreditNote'
vals['vals']['credit_note_type_code'] = 381
return vals
def _export_invoice_constraints(self, invoice, vals):
constraints = self._invoice_constraints_common(invoice)
constraints.update({
'ubl20_supplier_name_required': self._check_required_fields(vals['supplier'], 'name'),
'ubl20_customer_name_required': self._check_required_fields(vals['customer'], 'name'),
'ubl20_commercial_customer_name_required': self._check_required_fields(vals['customer'].commercial_partner_id, 'name'),
'ubl20_invoice_name_required': self._check_required_fields(invoice, 'name'),
'ubl20_invoice_date_required': self._check_required_fields(invoice, 'invoice_date'),
})
return constraints
def _export_invoice(self, invoice):
vals = self._export_invoice_vals(invoice)
errors = [constraint for constraint in self._export_invoice_constraints(invoice, vals).values() if constraint]
xml_content = self.env['ir.qweb']._render(vals['main_template'], vals)
return etree.tostring(cleanup_xml_node(xml_content), xml_declaration=True, encoding='UTF-8'), set(errors)
# -------------------------------------------------------------------------
# IMPORT
# -------------------------------------------------------------------------
def _import_fill_invoice_form(self, journal, tree, invoice_form, qty_factor):
def _find_value(xpath, element=tree):
# avoid 'TypeError: empty namespace prefix is not supported in XPath'
nsmap = {k: v for k, v in tree.nsmap.items() if k is not None}
return self.env['account.edi.format']._find_value(xpath, element, nsmap)
logs = []
if qty_factor == -1:
logs.append(_("The invoice has been converted into a credit note and the quantities have been reverted."))
# ==== partner_id ====
role = "Customer" if invoice_form.journal_id.type == 'sale' else "Supplier"
vat = _find_value(f'//cac:Accounting{role}Party/cac:Party//cbc:CompanyID')
phone = _find_value(f'//cac:Accounting{role}Party/cac:Party//cbc:Telephone')
mail = _find_value(f'//cac:Accounting{role}Party/cac:Party//cbc:ElectronicMail')
name = _find_value(f'//cac:Accounting{role}Party/cac:Party//cbc:Name')
self._import_retrieve_and_fill_partner(invoice_form, name=name, phone=phone, mail=mail, vat=vat)
# ==== currency_id ====
currency_code_node = tree.find('.//{*}DocumentCurrencyCode')
if currency_code_node is not None:
currency = self.env['res.currency'].with_context(active_test=False).search([
('name', '=', currency_code_node.text),
], limit=1)
if currency:
if not currency.active:
logs.append(_("The currency '%s' is not active.", currency.name))
invoice_form.currency_id = currency
else:
logs.append(_("Could not retrieve currency: %s. Did you enable the multicurrency option "
"and activate the currency ?", currency_code_node.text))
# ==== Reference ====
ref_node = tree.find('./{*}ID')
if ref_node is not None:
invoice_form.ref = ref_node.text
# === Note/narration ====
narration = ""
note_node = tree.find('./{*}Note')
if note_node is not None and note_node.text:
narration += note_node.text + "\n"
payment_terms_node = tree.find('./{*}PaymentTerms/{*}Note') # e.g. 'Payment within 10 days, 2% discount'
if payment_terms_node is not None and payment_terms_node.text:
narration += payment_terms_node.text + "\n"
invoice_form.narration = narration
# ==== payment_reference ====
payment_reference_node = tree.find('./{*}PaymentMeans/{*}PaymentID')
if payment_reference_node is not None:
invoice_form.payment_reference = payment_reference_node.text
# ==== invoice_date ====
invoice_date_node = tree.find('./{*}IssueDate')
if invoice_date_node is not None:
invoice_form.invoice_date = invoice_date_node.text
# ==== invoice_date_due ====
for xpath in ('./{*}DueDate', './/{*}PaymentDueDate'):
invoice_date_due_node = tree.find(xpath)
if invoice_date_due_node is not None:
invoice_form.invoice_date_due = invoice_date_due_node.text
break
# ==== invoice_incoterm_id ====
incoterm_code_node = tree.find('./{*}TransportExecutionTerms/{*}DeliveryTerms/{*}ID')
if incoterm_code_node is not None:
incoterm = self.env['account.incoterms'].search([('code', '=', incoterm_code_node.text)], limit=1)
if incoterm:
invoice_form.invoice_incoterm_id = incoterm
# ==== invoice_line_ids: AllowanceCharge (document level) ====
logs += self._import_fill_invoice_allowance_charge(tree, invoice_form, journal, qty_factor)
# ==== Prepaid amount ====
prepaid_node = tree.find('./{*}LegalMonetaryTotal/{*}PrepaidAmount')
logs += self._import_log_prepaid_amount(invoice_form, prepaid_node, qty_factor)
# ==== invoice_line_ids: InvoiceLine/CreditNoteLine ====
invoice_line_tag = 'InvoiceLine' if invoice_form.move_type in ('in_invoice', 'out_invoice') or qty_factor == -1 else 'CreditNoteLine'
for i, invl_el in enumerate(tree.findall('./{*}' + invoice_line_tag)):
with invoice_form.invoice_line_ids.new() as invoice_line_form:
invoice_line_form.sequence = i
invl_logs = self._import_fill_invoice_line_form(journal, invl_el, invoice_form, invoice_line_form, qty_factor)
logs += invl_logs
return invoice_form, logs
def _import_fill_invoice_line_form(self, journal, tree, invoice_form, invoice_line_form, qty_factor):
logs = []
# Product
product = self._import_retrieve_info_from_map(
tree,
self._import_retrieve_product_map(journal),
)
if product is not None:
invoice_line_form.product_id = product
# Description
description_node = tree.find('./{*}Item/{*}Description')
name_node = tree.find('./{*}Item/{*}Name')
if description_node is not None:
invoice_line_form.name = description_node.text
elif name_node is not None:
invoice_line_form.name = name_node.text # Fallback on Name if Description is not found.
xpath_dict = {
'basis_qty': [
'./{*}Price/{*}BaseQuantity',
],
'gross_price_unit': './{*}Price/{*}AllowanceCharge/{*}BaseAmount',
'rebate': './{*}Price/{*}AllowanceCharge/{*}Amount',
'net_price_unit': './{*}Price/{*}PriceAmount',
'billed_qty': './{*}InvoicedQuantity' if invoice_form.move_type in ('in_invoice', 'out_invoice') or qty_factor == -1 else './{*}CreditedQuantity',
'allowance_charge': './/{*}AllowanceCharge',
'allowance_charge_indicator': './{*}ChargeIndicator',
'allowance_charge_amount': './{*}Amount',
'allowance_charge_reason': './{*}AllowanceChargeReason',
'allowance_charge_reason_code': './{*}AllowanceChargeReasonCode',
'line_total_amount': './{*}LineExtensionAmount',
}
inv_line_vals = self._import_fill_invoice_line_values(tree, xpath_dict, invoice_line_form, qty_factor)
# retrieve tax nodes
tax_nodes = tree.findall('.//{*}Item/{*}ClassifiedTaxCategory/{*}Percent')
if not tax_nodes:
for elem in tree.findall('.//{*}TaxTotal'):
tax_nodes += elem.findall('.//{*}TaxSubtotal/{*}Percent')
return self._import_fill_invoice_line_taxes(journal, tax_nodes, invoice_line_form, inv_line_vals, logs)
# -------------------------------------------------------------------------
# IMPORT : helpers
# -------------------------------------------------------------------------
def _get_import_document_amount_sign(self, filename, tree):
"""
In UBL, an invoice has tag 'Invoice' and a credit note has tag 'CreditNote'. However, a credit note can be
expressed as an invoice with negative amounts. For this case, we need a factor to take the opposite
of each quantity in the invoice.
"""
if tree.tag == '{urn:oasis:names:specification:ubl:schema:xsd:Invoice-2}Invoice':
amount_node = tree.find('.//{*}LegalMonetaryTotal/{*}TaxExclusiveAmount')
if amount_node is not None and float(amount_node.text) < 0:
return ('in_refund', 'out_refund'), -1
return ('in_invoice', 'out_invoice'), 1
if tree.tag == '{urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2}CreditNote':
return ('in_refund', 'out_refund'), 1
return None, None
def _import_retrieve_partner_map(self, company, move_type='purchase'):
role = "Customer" if move_type == 'sale' else "Supplier"
def with_vat(tree, extra_domain):
vat_node = tree.find(f'.//{{*}}Accounting{role}Party/{{*}}Party//{{*}}CompanyID')
vat = None if vat_node is None else vat_node.text
return self.env['account.edi.format']._retrieve_partner_with_vat(vat, extra_domain)
def with_phone_mail(tree, extra_domain):
phone_node = tree.find(f'.//{{*}}Accounting{role}Party/{{*}}Party//{{*}}Telephone')
mail_node = tree.find(f'.//{{*}}Accounting{role}Party/{{*}}Party//{{*}}ElectronicMail')
phone = None if phone_node is None else phone_node.text
mail = None if mail_node is None else mail_node.text
return self.env['account.edi.format']._retrieve_partner_with_phone_mail(phone, mail, extra_domain)
def with_name(tree, extra_domain):
name_node = tree.find(f'.//{{*}}Accounting{role}Party/{{*}}Party//{{*}}Name')
name = None if name_node is None else name_node.text
return self.env['account.edi.format']._retrieve_partner_with_name(name, extra_domain)
return {
10: lambda tree: with_vat(tree, [('company_id', '=', company.id)]),
20: lambda tree: with_vat(tree, []),
30: lambda tree: with_phone_mail(tree, [('company_id', '=', company.id)]),
40: lambda tree: with_phone_mail(tree, []),
50: lambda tree: with_name(tree, [('company_id', '=', company.id)]),
60: lambda tree: with_name(tree, []),
}
def _import_retrieve_product_map(self, company):
def with_code_barcode(tree, extra_domain):
domains = []
default_code_node = tree.find('./{*}Item/{*}SellersItemIdentification/{*}ID')
if default_code_node is not None:
domains.append([('default_code', '=', default_code_node.text)])
barcode_node = tree.find("./{*}Item/{*}StandardItemIdentification/{*}ID[@schemeID='0160']")
if barcode_node is not None:
domains.append([('barcode', '=', barcode_node.text)])
if not domains:
return None
return self.env['product.product'].search(extra_domain + expression.OR(domains), limit=1)
def with_name(tree, extra_domain):
name_node = tree.find('./{*}Item/{*}Name')
if name_node is None:
return None
return self.env['product.product'].search(extra_domain + [('name', 'ilike', name_node.text)], limit=1)
return {
10: lambda tree: with_code_barcode(tree, [('company_id', '=', company.id)]),
20: lambda tree: with_code_barcode(tree, []),
30: lambda tree: with_name(tree, [('company_id', '=', company.id)]),
40: lambda tree: with_name(tree, []),
}
def _import_retrieve_info_from_map(self, tree, import_method_map):
for key in sorted(import_method_map.keys()):
record = import_method_map[key](tree)
if record:
return record
return None

View File

@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
from flectra import models
class AccountEdiXmlUBL21(models.AbstractModel):
_name = "account.edi.xml.ubl_21"
_inherit = 'account.edi.xml.ubl_20'
_description = "UBL 2.1"
# -------------------------------------------------------------------------
# EXPORT
# -------------------------------------------------------------------------
def _export_invoice_filename(self, invoice):
return f"{invoice.name.replace('/', '_')}_ubl_21.xml"
def _export_invoice_ecosio_schematrons(self):
return {
'invoice': 'org.oasis-open:invoice:2.1',
'credit_note': 'org.oasis-open:creditnote:2.1',
}
def _export_invoice_vals(self, invoice):
# EXTENDS account.edi.xml.ubl_20
vals = super()._export_invoice_vals(invoice)
vals.update({
'InvoiceType_template': 'account_edi_ubl_cii.ubl_21_InvoiceType',
'InvoiceLineType_template': 'account_edi_ubl_cii.ubl_21_InvoiceLineType',
})
vals['vals'].update({
'ubl_version_id': 2.1,
'buyer_reference': invoice.commercial_partner_id.ref,
})
return vals

View File

@@ -0,0 +1,455 @@
# -*- coding: utf-8 -*-
from flectra import models, _
from flectra.addons.account_edi_ubl_cii.models.account_edi_common import COUNTRY_EAS
from stdnum.no import mva
class AccountEdiXmlUBLBIS3(models.AbstractModel):
_name = "account.edi.xml.ubl_bis3"
_inherit = 'account.edi.xml.ubl_21'
_description = "UBL BIS Billing 3.0.12"
"""
* Documentation of EHF Billing 3.0: https://anskaffelser.dev/postaward/g3/
* EHF 2.0 is no longer used:
https://anskaffelser.dev/postaward/g2/announcement/2019-11-14-removal-old-invoicing-specifications/
* Official doc for EHF Billing 3.0 is the OpenPeppol BIS 3 doc +
https://anskaffelser.dev/postaward/g3/spec/current/billing-3.0/norway/
"Based on work done in PEPPOL BIS Billing 3.0, Difi has included Norwegian rules in PEPPOL BIS Billing 3.0 and
does not see a need to implement a different CIUS targeting the Norwegian market. Implementation of EHF Billing
3.0 is therefore done by implementing PEPPOL BIS Billing 3.0 without extensions or extra rules."
Thus, EHF 3 and Bis 3 are actually the same format. The specific rules for NO defined in Bis 3 are added in Bis 3.
"""
# -------------------------------------------------------------------------
# EXPORT
# -------------------------------------------------------------------------
def _export_invoice_filename(self, invoice):
return f"{invoice.name.replace('/', '_')}_ubl_bis3.xml"
def _export_invoice_ecosio_schematrons(self):
return {
'invoice': 'eu.peppol.bis3:invoice:3.13.0',
'credit_note': 'eu.peppol.bis3:creditnote:3.13.0',
}
def _get_country_vals(self, country):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_country_vals(country)
vals.pop('name', None)
return vals
def _get_partner_party_tax_scheme_vals_list(self, partner, role):
# EXTENDS account.edi.xml.ubl_21
vals_list = super()._get_partner_party_tax_scheme_vals_list(partner, role)
if not partner.vat:
return []
for vals in vals_list:
vals.pop('registration_name', None)
vals.pop('registration_address_vals', None)
# /!\ For Australian companies, the ABN is encoded on the VAT field, but doesn't have the 2 digits prefix,
# causing a validation error
if partner.country_id.code == "AU" and partner.vat and not partner.vat.upper().startswith("AU"):
vals['company_id'] = "AU" + partner.vat
if partner.country_id.code == "LU" and 'l10n_lu_peppol_identifier' in partner._fields and partner.l10n_lu_peppol_identifier:
vals['company_id'] = partner.l10n_lu_peppol_identifier
# sources:
# https://anskaffelser.dev/postaward/g3/spec/current/billing-3.0/norway/#_applying_foretaksregisteret
# https://docs.peppol.eu/poacc/billing/3.0/bis/#national_rules (NO-R-002 (warning))
if partner.country_id.code == "NO" and role == 'supplier':
vals_list.append({
'company_id': "Foretaksregisteret",
'tax_scheme_id': "TAX",
})
return vals_list
def _get_partner_party_legal_entity_vals_list(self, partner):
# EXTENDS account.edi.xml.ubl_21
vals_list = super()._get_partner_party_legal_entity_vals_list(partner)
for vals in vals_list:
vals.pop('registration_address_vals', None)
if partner.country_id.code == 'NL' and 'l10n_nl_oin' in partner._fields:
endpoint = partner.l10n_nl_oin or partner.l10n_nl_kvk
scheme = '0190' if partner.l10n_nl_oin else '0106'
vals.update({
'company_id': endpoint,
'company_id_attrs': {'schemeID': scheme},
})
if partner.country_id.code == "LU" and 'l10n_lu_peppol_identifier' in partner._fields and partner.l10n_lu_peppol_identifier:
vals['company_id'] = partner.l10n_lu_peppol_identifier
if partner.country_id.code == 'DK':
# DK-R-014: For Danish Suppliers it is mandatory to specify schemeID as "0184" (DK CVR-number) when
# PartyLegalEntity/CompanyID is used for AccountingSupplierParty
vals['company_id_attrs'] = {'schemeID': '0184'}
return vals_list
def _get_partner_contact_vals(self, partner):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_partner_contact_vals(partner)
vals.pop('id', None)
return vals
def _get_partner_party_vals(self, partner, role):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_partner_party_vals(partner, role)
vals['endpoint_id'] = partner.vat
vals['endpoint_id_attrs'] = {'schemeID': COUNTRY_EAS.get(partner.country_id.code)}
if partner.country_id.code == 'NO' and 'l10n_no_bronnoysund_number' in partner._fields:
vals.update({
'endpoint_id': partner.l10n_no_bronnoysund_number,
'endpoint_id_attrs': {'schemeID': '0192'},
})
# [BR-NL-1] Dutch supplier registration number ( AccountingSupplierParty/Party/PartyLegalEntity/CompanyID );
# With a Dutch supplier (NL), SchemeID may only contain 106 (Chamber of Commerce number) or 190 (OIN number).
# [BR-NL-10] At a Dutch supplier, for a Dutch customer ( AccountingCustomerParty ) the customer registration
# number must be filled with Chamber of Commerce or OIN. SchemeID may only contain 106 (Chamber of
# Commerce number) or 190 (OIN number).
if partner.country_id.code == 'NL' and 'l10n_nl_oin' in partner._fields:
if partner.l10n_nl_oin:
vals.update({
'endpoint_id': partner.l10n_nl_oin,
'endpoint_id_attrs': {'schemeID': '0190'},
})
elif partner.l10n_nl_kvk:
vals.update({
'endpoint_id': partner.l10n_nl_kvk,
'endpoint_id_attrs': {'schemeID': '0106'},
})
if partner.country_id.code == 'SG' and 'l10n_sg_unique_entity_number' in partner._fields:
vals.update({
'endpoint_id': partner.l10n_sg_unique_entity_number,
'endpoint_id_attrs': {'schemeID': '0195'},
})
if partner.country_id.code == "LU" and 'l10n_lu_peppol_identifier' in partner._fields and partner.l10n_lu_peppol_identifier:
vals['endpoint_id'] = partner.l10n_lu_peppol_identifier
return vals
def _get_partner_party_identification_vals_list(self, partner):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_partner_party_identification_vals_list(partner)
if partner.country_id.code == 'NL' and 'l10n_nl_oin' in partner._fields:
endpoint = partner.l10n_nl_oin or partner.l10n_nl_kvk
vals.append({
'id': endpoint,
})
return vals
def _get_delivery_vals_list(self, invoice):
# EXTENDS account.edi.xml.ubl_21
supplier = invoice.company_id.partner_id.commercial_partner_id
customer = invoice.commercial_partner_id
economic_area = self.env.ref('base.europe').country_ids.mapped('code') + ['NO']
intracom_delivery = (customer.country_id.code in economic_area
and supplier.country_id.code in economic_area
and supplier.country_id != customer.country_id)
if not intracom_delivery:
return []
# [BR-IC-12]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is
# "Intra-community supply" the Deliver to country code (BT-80) shall not be blank.
# [BR-IC-11]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is
# "Intra-community supply" the Actual delivery date (BT-72) or the Invoicing period (BG-14)
# shall not be blank.
if 'partner_shipping_id' in invoice._fields:
partner_shipping = invoice.partner_shipping_id
else:
partner_shipping = customer
return [{
'actual_delivery_date': invoice.invoice_date,
'delivery_location_vals': {
'delivery_address_vals': self._get_partner_address_vals(partner_shipping),
},
}]
def _get_partner_address_vals(self, partner):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_partner_address_vals(partner)
# schematron/openpeppol/3.13.0/xslt/CEN-EN16931-UBL.xslt
# [UBL-CR-225]-A UBL invoice should not include the AccountingCustomerParty Party PostalAddress CountrySubentityCode
vals.pop('country_subentity_code', None)
return vals
def _get_financial_institution_branch_vals(self, bank):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_financial_institution_branch_vals(bank)
# schematron/openpeppol/3.13.0/xslt/CEN-EN16931-UBL.xslt
# [UBL-CR-664]-A UBL invoice should not include the FinancialInstitutionBranch FinancialInstitution
# xpath test: not(//cac:FinancialInstitution)
vals.pop('id_attrs', None)
vals.pop('financial_institution_vals', None)
return vals
def _get_invoice_payment_means_vals_list(self, invoice):
# EXTENDS account.edi.xml.ubl_21
vals_list = super()._get_invoice_payment_means_vals_list(invoice)
for vals in vals_list:
vals.pop('payment_due_date', None)
vals.pop('instruction_id', None)
if vals.get('payment_id_vals'):
vals['payment_id_vals'] = vals['payment_id_vals'][:1]
return vals_list
def _get_tax_category_list(self, invoice, taxes):
# EXTENDS account.edi.xml.ubl_21
vals_list = super()._get_tax_category_list(invoice, taxes)
for vals in vals_list:
vals.pop('name')
# [UBL-CR-601]-A UBL invoice should not include the InvoiceLine Item ClassifiedTaxCategory TaxExemptionReason
#vals.pop('tax_exemption_reason')
return vals_list
def _get_invoice_tax_totals_vals_list(self, invoice, taxes_vals):
# EXTENDS account.edi.xml.ubl_21
vals_list = super()._get_invoice_tax_totals_vals_list(invoice, taxes_vals)
for vals in vals_list:
vals['currency_dp'] = 2
for subtotal_vals in vals.get('tax_subtotal_vals', []):
subtotal_vals.pop('percent', None)
subtotal_vals['currency_dp'] = 2
return vals_list
def _get_invoice_line_allowance_vals_list(self, line, tax_values_list):
# EXTENDS account.edi.xml.ubl_21
vals_list = super()._get_invoice_line_allowance_vals_list(line, tax_values_list)
for vals in vals_list:
vals['currency_dp'] = 2
return vals_list
def _get_invoice_line_vals(self, line, taxes_vals):
# EXTENDS account.edi.xml.ubl_21
vals = super()._get_invoice_line_vals(line, taxes_vals)
vals.pop('tax_total_vals', None)
vals['currency_dp'] = 2
vals['price_vals']['currency_dp'] = 2
return vals
def _export_invoice_vals(self, invoice):
# EXTENDS account.edi.xml.ubl_21
vals = super()._export_invoice_vals(invoice)
vals['vals'].update({
'customization_id': 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0',
'profile_id': 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0',
'currency_dp': 2,
'ubl_version_id': None,
})
vals['vals']['legal_monetary_total_vals']['currency_dp'] = 2
# [NL-R-001] For suppliers in the Netherlands, if the document is a creditnote, the document MUST
# contain an invoice reference (cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID)
if vals['supplier'].country_id.code == 'NL' and 'refund' in invoice.move_type:
vals['vals'].update({
'billing_reference_vals': {
'id': invoice.ref,
'issue_date': None,
}
})
return vals
def _export_invoice_constraints(self, invoice, vals):
# EXTENDS account.edi.xml.ubl_21
constraints = super()._export_invoice_constraints(invoice, vals)
constraints.update(
self._invoice_constraints_peppol_en16931_ubl(invoice, vals)
)
constraints.update(
self._invoice_constraints_cen_en16931_ubl(invoice, vals)
)
return constraints
def _invoice_constraints_cen_en16931_ubl(self, invoice, vals):
"""
corresponds to the errors raised by ' schematron/openpeppol/3.13.0/xslt/CEN-EN16931-UBL.xslt' for invoices.
This xslt was obtained by transforming the corresponding sch
https://docs.peppol.eu/poacc/billing/3.0/files/CEN-EN16931-UBL.sch.
"""
eu_countries = self.env.ref('base.europe').country_ids
intracom_delivery = (vals['customer'].country_id in eu_countries
and vals['supplier'].country_id in eu_countries
and vals['customer'].country_id != vals['supplier'].country_id)
constraints = {
# [BR-S-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code
# (BT-151) is "Standard rated" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration
# identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).
# ---
# [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.
'cen_en16931_seller_vat_identifier': self._check_required_fields(
vals['supplier'], 'vat' # this check is larger than the rules above
),
# [BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or
# Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.
# note: Payment account identifier is <cac:PayeeFinancialAccount>
# note: no need to check account_number, because it's a required field for a partner_bank
'cen_en16931_payment_account_identifier': self._check_required_fields(
invoice, 'partner_bank_id'
) if vals['vals']['payment_means_vals_list'][0]['payment_means_code'] in (30, 58) else None,
# [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier.
# if this fails, it might just be a missing country when mapping the country to the EAS code
'cen_en16931_seller_EAS': self._check_required_fields(
vals['vals']['accounting_supplier_party_vals']['party_vals']['endpoint_id_attrs'], 'schemeID',
_("No Electronic Address Scheme (EAS) could be found for %s.", vals['customer'].name)
),
# [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier.
# if this fails, it might just be a missing country when mapping the country to the EAS code
'cen_en16931_buyer_EAS': self._check_required_fields(
vals['vals']['accounting_customer_party_vals']['party_vals']['endpoint_id_attrs'], 'schemeID',
_("No Electronic Address Scheme (EAS) could be found for %s.", vals['customer'].name)
),
# [BR-IC-12]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is
# "Intra-community supply" the Deliver to country code (BT-80) shall not be blank.
'cen_en16931_delivery_country_code': self._check_required_fields(
vals['vals']['delivery_vals_list'][0], 'delivery_location_vals',
_("For intracommunity supply, the delivery address should be included.")
) if intracom_delivery else None,
# [BR-IC-11]-In an Invoice with a VAT breakdown (BG-23) where the VAT category code (BT-118) is
# "Intra-community supply" the Actual delivery date (BT-72) or the Invoicing period (BG-14)
# shall not be blank.
'cen_en16931_delivery_date_invoicing_period': self._check_required_fields(
vals['vals']['delivery_vals_list'][0], 'actual_delivery_date',
_("For intracommunity supply, the actual delivery date or the invoicing period should be included.")
) and self._check_required_fields(
vals['vals']['invoice_period_vals_list'][0], ['start_date', 'end_date'],
_("For intracommunity supply, the actual delivery date or the invoicing period should be included.")
) if intracom_delivery else None,
}
for line in invoice.invoice_line_ids.filtered(lambda x: x.display_type not in ('line_note', 'line_section')):
if len(line.tax_ids.flatten_taxes_hierarchy().filtered(lambda t: t.amount_type != 'fixed')) != 1:
# [UBL-SR-48]-Invoice lines shall have one and only one classified tax category.
# /!\ exception: possible to have any number of ecotaxes (fixed tax) with a regular percentage tax
constraints.update({'cen_en16931_tax_line': _("Each invoice line shall have one and only one tax.")})
return constraints
def _invoice_constraints_peppol_en16931_ubl(self, invoice, vals):
"""
corresponds to the errors raised by 'schematron/openpeppol/3.13.0/xslt/PEPPOL-EN16931-UBL.xslt' for
invoices in ecosio. This xslt was obtained by transforming the corresponding sch
https://docs.peppol.eu/poacc/billing/3.0/files/PEPPOL-EN16931-UBL.sch.
The national rules (https://docs.peppol.eu/poacc/billing/3.0/bis/#national_rules) are included in this file.
They always refer to the supplier's country.
"""
constraints = {
# PEPPOL-EN16931-R020: Seller electronic address MUST be provided
'peppol_en16931_ubl_seller_endpoint': self._check_required_fields(
vals['supplier'], 'vat'
),
# PEPPOL-EN16931-R010: Buyer electronic address MUST be provided
'peppol_en16931_ubl_buyer_endpoint': self._check_required_fields(
vals['customer'], 'vat'
),
# PEPPOL-EN16931-R003: A buyer reference or purchase order reference MUST be provided.
'peppol_en16931_ubl_buyer_ref_po_ref':
"A buyer reference or purchase order reference must be provided." if self._check_required_fields(
vals['vals'], 'buyer_reference'
) and self._check_required_fields(vals['vals'], 'order_reference') else None,
}
if vals['supplier'].country_id.code == 'NL':
constraints.update({
# [NL-R-001] For suppliers in the Netherlands, if the document is a creditnote, the document MUST contain
# an invoice reference (cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID)
'nl_r_001': self._check_required_fields(invoice, 'ref') if 'refund' in invoice.move_type else '',
# [NL-R-002] For suppliers in the Netherlands the suppliers address (cac:AccountingSupplierParty/cac:Party
# /cac:PostalAddress) MUST contain street name (cbc:StreetName), city (cbc:CityName) and post code (cbc:PostalZone)
'nl_r_002_street': self._check_required_fields(vals['supplier'], 'street'),
'nl_r_002_zip': self._check_required_fields(vals['supplier'], 'zip'),
'nl_r_002_city': self._check_required_fields(vals['supplier'], 'city'),
# [NL-R-003] For suppliers in the Netherlands, the legal entity identifier MUST be either a
# KVK or OIN number (schemeID 0106 or 0190)
'nl_r_003': _(
"The supplier %s must have a KVK or OIN number.",
vals['supplier'].display_name
) if 'l10n_nl_oin' not in vals['supplier']._fields or 'l10n_nl_kvk' not in vals['supplier']._fields else '',
# [NL-R-007] For suppliers in the Netherlands, the supplier MUST provide a means of payment
# (cac:PaymentMeans) if the payment is from customer to supplier
'nl_r_007': self._check_required_fields(invoice, 'partner_bank_id')
})
if vals['customer'].country_id.code == 'NL':
constraints.update({
# [NL-R-004] For suppliers in the Netherlands, if the customer is in the Netherlands, the customer
# address (cac:AccountingCustomerParty/cac:Party/cac:PostalAddress) MUST contain the street name
# (cbc:StreetName), the city (cbc:CityName) and post code (cbc:PostalZone)
'nl_r_004_street': self._check_required_fields(vals['customer'], 'street'),
'nl_r_004_city': self._check_required_fields(vals['customer'], 'city'),
'nl_r_004_zip': self._check_required_fields(vals['customer'], 'zip'),
# [NL-R-005] For suppliers in the Netherlands, if the customer is in the Netherlands,
# the customers legal entity identifier MUST be either a KVK or OIN number (schemeID 0106 or 0190)
'nl_r_005': _(
"The customer %s must have a KVK or OIN number.",
vals['customer'].display_name
) if 'l10n_nl_oin' not in vals['customer']._fields or 'l10n_nl_kvk' not in vals['customer']._fields else '',
})
if vals['supplier'].country_id.code == 'NO':
vat = vals['supplier'].vat
constraints.update({
# NO-R-001: For Norwegian suppliers, a VAT number MUST be the country code prefix NO followed by a
# valid Norwegian organization number (nine numbers) followed by the letters MVA.
# Note: mva.is_valid("179728982MVA") is True while it lacks the NO prefix
'no_r_001': _(
"The VAT number of the supplier does not seem to be valid. It should be of the form: NO179728982MVA."
) if not mva.is_valid(vat) or len(vat) != 14 or vat[:2] != 'NO' or vat[-3:] != 'MVA' else "",
'no_supplier_bronnoysund': _(
"The supplier %s must have a Bronnoysund company registry.",
vals['supplier'].display_name
) if 'l10n_no_bronnoysund_number' not in vals['supplier']._fields or not vals['supplier'].l10n_no_bronnoysund_number else "",
})
if vals['customer'].country_id.code == 'NO':
constraints.update({
'no_customer_bronnoysund': _(
"The supplier %s must have a Bronnoysund company registry.",
vals['customer'].display_name
) if 'l10n_no_bronnoysund_number' not in vals['customer']._fields or not vals['customer'].l10n_no_bronnoysund_number else "",
})
return constraints

View File

@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
from flectra import models
import re
class AccountEdiXmlUBLEFFF(models.AbstractModel):
_inherit = "account.edi.xml.ubl_20"
_name = 'account.edi.xml.ubl_efff'
_description = "E-FFF (BE)"
# -------------------------------------------------------------------------
# EXPORT
# -------------------------------------------------------------------------
def _export_invoice_filename(self, invoice):
# official naming convention
vat = invoice.company_id.partner_id.commercial_partner_id.vat
return 'efff_%s%s%s.xml' % (vat or '', '_' if vat else '', re.sub(r'[\W_]', '', invoice.name))
def _export_invoice_ecosio_schematrons(self):
return None

View File

@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
from flectra import models
class AccountEdiXmlUBLDE(models.AbstractModel):
_inherit = "account.edi.xml.ubl_bis3"
_name = 'account.edi.xml.ubl_de'
_description = "BIS3 DE (XRechnung)"
# -------------------------------------------------------------------------
# EXPORT
# -------------------------------------------------------------------------
def _export_invoice_filename(self, invoice):
return f"{invoice.name.replace('/', '_')}_ubl_de.xml"
def _export_invoice_ecosio_schematrons(self):
return {
'invoice': 'de.xrechnung:ubl-invoice:2.2.0',
'credit_note': 'de.xrechnung:ubl-creditnote:2.2.0',
}
def _export_invoice_vals(self, invoice):
# EXTENDS account.edi.xml.ubl_bis3
vals = super()._export_invoice_vals(invoice)
vals['vals'].update({
'customization_id': 'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2#conformant#urn:xoev-de:kosit:extension:xrechnung_2.2',
})
return vals
def _export_invoice_constraints(self, invoice, vals):
# EXTENDS account.edi.xml.ubl_bis3
constraints = super()._export_invoice_constraints(invoice, vals)
constraints.update({
'bis3_de_supplier_telephone_required': self._check_required_fields(vals['supplier'], ['phone', 'mobile']),
'bis3_de_supplier_electronic_mail_required': self._check_required_fields(vals['supplier'], 'email'),
})
return constraints

View File

@@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from flectra import models
from flectra.tools import cleanup_xml_node
from lxml import etree
import base64
from xml.sax.saxutils import escape, quoteattr
class IrActionsReport(models.Model):
_inherit = 'ir.actions.report'
def _postprocess_pdf_report(self, record, buffer):
"""
EXTENDS account
Add the pdf report in XML as base64 string.
"""
result = super()._postprocess_pdf_report(record, buffer)
if record._name == 'account.move':
# exclude efff because it's handled by l10n_be_edi
format_codes = ['ubl_bis3', 'ubl_de', 'nlcius_1']
edi_attachments = record.edi_document_ids.filtered(lambda d: d.edi_format_id.code in format_codes).attachment_id
for edi_attachment in edi_attachments:
old_xml = base64.b64decode(edi_attachment.with_context(bin_size=False).datas, validate=True)
tree = etree.fromstring(old_xml)
anchor_elements = tree.xpath("//*[local-name()='AccountingSupplierParty']")
additional_document_elements = tree.xpath("//*[local-name()='AdditionalDocumentReference']")
# with this clause, we ensure the xml are only postprocessed once (even when the invoice is reset to
# draft then validated again)
if anchor_elements and not additional_document_elements:
pdf = base64.b64encode(buffer.getvalue()).decode()
pdf_name = '%s.pdf' % record.name.replace('/', '_')
to_inject = '''
<cac:AdditionalDocumentReference
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
<cbc:ID>%s</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename=%s>
%s
</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
''' % (escape(pdf_name), quoteattr(pdf_name), pdf)
anchor_index = tree.index(anchor_elements[0])
tree.insert(anchor_index, etree.fromstring(to_inject))
new_xml = etree.tostring(cleanup_xml_node(tree), xml_declaration=True, encoding='UTF-8')
edi_attachment.write({
'res_model': 'account.move',
'res_id': record.id,
'datas': base64.b64encode(new_xml),
'mimetype': 'application/xml',
})
return result

View File

@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
# Part of Flectra. See LICENSE file for full copyright and licensing details.
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Flectra. See LICENSE file for full copyright and licensing details.
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
{

0
addons/hw_drivers/controllers/driver.py Normal file → Executable file
View File

View File

@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
{
'name': "Testing the Import/Export invoices with UBL/CII",
'version': '1.0',
'category': 'Hidden/Tests',
'description': """
This module tests the module 'account_edi_ubl_cii', it is separated since dependencies to some
localizations were required. Its name begins with 'l10n' to not overload runbot.
The test files are separated by sources, they were taken from:
* the factur-x doc (form the FNFE)
* the peppol-bis-invoice-3 doc (the github repository: https://github.com/OpenPEPPOL/peppol-bis-invoice-3/tree/master/rules/examples contains examples)
* flectra, these files pass all validation tests (using ecosio or the FNFE validator)
We test that the external examples are correctly imported (currency, total amount and total tax match).
We also test that generating xml from flectra with given parameters gives exactly the same xml as the expected,
valid ones.
""",
'depends': [
'l10n_generic_coa',
'account_edi_ubl_cii',
'l10n_fr',
'l10n_be',
'l10n_de',
],
'installable': True,
'application': False,
'auto_install': False,
'license': 'LGPL-3',
}

View File

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
from . import test_xml_ubl_be
from . import test_xml_ubl_de
from . import test_xml_cii_fr

View File

@@ -0,0 +1,241 @@
# -*- coding: utf-8 -*-
import base64
from freezegun import freeze_time
from flectra.addons.account_edi.tests.common import AccountEdiTestCommon
from flectra import fields
from flectra.modules.module import get_resource_path
from flectra.tests import tagged
from lxml import etree
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestUBLCommon(AccountEdiTestCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None, edi_format_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref, edi_format_ref=edi_format_ref)
# Ensure the testing currency is using a valid ISO code.
real_usd = cls.env.ref('base.USD')
real_usd.name = 'FUSD'
real_usd.flush(['name'])
cls.currency_data['currency'].name = 'USD'
# remove this tax, otherwise, at import, this tax with children taxes can be selected and the total is wrong
cls.tax_armageddon.children_tax_ids.unlink()
cls.tax_armageddon.unlink()
# Fixed Taxes
cls.recupel = cls.env['account.tax'].create({
'name': "RECUPEL",
'amount_type': 'fixed',
'amount': 1,
'include_base_amount': True,
'sequence': 1,
})
cls.auvibel = cls.env['account.tax'].create({
'name': "AUVIBEL",
'amount_type': 'fixed',
'amount': 1,
'include_base_amount': True,
'sequence': 2,
})
@classmethod
def setup_company_data(cls, company_name, chart_template=None, **kwargs):
# OVERRIDE to force the company with EUR currency.
eur = cls.env.ref('base.EUR')
if not eur.active:
eur.active = True
res = super().setup_company_data(company_name, chart_template=chart_template, **kwargs)
res['company'].currency_id = eur
return res
def assert_same_invoice(self, invoice1, invoice2, **invoice_kwargs):
self.assertEqual(len(invoice1.invoice_line_ids), len(invoice2.invoice_line_ids))
self.assertRecordValues(invoice2, [{
'partner_id': invoice1.partner_id.id,
'invoice_date': fields.Date.from_string(invoice1.date),
'currency_id': invoice1.currency_id.id,
'amount_untaxed': invoice1.amount_untaxed,
'amount_tax': invoice1.amount_tax,
'amount_total': invoice1.amount_total,
**invoice_kwargs,
}])
default_invoice_line_kwargs_list = [{}] * len(invoice1.invoice_line_ids)
invoice_line_kwargs_list = invoice_kwargs.get('invoice_line_ids', default_invoice_line_kwargs_list)
self.assertRecordValues(invoice2.invoice_line_ids, [{
'quantity': line.quantity,
'price_unit': line.price_unit,
'discount': line.discount,
'product_id': line.product_id.id,
'product_uom_id': line.product_uom_id.id,
**invoice_line_kwargs,
} for line, invoice_line_kwargs in zip(invoice1.invoice_line_ids, invoice_line_kwargs_list)])
# -------------------------------------------------------------------------
# IMPORT HELPERS
# -------------------------------------------------------------------------
@freeze_time('2017-01-01')
def _assert_imported_invoice_from_etree(self, invoice, xml_etree, xml_filename):
"""
Create an account.move directly from an xml file, asserts the invoice obtained is the same as the expected
invoice.
"""
new_invoice = self.edi_format._create_invoice_from_xml_tree(
xml_filename,
xml_etree,
# /!\ use the same journal as the invoice's one to import the xml !
invoice.journal_id,
)
self.assertTrue(new_invoice)
self.assert_same_invoice(invoice, new_invoice)
def _assert_imported_invoice_from_file(self, subfolder, filename, amount_total, amount_tax, list_line_subtotals,
list_line_price_unit=None, list_line_discount=None, list_line_taxes=None,
move_type='in_invoice', currency_id=None):
"""
Create an empty account.move, update the file to fill its fields, asserts the currency, total and tax amounts
are as expected.
"""
if not currency_id:
currency_id = self.env.ref('base.EUR').id
# Create empty account.move, then update a file
if move_type == 'in_invoice':
invoice = self._create_empty_vendor_bill()
elif move_type == 'out_invoice':
invoice = self.env['account.move'].create({
'move_type': move_type,
'journal_id': self.company_data['default_journal_sale'].id,
})
else:
invoice = self.env['account.move'].create({
'move_type': move_type,
'journal_id': self.company_data['default_journal_purchase'].id,
})
invoice_count = len(self.env['account.move'].search([]))
# Import the file to fill the empty invoice
self.update_invoice_from_file('l10n_account_edi_ubl_cii_tests', subfolder, filename, invoice)
# Checks
self.assertEqual(len(self.env['account.move'].search([])), invoice_count)
self.assertRecordValues(invoice, [{
'amount_total': amount_total,
'amount_tax': amount_tax,
'currency_id': currency_id,
}])
if list_line_price_unit:
self.assertEqual(invoice.invoice_line_ids.mapped('price_unit'), list_line_price_unit)
if list_line_discount:
self.assertEqual(invoice.invoice_line_ids.mapped('discount'), list_line_discount)
if list_line_taxes:
for line, taxes in zip(invoice.invoice_line_ids, list_line_taxes):
self.assertEqual(line.tax_ids, taxes)
self.assertEqual(invoice.invoice_line_ids.mapped('price_subtotal'), list_line_subtotals)
# -------------------------------------------------------------------------
# EXPORT HELPERS
# -------------------------------------------------------------------------
@freeze_time('2017-01-01')
def _generate_move(self, seller, buyer, **invoice_kwargs):
"""
Create and post an account.move.
"""
# Setup the seller.
self.env.company.write({
'partner_id': seller.id,
'name': seller.name,
'street': seller.street,
'zip': seller.zip,
'city': seller.city,
'vat': seller.vat,
'country_id': seller.country_id.id,
})
move_type = invoice_kwargs['move_type']
account_move = self.env['account.move'].create({
'partner_id': buyer.id,
'partner_bank_id': (seller if move_type == 'out_invoice' else buyer).bank_ids[:1].id,
'invoice_payment_term_id': self.pay_terms_b.id,
'invoice_date': '2017-01-01',
'date': '2017-01-01',
'currency_id': self.currency_data['currency'].id,
'narration': 'test narration',
'ref': 'ref_move',
**invoice_kwargs,
'invoice_line_ids': [
(0, 0, {
'sequence': i,
**invoice_line_kwargs,
})
for i, invoice_line_kwargs in enumerate(invoice_kwargs.get('invoice_line_ids', []))
],
})
# this is needed for formats not enabled by default on the journal
account_move.journal_id.edi_format_ids += self.edi_format
account_move.action_post()
return account_move
def _assert_invoice_attachment(self, invoice, xpaths, expected_file):
"""
Get attachment from a posted account.move, and asserts it's the same as the expected xml file.
"""
attachment = invoice._get_edi_attachment(self.edi_format)
self.assertTrue(attachment)
xml_filename = attachment.name
xml_content = base64.b64decode(attachment.with_context(bin_size=False).datas)
xml_etree = self.get_xml_tree_from_string(xml_content)
expected_file_path = get_resource_path('l10n_account_edi_ubl_cii_tests', 'tests/test_files', expected_file)
expected_etree = etree.parse(expected_file_path).getroot()
modified_etree = self.with_applied_xpath(
expected_etree,
xpaths
)
self.assertXmlTreeEqual(
xml_etree,
modified_etree,
)
return xml_etree, xml_filename
def _import_invoice_attachment(self, invoice, edi_code, journal):
""" Extract the attachment from the invoice and import it on the given journal.
"""
# Get the attachment from the invoice
edi_attachment = invoice.edi_document_ids.filtered(
lambda doc: doc.edi_format_id.code == edi_code).attachment_id
edi_etree = self.get_xml_tree_from_string(edi_attachment.raw)
# import the attachment and return the resulting invoice
return self.edi_format._create_invoice_from_xml_tree(
filename='test_filename',
tree=edi_etree,
journal=journal,
)
def _test_encoding_in_attachment(self, edi_code, filename):
"""
Generate an invoice, assert that the tag '<?xml version='1.0' encoding='UTF-8'?>' is present in the attachment
"""
invoice = self._generate_move(
seller=self.partner_1,
buyer=self.partner_2,
move_type='out_invoice',
invoice_line_ids=[{'product_id': self.product_a.id}],
)
edi_attachment = invoice.edi_document_ids.filtered(
lambda doc: doc.edi_format_id.code == edi_code).attachment_id
self.assertEqual(edi_attachment.name, filename)
self.assertIn(b"<?xml version='1.0' encoding='UTF-8'?>", edi_attachment.raw)

View File

@@ -0,0 +1,193 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>AV-2017-0005</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20171116</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>Avoir suite à bidon 10L d'huile d'olive percé et carton de nougat renversé</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:GlobalID schemeID="0160">3518370400049</ram:GlobalID>
<ram:SellerAssignedID>NOUG250</ram:SellerAssignedID>
<ram:Name>Nougat de l'Abbaye 250g</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>4.55</ram:ChargeAmount>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>-0.45</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>4.10</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">-5.000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-20.48</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:SellerAssignedID>HOLANCL</ram:SellerAssignedID>
<ram:Name>Huile d'olive à l'ancienne</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>19.80</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>19.80</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="LTR">-10.000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>5.50</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-198.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:SellerTradeParty>
<ram:Name>Au bon moulin</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">99999999800010</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact>
<ram:PersonName>Tony Dubois</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+33 4 72 07 08 56</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">tony.dubois@aubonmoulin.fr</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>84340</ram:PostcodeCode>
<ram:LineOne>1242 chemin de l'olive</ram:LineOne>
<ram:CityName>Malaucène</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR11999999998</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>Ma jolie boutique</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">78787878400035</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact>
<ram:PersonName>Alexandre Payet</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+33 4 72 07 08 67</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">alexandre.payet@majolieboutique.net</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>69001</ram:PostcodeCode>
<ram:LineOne>35 rue de la République</ram:LineOne>
<ram:CityName>Lyon</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR19787878784</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>PO445</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
<ram:ContractReferencedDocument>
<ram:IssuerAssignedID>MSPE2017</ram:IssuerAssignedID>
</ram:ContractReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:PostalTradeAddress>
<ram:PostcodeCode>69001</ram:PostcodeCode>
<ram:LineOne>35 rue de la République</ram:LineOne>
<ram:CityName>Lyon</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>AV-2017-0005</ram:PaymentReference>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>-4.10</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>-20.48</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>-10.89</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>-198.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>5.50</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>Paiement immédiat</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20171116</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>-218.48</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>-218.48</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">-14.99</ram:TaxTotalAmount>
<ram:GrandTotalAmount>-233.47</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>-0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>-233.47</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:InvoiceReferencedDocument>
<ram:IssuerAssignedID>FA-2017-0010</ram:IssuerAssignedID>
<ram:FormattedIssueDateTime>
<qdt:DateTimeString format="102">20171113</qdt:DateTimeString>
</ram:FormattedIssueDateTime>
</ram:InvoiceReferencedDocument>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,193 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>AV-2017-0005</ram:ID>
<ram:TypeCode>381</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20171116</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>Avoir suite à bidon 10L d'huile d'olive percé et carton de nougat renversé</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:GlobalID schemeID="0160">3518370400049</ram:GlobalID>
<ram:SellerAssignedID>NOUG250</ram:SellerAssignedID>
<ram:Name>Nougat de l'Abbaye 250g</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>4.55</ram:ChargeAmount>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>0.45</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>4.10</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">5.000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>20.48</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:SellerAssignedID>HOLANCL</ram:SellerAssignedID>
<ram:Name>Huile d'olive à l'ancienne</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>19.80</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>19.80</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="LTR">10.000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>5.50</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>198.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:SellerTradeParty>
<ram:Name>Au bon moulin</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">99999999800010</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact>
<ram:PersonName>Tony Dubois</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+33 4 72 07 08 56</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">tony.dubois@aubonmoulin.fr</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>84340</ram:PostcodeCode>
<ram:LineOne>1242 chemin de l'olive</ram:LineOne>
<ram:CityName>Malaucène</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR11999999998</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>Ma jolie boutique</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">78787878400035</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact>
<ram:PersonName>Alexandre Payet</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+33 4 72 07 08 67</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">alexandre.payet@majolieboutique.net</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>69001</ram:PostcodeCode>
<ram:LineOne>35 rue de la République</ram:LineOne>
<ram:CityName>Lyon</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR19787878784</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>PO445</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
<ram:ContractReferencedDocument>
<ram:IssuerAssignedID>MSPE2017</ram:IssuerAssignedID>
</ram:ContractReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:PostalTradeAddress>
<ram:PostcodeCode>69001</ram:PostcodeCode>
<ram:LineOne>35 rue de la République</ram:LineOne>
<ram:CityName>Lyon</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>AV-2017-0005</ram:PaymentReference>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>4.10</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>20.48</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>10.89</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>198.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>5.50</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>Paiement immédiat</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20171116</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>218.48</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>218.48</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">14.99</ram:TaxTotalAmount>
<ram:GrandTotalAmount>233.47</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>233.47</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:InvoiceReferencedDocument>
<ram:IssuerAssignedID>FA-2017-0010</ram:IssuerAssignedID>
<ram:FormattedIssueDateTime>
<qdt:DateTimeString format="102">20171113</qdt:DateTimeString>
</ram:FormattedIssueDateTime>
</ram:InvoiceReferencedDocument>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,441 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rsm:ExchangedDocumentContext>
<ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:ID>A1</ram:ID>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>F20220024</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20220131</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>FOURNISSEUR F SARL au capital de 50 000 EUR</ram:Content>
<ram:SubjectCode>REG</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>RCS MAVILLE 123 456 782</ram:Content>
<ram:SubjectCode>ABL</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>35 ma rue a moi, code postal Ville Pays contact@masociete.fr - www.masociete.fr N° TVA : FR32 123 456 789</ram:Content>
<ram:SubjectCode>AAI</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>Tout retard de paiement engendre une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal. </ram:Content>
<ram:SubjectCode>PMD</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €.</ram:Content>
<ram:SubjectCode>PMT</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>Les réglements reçus avant la date d'échéance ne donneront pas lieu à escompte.</ram:Content>
<ram:SubjectCode>AAB</ram:SubjectCode>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:GlobalID schemeID="0088">598785412598745</ram:GlobalID>
<ram:Name>PRESTATION SUPPORT</ram:Name>
<ram:Description>Description</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:BuyerOrderReferencedDocument>
<ram:LineID>1</ram:LineID>
</ram:BuyerOrderReferencedDocument>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>60.0000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>E</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>71</ram:ReasonCode>
<ram:Reason>REMISE VOLUME</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>71</ram:ReasonCode>
<ram:Reason>REMISE VOLUME</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>71</ram:ReasonCode>
<ram:Reason>REMISE VOLUME</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>100</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>ADL</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:Reason>FRAIS PALETTE</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>ADL</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>ADL</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>60.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>FOURNITURES DIVERSES</ram:Name>
<ram:Description>Description</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:BuyerOrderReferencedDocument>
<ram:LineID>3</ram:LineID>
</ram:BuyerOrderReferencedDocument>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>30.0000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">3.0000</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">3.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>2.00</ram:ActualAmount>
<ram:ReasonCode>71</ram:ReasonCode>
<ram:Reason>REMISE VOLUME</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>71</ram:ReasonCode>
<ram:Reason>REMISE VOLUME</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>71</ram:ReasonCode>
<ram:Reason>REMISE VOLUME</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>100</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>ADL</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>ADL</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>ADL</ram:ReasonCode>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>28.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>3</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>APPEL</ram:Name>
<ram:Description>Description</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:BuyerOrderReferencedDocument>
<ram:LineID>2</ram:LineID>
</ram:BuyerOrderReferencedDocument>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>7.0000</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>7.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>SERVEXEC</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:ID>123</ram:ID>
<ram:GlobalID schemeID="0088">587451236587</ram:GlobalID>
<ram:Name>LE FOURNISSEUR</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">123456782</ram:ID>
<ram:TradingBusinessName>SELLER TRADE NAME</ram:TradingBusinessName>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact>
<ram:PersonName>M. CONTACT</ram:PersonName>
<ram:DepartmentName>DEP SELLER</ram:DepartmentName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>01 02 03 54 87</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID>seller@seller.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75018</ram:PostcodeCode>
<ram:LineOne>35 rue d'ici</ram:LineOne>
<ram:LineTwo>Seller line 2</ram:LineTwo>
<ram:LineThree>Seller line 3</ram:LineThree>
<ram:CityName>PARIS</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:URIUniversalCommunication>
<ram:URIID schemeID="EM">moi@seller.com</ram:URIID>
</ram:URIUniversalCommunication>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR11123456782</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:GlobalID schemeID="0088">3654789851</ram:GlobalID>
<ram:Name>LE CLIENT</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">987654321</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:DefinedTradeContact>
<ram:PersonName>Buyer contact name</ram:PersonName>
<ram:DepartmentName>Buyer dep</ram:DepartmentName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>01 01 25 45 87</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID>buyer@buyer.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>06000</ram:PostcodeCode>
<ram:LineOne>58 rue de la mer</ram:LineOne>
<ram:LineTwo>Buyer line 2</ram:LineTwo>
<ram:LineThree>Buyer line 3</ram:LineThree>
<ram:CityName>NICE</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:URIUniversalCommunication>
<ram:URIID schemeID="EM">me@buyer.com</ram:URIID>
</ram:URIUniversalCommunication>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR 05 987 654 321</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:SellerTaxRepresentativeTradeParty>
<ram:Name>SELLER TAX REP</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75018</ram:PostcodeCode>
<ram:LineOne>35 rue d'ici</ram:LineOne>
<ram:LineTwo>Seller line 2</ram:LineTwo>
<ram:LineThree>Seller line 3</ram:LineThree>
<ram:CityName>PARIS</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR 05 987 654 321</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTaxRepresentativeTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>PO201925478</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
<ram:ContractReferencedDocument>
<ram:IssuerAssignedID>CT2018120802</ram:IssuerAssignedID>
</ram:ContractReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20220128</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
<ram:DespatchAdviceReferencedDocument>
<ram:IssuerAssignedID>DESPADV002</ram:IssuerAssignedID>
</ram:DespatchAdviceReferencedDocument>
<ram:ReceivingAdviceReferencedDocument>
<ram:IssuerAssignedID>RECEIV-ADV002</ram:IssuerAssignedID>
</ram:ReceivingAdviceReferencedDocument>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:CreditorReferenceID>CREDID</ram:CreditorReferenceID>
<ram:PaymentReference>F20180023BUYER</ram:PaymentReference>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:PayeeTradeParty>
<ram:ID>123</ram:ID>
<ram:Name>PAYEE NAME</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">123456782</ram:ID>
</ram:SpecifiedLegalOrganization>
</ram:PayeeTradeParty>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>30</ram:TypeCode>
<ram:PayerPartyDebtorFinancialAccount>
<ram:IBANID>FRDEBIT</ram:IBANID>
</ram:PayerPartyDebtorFinancialAccount>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>FR76 1254 2547 2569 8542 5874 698</ram:IBANID>
<ram:ProprietaryID>LOC BANK ACCOUNT</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>8.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>40.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>72</ram:DueDateTypeCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>0.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:ExemptionReason>VAT EXEMP</ram:ExemptionReason>
<ram:BasisAmount>60.00</ram:BasisAmount>
<ram:CategoryCode>E</ram:CategoryCode>
<ram:ExemptionReasonCode>VATEX-EU-D</ram:ExemptionReasonCode>
<ram:DueDateTypeCode>72</ram:DueDateTypeCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:CalculationPercent>5.00</ram:CalculationPercent>
<ram:BasisAmount>100.00</ram:BasisAmount>
<ram:ActualAmount>5.00</ram:ActualAmount>
<ram:ReasonCode>95</ram:ReasonCode>
<ram:Reason>REMISE COMMERCIALE</ram:Reason>
<ram:CategoryTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:CalculationPercent>10.00</ram:CalculationPercent>
<ram:BasisAmount>100.00</ram:BasisAmount>
<ram:ActualAmount>10.00</ram:ActualAmount>
<ram:ReasonCode>FC</ram:ReasonCode>
<ram:Reason>FRAIS DEPLACEMENT</ram:Reason>
<ram:CategoryTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>20.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradePaymentTerms>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20220302</udt:DateTimeString>
</ram:DueDateDateTime>
<ram:DirectDebitMandateID>MANDATE PT</ram:DirectDebitMandateID>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>95.00</ram:LineTotalAmount>
<ram:ChargeTotalAmount>10.00</ram:ChargeTotalAmount>
<ram:AllowanceTotalAmount>5.00</ram:AllowanceTotalAmount>
<ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">8.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>108.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>108.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:ReceivableSpecifiedTradeAccountingAccount>
<ram:ID>BUYER ACCOUNT REF</ram:ID>
</ram:ReceivableSpecifiedTradeAccountingAccount>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,325 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rsm:ExchangedDocumentContext>
<ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:ID>A1</ram:ID>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>F20220029</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20220131</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>FOURNISSEUR F SARL au capital de 50 000 EUR</ram:Content>
<ram:SubjectCode>REG</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>RCS MAVILLE 123 456 782</ram:Content>
<ram:SubjectCode>ABL</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>35 ma rue a moi, code postal Ville Pays contact@masociete.fr - www.masociete.fr N° TVA : FR32 123 456 789</ram:Content>
<ram:SubjectCode>AAI</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>Tout retard de paiement engendre une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal. </ram:Content>
<ram:SubjectCode>PMD</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €.</ram:Content>
<ram:SubjectCode>PMT</ram:SubjectCode>
</ram:IncludedNote>
<ram:IncludedNote>
<ram:Content>Les réglements reçus avant la date d'échéance ne donneront pas lieu à escompte.</ram:Content>
<ram:SubjectCode>AAB</ram:SubjectCode>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:GlobalID schemeID="0088">598785412598745</ram:GlobalID>
<ram:Name>PRESTATION SUPPORT</ram:Name>
<ram:Description>Description</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:BuyerOrderReferencedDocument>
<ram:LineID>1</ram:LineID>
</ram:BuyerOrderReferencedDocument>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>60.0000</ram:ChargeAmount>
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">-1.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>K</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:BillingSpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString format="102">20220101</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString format="102">20220131</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-60.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>FOURNITURES DIVERSES</ram:Name>
<ram:Description>Description</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:BuyerOrderReferencedDocument>
<ram:LineID>3</ram:LineID>
</ram:BuyerOrderReferencedDocument>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>10.0000</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">-3.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>K</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:BillingSpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString format="102">20220101</udt:DateTimeString>
</ram:StartDateTime>
</ram:BillingSpecifiedPeriod>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-30.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>3</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>APPEL</ram:Name>
<ram:Description>Description</ram:Description>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>5.0000</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">-1.0000</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>K</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:BillingSpecifiedPeriod>
<ram:EndDateTime>
<udt:DateTimeString format="102">20220131</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-5.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>SERVEXEC</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:GlobalID schemeID="0088">587451236587</ram:GlobalID>
<ram:Name>LE FOURNISSEUR</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">123456782</ram:ID>
<ram:TradingBusinessName>SELLER TRADE NAME</ram:TradingBusinessName>
</ram:SpecifiedLegalOrganization>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75018</ram:PostcodeCode>
<ram:LineOne>35 rue d'ici</ram:LineOne>
<ram:LineTwo>Seller line 2</ram:LineTwo>
<ram:CityName>PARIS</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:URIUniversalCommunication>
<ram:URIID schemeID="EM">moi@seller.com</ram:URIID>
</ram:URIUniversalCommunication>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR11123456782</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:GlobalID schemeID="0088">3654789851</ram:GlobalID>
<ram:Name>LE CLIENT</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">987654321</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:PostalTradeAddress>
<ram:PostcodeCode>06000</ram:PostcodeCode>
<ram:LineOne>58 rue de la mer</ram:LineOne>
<ram:LineTwo>Buyer line 2</ram:LineTwo>
<ram:CityName>NICE</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
<ram:URIUniversalCommunication>
<ram:URIID schemeID="EM">me@buyer.com</ram:URIID>
</ram:URIUniversalCommunication>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR 05 987 654 321</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:SellerOrderReferencedDocument>
<ram:IssuerAssignedID>SALES REF 2547</ram:IssuerAssignedID>
</ram:SellerOrderReferencedDocument>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>PO201925478</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
<ram:ContractReferencedDocument>
<ram:IssuerAssignedID>CT2018120802</ram:IssuerAssignedID>
</ram:ContractReferencedDocument>
<ram:AdditionalReferencedDocument>
<ram:IssuerAssignedID>SUPPort doc</ram:IssuerAssignedID>
<ram:URIID>url:gffter</ram:URIID>
<ram:TypeCode>916</ram:TypeCode>
<ram:Name>support descript</ram:Name>
</ram:AdditionalReferencedDocument>
<ram:AdditionalReferencedDocument>
<ram:IssuerAssignedID>TENDER-002</ram:IssuerAssignedID>
<ram:TypeCode>50</ram:TypeCode>
</ram:AdditionalReferencedDocument>
<ram:AdditionalReferencedDocument>
<ram:IssuerAssignedID>REFCLI0215</ram:IssuerAssignedID>
<ram:TypeCode>130</ram:TypeCode>
</ram:AdditionalReferencedDocument>
<ram:SpecifiedProcuringProject>
<ram:ID>PROJET2547</ram:ID>
<ram:Name>Project reference</ram:Name>
</ram:SpecifiedProcuringProject>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:GlobalID schemeID="0088">3654789851</ram:GlobalID>
<ram:Name>DEL Name</ram:Name>
<ram:PostalTradeAddress>
<ram:PostcodeCode>06000</ram:PostcodeCode>
<ram:LineOne>DEL 58 rue de la mer</ram:LineOne>
<ram:LineTwo>DEL line 2</ram:LineTwo>
<ram:CityName>BERLIN</ram:CityName>
<ram:CountryID>DE</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20220128</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
<ram:DespatchAdviceReferencedDocument>
<ram:IssuerAssignedID>DESPADV002</ram:IssuerAssignedID>
</ram:DespatchAdviceReferencedDocument>
<ram:ReceivingAdviceReferencedDocument>
<ram:IssuerAssignedID>RECEIV-ADV002</ram:IssuerAssignedID>
</ram:ReceivingAdviceReferencedDocument>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>F20180023BUYER</ram:PaymentReference>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>30</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:IBANID>FR76 1254 2547 2569 8542 5874 698</ram:IBANID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>0.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>-100.00</ram:BasisAmount>
<ram:CategoryCode>K</ram:CategoryCode>
<ram:ExemptionReasonCode>VATEX-EU-IC</ram:ExemptionReasonCode>
<ram:DueDateTypeCode>72</ram:DueDateTypeCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:BillingSpecifiedPeriod>
<ram:StartDateTime>
<udt:DateTimeString format="102">20220101</udt:DateTimeString>
</ram:StartDateTime>
<ram:EndDateTime>
<udt:DateTimeString format="102">20221231</udt:DateTimeString>
</ram:EndDateTime>
</ram:BillingSpecifiedPeriod>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>-5.00</ram:ActualAmount>
<ram:Reason>REMISE COMMERCIALE</ram:Reason>
<ram:CategoryTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>K</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>-10.00</ram:ActualAmount>
<ram:Reason>FRAIS DEPLACEMENT</ram:Reason>
<ram:CategoryTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>K</ram:CategoryCode>
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
</ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradePaymentTerms>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20220302</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>-95.00</ram:LineTotalAmount>
<ram:ChargeTotalAmount>-10.00</ram:ChargeTotalAmount>
<ram:AllowanceTotalAmount>-5.00</ram:AllowanceTotalAmount>
<ram:TaxBasisTotalAmount>-100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">0.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>-100.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>-10.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>-90.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:InvoiceReferencedDocument>
<ram:IssuerAssignedID>F20220003</ram:IssuerAssignedID>
<ram:FormattedIssueDateTime>
<qdt:DateTimeString format="102">20220101</qdt:DateTimeString>
</ram:FormattedIssueDateTime>
</ram:InvoiceReferencedDocument>
<ram:ReceivableSpecifiedTradeAccountingAccount>
<ram:ID>BUYER ACCOUNT REF</ram:ID>
</ram:ReceivableSpecifiedTradeAccountingAccount>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,132 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0
</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>___ignore___</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>___ignore___</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chauss&#233;e de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>___ignore___</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">21.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">21.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">121.00</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">121.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>___ignore___</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">100.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>AEO</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>RECUPEL</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="USD">1.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">99.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,138 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0
</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>___ignore___</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>___ignore___</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chauss&#233;e de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>___ignore___</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">21.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">21.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">121.00</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">121.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>___ignore___</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">100.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>AEO</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>RECUPEL</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="USD">1.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>AEO</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>AUVIBEL</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="USD">1.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">98.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,132 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0
</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>___ignore___</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>___ignore___</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chauss&#233;e de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>___ignore___</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">21.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">21.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">121.00</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">121.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>___ignore___</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">100.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>AEO</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>RECUPEL</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="USD">1.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">99.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,177 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/01/0002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chaussée de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>+++000/0000/26268+++</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">482.22</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">374.22</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">108.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3164.22</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3164.22</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>901</cbc:ID>
<cbc:InvoicedQuantity unitCode="DZN">2.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">990.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>902</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">10.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>903</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">-1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,168 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/01/0002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chaussée de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>+++000/0000/26268+++</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">482.22</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">374.22</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">108.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3164.22</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3164.22</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>901</cbc:ID>
<cbc:InvoicedQuantity unitCode="DZN">2.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>902</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">10.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>903</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">-1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,115 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/01/0002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chauss&#233;e de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>+++000/0000/05959+++</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">42.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">200.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">42.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">200.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">200.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">242.00</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">242.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>234</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">2.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">200.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,126 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0
</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/01/0002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>___ignore___</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chauss&#233;e de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>___ignore___</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">959.07</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">4567.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">959.07</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">4567.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">4567.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">5526.07</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">5526.07</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>___ignore___</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">10000.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">4567.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">0.4567</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,176 @@
<?xml version='1.0' encoding='UTF-8'?>
<CreditNote xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>RINV/2017/01/0001</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chaussée de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0477472701</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Rue des Bourlottes 9</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>BE0477472701</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>RINV/2017/01/0001</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE90735788866632</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">482.22</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">374.22</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">108.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3164.22</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3164.22</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:CreditNoteLine>
<cbc:ID>966</cbc:ID>
<cbc:CreditedQuantity unitCode="DZN">2.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>21.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">990.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>967</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">10.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>968</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">-1.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>12.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
</CreditNote>

View File

@@ -0,0 +1,152 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>___ignore___</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>99.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>99.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>AEO</ram:ReasonCode>
<ram:Reason>RECUPEL</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>ref_partner_2</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaur&#232;s, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR35562153452</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>___ignore___</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>___ignore___</ram:PaymentReference>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR15001559627230</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>21.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>100.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20170228</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">21.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>121.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>121.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,160 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>___ignore___</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>98.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>98.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>AEO</ram:ReasonCode>
<ram:Reason>RECUPEL</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>AEO</ram:ReasonCode>
<ram:Reason>AUVIBEL</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>ref_partner_2</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaur&#232;s, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR35562153452</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>___ignore___</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>___ignore___</ram:PaymentReference>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR15001559627230</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>21.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>100.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20170228</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">21.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>121.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>121.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,152 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>___ignore___</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>99.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>99.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>true</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>1.00</ram:ActualAmount>
<ram:ReasonCode>AEO</ram:ReasonCode>
<ram:Reason>RECUPEL</ram:Reason>
</ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>ref_partner_2</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaur&#232;s, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR35562153452</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>___ignore___</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>___ignore___</ram:PaymentReference>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR15001559627230</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>21.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>100.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20170228</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">21.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>121.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>121.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,214 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>INV/2017/01/0002</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>990.00</ram:ChargeAmount>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>99.00</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>891.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="DZN">2.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>1782.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_b</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">10.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>12.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>1000.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>3</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_b</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">-1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>12.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>ref_partner_2</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaurès, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-Églises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR35562153452</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>INV/2017/01/0002: INV/2017/01/0002</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-Églises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>INV/2017/01/0002</ram:PaymentReference>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR15001559627230</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>374.22</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>1782.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>108.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>900.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>12.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20170228</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>2682.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>2682.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">482.22</ram:TaxTotalAmount>
<ram:GrandTotalAmount>3164.22</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>3164.22</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,241 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>INV/2017/01/0001</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>95.24</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>95.24</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>5.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>95.24</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>5.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>3</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>190.48</ram:ChargeAmount>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>19.05</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>171.43</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>5.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>171.43</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>4</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>200.00</ram:ChargeAmount>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>20.00</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>180.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>5.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>180.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>ref_partner_2</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaur&#232;s, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR35562153452</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>INV/2017/01/0001</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-&#201;glises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>INV/2017/01/0001</ram:PaymentReference>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR15001559627230</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>27.33</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>546.67</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>5.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20170228</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>546.67</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>546.67</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">27.33</ram:TaxTotalAmount>
<ram:GrandTotalAmount>574.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>574.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,213 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>RINV/2017/01/0001</ram:ID>
<ram:TypeCode>381</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>990.00</ram:ChargeAmount>
<ram:AppliedTradeAllowanceCharge>
<ram:ChargeIndicator>
<udt:Indicator>false</udt:Indicator>
</ram:ChargeIndicator>
<ram:ActualAmount>99.00</ram:ActualAmount>
</ram:AppliedTradeAllowanceCharge>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>891.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="DZN">2.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>1782.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>2</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_b</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">10.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>12.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>1000.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>3</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_b</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>100.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">-1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:ApplicableTradeTax>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:RateApplicablePercent>12.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>-100.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>ref_partner_2</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaurès, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-Églises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR35562153452</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>RINV/2017/01/0001</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>partner_2</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_2</ram:PersonName>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>52330</ram:PostcodeCode>
<ram:LineOne>Rue Charles de Gaulle</ram:LineOne>
<ram:CityName>Colombey-les-Deux-Églises</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR90735788866632</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>374.22</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>1782.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>21.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>108.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:BasisAmount>900.00</ram:BasisAmount>
<ram:CategoryCode>S</ram:CategoryCode>
<ram:DueDateTypeCode>5</ram:DueDateTypeCode>
<ram:RateApplicablePercent>12.0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
<ram:DueDateDateTime>
<udt:DateTimeString format="102">20170228</udt:DateTimeString>
</ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>2682.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>2682.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">482.22</ram:TaxTotalAmount>
<ram:GrandTotalAmount>3164.22</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>3164.22</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,127 @@
<?xml version='1.0' encoding='UTF-8'?>
<rsm:CrossIndustryInvoice xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
<rsm:ExchangedDocumentContext>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>INV/2017/01/0001</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:IssueDateTime>
<ram:IncludedNote>
<ram:Content>test narration</ram:Content>
</ram:IncludedNote>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:IncludedSupplyChainTradeLineItem>
<ram:AssociatedDocumentLineDocument>
<ram:LineID>1</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
<ram:Name>product_a</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
<ram:GrossPriceProductTradePrice>
<ram:ChargeAmount>0.00</ram:ChargeAmount>
</ram:GrossPriceProductTradePrice>
<ram:NetPriceProductTradePrice>
<ram:ChargeAmount>0.00</ram:ChargeAmount>
</ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
<ram:BilledQuantity unitCode="C62">1.0</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>
<ram:SpecifiedLineTradeSettlement>
<ram:SpecifiedTradeSettlementLineMonetarySummation>
<ram:LineTotalAmount>0.00</ram:LineTotalAmount>
</ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
<ram:ApplicableHeaderTradeAgreement>
<ram:SellerTradeParty>
<ram:Name>partner_1</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>partner_1</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>+1 (650) 555-0111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">partner1@yourcompany.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:PostalTradeAddress>
<ram:PostcodeCode>75000</ram:PostcodeCode>
<ram:LineOne>Rue Jean Jaur&#232;s, 42</ram:LineOne>
<ram:CityName>Paris</ram:CityName>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR05677404089</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>Buyer</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>Buyer</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>1111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">buyer@yahoo.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">2222</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>INV/2017/01/0001</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery>
<ram:ShipToTradeParty>
<ram:Name>Buyer</ram:Name>
<ram:DefinedTradeContact>
<ram:PersonName>Buyer</ram:PersonName>
<ram:TelephoneUniversalCommunication>
<ram:CompleteNumber>1111</ram:CompleteNumber>
</ram:TelephoneUniversalCommunication>
<ram:EmailURIUniversalCommunication>
<ram:URIID schemeID="SMTP">buyer@yahoo.com</ram:URIID>
</ram:EmailURIUniversalCommunication>
</ram:DefinedTradeContact>
</ram:ShipToTradeParty>
<ram:ActualDeliverySupplyChainEvent>
<ram:OccurrenceDateTime>
<udt:DateTimeString format="102">20170101</udt:DateTimeString>
</ram:OccurrenceDateTime>
</ram:ActualDeliverySupplyChainEvent>
</ram:ApplicableHeaderTradeDelivery>
<ram:ApplicableHeaderTradeSettlement>
<ram:PaymentReference>INV/2017/01/0001</ram:PaymentReference>
<ram:InvoiceCurrencyCode>USD</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementPaymentMeans>
<ram:TypeCode>42</ram:TypeCode>
<ram:PayeePartyCreditorFinancialAccount>
<ram:ProprietaryID>FR15001559627230</ram:ProprietaryID>
</ram:PayeePartyCreditorFinancialAccount>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:SpecifiedTradePaymentTerms>
<ram:Description>30% Advance End of Following Month</ram:Description>
</ram:SpecifiedTradePaymentTerms>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:LineTotalAmount>0.00</ram:LineTotalAmount>
<ram:TaxBasisTotalAmount>0.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="USD">0.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>0.00</ram:GrandTotalAmount>
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>0.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>

View File

@@ -0,0 +1,185 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:nen.nl:nlcius:v1.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/00002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0106">77777677</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>77777677</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Kunststraat, 3</cbc:StreetName>
<cbc:CityName>Amsterdam</cbc:CityName>
<cbc:PostalZone>1000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>NL</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>NL000099998B57</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID schemeID="0106">77777677</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
<cbc:Telephone>+31 180 6 225789</cbc:Telephone>
<cbc:ElectronicMail>info@outlook.nl</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0106">1234567</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>1234567</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Europaweg, 2</cbc:StreetName>
<cbc:CityName>Rotterdam</cbc:CityName>
<cbc:PostalZone>1200</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>NL</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>NL000041452B11</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID schemeID="0106">1234567</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
<cbc:PaymentID>INV/2017/00002</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>NL000099998B57</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">401.58</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">338.58</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">63.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3083.58</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3083.58</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1359</cbc:ID>
<cbc:InvoicedQuantity unitCode="DZN">2.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">990.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1360</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">10.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1361</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">-1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,184 @@
<?xml version='1.0' encoding='UTF-8'?>
<CreditNote xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:nen.nl:nlcius:v1.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>RINV/2017/00001</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0106">77777677</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>77777677</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Kunststraat, 3</cbc:StreetName>
<cbc:CityName>Amsterdam</cbc:CityName>
<cbc:PostalZone>1000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>NL</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>NL000099998B57</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID schemeID="0106">77777677</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
<cbc:Telephone>+31 180 6 225789</cbc:Telephone>
<cbc:ElectronicMail>info@outlook.nl</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0106">1234567</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>1234567</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Europaweg, 2</cbc:StreetName>
<cbc:CityName>Rotterdam</cbc:CityName>
<cbc:PostalZone>1200</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>NL</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>NL000041452B11</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID schemeID="0106">1234567</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
<cbc:PaymentID>RINV/2017/00001</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>NL93999574162167</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">401.58</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">338.58</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">63.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3083.58</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3083.58</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:CreditNoteLine>
<cbc:ID>1405</cbc:ID>
<cbc:CreditedQuantity unitCode="DZN">2.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">990.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>1406</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">10.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>1407</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">-1.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
</CreditNote>

View File

@@ -0,0 +1,101 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0
</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/01/0002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>Buyer</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>test invoice origin</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9925">BE0202239951</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Chauss&#233;e de Namur 40</cbc:StreetName>
<cbc:CityName>Ramillies</cbc:CityName>
<cbc:PostalZone>1367</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>BE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>BE0202239951</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID>2222</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>Buyer</cbc:Name>
</cac:PartyName>
<cac:PartyTaxScheme>
<cbc:CompanyID>2222</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Buyer</cbc:RegistrationName>
<cbc:CompanyID>2222</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Buyer</cbc:Name>
<cbc:Telephone>1111</cbc:Telephone>
<cbc:ElectronicMail>buyer@yahoo.com</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>+++000/0000/08282+++</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>BE15001559627230</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">-0.00</cbc:TaxAmount>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">0.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">0.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">0.00</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">0.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>259</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">0.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">0.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,179 @@
<?xml version='1.0' encoding='UTF-8'?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2#conformant#urn:xoev-de:kosit:extension:xrechnung_2.2</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>INV/2017/01/0002</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:DueDate>2017-02-28</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9930">DE257486969</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Legoland-Allee 3</cbc:StreetName>
<cbc:CityName>Günzburg</cbc:CityName>
<cbc:PostalZone>89312</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE257486969</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>DE257486969</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
<cbc:Telephone>+49 180 6 225789</cbc:Telephone>
<cbc:ElectronicMail>info@legoland.de</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9930">DE186775212</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Europa-Park-Straße 2</cbc:StreetName>
<cbc:CityName>Rust</cbc:CityName>
<cbc:PostalZone>77977</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE186775212</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>DE186775212</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>INV/2017/01/0002</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>DE48500105176424548921</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">401.58</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">338.58</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">63.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3083.58</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3083.58</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1708</cbc:ID>
<cbc:InvoicedQuantity unitCode="DZN">2.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">990.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1709</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">10.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>1710</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">-1.0</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,178 @@
<?xml version='1.0' encoding='UTF-8'?>
<CreditNote xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2#conformant#urn:xoev-de:kosit:extension:xrechnung_2.2</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>RINV/2017/01/0001</cbc:ID>
<cbc:IssueDate>2017-01-01</cbc:IssueDate>
<cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
<cbc:Note>test narration</cbc:Note>
<cbc:DocumentCurrencyCode>USD</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>ref_partner_2</cbc:BuyerReference>
<cac:OrderReference>
<cbc:ID>ref_move</cbc:ID>
</cac:OrderReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9930">DE257486969</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_1</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Legoland-Allee 3</cbc:StreetName>
<cbc:CityName>Günzburg</cbc:CityName>
<cbc:PostalZone>89312</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE257486969</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_1</cbc:RegistrationName>
<cbc:CompanyID>DE257486969</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_1</cbc:Name>
<cbc:Telephone>+49 180 6 225789</cbc:Telephone>
<cbc:ElectronicMail>info@legoland.de</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9930">DE186775212</cbc:EndpointID>
<cac:PartyName>
<cbc:Name>partner_2</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Europa-Park-Straße 2</cbc:StreetName>
<cbc:CityName>Rust</cbc:CityName>
<cbc:PostalZone>77977</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>DE186775212</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>partner_2</cbc:RegistrationName>
<cbc:CompanyID>DE186775212</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>partner_2</cbc:Name>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>RINV/2017/01/0001</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>DE50500105175653254743</cbc:ID>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>30% Advance End of Following Month</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="USD">401.58</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">1782.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">338.58</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="USD">900.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="USD">63.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="USD">2682.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="USD">2682.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="USD">3083.58</cbc:TaxInclusiveAmount>
<cbc:PrepaidAmount currencyID="USD">0.00</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="USD">3083.58</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:CreditNoteLine>
<cbc:ID>1754</cbc:ID>
<cbc:CreditedQuantity unitCode="DZN">2.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1782.00</cbc:LineExtensionAmount>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:Amount currencyID="USD">198.00</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>product_a</cbc:Description>
<cbc:Name>product_a</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>19.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">990.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>1755</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">10.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">1000.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>1756</cbc:ID>
<cbc:CreditedQuantity unitCode="C62">-1.0</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="USD">-100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Description>product_b</cbc:Description>
<cbc:Name>product_b</cbc:Name>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>7.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="USD">100.00</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
</CreditNote>

View File

@@ -0,0 +1,370 @@
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>Snippet1</cbc:ID>
<cbc:IssueDate>2017-11-13</cbc:IssueDate>
<cbc:DueDate>2017-12-01</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:Note>Please note we have a new phone number: 22 22 22 22</cbc:Note>
<cbc:TaxPointDate>2017-12-01</cbc:TaxPointDate>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:TaxCurrencyCode>SEK</cbc:TaxCurrencyCode>
<cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
<cbc:BuyerReference>0150abc</cbc:BuyerReference>
<cac:InvoicePeriod>
<cbc:StartDate>2017-12-01</cbc:StartDate>
<cbc:EndDate>2017-12-31</cbc:EndDate>
</cac:InvoicePeriod>
<cac:ContractDocumentReference>
<cbc:ID>framework no 1</cbc:ID>
</cac:ContractDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID schemeID="ABT">DR35141</cbc:ID>
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>ts12345</cbc:ID>
<cbc:DocumentDescription>Technical specification</cbc:DocumentDescription>
<cac:Attachment>
<cac:ExternalReference>
<cbc:URI>www.techspec.no</cbc:URI>
</cac:ExternalReference>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>99887766</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>SupplierTradingName Ltd.</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Main street 1</cbc:StreetName>
<cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
<cbc:CityName>London</cbc:CityName>
<cbc:PostalZone>GB 123 EW</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>GB</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>GB1232434</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
<cbc:CompanyID>GB983294</cbc:CompanyID>
<cbc:CompanyLegalForm>AdditionalLegalInformation</cbc:CompanyLegalForm>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0002">4598375937</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID schemeID="0002">4598375937</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>BuyerTradingName AS</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Hovedgatan 32</cbc:StreetName>
<cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>456 34</cbc:PostalZone>
<cbc:CountrySubentity>Södermalm</cbc:CountrySubentity>
<cac:Country>
<cbc:IdentificationCode>SE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>SE4598375937</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
<cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Lisa Johnson</cbc:Name>
<cbc:Telephone>23434234</cbc:Telephone>
<cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:Delivery>
<cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
<cac:DeliveryLocation>
<cbc:ID schemeID="0088">7300010000001</cbc:ID>
<cac:Address>
<cbc:StreetName>Delivery street 2</cbc:StreetName>
<cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>21234</cbc:PostalZone>
<cbc:CountrySubentity>Södermalm</cbc:CountrySubentity>
<cac:AddressLine>
<cbc:Line>Gate 15</cbc:Line>
</cac:AddressLine>
<cac:Country>
<cbc:IdentificationCode>SE</cbc:IdentificationCode>
</cac:Country>
</cac:Address>
</cac:DeliveryLocation>
<cac:DeliveryParty>
<cac:PartyName>
<cbc:Name>Delivery party Name</cbc:Name>
</cac:PartyName>
</cac:DeliveryParty>
</cac:Delivery>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>Snippet1</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>IBAN32423940</cbc:ID>
<cbc:Name>AccountName</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>BIC324098</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
</cac:PaymentTerms>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Cleaning</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>20</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="EUR">200</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">200</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">1225.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">4900.0</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">1225</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">1000.0</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">0</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0</cbc:Percent>
<cbc:TaxExemptionReason>Reason for tax exempt</cbc:TaxExemptionReason>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:TaxTotal>
<cbc:TaxAmount currencyID ="SEK">9324.00</cbc:TaxAmount>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">5900</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">5900</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">7125</cbc:TaxInclusiveAmount>
<cbc:AllowanceTotalAmount currencyID="EUR">200</cbc:AllowanceTotalAmount>
<cbc:ChargeTotalAmount currencyID="EUR">200</cbc:ChargeTotalAmount>
<cbc:PrepaidAmount currencyID="EUR">1000</cbc:PrepaidAmount>
<cbc:PayableAmount currencyID="EUR">6125.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:Note>Testing note on line level</cbc:Note>
<cbc:InvoicedQuantity unitCode="C62">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">4000.00</cbc:LineExtensionAmount>
<cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Cleaning</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>1</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="EUR">1</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">100</cbc:BaseAmount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">101</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>Description of item A</cbc:Description>
<cbc:Name>item name</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>97iugug876</cbc:ID>
</cac:SellersItemIdentification>
<cac:OriginCountry>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:OriginCountry>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">410</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:Amount currencyID="EUR">40</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">450</cbc:BaseAmount>
</cac:AllowanceCharge>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:Note>Testing note on line level</cbc:Note>
<cbc:InvoicedQuantity unitCode="C62">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">1000.00</cbc:LineExtensionAmount>
<cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
<cac:InvoicePeriod>
<cbc:StartDate>2017-12-01</cbc:StartDate>
<cbc:EndDate>2017-12-05</cbc:EndDate>
</cac:InvoicePeriod>
<cac:OrderLineReference>
<cbc:LineID>124</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Description of item B</cbc:Description>
<cbc:Name>item name</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>97iugug876</cbc:ID>
</cac:SellersItemIdentification>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">86776</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
<cac:AdditionalItemProperty>
<cbc:Name>AdditionalItemName</cbc:Name>
<cbc:Value>AdditionalItemValue</cbc:Value>
</cac:AdditionalItemProperty>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">200</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="C62">2</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>3</cbc:ID>
<cbc:Note>Testing note on line level</cbc:Note>
<cbc:InvoicedQuantity unitCode="C62">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">900.00</cbc:LineExtensionAmount>
<cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
<cac:InvoicePeriod>
<cbc:StartDate>2017-12-01</cbc:StartDate>
<cbc:EndDate>2017-12-05</cbc:EndDate>
</cac:InvoicePeriod>
<cac:OrderLineReference>
<cbc:LineID>124</cbc:LineID>
</cac:OrderLineReference>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>CG</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Charge</cbc:AllowanceChargeReason>
<cbc:MultiplierFactorNumeric>1</cbc:MultiplierFactorNumeric>
<cbc:Amount currencyID="EUR">1</cbc:Amount>
<cbc:BaseAmount currencyID="EUR">100</cbc:BaseAmount>
</cac:AllowanceCharge>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
<cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">101</cbc:Amount>
</cac:AllowanceCharge>
<cac:Item>
<cbc:Description>Description of item C</cbc:Description>
<cbc:Name>item name</cbc:Name>
<cac:SellersItemIdentification>
<cbc:ID>97iugug876</cbc:ID>
</cac:SellersItemIdentification>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">86776</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
<cac:AdditionalItemProperty>
<cbc:Name>AdditionalItemName</cbc:Name>
<cbc:Value>AdditionalItemValue</cbc:Value>
</cac:AdditionalItemProperty>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">100</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="UTF-8"?>
<CreditNote xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>Snippet1</cbc:ID>
<cbc:IssueDate>2017-11-13</cbc:IssueDate>
<cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
<cbc:Note>Please note we have a new phone number: 22 22 22 22</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
<cbc:BuyerReference>0150abc</cbc:BuyerReference>
<cac:BillingReference>
<cac:InvoiceDocumentReference>
<cbc:ID>Snippet1</cbc:ID>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>99887766</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>SupplierTradingName Ltd.</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Main street 1</cbc:StreetName>
<cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
<cbc:CityName>London</cbc:CityName>
<cbc:PostalZone>GB 123 EW</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>GB</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>GB1232434</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
<cbc:CompanyID>GB983294</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0002">FR23342</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID schemeID="0002">FR23342</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>BuyerTradingName AS</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Hovedgatan 32</cbc:StreetName>
<cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>456 34</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>SE4598375937</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
<cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Lisa Johnson</cbc:Name>
<cbc:Telephone>23434234</cbc:Telephone>
<cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:Delivery>
<cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
<cac:DeliveryLocation>
<cbc:ID schemeID="0088">9483759475923478</cbc:ID>
<cac:Address>
<cbc:StreetName>Delivery street 2</cbc:StreetName>
<cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>21234</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SE</cbc:IdentificationCode>
</cac:Country>
</cac:Address>
</cac:DeliveryLocation>
<cac:DeliveryParty>
<cac:PartyName>
<cbc:Name>Delivery party Name</cbc:Name>
</cac:PartyName>
</cac:DeliveryParty>
</cac:Delivery>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>Snippet1</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>IBAN32423940</cbc:ID>
<cbc:Name>AccountName</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>BIC324098</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
</cac:PaymentTerms>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">25</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">1325</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">331.25</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">1300</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">1325</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">1656.25</cbc:TaxInclusiveAmount>
<cbc:ChargeTotalAmount currencyID="EUR">25</cbc:ChargeTotalAmount>
<cbc:PayableAmount currencyID="EUR">1656.25</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:CreditNoteLine>
<cbc:ID>1</cbc:ID>
<cbc:CreditedQuantity unitCode="DAY">7</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID= "EUR">2800</cbc:LineExtensionAmount>
<cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
<cac:OrderLineReference>
<cbc:LineID>123</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Description of item</cbc:Description>
<cbc:Name>item name</cbc:Name>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0088">21382183120983</cbc:ID>
</cac:StandardItemIdentification>
<cac:OriginCountry>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:OriginCountry>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">400</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
<cac:CreditNoteLine>
<cbc:ID>2</cbc:ID>
<cbc:CreditedQuantity unitCode="DAY">-3</cbc:CreditedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">-1500</cbc:LineExtensionAmount>
<cac:OrderLineReference>
<cbc:LineID>123</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Description 2</cbc:Description>
<cbc:Name>item name 2</cbc:Name>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0088">21382183120983</cbc:ID>
</cac:StandardItemIdentification>
<cac:OriginCountry>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:OriginCountry>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount>
</cac:Price>
</cac:CreditNoteLine>
</CreditNote>

View File

@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>Correction1</cbc:ID>
<cbc:IssueDate>2017-11-13</cbc:IssueDate>
<cbc:DueDate>2017-12-01</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:AccountingCost>4025:123:4343</cbc:AccountingCost>
<cbc:BuyerReference>0150abc</cbc:BuyerReference>
<cac:BillingReference>
<cac:InvoiceDocumentReference>
<cbc:ID>Snippet1</cbc:ID>
</cac:InvoiceDocumentReference>
</cac:BillingReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0088">9482348239847239874</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>99887766</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>SupplierTradingName Ltd.</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Main street 1</cbc:StreetName>
<cbc:AdditionalStreetName>Postbox 123</cbc:AdditionalStreetName>
<cbc:CityName>London</cbc:CityName>
<cbc:PostalZone>GB 123 EW</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>GB</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>GB1232434</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>SupplierOfficialName Ltd</cbc:RegistrationName>
<cbc:CompanyID>GB983294</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0002">FR23342</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID schemeID="0002">FR23342</cbc:ID>
</cac:PartyIdentification>
<cac:PartyName>
<cbc:Name>BuyerTradingName AS</cbc:Name>
</cac:PartyName>
<cac:PostalAddress>
<cbc:StreetName>Hovedgatan 32</cbc:StreetName>
<cbc:AdditionalStreetName>Po box 878</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>456 34</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SE</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>SE4598375937</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>Buyer Official Name</cbc:RegistrationName>
<cbc:CompanyID schemeID="0183">39937423947</cbc:CompanyID>
</cac:PartyLegalEntity>
<cac:Contact>
<cbc:Name>Lisa Johnson</cbc:Name>
<cbc:Telephone>23434234</cbc:Telephone>
<cbc:ElectronicMail>lj@buyer.se</cbc:ElectronicMail>
</cac:Contact>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:Delivery>
<cbc:ActualDeliveryDate>2017-11-01</cbc:ActualDeliveryDate>
<cac:DeliveryLocation>
<cbc:ID schemeID="0088">9483759475923478</cbc:ID>
<cac:Address>
<cbc:StreetName>Delivery street 2</cbc:StreetName>
<cbc:AdditionalStreetName>Building 56</cbc:AdditionalStreetName>
<cbc:CityName>Stockholm</cbc:CityName>
<cbc:PostalZone>21234</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>SE</cbc:IdentificationCode>
</cac:Country>
</cac:Address>
</cac:DeliveryLocation>
<cac:DeliveryParty>
<cac:PartyName>
<cbc:Name>Delivery party Name</cbc:Name>
</cac:PartyName>
</cac:DeliveryParty>
</cac:Delivery>
<cac:PaymentMeans>
<cbc:PaymentMeansCode name="Credit transfer">30</cbc:PaymentMeansCode>
<cbc:PaymentID>Snippet1</cbc:PaymentID>
<cac:PayeeFinancialAccount>
<cbc:ID>IBAN32423940</cbc:ID>
<cbc:Name>AccountName</cbc:Name>
<cac:FinancialInstitutionBranch>
<cbc:ID>BIC324098</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Payment within 10 days, 2% discount</cbc:Note>
</cac:PaymentTerms>
<cac:AllowanceCharge>
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
<cbc:AllowanceChargeReason>Insurance</cbc:AllowanceChargeReason>
<cbc:Amount currencyID="EUR">-25</cbc:Amount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:AllowanceCharge>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">-331.25</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">-1325</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">-331.25</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">-1300</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">-1325</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">-1656.25</cbc:TaxInclusiveAmount>
<cbc:ChargeTotalAmount currencyID="EUR">-25</cbc:ChargeTotalAmount>
<cbc:PayableAmount currencyID="EUR">-1656.25</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="DAY">-7</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID= "EUR">-2800</cbc:LineExtensionAmount>
<cbc:AccountingCost>Konteringsstreng</cbc:AccountingCost>
<cac:OrderLineReference>
<cbc:LineID>123</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Description of item</cbc:Description>
<cbc:Name>item name</cbc:Name>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0088">21382183120983</cbc:ID>
</cac:StandardItemIdentification>
<cac:OriginCountry>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:OriginCountry>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">400</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
<cac:InvoiceLine>
<cbc:ID>2</cbc:ID>
<cbc:InvoicedQuantity unitCode="DAY">3</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">1500</cbc:LineExtensionAmount>
<cac:OrderLineReference>
<cbc:LineID>123</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Description>Description 2</cbc:Description>
<cbc:Name>item name 2</cbc:Name>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0088">21382183120983</cbc:ID>
</cac:StandardItemIdentification>
<cac:OriginCountry>
<cbc:IdentificationCode>NO</cbc:IdentificationCode>
</cac:OriginCountry>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="SRV">09348023</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25.0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">500</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- PEPPOL BIS Billing, testfile showing the use of VAT category Z (Zero rated goods) -->
<Invoice xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>Vat-Z</cbc:ID>
<cbc:IssueDate>2018-08-30</cbc:IssueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>GBP</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>test reference</cbc:BuyerReference>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="0088">7300010000001</cbc:EndpointID>
<cac:PartyIdentification>
<cbc:ID>7300010000001</cbc:ID>
</cac:PartyIdentification>
<cac:PostalAddress>
<cbc:StreetName>Main street 2, Building 4</cbc:StreetName>
<cbc:CityName>Big city</cbc:CityName>
<cbc:PostalZone>54321</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>GB</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>GB928741974</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>The Sellercompany Incorporated</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="0184">DK12345678</cbc:EndpointID>
<cac:PostalAddress>
<cbc:StreetName>Anystreet 8</cbc:StreetName>
<cbc:AdditionalStreetName>Back door</cbc:AdditionalStreetName>
<cbc:CityName>Anytown</cbc:CityName>
<cbc:PostalZone>101</cbc:PostalZone>
<cbc:CountrySubentity>RegionB</cbc:CountrySubentity>
<cac:Country>
<cbc:IdentificationCode>DK</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyLegalEntity>
<cbc:RegistrationName>The Buyercompany</cbc:RegistrationName>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
<cac:PayeeFinancialAccount>
<cbc:ID>SE1212341234123412</cbc:ID>
<cac:FinancialInstitutionBranch>
<cbc:ID>SEXDABCD</cbc:ID>
</cac:FinancialInstitutionBranch>
</cac:PayeeFinancialAccount>
</cac:PaymentMeans>
<cac:PaymentTerms>
<cbc:Note>Payment within 30 days</cbc:Note>
</cac:PaymentTerms>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="GBP">0.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="GBP">1200.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="GBP">0.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0</cbc:Percent>
<cbc:TaxExemptionReasonCode>VATEX-EU-F</cbc:TaxExemptionReasonCode>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="GBP">1200.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="GBP">1200.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="GBP">1200.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="GBP">1200.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="EA">10</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="GBP">1200.00</cbc:LineExtensionAmount>
<cac:OrderLineReference>
<cbc:LineID>1</cbc:LineID>
</cac:OrderLineReference>
<cac:Item>
<cbc:Name>Test item, category Z</cbc:Name>
<cac:StandardItemIdentification>
<cbc:ID schemeID="0160">192387129837129873</cbc:ID>
</cac:StandardItemIdentification>
<cac:ClassifiedTaxCategory>
<cbc:ID>E</cbc:ID>
<cbc:Percent>0</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="GBP">120.00</cbc:PriceAmount>
</cac:Price>
</cac:InvoiceLine>
</Invoice>

View File

@@ -0,0 +1,465 @@
# -*- coding: utf-8 -*-
from flectra.addons.l10n_account_edi_ubl_cii_tests.tests.common import TestUBLCommon
from flectra.tests import tagged
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestCIIFR(TestUBLCommon):
@classmethod
def setUpClass(cls,
chart_template_ref="l10n_fr.l10n_fr_pcg_chart_template",
edi_format_ref="account_edi_facturx.edi_facturx_1_0_05",
):
"""
this test will fail if account_edi_facturx is not installed. In order not to duplicate the
account.edi.format already installed, we use the existing ones (comprising
account_edi_facturx.facturx_1_0_05).
"""
super().setUpClass(chart_template_ref=chart_template_ref, edi_format_ref=edi_format_ref)
cls.partner_1 = cls.env['res.partner'].create({
'name': "partner_1",
'street': "Rue Jean Jaurès, 42",
'zip': "75000",
'city': "Paris",
'vat': 'FR05677404089',
'country_id': cls.env.ref('base.fr').id,
'bank_ids': [(0, 0, {'acc_number': 'FR15001559627230'})],
'phone': '+1 (650) 555-0111',
'email': "partner1@yourcompany.com",
'ref': 'ref_partner_1',
})
cls.partner_2 = cls.env['res.partner'].create({
'name': "partner_2",
'street': "Rue Charles de Gaulle",
'zip': "52330",
'city': "Colombey-les-Deux-Églises",
'vat': 'FR35562153452',
'country_id': cls.env.ref('base.fr').id,
'bank_ids': [(0, 0, {'acc_number': 'FR90735788866632'})],
'ref': 'ref_partner_2',
})
cls.tax_21 = cls.env['account.tax'].create({
'name': 'tax_21',
'amount_type': 'percent',
'amount': 21,
'type_tax_use': 'sale',
'sequence': 10,
})
cls.tax_12 = cls.env['account.tax'].create({
'name': 'tax_12',
'amount_type': 'percent',
'amount': 12,
'type_tax_use': 'sale',
})
cls.tax_21_purchase = cls.env['account.tax'].create({
'name': 'tax_21',
'amount_type': 'percent',
'amount': 21,
'type_tax_use': 'purchase',
})
cls.tax_12_purchase = cls.env['account.tax'].create({
'name': 'tax_12',
'amount_type': 'percent',
'amount': 12,
'type_tax_use': 'purchase',
})
cls.tax_5_purchase = cls.env['account.tax'].create({
'name': 'tax_5',
'amount_type': 'percent',
'amount': 5,
'type_tax_use': 'purchase',
})
cls.tax_5 = cls.env['account.tax'].create({
'name': 'tax_5',
'amount_type': 'percent',
'amount': 5,
'type_tax_use': 'sale',
})
cls.tax_5_incl = cls.env['account.tax'].create({
'name': 'tax_5_incl',
'amount_type': 'percent',
'amount': 5,
'type_tax_use': 'sale',
'price_include': True,
})
@classmethod
def setup_company_data(cls, company_name, chart_template):
# OVERRIDE
# to force the company to be french
res = super().setup_company_data(
company_name,
chart_template=chart_template,
country_id=cls.env.ref("base.fr").id,
phone='+1 (650) 555-0111', # [BR-DE-6] "Seller contact telephone number" (BT-42) is required
email="info@yourcompany.com", # [BR-DE-7] The element "Seller contact email address" (BT-43) is required
)
return res
####################################################
# Test export - import
####################################################
def test_export_pdf(self):
acc_bank = self.env['res.partner.bank'].create({
'acc_number': 'FR15001559627231',
'partner_id': self.company_data['company'].partner_id.id,
})
invoice = self.env['account.move'].create({
'move_type': 'out_invoice',
'journal_id': self.journal.id,
'partner_id': self.partner_1.id,
'partner_bank_id': acc_bank,
'invoice_date': '2017-01-01',
'date': '2017-01-01',
'currency_id': self.currency_data['currency'].id,
'invoice_line_ids': [(0, 0, {
'product_id': self.product_a.id,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 275.0,
'quantity': 5,
'discount': 20.0,
'tax_ids': [(6, 0, self.tax_21.ids)],
})],
})
invoice.action_post()
pdf_attachment = invoice._get_edi_attachment(self.edi_format)
self.assertEqual(pdf_attachment['name'], 'factur-x.xml')
def test_export_import_invoice(self):
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2.0,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 990.0,
'discount': 10.0,
'tax_ids': [(6, 0, self.tax_21.ids)],
},
{
'product_id': self.product_b.id,
'quantity': 10.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
{
'product_id': self.product_b.id,
'quantity': -1.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
],
)
xml_etree, xml_filename = self._assert_invoice_attachment(
invoice,
xpaths='''
<xpath expr="./*[local-name()='ExchangedDocument']/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='IssuerAssignedID']" position="replace">
<IssuerAssignedID>___ignore___</IssuerAssignedID>
</xpath>
<xpath expr=".//*[local-name()='PaymentReference']" position="replace">
<PaymentReference>___ignore___</PaymentReference>
</xpath>
''',
expected_file='from_flectra/facturx_out_invoice.xml',
)
self.assertEqual(xml_filename, "factur-x.xml")
self._assert_imported_invoice_from_etree(invoice, xml_etree, xml_filename)
def test_export_import_refund(self):
refund = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_refund',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2.0,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 990.0,
'discount': 10.0,
'tax_ids': [(6, 0, self.tax_21.ids)],
},
{
'product_id': self.product_b.id,
'quantity': 10.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
{
'product_id': self.product_b.id,
'quantity': -1.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
],
)
xml_etree, xml_filename = self._assert_invoice_attachment(
refund,
xpaths='''
<xpath expr="./*[local-name()='ExchangedDocument']/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='IssuerAssignedID']" position="replace">
<IssuerAssignedID>___ignore___</IssuerAssignedID>
</xpath>
''',
expected_file='from_flectra/facturx_out_refund.xml'
)
self.assertEqual(xml_filename, "factur-x.xml")
self._assert_imported_invoice_from_etree(refund, xml_etree, xml_filename)
def test_export_tax_included(self):
"""
Tests whether the tax included price_units are correctly converted to tax excluded
amounts in the exported xml
"""
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 100,
'tax_ids': [(6, 0, self.tax_5_incl.ids)],
},
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 100,
'tax_ids': [(6, 0, self.tax_5.ids)],
},
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 200,
'discount': 10,
'tax_ids': [(6, 0, self.tax_5_incl.ids)],
},
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 200,
'discount': 10,
'tax_ids': [(6, 0, self.tax_5.ids)],
},
],
)
self._assert_invoice_attachment(
invoice,
xpaths='''
<xpath expr="./*[local-name()='ExchangedDocument']/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='IssuerAssignedID']" position="replace">
<IssuerAssignedID>___ignore___</IssuerAssignedID>
</xpath>
''',
expected_file='from_flectra/facturx_out_invoice_tax_incl.xml'
)
def test_encoding_in_attachment_facturx(self):
self._test_encoding_in_attachment('facturx_1_0_05', 'factur-x.xml')
def test_export_with_fixed_taxes_case1(self):
# CASE 1: simple invoice with a recupel tax
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 99,
'tax_ids': [(6, 0, [self.recupel.id, self.tax_21.id])],
}
],
)
self.assertEqual(invoice.amount_total, 121)
self._assert_invoice_attachment(invoice, None, 'from_flectra/facturx_ecotaxes_case1.xml')
def test_export_with_fixed_taxes_case2(self):
# CASE 2: Same but with several ecotaxes
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 98,
'tax_ids': [(6, 0, [self.recupel.id, self.auvibel.id, self.tax_21.id])],
}
],
)
self.assertEqual(invoice.amount_total, 121)
self._assert_invoice_attachment(invoice, None, 'from_flectra/facturx_ecotaxes_case2.xml')
def test_export_with_fixed_taxes_case3(self):
# CASE 3: same as Case 1 but taxes are Price Included
self.recupel.price_include = True
self.tax_21.price_include = True
# Price TTC = 121 = (99 + 1 ) * 1.21
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 121,
'tax_ids': [(6, 0, [self.recupel.id, self.tax_21.id])],
}
],
)
self.assertEqual(invoice.amount_total, 121)
self._assert_invoice_attachment(invoice, None, 'from_flectra/facturx_ecotaxes_case3.xml')
####################################################
# Test import
####################################################
def test_import_partner_facturx(self):
"""
Given an invoice where partner_1 is the vendor and partner_2 is the customer with an EDI attachment.
* Uploading the attachment as an invoice should create an invoice with the buyer = partner_2.
* Uploading the attachment as a vendor bill should create a bill with the vendor = partner_1.
"""
invoice = self._generate_move(
seller=self.partner_1,
buyer=self.partner_2,
move_type='out_invoice',
invoice_line_ids=[{'product_id': self.product_a.id}],
)
new_invoice = self._import_invoice_attachment(invoice, 'facturx_1_0_05', self.company_data['default_journal_sale'])
self.assertEqual(self.partner_2, new_invoice.partner_id)
new_invoice = self._import_invoice_attachment(invoice, 'facturx_1_0_05', self.company_data['default_journal_purchase'])
self.assertEqual(self.partner_1, new_invoice.partner_id)
def test_import_and_create_partner_facturx(self):
""" Tests whether the partner is created at import if no match is found when decoding the EDI attachment
"""
partner_vals = {
'name': "Buyer",
'mail': "buyer@yahoo.com",
'phone': "1111",
'vat': "2222",
}
# assert there is no matching partner
partner_match = self.env['account.edi.format']._retrieve_partner(**partner_vals)
self.assertFalse(partner_match)
# Import attachment as an invoice
invoice = self.env['account.move'].create({
'move_type': 'out_invoice',
'journal_id': self.company_data['default_journal_sale'].id,
})
self.update_invoice_from_file(
module_name='l10n_account_edi_ubl_cii_tests',
subfolder='tests/test_files/from_flectra',
filename='facturx_test_import_partner.xml',
invoice=invoice)
# assert a new partner has been created
partner_vals['email'] = partner_vals.pop('mail')
self.assertRecordValues(invoice.partner_id, [partner_vals])
def test_import_tax_included(self):
"""
Tests whether the tax included / tax excluded are correctly decoded when
importing a document. The imported xml represents the following invoice:
Description Quantity Unit Price Disc (%) Taxes Amount
--------------------------------------------------------------------------------
Product A 1 100 0 5% (incl) 95.24
Product A 1 100 0 5% (not incl) 100
Product A 2 200 10 5% (incl) 171.43
Product A 2 200 10 5% (not incl) 180
-----------------------
Untaxed Amount: 546.67
Taxes: 27.334
-----------------------
Total: 574.004
"""
self._assert_imported_invoice_from_file(
subfolder='tests/test_files/from_flectra',
filename='facturx_out_invoice_tax_incl.xml',
amount_total=574.004,
amount_tax=27.334,
list_line_subtotals=[95.24, 100, 171.43, 180],
# /!\ The price_unit are different for taxes with price_include, because all amounts in Factur-X should be
# tax excluded. At import, the tax included amounts are thus converted into tax excluded ones.
# Yet, the line subtotals and total will be the same (if an equivalent tax exist with price_include = False)
list_line_price_unit=[95.24, 100, 190.48, 200],
list_line_discount=[0, 0, 10, 10],
# Again, all taxes in the imported invoice are price_include = False
list_line_taxes=[self.tax_5_purchase]*4,
move_type='in_invoice',
currency_id=self.env['res.currency'].search([('name', '=', 'USD')], limit=1).id,
)
def test_import_fnfe_examples(self):
# Source: official documentation of the FNFE (subdirectory: "5. FACTUR-X 1.0.06 - Examples")
subfolder = 'tests/test_files/from_factur-x_doc'
# the 2 following files have the same pdf but one is labelled as an invoice and the other as a refund
# source: Avoir_FR_type380_EN16931.pdf
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='facturx_credit_note_type380.xml',
amount_total=233.47, amount_tax=14.99, list_line_subtotals=[20.48, 198], move_type='in_refund')
# source: Avoir_FR_type381_EN16931.pdf
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='facturx_credit_note_type381.xml',
amount_total=233.47, amount_tax=14.99, list_line_subtotals=[20.48, 198], move_type='in_refund')
# source: Facture_F20220024_EN_16931_basis_quantity, basis quantity != 1 for one of the lines
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='facturx_invoice_basis_quantity.xml',
amount_total=108, amount_tax=8, list_line_subtotals=[-5, 10, 60, 28, 7])
# source: Facture_F20220029_EN_16931_K.pdf, credit note labelled as an invoice with negative amounts
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='facturx_invoice_negative_amounts.xml',
amount_total=100, amount_tax=0, list_line_subtotals=[-5, 10, 60, 30, 5], move_type='in_refund')
def test_import_fixed_taxes(self):
""" Tests whether we correctly decode the xml attachments created using fixed taxes.
See the tests above to create these xml attachments ('test_export_with_fixed_taxes_case_[X]').
NB: use move_type = 'out_invoice' s.t. we can retrieve the taxes used to create the invoices.
"""
subfolder = "tests/test_files/from_flectra"
self._assert_imported_invoice_from_file(
subfolder=subfolder, filename='facturx_ecotaxes_case1.xml', amount_total=121, amount_tax=22,
list_line_subtotals=[99], currency_id=self.currency_data['currency'].id, list_line_price_unit=[99],
list_line_discount=[0], list_line_taxes=[self.tax_21+self.recupel], move_type='out_invoice',
)
self._assert_imported_invoice_from_file(
subfolder=subfolder, filename='facturx_ecotaxes_case2.xml', amount_total=121, amount_tax=23,
list_line_subtotals=[98], currency_id=self.currency_data['currency'].id, list_line_price_unit=[98],
list_line_discount=[0], list_line_taxes=[self.tax_21+self.recupel+self.auvibel], move_type='out_invoice',
)
self._assert_imported_invoice_from_file(
subfolder=subfolder, filename='facturx_ecotaxes_case3.xml', amount_total=121, amount_tax=22,
list_line_subtotals=[99], currency_id=self.currency_data['currency'].id, list_line_price_unit=[99],
list_line_discount=[0], list_line_taxes=[self.tax_21+self.recupel], move_type='out_invoice',
)

View File

@@ -0,0 +1,484 @@
# -*- coding: utf-8 -*-
from flectra.addons.l10n_account_edi_ubl_cii_tests.tests.common import TestUBLCommon
from flectra.tests import tagged
import base64
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestUBLBE(TestUBLCommon):
@classmethod
def setUpClass(cls,
chart_template_ref="l10n_be.l10nbe_chart_template",
edi_format_ref="account_edi_ubl_cii.ubl_bis3",
):
super().setUpClass(chart_template_ref=chart_template_ref, edi_format_ref=edi_format_ref)
# seller
cls.partner_1 = cls.env['res.partner'].create({
'name': "partner_1",
'street': "Chaussée de Namur 40",
'zip': "1367",
'city': "Ramillies",
'vat': 'BE0202239951',
'country_id': cls.env.ref('base.be').id,
'bank_ids': [(0, 0, {'acc_number': 'BE15001559627230'})],
'ref': 'ref_partner_1',
})
# buyer
cls.partner_2 = cls.env['res.partner'].create({
'name': "partner_2",
'street': "Rue des Bourlottes 9",
'zip': "1367",
'city': "Ramillies",
'vat': 'BE0477472701',
'country_id': cls.env.ref('base.be').id,
'bank_ids': [(0, 0, {'acc_number': 'BE90735788866632'})],
'ref': 'ref_partner_2',
})
cls.tax_25 = cls.env['account.tax'].create({
'name': 'tax_25',
'amount_type': 'percent',
'amount': 25,
'type_tax_use': 'purchase',
})
cls.tax_21 = cls.env['account.tax'].create({
'name': 'tax_21',
'amount_type': 'percent',
'amount': 21,
'type_tax_use': 'sale',
'sequence': 10,
})
cls.tax_15 = cls.env['account.tax'].create({
'name': 'tax_15',
'amount_type': 'percent',
'amount': 15,
'type_tax_use': 'sale',
})
cls.tax_12 = cls.env['account.tax'].create({
'name': 'tax_12',
'amount_type': 'percent',
'amount': 12,
'type_tax_use': 'sale',
})
cls.acc_bank = cls.env['res.partner.bank'].create({
'acc_number': 'BE15001559627231',
'partner_id': cls.company_data['company'].partner_id.id,
})
cls.invoice = cls.env['account.move'].create({
'move_type': 'out_invoice',
'journal_id': cls.journal.id,
'partner_id': cls.partner_1.id,
'partner_bank_id': cls.acc_bank,
'invoice_date': '2017-01-01',
'date': '2017-01-01',
'currency_id': cls.currency_data['currency'].id,
'invoice_line_ids': [(0, 0, {
'product_id': cls.product_a.id,
'product_uom_id': cls.env.ref('uom.product_uom_dozen').id,
'price_unit': 275.0,
'quantity': 5,
'discount': 20.0,
'tax_ids': [(6, 0, cls.tax_21.ids)],
})],
})
@classmethod
def setup_company_data(cls, company_name, chart_template):
# OVERRIDE
# to force the company to be belgian
res = super().setup_company_data(
company_name,
chart_template=chart_template,
country_id=cls.env.ref("base.be").id,
vat="BE0246697724")
return res
####################################################
# Test export - import
####################################################
def test_export_import_invoice(self):
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2.0,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 990.0,
'discount': 10.0,
'tax_ids': [(6, 0, self.tax_21.ids)],
},
{
'product_id': self.product_b.id,
'quantity': 10.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
{
'product_id': self.product_b.id,
'quantity': -1.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
],
)
xml_etree, xml_filename = self._assert_invoice_attachment(
invoice,
xpaths='''
<xpath expr="./*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][1]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][2]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][3]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='PaymentMeans']/*[local-name()='PaymentID']" position="replace">
<PaymentID>___ignore___</PaymentID>
</xpath>
''',
expected_file='from_flectra/bis3_out_invoice.xml',
)
self.assertEqual(xml_filename[-12:], "ubl_bis3.xml") # ensure we test the right format !
self._assert_imported_invoice_from_etree(invoice, xml_etree, xml_filename)
def test_export_import_refund(self):
refund = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_refund',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2.0,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 990.0,
'discount': 10.0,
'tax_ids': [(6, 0, self.tax_21.ids)],
},
{
'product_id': self.product_b.id,
'quantity': 10.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
{
'product_id': self.product_b.id,
'quantity': -1.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_12.ids)],
},
],
)
xml_etree, xml_filename = self._assert_invoice_attachment(
refund,
xpaths='''
<xpath expr="./*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr="./*[local-name()='PaymentMeans']/*[local-name()='PaymentID']" position="replace">
<PaymentID>___ignore___</PaymentID>
</xpath>
<xpath expr=".//*[local-name()='CreditNoteLine'][1]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='CreditNoteLine'][2]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='CreditNoteLine'][3]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
''',
expected_file='from_flectra/bis3_out_refund.xml',
)
self.assertEqual(xml_filename[-12:], "ubl_bis3.xml")
self._assert_imported_invoice_from_etree(refund, xml_etree, xml_filename)
def test_encoding_in_attachment_ubl(self):
self._test_encoding_in_attachment('ubl_bis3', 'INV_2017_01_0002_ubl_bis3.xml')
def test_sending_to_public_admin(self):
""" A public administration has no VAT, but has an arbitrary number (see:
https://pch.gouvernement.lu/fr/peppol.html). When a partner has no VAT, the node PartyTaxScheme should
not appear.
NB: The `EndpointID` node should be filled with this arbitrary number, that is why `l10n_lu_peppol_id`
module was created. However we cannot use it here because it would require adding it to the dependencies of
`l10n_account_edi_ubl_cii_tests` in stable.
"""
self.partner_2.vat = None
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2,
'price_unit': 100,
'tax_ids': [(6, 0, self.tax_21.ids)],
}
],
)
self._assert_invoice_attachment(
invoice,
xpaths='''
<xpath expr="./*[local-name()='PaymentMeans']/*[local-name()='PaymentID']" position="replace">
<PaymentID>___ignore___</PaymentID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][1]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
''',
expected_file='from_flectra/bis3_out_invoice_public_admin.xml',
)
def test_rounding_price_unit(self):
""" OpenPeppol states that:
* All document level amounts shall be rounded to two decimals for accounting
* Invoice line net amount shall be rounded to two decimals
See: https://docs.peppol.eu/poacc/billing/3.0/bis/#_rounding
Do not round the unit prices. It allows to obtain the correct line amounts when prices have more than 2
digits.
"""
# Set the allowed number of digits for the price_unit
decimal_precision = self.env['decimal.precision'].search([('name', '=', 'Product Price')], limit=1)
self.assertTrue(bool(decimal_precision), "The decimal precision for Product Price is required for this test")
decimal_precision.digits = 4
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 10000,
'price_unit': 0.4567,
'tax_ids': [(6, 0, self.tax_21.ids)],
}
],
)
self._assert_invoice_attachment(invoice, None, 'from_flectra/bis3_out_invoice_rounding.xml')
def test_export_with_fixed_taxes_case1(self):
# CASE 1: simple invoice with a recupel tax
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 99,
'tax_ids': [(6, 0, [self.recupel.id, self.tax_21.id])],
}
],
)
self.assertEqual(invoice.amount_total, 121)
self._assert_invoice_attachment(invoice, None, 'from_flectra/bis3_ecotaxes_case1.xml')
def test_export_with_fixed_taxes_case2(self):
# CASE 2: Same but with several ecotaxes
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 98,
'tax_ids': [(6, 0, [self.recupel.id, self.auvibel.id, self.tax_21.id])],
}
],
)
self.assertEqual(invoice.amount_total, 121)
self._assert_invoice_attachment(invoice, None, 'from_flectra/bis3_ecotaxes_case2.xml')
def test_export_with_fixed_taxes_case3(self):
# CASE 3: same as Case 1 but taxes are Price Included
self.recupel.price_include = True
self.tax_21.price_include = True
# Price TTC = 121 = (99 + 1 ) * 1.21
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 1,
'price_unit': 121,
'tax_ids': [(6, 0, [self.recupel.id, self.tax_21.id])],
}
],
)
self.assertEqual(invoice.amount_total, 121)
self._assert_invoice_attachment(invoice, None, 'from_flectra/bis3_ecotaxes_case3.xml')
####################################################
# Test import
####################################################
def test_import_partner_ubl(self):
"""
Given an invoice where partner_1 is the vendor and partner_2 is the customer with an EDI attachment.
* Uploading the attachment as an invoice should create an invoice with the buyer = partner_2.
* Uploading the attachment as a vendor bill should create a bill with the vendor = partner_1.
"""
invoice = self._generate_move(
seller=self.partner_1,
buyer=self.partner_2,
move_type='out_invoice',
invoice_line_ids=[{'product_id': self.product_a.id}],
)
new_invoice = self._import_invoice_attachment(invoice, 'ubl_bis3', self.company_data['default_journal_sale'])
self.assertEqual(self.partner_2, new_invoice.partner_id)
new_invoice = self._import_invoice_attachment(invoice, 'ubl_bis3', self.company_data['default_journal_purchase'])
self.assertEqual(self.partner_1, new_invoice.partner_id)
def test_import_and_create_partner_ubl(self):
""" Tests whether the partner is created at import if no match is found when decoding the EDI attachment
"""
partner_vals = {
'name': "Buyer",
'mail': "buyer@yahoo.com",
'phone': "1111",
'vat': "2222",
}
# assert there is no matching partner
partner_match = self.env['account.edi.format']._retrieve_partner(**partner_vals)
self.assertFalse(partner_match)
# Import attachment as an invoice
invoice = self.env['account.move'].create({
'move_type': 'out_invoice',
'journal_id': self.company_data['default_journal_sale'].id,
})
self.update_invoice_from_file(
module_name='l10n_account_edi_ubl_cii_tests',
subfolder='tests/test_files/from_flectra',
filename='ubl_test_import_partner.xml',
invoice=invoice)
# assert a new partner has been created
partner_vals['email'] = partner_vals.pop('mail')
self.assertRecordValues(invoice.partner_id, [partner_vals])
def test_import_export_invoice_xml(self):
"""
Test whether the elements only specific to ubl_be are correctly exported
and imported in the xml file
"""
self.invoice.action_post()
attachment = self.invoice._get_edi_attachment(self.edi_format)
self.assertTrue(attachment)
xml_content = base64.b64decode(attachment.with_context(bin_size=False).datas)
xml_etree = self.get_xml_tree_from_string(xml_content)
self.assertEqual(
xml_etree.find('{*}ProfileID').text,
'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'
)
self.assertEqual(
xml_etree.find('{*}CustomizationID').text,
'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'
)
# Export: in bis3, under Country, the Name element should not appear, but IdentificationCode still should
self.assertIsNotNone(xml_etree.find('.//{*}Country/{*}IdentificationCode'))
self.assertIsNone(xml_etree.find('.//{*}Country/{*}Name'))
# Import:
created_bill = self.env['account.move'].create({'move_type': 'in_invoice'})
created_bill.message_post(attachment_ids=[attachment.id])
self.assertTrue(created_bill)
def test_import_invoice_xml(self):
kwargs = {
'subfolder': 'tests/test_files/from_flectra',
'amount_total': 3164.22,
'amount_tax': 482.22,
'list_line_subtotals': [1782, 1000, -100],
'list_line_price_unit': [990, 100, 100],
'list_line_discount': [10, 0, 0],
'currency_id': self.currency_data['currency'].id,
}
self._assert_imported_invoice_from_file(filename='bis3_out_invoice.xml', **kwargs)
# same as the file above, but the <cac:Price> are missing in the invoice lines
self._assert_imported_invoice_from_file(filename='bis3_out_invoice_no_prices.xml', **kwargs)
def test_import_invoice_xml_open_peppol_examples(self):
# Source: https://github.com/OpenPEPPOL/peppol-bis-invoice-3/tree/master/rules/examples
subfolder = 'tests/test_files/from_peppol-bis-invoice-3_doc'
# source: Allowance-example.xml
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='bis3_allowance.xml', amount_total=7125,
amount_tax=1225, list_line_subtotals=[200, -200, 4000, 1000, 900])
# source: base-creditnote-correction.xml
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='bis3_credit_note.xml',
amount_total=1656.25, amount_tax=331.25, list_line_subtotals=[25, 2800, -1500], move_type='in_refund')
# source: base-negative-inv-correction.xml
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='bis3_invoice_negative_amounts.xml',
amount_total=1656.25, amount_tax=331.25, list_line_subtotals=[25, 2800, -1500], move_type='in_refund')
# source: vat-category-E.xml
self._assert_imported_invoice_from_file(subfolder=subfolder, filename='bis3_tax_exempt_gbp.xml',
amount_total=1200, amount_tax=0, list_line_subtotals=[1200], currency_id=self.env.ref('base.GBP').id)
def test_import_existing_invoice_flip_move_type(self):
""" Tests whether the move_type of an existing invoice can be flipped when importing an attachment
For instance: with an email alias to create account_move, first the move is created (using alias_defaults,
which contains move_type = 'out_invoice') then the attachment is decoded, if it represents a credit note,
the move type needs to be changed to 'out_refund'
"""
invoice = self.env['account.move'].create({'move_type': 'out_invoice'})
self.update_invoice_from_file(
'l10n_account_edi_ubl_cii_tests',
'tests/test_files/from_flectra',
'bis3_out_refund.xml',
invoice,
)
self.assertRecordValues(invoice, [{'move_type': 'out_refund', 'amount_total': 3164.22}])
def test_import_fixed_taxes(self):
""" Tests whether we correctly decode the xml attachments created using fixed taxes.
See the tests above to create these xml attachments ('test_export_with_fixed_taxes_case_[X]').
NB: use move_type = 'out_invoice' s.t. we can retrieve the taxes used to create the invoices.
"""
subfolder = "tests/test_files/from_flectra"
# The tax 21% from l10n_be is retrieved since it's a duplicate of self.tax_21
tax_21 = self.env.ref(f'l10n_be.{self.env.company.id}_attn_VAT-OUT-21-L')
self._assert_imported_invoice_from_file(
subfolder=subfolder, filename='bis3_ecotaxes_case1.xml', amount_total=121, amount_tax=22,
list_line_subtotals=[99], currency_id=self.currency_data['currency'].id, list_line_price_unit=[99],
list_line_discount=[0], list_line_taxes=[tax_21+self.recupel], move_type='out_invoice',
)
self._assert_imported_invoice_from_file(
subfolder=subfolder, filename='bis3_ecotaxes_case2.xml', amount_total=121, amount_tax=23,
list_line_subtotals=[98], currency_id=self.currency_data['currency'].id, list_line_price_unit=[98],
list_line_discount=[0], list_line_taxes=[tax_21+self.recupel+self.auvibel], move_type='out_invoice',
)
self._assert_imported_invoice_from_file(
subfolder=subfolder, filename='bis3_ecotaxes_case3.xml', amount_total=121, amount_tax=22,
list_line_subtotals=[99], currency_id=self.currency_data['currency'].id, list_line_price_unit=[99],
list_line_discount=[0], list_line_taxes=[tax_21+self.recupel], move_type='out_invoice',
)

View File

@@ -0,0 +1,232 @@
# -*- coding: utf-8 -*-
from flectra.addons.l10n_account_edi_ubl_cii_tests.tests.common import TestUBLCommon
from flectra.tests import tagged
import base64
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestUBLDE(TestUBLCommon):
@classmethod
def setUpClass(cls,
chart_template_ref="l10n_de_skr03.l10n_de_chart_template",
edi_format_ref="account_edi_ubl_cii.ubl_de",
):
super().setUpClass(chart_template_ref=chart_template_ref, edi_format_ref=edi_format_ref)
cls.partner_1 = cls.env['res.partner'].create({
'name': "partner_1",
'street': "Legoland-Allee 3",
'zip': "89312",
'city': "Günzburg",
'vat': 'DE257486969',
'phone': '+49 180 6 225789',
'email': 'info@legoland.de',
'country_id': cls.env.ref('base.de').id,
'bank_ids': [(0, 0, {'acc_number': 'DE48500105176424548921'})],
'ref': 'ref_partner_1',
})
cls.partner_2 = cls.env['res.partner'].create({
'name': "partner_2",
'street': "Europa-Park-Straße 2",
'zip': "77977",
'city': "Rust",
'vat': 'DE186775212',
'country_id': cls.env.ref('base.de').id,
'bank_ids': [(0, 0, {'acc_number': 'DE50500105175653254743'})],
'ref': 'ref_partner_2',
})
cls.tax_19 = cls.env['account.tax'].create({
'name': 'tax_19',
'amount_type': 'percent',
'amount': 19,
'type_tax_use': 'sale',
})
cls.tax_7 = cls.env['account.tax'].create({
'name': 'tax_7',
'amount_type': 'percent',
'amount': 7,
'type_tax_use': 'sale',
})
@classmethod
def setup_company_data(cls, company_name, chart_template):
# OVERRIDE
# to force the company to be german + add phone and email
res = super().setup_company_data(
company_name,
chart_template=chart_template,
country_id=cls.env.ref("base.de").id,
phone="+49(0) 30 227-0",
email="test@xrechnung@com",
)
return res
####################################################
# Test export - import
####################################################
def test_export_import_invoice(self):
invoice = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_invoice',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2.0,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 990.0,
'discount': 10.0,
'tax_ids': [(6, 0, self.tax_19.ids)],
},
{
'product_id': self.product_b.id,
'quantity': 10.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_7.ids)],
},
{
'product_id': self.product_b.id,
'quantity': -1.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_7.ids)],
},
],
)
xml_etree, xml_filename = self._assert_invoice_attachment(
invoice,
xpaths='''
<xpath expr="./*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][1]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][2]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='InvoiceLine'][3]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='PaymentMeans']/*[local-name()='PaymentID']" position="replace">
<PaymentID>___ignore___</PaymentID>
</xpath>
''',
expected_file='from_flectra/xrechnung_ubl_out_invoice.xml',
)
self.assertEqual(xml_filename[-10:], "ubl_de.xml")
self._assert_imported_invoice_from_etree(invoice, xml_etree, xml_filename)
def test_export_import_refund(self):
refund = self._generate_move(
self.partner_1,
self.partner_2,
move_type='out_refund',
invoice_line_ids=[
{
'product_id': self.product_a.id,
'quantity': 2.0,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 990.0,
'discount': 10.0,
'tax_ids': [(6, 0, self.tax_19.ids)],
},
{
'product_id': self.product_b.id,
'quantity': 10.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_7.ids)],
},
{
'product_id': self.product_b.id,
'quantity': -1.0,
'product_uom_id': self.env.ref('uom.product_uom_unit').id,
'price_unit': 100.0,
'tax_ids': [(6, 0, self.tax_7.ids)],
},
],
)
xml_etree, xml_filename = self._assert_invoice_attachment(
refund,
xpaths='''
<xpath expr="./*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='CreditNoteLine'][1]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='CreditNoteLine'][2]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='CreditNoteLine'][3]/*[local-name()='ID']" position="replace">
<ID>___ignore___</ID>
</xpath>
<xpath expr=".//*[local-name()='PaymentMeans']/*[local-name()='PaymentID']" position="replace">
<PaymentID>___ignore___</PaymentID>
</xpath>
''',
expected_file='from_flectra/xrechnung_ubl_out_refund.xml',
)
self.assertEqual(xml_filename[-10:], "ubl_de.xml")
self._assert_imported_invoice_from_etree(refund, xml_etree, xml_filename)
####################################################
# Test import
####################################################
def test_import_invoice_xml(self):
self._assert_imported_invoice_from_file(subfolder='tests/test_files/from_flectra',
filename='xrechnung_ubl_out_invoice.xml', amount_total=3083.58, amount_tax=401.58,
list_line_subtotals=[1782, 1000, -100], currency_id=self.currency_data['currency'].id)
def test_import_export_invoice_xml(self):
"""
Test whether the elements which are only specific to ubl_de are correctly exported
and imported in the xml file
"""
acc_bank = self.env['res.partner.bank'].create({
'acc_number': 'BE15001559627232',
'partner_id': self.company_data['company'].partner_id.id,
})
invoice = self.env['account.move'].create({
'move_type': 'out_invoice',
'journal_id': self.journal.id,
'partner_id': self.partner_1.id,
'partner_bank_id': acc_bank,
'invoice_date': '2017-01-01',
'date': '2017-01-01',
'currency_id': self.currency_data['currency'].id,
'invoice_line_ids': [(0, 0, {
'product_id': self.product_a.id,
'product_uom_id': self.env.ref('uom.product_uom_dozen').id,
'price_unit': 275.0,
'quantity': 5,
'discount': 20.0,
'tax_ids': [(6, 0, self.tax_19.ids)],
})],
})
partner = invoice.commercial_partner_id
invoice.action_post()
attachment = invoice._get_edi_attachment(self.edi_format)
self.assertTrue(attachment)
xml_content = base64.b64decode(attachment.with_context(bin_size=False).datas)
xml_etree = self.get_xml_tree_from_string(xml_content)
# Export: BuyerReference is in the out_invoice xml
self.assertEqual(xml_etree.find('{*}BuyerReference').text, partner.ref)
self.assertEqual(
xml_etree.find('{*}CustomizationID').text,
'urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2#conformant#urn:xoev-de:kosit:extension:xrechnung_2.2'
)
created_bill = self.env['account.move'].create({'move_type': 'in_invoice'})
created_bill.message_post(attachment_ids=[attachment.id])
self.assertTrue(created_bill)

0
addons/l10n_dz/__init__.py Normal file → Executable file
View File

0
addons/l10n_dz/__manifest__.py Normal file → Executable file
View File

35
addons/l10n_dz/i18n/ar.po Normal file
View File

@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_dz
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-29 13:57+0000\n"
"PO-Revision-Date: 2022-11-29 13:57+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_dz
#: model_terms:ir.ui.view,arch_db:l10n_dz.invoice_report_amount_in_words_inherit
msgid "Arranged the present invoice in the amount of :"
msgstr "رتبت هذه الفاتورة بمبلغ: "
#. module: l10n_dz
#: model:ir.model.fields,field_description:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_payment__amount_sentence
msgid "Arranged the present invoice in the amount of : "
msgstr "رتبت هذه الفاتورة بمبلغ: "
#. module: l10n_dz
#: model:ir.model.fields,help:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_payment__amount_sentence
msgid "The amount is automatically generated by the software"
msgstr "يتم إنشاء المبلغ تلقائيًا بواسطة البرنامج"

35
addons/l10n_dz/i18n/fr.po Normal file
View File

@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_dz
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-29 13:57+0000\n"
"PO-Revision-Date: 2022-11-29 13:57+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_dz
#: model_terms:ir.ui.view,arch_db:l10n_dz.invoice_report_amount_in_words_inherit
msgid "Arranged the present invoice in the amount of :"
msgstr "Arrêtée la présente facture à la somme de : "
#. module: l10n_dz
#: model:ir.model.fields,field_description:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_payment__amount_sentence
msgid "Arranged the present invoice in the amount of : "
msgstr "Arrêtée la présente facture à la somme de : "
#. module: l10n_dz
#: model:ir.model.fields,help:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_payment__amount_sentence
msgid "The amount is automatically generated by the software"
msgstr "Le montant est automatiquement généré par le programme"

View File

@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_dz
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-29 14:39+0000\n"
"PO-Revision-Date: 2022-11-29 14:39+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_dz
#: model_terms:ir.ui.view,arch_db:l10n_dz.invoice_report_amount_in_words_inherit
msgid "Arranged the present invoice in the amount of :"
msgstr ""
#. module: l10n_dz
#: model:ir.model.fields,field_description:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,field_description:l10n_dz.field_account_payment__amount_sentence
msgid "Arranged the present invoice in the amount of : "
msgstr ""
#. module: l10n_dz
#: model:ir.model.fields,help:l10n_dz.field_account_bank_statement_line__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_move__amount_sentence
#: model:ir.model.fields,help:l10n_dz.field_account_payment__amount_sentence
msgid "The amount is automatically generated by the software"
msgstr ""

View File

@@ -0,0 +1,4 @@
#-*- coding:utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import models

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
{
'name': 'Finland - Sale',
'version': '1.0',
'description': """Finland Sale""",
'category': 'Localization',
'depends': [
'l10n_fi',
'sale',
],
'installable': True,
'application': False,
'auto_install': True,
'license': 'LGPL-3',
}

View File

@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fi_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-04 12:50+0000\n"
"PO-Revision-Date: 2022-04-04 12:50+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_fi_sale
#: code:addons/l10n_fi_sale/models/sale.py:0
#, python-format
msgid "Reference must contain numeric characters"
msgstr "Viitteen tulee sisältää numeerisia merkkejä"
#. module: l10n_fi_sale
#: model:ir.model,name:l10n_fi_sale.model_sale_order
msgid "Sales Order"
msgstr "Myyntitilaus"

View File

@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fi_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-04 12:50+0000\n"
"PO-Revision-Date: 2022-04-04 12:50+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_fi_sale
#: code:addons/l10n_fi_sale/models/sale.py:0
#, python-format
msgid "Reference must contain numeric characters"
msgstr ""
#. module: l10n_fi_sale
#: model:ir.model,name:l10n_fi_sale.model_sale_order
msgid "Sales Order"
msgstr ""

View File

@@ -0,0 +1,4 @@
# -*- coding:utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import sale

View File

@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
import re
from flectra import api, models, _
from flectra.exceptions import UserError
class SaleOrder(models.Model):
_inherit = "sale.order"
def write(self, values):
# We compute the l10n_fi/SaleOrder.reference from itself the same way
# we compute the l10n_fi/AccountMove.invoice_payment_ref from its name.
reference = values.get('reference', False)
if reference:
values['reference'] = self.compute_payment_reference_finnish(reference)
return super().write(values)
@api.model
def number2numeric(self, number):
so_number = re.sub(r'\D', '', number)
if so_number == '' or so_number is False:
raise UserError(_('Reference must contain numeric characters'))
# Make sure the base number is 3...19 characters long
if len(so_number) < 3:
so_number = ('11' + so_number)[-3:]
elif len(so_number) > 19:
so_number = so_number[:19]
return so_number
@api.model
def get_finnish_check_digit(self, base_number):
# Multiply digits from end to beginning with 7, 3 and 1 and
# calculate the sum of the products
total = sum((7, 3, 1)[idx % 3] * int(val) for idx, val in
enumerate(base_number[::-1]))
# Subtract the sum from the next decade. 10 = 0
return str((10 - (total % 10)) % 10)
@api.model
def compute_payment_reference_finnish(self, number):
# Drop all non-numeric characters
so_number = self.number2numeric(number)
# Calculate the Finnish check digit
check_digit = self.get_finnish_check_digit(so_number)
return so_number + check_digit

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import models

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
{
'name': 'France - Factur-X integration with Chorus Pro',
'version': '1.0',
'category': 'Accounting/Localizations/EDI',
'description': """
Add supports to fill three optional fields used when using Chorus Pro, especially when invoicing public services.
""",
'depends': [
'account',
'account_edi_facturx',
'l10n_fr'
],
'data': [
'views/account_move_views.xml',
],
'license': 'LGPL-3',
}

View File

@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fr_facturx_chorus_pro
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-07 11:33+0000\n"
"PO-Revision-Date: 2022-06-07 11:33+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__purchase_order_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_move__purchase_order_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_payment__purchase_order_reference
msgid "'Engagement Juridique' in Chorus PRO."
msgstr "'Engagement Juridique' dans Chorus PRO."
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__buyer_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_move__buyer_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_payment__buyer_reference
msgid "'Service Exécutant' in Chorus PRO."
msgstr "'Service Exécutant' dans Chorus PRO."
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__contract_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_move__contract_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_payment__contract_reference
msgid "'Numéro de Marché' in Chorus PRO."
msgstr "'Numéro de Marché' dans Chorus PRO."
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__buyer_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__buyer_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_payment__buyer_reference
msgid "Buyer reference"
msgstr "Service Exécutant"
#. module: l10n_fr_facturx_chorus_pro
#: model_terms:ir.ui.view,arch_db:l10n_fr_facturx_chorus_pro.view_move_form_inherit_chorus_pro
msgid "Chorus Pro"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__contract_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__contract_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_payment__contract_reference
msgid "Contract Reference"
msgstr "Numéro de Marché"
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__display_name
msgid "Display Name"
msgstr "Nom affiché"
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__id
msgid "ID"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model,name:l10n_fr_facturx_chorus_pro.model_account_move
msgid "Journal Entry"
msgstr "Pièce comptable"
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__purchase_order_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__purchase_order_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_payment__purchase_order_reference
msgid "Purchase order reference"
msgstr "Engagement Juridique"

View File

@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fr_facturx_chorus_pro
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-06-07 11:31+0000\n"
"PO-Revision-Date: 2022-06-07 11:31+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__purchase_order_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_move__purchase_order_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_payment__purchase_order_reference
msgid "'Engagement Juridique' in Chorus PRO."
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__buyer_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_move__buyer_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_payment__buyer_reference
msgid "'Service Exécutant' in Chorus PRO."
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__contract_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_move__contract_reference
#: model:ir.model.fields,help:l10n_fr_facturx_chorus_pro.field_account_payment__contract_reference
msgid "'Numéro de Marché' in Chorus PRO."
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__buyer_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__buyer_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_payment__buyer_reference
msgid "Buyer reference"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model_terms:ir.ui.view,arch_db:l10n_fr_facturx_chorus_pro.view_move_form_inherit_chorus_pro
msgid "Chorus Pro"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__contract_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__contract_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_payment__contract_reference
msgid "Contract Reference"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__display_name
msgid "Display Name"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__id
msgid "ID"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model,name:l10n_fr_facturx_chorus_pro.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move____last_update
msgid "Last Modified on"
msgstr ""
#. module: l10n_fr_facturx_chorus_pro
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_bank_statement_line__purchase_order_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_move__purchase_order_reference
#: model:ir.model.fields,field_description:l10n_fr_facturx_chorus_pro.field_account_payment__purchase_order_reference
msgid "Purchase order reference"
msgstr ""

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import account_move

View File

@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from flectra import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
buyer_reference = fields.Char(help="'Service Exécutant' in Chorus PRO.")
contract_reference = fields.Char(help="'Numéro de Marché' in Chorus PRO.")
purchase_order_reference = fields.Char(help="'Engagement Juridique' in Chorus PRO.")

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<data>
<record id="view_move_form_inherit_chorus_pro" model="ir.ui.view">
<field name="name">account.move.form.inherit.chorus.pro</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='accounting_info_group']" position="after">
<group name="accounting_info_group_chorus_pro" string="Chorus Pro" attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}">
<field name="buyer_reference"/>
<field name="contract_reference"/>
<field name="purchase_order_reference"/>
</group>
</xpath>
</field>
</record>
</data>
</flectra>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,315 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_stock_ddt
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-11 14:02+0000\n"
"PO-Revision-Date: 2022-01-11 14:02+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_it_stock_ddt
#: model:ir.actions.report,print_report_name:l10n_it_stock_ddt.action_report_ddt
msgid ""
"'DDT - %s - %s' % (object.partner_id.name or '', object.l10n_it_ddt_number)"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<b>Note:</b>"
msgstr "<b>Nota:</b>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<b>Total:</b>"
msgstr "<b>Totale:</b>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<b>Transportation Method Details: </b>"
msgstr "<b>Dettagli metodo di trasporto</b>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<span><strong>Customer Address:</strong></span>"
msgstr "<span><strong>Indirizzo Cliente:</strong></span>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<span><strong>Warehouse Address:</strong></span>"
msgstr "<span><strong>Indirizzo Magazzino:</strong></span>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Carrier Signature</strong>"
msgstr "<strong>Firma Corriere</strong>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Company Signature</strong>"
msgstr "<strong>Firma Azienda</strong>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Customer Signature</strong>"
msgstr "<strong>Firma Cliente</strong>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Product</strong>"
msgstr "<strong>Prodotto</strong>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Quantity</strong>"
msgstr "<strong>Quantità</strong>"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Total Value</strong>"
msgstr "<strong>Valore Totale</strong>"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__attemped_sale
msgid "Attempted Sale"
msgstr "Tentata Vendita"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Carrier"
msgstr "Corriere"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Carrier Condition"
msgstr "Termini di Resa"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
msgid "Country Code"
msgstr "Codice Nazione"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__courier
msgid "Courier service"
msgstr "Servizio Corriere"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.view_picking_form_inherit_l10n_it_ddt
msgid "DDT Information"
msgstr "Informazioni DDT"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_ddt_number
msgid "DDT Number"
msgstr "Numero DDT"
#. module: l10n_it_stock_ddt
#: model:ir.actions.report,name:l10n_it_stock_ddt.action_report_ddt
msgid "DDT report"
msgstr "DDT"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.account_invoice_view_form_inherit_ddt
msgid "DDTs"
msgstr "DDT"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__display_name
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__display_name
msgid "Display Name"
msgstr "Nome visualizzato"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Documento di Trasporto"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__evaluation
msgid "Evaluation"
msgstr "Valutazione"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__gift
msgid "Gift"
msgstr "Regalo"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Gross Weight (kg)"
msgstr "Peso lordo (kg)"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__id
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__id
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__id
msgid "ID"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model,name:l10n_it_stock_ddt.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_ids
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_ids
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_ids
msgid "L10N It Ddt"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_count
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_count
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_count
msgid "L10N It Ddt Count"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__l10n_it_ddt_sequence_id
msgid "L10N It Ddt Sequence"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move____last_update
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking____last_update
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"
#. module: l10n_it_stock_ddt
#: code:addons/l10n_it_stock_ddt/models/account_invoice.py:0
#, python-format
msgid "Linked deliveries"
msgstr "Spedizioni associate"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__loaned_use
msgid "Loaned for Use"
msgstr "Comodato d'uso"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Order"
msgstr "Ordine"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__outsourcing
msgid "Outsourcing"
msgstr "Conto Lavorazione"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_parcels
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Parcels"
msgstr "Colli"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Picking Number"
msgstr "Numero prelievo"
#. module: l10n_it_stock_ddt
#: model:ir.model,name:l10n_it_stock_ddt.model_stock_picking_type
msgid "Picking Type"
msgstr "Tipologia prelievo"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.view_picking_form_inherit_l10n_it_ddt
msgid "Print"
msgstr "Stampa"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__recipient
msgid "Recipient"
msgstr "Destinatario"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__repair
msgid "Repair"
msgstr "Conto Riparazione"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__sale
msgid "Sale"
msgstr "Vendita"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__sender
msgid "Sender"
msgstr "Mittente"
#. module: l10n_it_stock_ddt
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
#, python-format
msgid "Sequence"
msgstr "Sequenza"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Shipping Date"
msgstr "Data transporto"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__substitution
msgid "Substitution"
msgstr "Sostituzione"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,help:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
msgid ""
"The ISO country code in two chars. \n"
"You can use this field for quick search."
msgstr ""
"Il codice ISO nazionale in 2 caratteri. \n"
"Puoi usare questo campo per la ricerca veloce."
#. module: l10n_it_stock_ddt
#: model:ir.model,name:l10n_it_stock_ddt.model_stock_picking
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__transfer
msgid "Transfer"
msgstr "Trasferimento"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_transport_method
msgid "Transport Method"
msgstr "Metodo di trasporto"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_transport_method_details
msgid "Transport Note"
msgstr "Nota di trasporto"
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_transport_reason
msgid "Transport Reason"
msgstr "Ragione trasporto"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Transportation Method"
msgstr "Metodo di trasporto"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Transportation Reason"
msgstr "Ragione trasporto"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "VAT"
msgstr "Pta IVA"
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "VAT:"
msgstr "Pta IVA:"

View File

@@ -0,0 +1,314 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_stock_ddt
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-10 15:18+0000\n"
"PO-Revision-Date: 2022-01-10 15:18+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_it_stock_ddt
#: model:ir.actions.report,print_report_name:l10n_it_stock_ddt.action_report_ddt
msgid ""
"'DDT - %s - %s' % (object.partner_id.name or '', object.l10n_it_ddt_number)"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<b>Note:</b>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<b>Total:</b>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<b>Transportation Method Details: </b>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<span><strong>Customer Address:</strong></span>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<span><strong>Warehouse Address:</strong></span>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Carrier Signature</strong>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Company Signature</strong>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Customer Signature</strong>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Product</strong>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Quantity</strong>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "<strong>Total Value</strong>"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__attemped_sale
msgid "Attempted Sale"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Carrier"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Carrier Condition"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
msgid "Country Code"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__courier
msgid "Courier service"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.view_picking_form_inherit_l10n_it_ddt
msgid "DDT Information"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_ddt_number
msgid "DDT Number"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.actions.report,name:l10n_it_stock_ddt.action_report_ddt
msgid "DDT report"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.account_invoice_view_form_inherit_ddt
msgid "DDTs"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__display_name
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__display_name
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__display_name
msgid "Display Name"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Documento di Trasporto"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__evaluation
msgid "Evaluation"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__gift
msgid "Gift"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Gross Weight (kg)"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__id
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__id
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__id
msgid "ID"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model,name:l10n_it_stock_ddt.model_account_move
msgid "Journal Entry"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_ids
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_ids
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_ids
msgid "L10N It Ddt"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_bank_statement_line__l10n_it_ddt_count
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move__l10n_it_ddt_count
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_payment__l10n_it_ddt_count
msgid "L10N It Ddt Count"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type__l10n_it_ddt_sequence_id
msgid "L10N It Ddt Sequence"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_account_move____last_update
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking____last_update
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking_type____last_update
msgid "Last Modified on"
msgstr ""
#. module: l10n_it_stock_ddt
#: code:addons/l10n_it_stock_ddt/models/account_invoice.py:0
#, python-format
msgid "Linked deliveries"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__loaned_use
msgid "Loaned for Use"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Order"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__outsourcing
msgid "Outsourcing"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_parcels
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Parcels"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Picking Number"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model,name:l10n_it_stock_ddt.model_stock_picking_type
msgid "Picking Type"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.view_picking_form_inherit_l10n_it_ddt
msgid "Print"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__recipient
msgid "Recipient"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__repair
msgid "Repair"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__sale
msgid "Sale"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_method__sender
msgid "Sender"
msgstr ""
#. module: l10n_it_stock_ddt
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
#: code:addons/l10n_it_stock_ddt/models/stock_picking.py:0
#, python-format
msgid "Sequence"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Shipping Date"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__substitution
msgid "Substitution"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,help:l10n_it_stock_ddt.field_stock_picking__l10n_it_country_code
msgid ""
"The ISO country code in two chars. \n"
"You can use this field for quick search."
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model,name:l10n_it_stock_ddt.model_stock_picking
#: model:ir.model.fields.selection,name:l10n_it_stock_ddt.selection__stock_picking__l10n_it_transport_reason__transfer
msgid "Transfer"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_transport_method
msgid "Transport Method"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_transport_method_details
msgid "Transport Note"
msgstr ""
#. module: l10n_it_stock_ddt
#: model:ir.model.fields,field_description:l10n_it_stock_ddt.field_stock_picking__l10n_it_transport_reason
msgid "Transport Reason"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Transportation Method"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "Transportation Reason"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "VAT"
msgstr ""
#. module: l10n_it_stock_ddt
#: model_terms:ir.ui.view,arch_db:l10n_it_stock_ddt.report_ddt_view
msgid "VAT:"
msgstr ""

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import models

View File

@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
{
'name': "Luxembourg - Peppol Identifier",
'version': '1.0',
'description': """
Some Luxembourg public institutions do not have a VAT number but have been assigned an arbitrary number
(see: https://pch.gouvernement.lu/fr/peppol.html). Thus, this module adds the Peppol Identifier field on
the account.move form view. If this field is set, it is then read when exporting electronic invoicing formats.
""",
'depends': ['l10n_lu', 'account_edi_ubl_cii'],
'data': [
'views/partner_view.xml',
],
'license': 'LGPL-3',
}

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import res_partner

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from flectra import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
country_code = fields.Char(related='country_id.code')
l10n_lu_peppol_identifier = fields.Char("Peppol Unique Identifier")

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="res_partner_form_inherit_l10n_lu_peppol_id" model="ir.ui.view">
<field name="name">res.partner.form.inherit.l10n_lu_peppol_id</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="account.view_partner_property_form"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='misc']" position="inside">
<field name="country_code" invisible="1"/>
<field name="l10n_lu_peppol_identifier" attrs="{'invisible': [('country_code', '!=', 'LU')]}"/>
</xpath>
</field>
</record>
</flectra>

View File

@@ -0,0 +1,4 @@
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
from . import models
from . import wizard

View File

@@ -0,0 +1,35 @@
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
{
"name": "Philippines - Accounting",
"summary": """
This is the module to manage the accounting chart for The Philippines.
""",
"category": "Accounting/Localizations/Account Charts",
"version": "1.0",
"author": "Flectra PS",
"website": "https://flectrahq.com",
"depends": [
"account",
"base_vat",
"l10n_multilang",
],
"data": [
"data/account_chart_template_data.xml",
"data/account.account.template.csv",
"data/account_chart_template_post_data.xml",
"data/account_tax_group.xml",
"data/account_tax_template.xml",
"data/account_fiscal_position_template.xml",
"data/account_fiscal_position_tax_template.xml",
"data/account_chart_template_configure_data.xml",
"wizard/generate_2307_wizard_views.xml",
"views/account_move_views.xml",
"views/account_payment_views.xml",
"views/account_tax_views.xml",
"views/res_partner_views.xml",
"security/ir.model.access.csv",
],
"license": "LGPL-3",
"icon": "/base/static/img/country_flags/ph.png",
}

View File

@@ -0,0 +1,98 @@
id,name,code,user_type_id/id,chart_template_id/id,reconcile
l10n_ph_100000,Bank Suspense Account,100000,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110000,Accounts Receivable,110000,account.data_account_type_receivable,l10n_ph_chart_template,True
l10n_ph_110003,Accounts Receivable (POS),110003,account.data_account_type_receivable,l10n_ph_chart_template,True
l10n_ph_110100,Advances to Suppliers,110100,account.data_account_type_prepayments,l10n_ph_chart_template,False
l10n_ph_110101,Deposits,110101,account.data_account_type_prepayments,l10n_ph_chart_template,False
l10n_ph_110102,Employees Receivable-Cash Advance,110102,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110103,Employees Receivable-Loan,110103,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110104,ER - Others,110104,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110105,Prepaid Insurance,110105,account.data_account_type_prepayments,l10n_ph_chart_template,False
l10n_ph_110106,Prepaid Pension - contribution,110106,account.data_account_type_prepayments,l10n_ph_chart_template,False
l10n_ph_110200,Prepaid Tax - Tax Credit Certificate,110200,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110201,Input VAT 12%,110201,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110202,Deferred Input VAT 12%,110202,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110203,Deferred Tax Asset,110203,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110205,Creditable Income Tax,110205,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110206,Tax Withheld by Customer,110206,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110207,Deferred Tax Withheld by Customer,110207,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110300,Inventory,110300,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110301,Purchases,110301,account.data_account_type_current_assets,l10n_ph_chart_template,False
l10n_ph_110302,Stock Interim (Received),110302,account.data_account_type_current_assets,l10n_ph_chart_template,True
l10n_ph_110303,Stock Interim (Delivered),110303,account.data_account_type_current_assets,l10n_ph_chart_template,True
l10n_ph_110304,Stock Interim (Production),110304,account.data_account_type_current_assets,l10n_ph_chart_template,True
l10n_ph_110400,Other Non-current Asset,110400,account.data_account_type_non_current_assets,l10n_ph_chart_template,False
l10n_ph_110500,Building and Leasehold Improvements,110500,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110501,"Furniture, Fixtures and Equipment",110501,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110502,Vehicles,110502,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110503,Computers,110503,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110504,Accum Depreciation-Bldg & Leasehold Imp,110504,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110505,"Accum Depreciation-Furniture, Fixtures and Equipment",110505,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110506,Accum Depreciation-Vehicles,110506,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_110507,Accum Depreciation-Computers,110507,account.data_account_type_fixed_assets,l10n_ph_chart_template,False
l10n_ph_200000,Accounts Payable,200000,account.data_account_type_payable,l10n_ph_chart_template,True
l10n_ph_200200,Dividends Payable - Common Shares,200200,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200201,Unearned Revenue,200201,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200202,Customer Deposits Received,200202,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200300,Output VAT 12% - Actual,200300,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200301,Deferred Output VAT 12% - Actual,200301,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200302,Tax Payable-Withholding Tax Compensation,200302,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200303,Tax Pay-Withholding Tax Source,200303,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200304,Deferred Tax Pay-Withholding Tax Source,200304,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200305,Taxes Payable-Final Withholding Tax,200305,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200306,Tax Payable-Withholding Tax at Source (Accrual),200306,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200307,Income Tax Payable,200307,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200308,Accrued Fringe Benefit Tax,200308,account.data_account_type_current_liabilities,l10n_ph_chart_template,False
l10n_ph_200400,Other Non-current Liability,200400,account.data_account_type_non_current_liabilities,l10n_ph_chart_template,False
l10n_ph_300000,Capital Stock,300000,account.data_account_type_equity,l10n_ph_chart_template,False
l10n_ph_300001,Additional Paid in Capital,300001,account.data_account_type_equity,l10n_ph_chart_template,False
l10n_ph_300002,Retained Earnings,300002,account.data_account_type_equity,l10n_ph_chart_template,False
l10n_ph_430400,Sales/Revenues,430400,account.data_account_type_revenue,l10n_ph_chart_template,False
l10n_ph_510000,Cost of Goods Sold,510000,account.data_account_type_direct_costs,l10n_ph_chart_template,False
l10n_ph_511100,COGS - Purchases,511100,account.data_account_type_direct_costs,l10n_ph_chart_template,False
l10n_ph_511600,COGS - Freight Costs,511600,account.data_account_type_direct_costs,l10n_ph_chart_template,False
l10n_ph_511700,COGS - Direct Labor,511700,account.data_account_type_direct_costs,l10n_ph_chart_template,False
l10n_ph_511800,COGS - Factory/Processing Overhead,511800,account.data_account_type_direct_costs,l10n_ph_chart_template,False
l10n_ph_620000,Admin Expense,620000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_620001,Marketing Expense,620001,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_620100,Lease-Corporate Offices,620100,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_621000,Insurance Expenses,621000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_622000,Repairs & Maintenance,622000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623000,Salaries & Wages,623000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623001,Overtime Pay,623001,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623002,SSS Contribution,623002,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623003,HDMF Contribution,623003,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623004,PHIC Contribution,623004,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623005,Meal Allowance,623005,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623006,Other Allowance,623006,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623007,13th Month Pay,623007,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623008,Retirement Expenses,623008,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623009,Training and Webinar,623009,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623014,Sick Leave Expenses,623014,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_623015,Vacation Leave Expenses,623015,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_624000,Taxes and Licenses,624000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_625000,Utilities Expenses,625000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_626000,Security Services,626000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_626001,Professional Fees,626001,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_627000,Travel and Transportation,627000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_628000,Advertising and Promotion,628000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_629000,Depreciation Expense,629000,account.data_account_type_depreciation,l10n_ph_chart_template,False
l10n_ph_632000,Commission Expense,632000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_633000,Supplies Expenses,633000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_634000,Miscellaneous Expenses,634000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_634001,Bank Fees,634001,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_635000,Prov DA-Billed Accts,635000,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_635001,Prov-Probable Expenses,635001,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_635002,Prov for Inc Tax - Creditable,635002,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_635003,Provision for Tax - Final,635003,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_710100,Forex Gain,710100,account.data_account_type_other_income,l10n_ph_chart_template,False
l10n_ph_710101,Forex Loss,710101,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_710102,Cash Difference Gain,710102,account.data_account_type_other_income,l10n_ph_chart_template,False
l10n_ph_710103,Cash Difference Loss,710103,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_710200,Gain/Loss- Sale FA,710200,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_710201,Loss on FA Disposal,710201,account.data_account_type_expenses,l10n_ph_chart_template,False
l10n_ph_710300,Interest Inc-Savings,710300,account.data_account_type_other_income,l10n_ph_chart_template,False
l10n_ph_710301,Interest Income-Savings Local,710301,account.data_account_type_other_income,l10n_ph_chart_template,False
l10n_ph_710400,Other Income,710400,account.data_account_type_other_income,l10n_ph_chart_template,False
l10n_ph_710500,Interest Expense-Suppliers' Credit Local,710500,account.data_account_type_other_income,l10n_ph_chart_template,False
l10n_ph_999999,Undistributed Profits/Losses,999999,account.data_unaffected_earnings,l10n_ph_chart_template,False
1 id name code user_type_id/id chart_template_id/id reconcile
2 l10n_ph_100000 Bank Suspense Account 100000 account.data_account_type_current_assets l10n_ph_chart_template False
3 l10n_ph_110000 Accounts Receivable 110000 account.data_account_type_receivable l10n_ph_chart_template True
4 l10n_ph_110003 Accounts Receivable (POS) 110003 account.data_account_type_receivable l10n_ph_chart_template True
5 l10n_ph_110100 Advances to Suppliers 110100 account.data_account_type_prepayments l10n_ph_chart_template False
6 l10n_ph_110101 Deposits 110101 account.data_account_type_prepayments l10n_ph_chart_template False
7 l10n_ph_110102 Employees Receivable-Cash Advance 110102 account.data_account_type_current_assets l10n_ph_chart_template False
8 l10n_ph_110103 Employees Receivable-Loan 110103 account.data_account_type_current_assets l10n_ph_chart_template False
9 l10n_ph_110104 ER - Others 110104 account.data_account_type_current_assets l10n_ph_chart_template False
10 l10n_ph_110105 Prepaid Insurance 110105 account.data_account_type_prepayments l10n_ph_chart_template False
11 l10n_ph_110106 Prepaid Pension - contribution 110106 account.data_account_type_prepayments l10n_ph_chart_template False
12 l10n_ph_110200 Prepaid Tax - Tax Credit Certificate 110200 account.data_account_type_current_assets l10n_ph_chart_template False
13 l10n_ph_110201 Input VAT 12% 110201 account.data_account_type_current_assets l10n_ph_chart_template False
14 l10n_ph_110202 Deferred Input VAT 12% 110202 account.data_account_type_current_assets l10n_ph_chart_template False
15 l10n_ph_110203 Deferred Tax Asset 110203 account.data_account_type_current_assets l10n_ph_chart_template False
16 l10n_ph_110205 Creditable Income Tax 110205 account.data_account_type_current_assets l10n_ph_chart_template False
17 l10n_ph_110206 Tax Withheld by Customer 110206 account.data_account_type_current_assets l10n_ph_chart_template False
18 l10n_ph_110207 Deferred Tax Withheld by Customer 110207 account.data_account_type_current_assets l10n_ph_chart_template False
19 l10n_ph_110300 Inventory 110300 account.data_account_type_current_assets l10n_ph_chart_template False
20 l10n_ph_110301 Purchases 110301 account.data_account_type_current_assets l10n_ph_chart_template False
21 l10n_ph_110302 Stock Interim (Received) 110302 account.data_account_type_current_assets l10n_ph_chart_template True
22 l10n_ph_110303 Stock Interim (Delivered) 110303 account.data_account_type_current_assets l10n_ph_chart_template True
23 l10n_ph_110304 Stock Interim (Production) 110304 account.data_account_type_current_assets l10n_ph_chart_template True
24 l10n_ph_110400 Other Non-current Asset 110400 account.data_account_type_non_current_assets l10n_ph_chart_template False
25 l10n_ph_110500 Building and Leasehold Improvements 110500 account.data_account_type_fixed_assets l10n_ph_chart_template False
26 l10n_ph_110501 Furniture, Fixtures and Equipment 110501 account.data_account_type_fixed_assets l10n_ph_chart_template False
27 l10n_ph_110502 Vehicles 110502 account.data_account_type_fixed_assets l10n_ph_chart_template False
28 l10n_ph_110503 Computers 110503 account.data_account_type_fixed_assets l10n_ph_chart_template False
29 l10n_ph_110504 Accum Depreciation-Bldg & Leasehold Imp 110504 account.data_account_type_fixed_assets l10n_ph_chart_template False
30 l10n_ph_110505 Accum Depreciation-Furniture, Fixtures and Equipment 110505 account.data_account_type_fixed_assets l10n_ph_chart_template False
31 l10n_ph_110506 Accum Depreciation-Vehicles 110506 account.data_account_type_fixed_assets l10n_ph_chart_template False
32 l10n_ph_110507 Accum Depreciation-Computers 110507 account.data_account_type_fixed_assets l10n_ph_chart_template False
33 l10n_ph_200000 Accounts Payable 200000 account.data_account_type_payable l10n_ph_chart_template True
34 l10n_ph_200200 Dividends Payable - Common Shares 200200 account.data_account_type_current_liabilities l10n_ph_chart_template False
35 l10n_ph_200201 Unearned Revenue 200201 account.data_account_type_current_liabilities l10n_ph_chart_template False
36 l10n_ph_200202 Customer Deposits Received 200202 account.data_account_type_current_liabilities l10n_ph_chart_template False
37 l10n_ph_200300 Output VAT 12% - Actual 200300 account.data_account_type_current_liabilities l10n_ph_chart_template False
38 l10n_ph_200301 Deferred Output VAT 12% - Actual 200301 account.data_account_type_current_liabilities l10n_ph_chart_template False
39 l10n_ph_200302 Tax Payable-Withholding Tax Compensation 200302 account.data_account_type_current_liabilities l10n_ph_chart_template False
40 l10n_ph_200303 Tax Pay-Withholding Tax Source 200303 account.data_account_type_current_liabilities l10n_ph_chart_template False
41 l10n_ph_200304 Deferred Tax Pay-Withholding Tax Source 200304 account.data_account_type_current_liabilities l10n_ph_chart_template False
42 l10n_ph_200305 Taxes Payable-Final Withholding Tax 200305 account.data_account_type_current_liabilities l10n_ph_chart_template False
43 l10n_ph_200306 Tax Payable-Withholding Tax at Source (Accrual) 200306 account.data_account_type_current_liabilities l10n_ph_chart_template False
44 l10n_ph_200307 Income Tax Payable 200307 account.data_account_type_current_liabilities l10n_ph_chart_template False
45 l10n_ph_200308 Accrued Fringe Benefit Tax 200308 account.data_account_type_current_liabilities l10n_ph_chart_template False
46 l10n_ph_200400 Other Non-current Liability 200400 account.data_account_type_non_current_liabilities l10n_ph_chart_template False
47 l10n_ph_300000 Capital Stock 300000 account.data_account_type_equity l10n_ph_chart_template False
48 l10n_ph_300001 Additional Paid in Capital 300001 account.data_account_type_equity l10n_ph_chart_template False
49 l10n_ph_300002 Retained Earnings 300002 account.data_account_type_equity l10n_ph_chart_template False
50 l10n_ph_430400 Sales/Revenues 430400 account.data_account_type_revenue l10n_ph_chart_template False
51 l10n_ph_510000 Cost of Goods Sold 510000 account.data_account_type_direct_costs l10n_ph_chart_template False
52 l10n_ph_511100 COGS - Purchases 511100 account.data_account_type_direct_costs l10n_ph_chart_template False
53 l10n_ph_511600 COGS - Freight Costs 511600 account.data_account_type_direct_costs l10n_ph_chart_template False
54 l10n_ph_511700 COGS - Direct Labor 511700 account.data_account_type_direct_costs l10n_ph_chart_template False
55 l10n_ph_511800 COGS - Factory/Processing Overhead 511800 account.data_account_type_direct_costs l10n_ph_chart_template False
56 l10n_ph_620000 Admin Expense 620000 account.data_account_type_expenses l10n_ph_chart_template False
57 l10n_ph_620001 Marketing Expense 620001 account.data_account_type_expenses l10n_ph_chart_template False
58 l10n_ph_620100 Lease-Corporate Offices 620100 account.data_account_type_expenses l10n_ph_chart_template False
59 l10n_ph_621000 Insurance Expenses 621000 account.data_account_type_expenses l10n_ph_chart_template False
60 l10n_ph_622000 Repairs & Maintenance 622000 account.data_account_type_expenses l10n_ph_chart_template False
61 l10n_ph_623000 Salaries & Wages 623000 account.data_account_type_expenses l10n_ph_chart_template False
62 l10n_ph_623001 Overtime Pay 623001 account.data_account_type_expenses l10n_ph_chart_template False
63 l10n_ph_623002 SSS Contribution 623002 account.data_account_type_expenses l10n_ph_chart_template False
64 l10n_ph_623003 HDMF Contribution 623003 account.data_account_type_expenses l10n_ph_chart_template False
65 l10n_ph_623004 PHIC Contribution 623004 account.data_account_type_expenses l10n_ph_chart_template False
66 l10n_ph_623005 Meal Allowance 623005 account.data_account_type_expenses l10n_ph_chart_template False
67 l10n_ph_623006 Other Allowance 623006 account.data_account_type_expenses l10n_ph_chart_template False
68 l10n_ph_623007 13th Month Pay 623007 account.data_account_type_expenses l10n_ph_chart_template False
69 l10n_ph_623008 Retirement Expenses 623008 account.data_account_type_expenses l10n_ph_chart_template False
70 l10n_ph_623009 Training and Webinar 623009 account.data_account_type_expenses l10n_ph_chart_template False
71 l10n_ph_623014 Sick Leave Expenses 623014 account.data_account_type_expenses l10n_ph_chart_template False
72 l10n_ph_623015 Vacation Leave Expenses 623015 account.data_account_type_expenses l10n_ph_chart_template False
73 l10n_ph_624000 Taxes and Licenses 624000 account.data_account_type_expenses l10n_ph_chart_template False
74 l10n_ph_625000 Utilities Expenses 625000 account.data_account_type_expenses l10n_ph_chart_template False
75 l10n_ph_626000 Security Services 626000 account.data_account_type_expenses l10n_ph_chart_template False
76 l10n_ph_626001 Professional Fees 626001 account.data_account_type_expenses l10n_ph_chart_template False
77 l10n_ph_627000 Travel and Transportation 627000 account.data_account_type_expenses l10n_ph_chart_template False
78 l10n_ph_628000 Advertising and Promotion 628000 account.data_account_type_expenses l10n_ph_chart_template False
79 l10n_ph_629000 Depreciation Expense 629000 account.data_account_type_depreciation l10n_ph_chart_template False
80 l10n_ph_632000 Commission Expense 632000 account.data_account_type_expenses l10n_ph_chart_template False
81 l10n_ph_633000 Supplies Expenses 633000 account.data_account_type_expenses l10n_ph_chart_template False
82 l10n_ph_634000 Miscellaneous Expenses 634000 account.data_account_type_expenses l10n_ph_chart_template False
83 l10n_ph_634001 Bank Fees 634001 account.data_account_type_expenses l10n_ph_chart_template False
84 l10n_ph_635000 Prov DA-Billed Accts 635000 account.data_account_type_expenses l10n_ph_chart_template False
85 l10n_ph_635001 Prov-Probable Expenses 635001 account.data_account_type_expenses l10n_ph_chart_template False
86 l10n_ph_635002 Prov for Inc Tax - Creditable 635002 account.data_account_type_expenses l10n_ph_chart_template False
87 l10n_ph_635003 Provision for Tax - Final 635003 account.data_account_type_expenses l10n_ph_chart_template False
88 l10n_ph_710100 Forex Gain 710100 account.data_account_type_other_income l10n_ph_chart_template False
89 l10n_ph_710101 Forex Loss 710101 account.data_account_type_expenses l10n_ph_chart_template False
90 l10n_ph_710102 Cash Difference Gain 710102 account.data_account_type_other_income l10n_ph_chart_template False
91 l10n_ph_710103 Cash Difference Loss 710103 account.data_account_type_expenses l10n_ph_chart_template False
92 l10n_ph_710200 Gain/Loss- Sale FA 710200 account.data_account_type_expenses l10n_ph_chart_template False
93 l10n_ph_710201 Loss on FA Disposal 710201 account.data_account_type_expenses l10n_ph_chart_template False
94 l10n_ph_710300 Interest Inc-Savings 710300 account.data_account_type_other_income l10n_ph_chart_template False
95 l10n_ph_710301 Interest Income-Savings Local 710301 account.data_account_type_other_income l10n_ph_chart_template False
96 l10n_ph_710400 Other Income 710400 account.data_account_type_other_income l10n_ph_chart_template False
97 l10n_ph_710500 Interest Expense-Suppliers' Credit Local 710500 account.data_account_type_other_income l10n_ph_chart_template False
98 l10n_ph_999999 Undistributed Profits/Losses 999999 account.data_unaffected_earnings l10n_ph_chart_template False

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<flectra noupdate="1">
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_ph.l10n_ph_chart_template')]" />
</function>
</flectra>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<flectra>
<record id="l10n_ph_chart_template" model="account.chart.template">
<field name="name">Philippines Account Template</field>
<field name="bank_account_code_prefix">1000</field>
<field name="cash_account_code_prefix">1001</field>
<field name="transfer_account_code_prefix">1002</field>
<field name="code_digits">6</field>
<field name="currency_id" ref="base.PHP" />
<field name="spoken_languages" eval="'tl_PH'"/>
<field name="use_anglo_saxon" eval="True" />
</record>
</flectra>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<flectra>
<record id="l10n_ph_chart_template" model="account.chart.template">
<field name="property_account_receivable_id" ref="l10n_ph_110000" />
<field name="property_account_payable_id" ref="l10n_ph_200000" />
<field name="property_account_income_categ_id" ref="l10n_ph_430400" />
<field name="property_account_expense_categ_id" ref="l10n_ph_620000" />
<field name="property_stock_valuation_account_id" ref="l10n_ph_110300" />
<field name="property_stock_account_input_categ_id" ref="l10n_ph_110302" />
<field name="property_stock_account_output_categ_id" ref="l10n_ph_110303" />
<field name="income_currency_exchange_account_id" ref="l10n_ph_710100" />
<field name="expense_currency_exchange_account_id" ref="l10n_ph_710101" />
<field name="default_pos_receivable_account_id" ref="l10n_ph_110003" />
<field name="account_journal_suspense_account_id" ref="l10n_ph_100000" />
<field name="default_cash_difference_income_account_id" ref="l10n_ph_710102" />
<field name="default_cash_difference_expense_account_id" ref="l10n_ph_710103" />
</record>
</flectra>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<flectra>
<!-- VAT Registered -->
<record id="l10n_ph_fiscal_position_tax_sale_vat_registered_vat_exempt" model="account.fiscal.position.tax.template">
<field name="tax_src_id" ref="l10n_ph_tax_sale_vat_exempt" />
<field name="tax_dest_id" ref="l10n_ph_tax_sale_vat_12" />
<field name="position_id" ref="l10n_ph_fiscal_position_vat_registered" />
</record>
<record id="l10n_ph_fiscal_position_tax_purchase_vat_registered_vat_exempt" model="account.fiscal.position.tax.template">
<field name="tax_src_id" ref="l10n_ph_tax_purchase_vat_exempt" />
<field name="tax_dest_id" ref="l10n_ph_tax_purchase_vat_12" />
<field name="position_id" ref="l10n_ph_fiscal_position_vat_registered" />
</record>
<record id="l10n_ph_fiscal_position_tax_sale_vat_exempt_vat_registered" model="account.fiscal.position.tax.template">
<field name="tax_src_id" ref="l10n_ph_tax_sale_vat_12" />
<field name="tax_dest_id" ref="l10n_ph_tax_sale_vat_exempt" />
<field name="position_id" ref="l10n_ph_fiscal_position_vat_exempt" />
</record>
<record id="l10n_ph_fiscal_position_tax_purchase_vat_exempt_vat_registered" model="account.fiscal.position.tax.template">
<field name="tax_src_id" ref="l10n_ph_tax_purchase_vat_12" />
<field name="tax_dest_id" ref="l10n_ph_tax_purchase_vat_exempt" />
<field name="position_id" ref="l10n_ph_fiscal_position_vat_exempt" />
</record>
</flectra>

View File

@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='utf-8' ?>
<flectra>
<record id="l10n_ph_fiscal_position_vat_registered" model="account.fiscal.position.template">
<field name="sequence">1</field>
<field name="name">VAT Registered</field>
<field name="chart_template_id" ref="l10n_ph_chart_template" />
<field name="auto_apply" eval="True" />
<field name="vat_required" eval="True" />
<field name="country_id" ref="base.ph" />
</record>
<record id="l10n_ph_fiscal_position_vat_exempt" model="account.fiscal.position.template">
<field name="sequence">2</field>
<field name="name">VAT Exempt</field>
<field name="chart_template_id" ref="l10n_ph_chart_template" />
<field name="auto_apply" eval="True" />
<field name="country_id" ref="base.ph" />
</record>
</flectra>

View File

@@ -0,0 +1,27 @@
<?xml version='1.0' encoding='utf-8' ?>
<flectra noupdate="1">
<record id="l10n_ph_tax_group_vat_12" model="account.tax.group">
<field name="name">VAT 12%</field>
</record>
<record id="l10n_ph_tax_group_vat_exempt" model="account.tax.group">
<field name="name">VAT Exempt</field>
</record>
<record id="l10n_ph_tax_group_wht_p5" model="account.tax.group">
<field name="name">WHT 0.5%</field>
</record>
<record id="l10n_ph_tax_group_wht_1" model="account.tax.group">
<field name="name">WHT 1%</field>
</record>
<record id="l10n_ph_tax_group_wht_2" model="account.tax.group">
<field name="name">WHT 2%</field>
</record>
<record id="l10n_ph_tax_group_wht_5" model="account.tax.group">
<field name="name">WHT 5%</field>
</record>
<record id="l10n_ph_tax_group_wht_10" model="account.tax.group">
<field name="name">WHT 10%</field>
</record>
<record id="l10n_ph_tax_group_wht_15" model="account.tax.group">
<field name="name">WHT 15%</field>
</record>
</flectra>

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More