From 1a4a9fbd810818db78fa6938468d55e771824d13 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 10 Jan 2025 19:02:17 +1100 Subject: [PATCH 01/15] Adjustments for zugferd document refactor --- .../EDocument/Standards/ZugferdEDocument.php | 501 ++++++++++++++++++ .../EDocument/Standards/ZugferdEDokument.php | 2 +- 2 files changed, 502 insertions(+), 1 deletion(-) create mode 100644 app/Services/EDocument/Standards/ZugferdEDocument.php diff --git a/app/Services/EDocument/Standards/ZugferdEDocument.php b/app/Services/EDocument/Standards/ZugferdEDocument.php new file mode 100644 index 00000000000..5c26e4d1d7b --- /dev/null +++ b/app/Services/EDocument/Standards/ZugferdEDocument.php @@ -0,0 +1,501 @@ +company = $this->document->company; + + /** @var \App\Models\Client $client */ + $this->client = $this->document->client; + + $profile = $this->client->getSetting('e_invoice_type'); + + $profile = match ($profile) { + "XInvoice_3_0" => ZugferdProfiles::PROFILE_XRECHNUNG_3, + "XInvoice_2_3" => ZugferdProfiles::PROFILE_XRECHNUNG_2_3, + "XInvoice_2_2" => ZugferdProfiles::PROFILE_XRECHNUNG_2_2, + "XInvoice_2_1" => ZugferdProfiles::PROFILE_XRECHNUNG_2_1, + "XInvoice_2_0" => ZugferdProfiles::PROFILE_XRECHNUNG_2, + "XInvoice_1_0" => ZugferdProfiles::PROFILE_XRECHNUNG, + "XInvoice-Extended" => ZugferdProfiles::PROFILE_EXTENDED, + "XInvoice-BasicWL" => ZugferdProfiles::PROFILE_BASICWL, + "XInvoice-Basic" => ZugferdProfiles::PROFILE_BASIC, + default => ZugferdProfiles::PROFILE_EN16931, + }; + + $this->xdocument = ZugferdDocumentBuilder::CreateNew($profile); + + + $this->bootFlags() + ->setBaseDocument() + ->setDocumentInformation() + ->setPoNumber() + ->setRoutingNumber() + ->setDeliveryAddress() + ->setDocumentTaxes() // 1. First set taxes + ->setPaymentMeans() // 2. Then payment means + ->setPaymentTerms() // 3. Then payment terms + ->setLineItems() // 4. Then line items + ->setDocumentSummation(); // 5. Finally document summation + + return $this; + + } + + + private function setDocumentTaxes(): self + { + if ($this->document->total_taxes == 0) { + $this->xdocument->addDocumentTax( + ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX, + "VAT", + 0, + 0, + 0, + ctrans('texts.vat_not_registered'), + "VATNOTREG" + ); + + return $this; + } + + foreach ($this->calc->getTaxMap() as $item) { + $tax_type = $this->getTaxType($item["tax_id"]); + + $this->xdocument->addDocumentTax( + $tax_type, + "VAT", + $item["total"], + ($item["tax_rate"] / 100) * $item["total"], + $item["tax_rate"], + $tax_type == ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES + ? ctrans('texts.intracommunity_tax_info') + : '' + ); + } + + return $this; + } + + private function setPaymentTerms(): self + { + $this->xdocument->addDocumentPaymentTerm( + ctrans("texts.xinvoice_payable", [ + 'payeddue' => date_create($this->document->date ?? now()->format('Y-m-d')) + ->diff(date_create($this->document->due_date ?? now()->format('Y-m-d'))) + ->format("%d"), + 'paydate' => $this->document->due_date + ]) + ); + + return $this; + } + + public function getDocument() + { + return $this->xdocument; + } + + public function getXml(): string + { + return $this->xdocument->getContent(); + } + + private function bootFlags(): self + { + + $this->calc = $this->document->calc(); + + return $this; + } + + private function setDocumentSummation(): self + { + $document_discount = $this->calc->getTotalDiscount(); + + $this->xdocument->setDocumentSummation( + $this->document->amount, + $this->document->balance, + $this->calc->getSubTotal(), + $this->calc->getTotalSurcharges(), + $document_discount, + $this->calc->getSubTotal() - $document_discount, + $this->calc->getItemTotalTaxes(), + 0.0, + $this->document->amount - $this->document->balance + ); + + return $this; + } +private function setLineItems(): self +{ + foreach ($this->document->line_items as $index => $item) { + /** @var InvoiceItem $item **/ + + // 1. Start new position and set basic details + $this->xdocument->addNewPosition($index) + ->setDocumentPositionProductDetails( + strlen($item->product_key ?? '') >= 1 ? $item->product_key : "no product name defined", + $item->notes + ) + ->setDocumentPositionQuantity( + $item->quantity, + $item->type_id == 2 ? "HUR" : "H87" + ) + ->setDocumentPositionNetPrice( + $this->document->uses_inclusive_tax ? $item->net_cost : $item->cost + ); + + // 2. ALWAYS add tax information (even if zero) + if(strlen($item->tax_name1) > 1) { + $this->xdocument->addDocumentPositionTax( + $this->getTaxType($item->tax_id ?? '2'), + 'VAT', + $item->tax_rate1 + ); + } else { + // Add zero tax if no tax is specified + $this->xdocument->addDocumentPositionTax( + ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX, + 'VAT', + 0 + ); + } + + // 3. Add allowances/charges (discounts) if any + if($item->discount > 0) { + $line_discount = $this->calculateTotalItemDiscountAmount($item); + $this->xdocument->addDocumentPositionGrossPriceAllowanceCharge( + abs($line_discount), + false + ); + } + + // 4. Finally add monetary summation + $this->xdocument->setDocumentPositionLineSummation($item->line_total); + } + + return $this; +} + +private function calculateTotalItemDiscountAmount($item): float +{ + if ($item->is_amount_discount) { + return $item->discount; + } + + return ($item->cost * $item->quantity) * ($item->discount / 100); +} + + + private function setClientTaxRegistration(): self + { + if (empty($this->client->vat_number)) { + + return $this; + + } + + $this->xdocument->addDocumentBuyerTaxRegistration("VA", $this->client->vat_number); + + return $this; + + } + + private function setCompanyTaxRegistration(): array + { + if (str_contains($this->company->getSetting('vat_number'), "/")) + return ["FC", $this->company->getSetting('vat_number')]; + + return ["VA", $this->company->getSetting('vat_number')]; + } + + private function setPaymentMeans(): self + { + + /**Check if the e_invoice object is populated */ + if (isset($this->company->e_invoice->Invoice->PaymentMeans) && ($pm = $this->company->e_invoice->Invoice->PaymentMeans[0] ?? false)) { + + switch ($pm->PaymentMeansCode->value ?? false) { + case '30': + case '58': + $iban = $pm->PayeeFinancialAccount->ID->value; + $name = $pm->PayeeFinancialAccount->Name ?? ''; + $bic = $pm->PayeeFinancialAccount->FinancialInstitutionBranch->FinancialInstitution->ID->value ?? ''; + $typecode = $pm->PaymentMeansCode->value; + + $this->xdocument->addDocumentPaymentMean(typeCode: $typecode, payeeIban: $iban, payeeAccountName: $name, payeeBic: $bic); + + return $this; + + default: + # code... + break; + } + + } + + //Otherwise default to the "old style" + + $custom_value1 = $this->company->settings->custom_value1; + //BR-DE-23 - If „Payment means type code“ (BT-81) contains a code for credit transfer (30, 58), „CREDIT TRANSFER“ (BG-17) shall be provided. + //Payment Means - Switcher + if (isset($custom_value1) && !empty($custom_value1) && ($custom_value1 == '30' || $custom_value1 == '58')) { + $this->xdocument->addDocumentPaymentMean(typeCode: $this->company->settings->custom_value1, payeeIban: $this->company->settings->custom_value2, payeeAccountName: $this->company->settings->custom_value4, payeeBic: $this->company->settings->custom_value3); + } else { + $this->xdocument->addDocumentPaymentMean('68', ctrans("texts.xinvoice_online_payment")); + } + + return $this; + + } + + private function setDeliveryAddress(): self + { + + if (isset($client->shipping_address1) && $client->shipping_country) { + $this->xdocument->setDocumentShipToAddress( + $this->client->shipping_address1, + $this->client->shipping_address2, + "", + $this->client->shipping_postal_code, + $this->client->shipping_city, + $this->client->shipping_country->iso_3166_2, + $this->client->shipping_state + ); + } + + return $this; + } + + private function setDocumentInformation(): self + { + $this->xdocument->setDocumentInformation( + $this->getDocumentNumber(), + $this->getDocumentType(), + $this->getDocumentDate(), + $this->getDocumentCurrency() + ); + + return $this; + } + + private function setBaseDocument(): self + { + + $user_or_company_phone = strlen($this->document->user->present()->phone()) > 3 ? $this->document->user->present()->phone() : $this->company->present()->phone(); + + $company_tax_registration = $this->setCompanyTaxRegistration(); + + $this->xdocument + ->setDocumentSupplyChainEvent($this->getDocumentDate()) + ->setDocumentSeller($this->company->getSetting('name')) + ->setDocumentSellerAddress($this->company->getSetting("address1"), $this->company->getSetting("address2"), "", $this->company->getSetting("postal_code"), $this->company->getSetting("city"), $this->company->country()->iso_3166_2, $this->company->getSetting("state")) + ->setDocumentSellerContact($this->document->user->present()->getFullName(), "", $user_or_company_phone, "", $this->document->user->email) + ->setDocumentSellerCommunication("EM", $this->document->user->email) + ->addDocumentSellerTaxRegistration($company_tax_registration[0], $company_tax_registration[1]) + ->setDocumentBuyer($this->client->present()->name(), $this->client->number) + ->setDocumentBuyerAddress($this->client->address1, "", "", $this->client->postal_code, $this->client->city, $this->client->country->iso_3166_2, $this->client->state) + ->setDocumentBuyerContact($this->client->present()->primary_contact_name(), "", $this->client->present()->phone(), "", $this->client->present()->email()) + ->setDocumentBuyerCommunication("EM", $this->client->present()->email()) + ->addDocumentPaymentTerm(ctrans("texts.xinvoice_payable", ['payeddue' => date_create($this->document->date ?? now()->format('Y-m-d'))->diff(date_create($this->document->due_date ?? now()->format('Y-m-d')))->format("%d"), 'paydate' => $this->document->due_date])); + + + return $this; + } + + private function setRoutingNumber(): self + { + if (empty($this->client->routing_id)) { + $this->xdocument->setDocumentBuyerReference(ctrans("texts.xinvoice_no_buyers_reference")); + } else { + $this->xdocument->setDocumentBuyerReference($this->client->routing_id) + ->setDocumentBuyerCommunication("0204", $this->client->routing_id); + } + return $this; + } + + private function setPoNumber(): self + { + if (isset($this->document->po_number) && strlen($this->document->po_number) > 1) { + $this->xdocument->setDocumentBuyerOrderReferencedDocument($this->document->po_number); + } + + return $this; + } + + //////////////////Getters////////////////// + private function getDocumentNumber(): string + { + return empty($this->document->number) ? "DRAFT" : $this->document->number; + } + + private function getDocumentType(): string + { + return match (get_class($this->document)) { + Quote::class => ZugferdDocumentType::CONTRACT_PRICE_QUOTE, + Invoice::class => ZugferdDocumentType::COMMERCIAL_INVOICE, + Credit::class => ZugferdDocumentType::CREDIT_NOTE, + default => ZugferdDocumentType::COMMERCIAL_INVOICE, + }; + } + + private function getDocumentDate(): ?DateTime + { + return date_create($this->document->date ?? now()->format('Y-m-d')); + } + + private function getDocumentCurrency(): string + { + return $this->client->getCurrencyCode(); + } + + private function getTaxType(string $tax_id): string + { + + switch ($tax_id) { + case Product::PRODUCT_TYPE_SERVICE: + case Product::PRODUCT_TYPE_DIGITAL: + case Product::PRODUCT_TYPE_PHYSICAL: + case Product::PRODUCT_TYPE_SHIPPING: + case Product::PRODUCT_TYPE_REDUCED_TAX: + $tax_type = ZugferdDutyTaxFeeCategories::STANDARD_RATE; + break; + case Product::PRODUCT_TYPE_EXEMPT: + $tax_type = ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX; + break; + case Product::PRODUCT_TYPE_ZERO_RATED: + $tax_type = ZugferdDutyTaxFeeCategories::ZERO_RATED_GOODS; + break; + case Product::PRODUCT_TYPE_REVERSE_TAX: + $tax_type = ZugferdDutyTaxFeeCategories::VAT_REVERSE_CHARGE; + break; + + default: + $tax_type = null; + break; + } + + if ($this->client->is_tax_exempt) { + $tax_type = ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX; + } + + $br = new \App\DataMapper\Tax\BaseRule(); + $eu_states = $br->eu_country_codes; + + if (empty($tax_type)) { + if ((in_array($this->company->country()->iso_3166_2, $eu_states) && in_array($this->client->country->iso_3166_2, $eu_states)) && $this->company->country()->iso_3166_2 != $this->client->country->iso_3166_2) { + $tax_type = ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES; + } elseif (!in_array($this->document->client->country->iso_3166_2, $eu_states)) { + $tax_type = ZugferdDutyTaxFeeCategories::SERVICE_OUTSIDE_SCOPE_OF_TAX; + } elseif ($this->document->client->country->iso_3166_2 == "ES-CN") { + $tax_type = ZugferdDutyTaxFeeCategories::CANARY_ISLANDS_GENERAL_INDIRECT_TAX; + } elseif (in_array($this->document->client->country->iso_3166_2, ["ES-CE", "ES-ML"])) { + $tax_type = ZugferdDutyTaxFeeCategories::TAX_FOR_PRODUCTION_SERVICES_AND_IMPORTATION_IN_CEUTA_AND_MELILLA; + } else { + nlog("Unkown tax case for xinvoice"); + $tax_type = ZugferdDutyTaxFeeCategories::STANDARD_RATE; + } + } + + return $tax_type; + } + + private function getTaxable(): float + { + $total = 0; + + foreach ($this->document->line_items as $item) { + $line_total = $item->quantity * $item->cost; + + if ($item->discount != 0) { + if ($this->document->is_amount_discount) { + $line_total -= $item->discount; + } else { + $line_total -= $line_total * $item->discount / 100; + } + } + + $total += $line_total; + } + + $total = round($total, 2); + + if ($this->document->discount > 0) { + if ($this->document->is_amount_discount) { + $total -= $this->document->discount; + } else { + $total *= (100 - $this->document->discount) / 100; + + } + } + + //** Surcharges are taxable regardless, if control is needed over taxable components, add it as a line item! */ + if ($this->document->custom_surcharge1 > 0) { + $total += $this->document->custom_surcharge1; + } + + if ($this->document->custom_surcharge2 > 0) { + $total += $this->document->custom_surcharge2; + } + + if ($this->document->custom_surcharge3 > 0) { + $total += $this->document->custom_surcharge3; + } + + if ($this->document->custom_surcharge4 > 0) { + $total += $this->document->custom_surcharge4; + } + + return round($total, 2); + } +} diff --git a/app/Services/EDocument/Standards/ZugferdEDokument.php b/app/Services/EDocument/Standards/ZugferdEDokument.php index a37dacc42d5..4b18f32a399 100644 --- a/app/Services/EDocument/Standards/ZugferdEDokument.php +++ b/app/Services/EDocument/Standards/ZugferdEDokument.php @@ -326,7 +326,7 @@ private function getTaxType($name): string $tax_type = ZugferdDutyTaxFeeCategories::STANDARD_RATE; break; case Product::PRODUCT_TYPE_EXEMPT: - $tax_type = ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX; + $tax_type = ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX; break; case Product::PRODUCT_TYPE_ZERO_RATED: $tax_type = ZugferdDutyTaxFeeCategories::ZERO_RATED_GOODS; From 7b314f1ce1050c7a5e0cc0e284fa425145a36b8b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 11 Jan 2025 08:18:49 +1100 Subject: [PATCH 02/15] Reworking zugferd --- .../EDocument/Gateway/Storecove/Mutator.php | 1 + .../Gateway/Storecove/StorecoveAdapter.php | 1 + app/Services/EDocument/Jobs/SendEDocument.php | 2 +- app/Services/EDocument/Standards/Peppol.php | 10 ++-- .../EDocument/Standards/ZugferdEDocument.php | 59 +++++++++++++++---- 5 files changed, 55 insertions(+), 18 deletions(-) diff --git a/app/Services/EDocument/Gateway/Storecove/Mutator.php b/app/Services/EDocument/Gateway/Storecove/Mutator.php index 57d668ae817..44a57d113ee 100644 --- a/app/Services/EDocument/Gateway/Storecove/Mutator.php +++ b/app/Services/EDocument/Gateway/Storecove/Mutator.php @@ -612,6 +612,7 @@ public function setClientRoutingCode(): self $identifier = $this->getClientPublicIdentifier($code); } + $identifier = str_ireplace(["FR","BE"],"", $identifier); $this->setStorecoveMeta($this->buildRouting([ ["scheme" => $code, "id" => $identifier] diff --git a/app/Services/EDocument/Gateway/Storecove/StorecoveAdapter.php b/app/Services/EDocument/Gateway/Storecove/StorecoveAdapter.php index ff1ab8dad57..e0d5f21a807 100644 --- a/app/Services/EDocument/Gateway/Storecove/StorecoveAdapter.php +++ b/app/Services/EDocument/Gateway/Storecove/StorecoveAdapter.php @@ -257,6 +257,7 @@ public function decorate(): self // $id = str_ireplace("fr","", $this->ninja_invoice->client->vat_number); $id = $this->ninja_invoice->client->vat_number; $scheme = $this->storecove->router->setInvoice($this->ninja_invoice)->resolveTaxScheme($this->ninja_invoice->client->country->iso_3166_2, $this->ninja_invoice->client->classification ?? 'individual'); + // $id = str_ireplace(["FR","BE"],"", $id); $pi = new \App\Services\EDocument\Gateway\Storecove\Models\PublicIdentifiers($scheme, $id); $accounting_customer_party->addPublicIdentifiers($pi); $this->storecove_invoice->setAccountingCustomerParty($accounting_customer_party); diff --git a/app/Services/EDocument/Jobs/SendEDocument.php b/app/Services/EDocument/Jobs/SendEDocument.php index 2848018dc01..3af2e7f306c 100644 --- a/app/Services/EDocument/Jobs/SendEDocument.php +++ b/app/Services/EDocument/Jobs/SendEDocument.php @@ -93,7 +93,7 @@ public function handle(Storecove $storecove) 'account_key' => $model->company->account->key, 'e_invoicing_token' => $model->company->account->e_invoicing_token, ]; - +nlog($payload); //Self Hosted Sending Code Path if (Ninja::isSelfHost() && ($model instanceof Invoice) && $model->company->peppolSendingEnabled()) { diff --git a/app/Services/EDocument/Standards/Peppol.php b/app/Services/EDocument/Standards/Peppol.php index 6f40a563432..f2d3bb3fbe1 100644 --- a/app/Services/EDocument/Standards/Peppol.php +++ b/app/Services/EDocument/Standards/Peppol.php @@ -987,14 +987,14 @@ private function getAccountingSupplierParty(): AccountingSupplierParty $pi = new PartyIdentification(); $vatID = new ID(); $vatID->schemeID = $this->resolveScheme(); - $vatID->value = $this->override_vat_number ?? preg_replace("/[^a-zA-Z0-9]/", "", $this->company->settings->vat_number); //todo if we are cross border - switch to the supplier local vat number + $vatID->value = $this->override_vat_number ?? preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->company->settings->vat_number); //todo if we are cross border - switch to the supplier local vat number $pi->ID = $vatID; $party->PartyIdentification[] = $pi; $pts = new \InvoiceNinja\EInvoice\Models\Peppol\PartyTaxSchemeType\PartyTaxScheme(); $companyID = new \InvoiceNinja\EInvoice\Models\Peppol\IdentifierType\CompanyID(); - $companyID->value = $this->override_vat_number ?? preg_replace("/[^a-zA-Z0-9]/", "", $this->company->settings->vat_number); + $companyID->value = $this->override_vat_number ?? preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->company->settings->vat_number); $pts->CompanyID = $companyID; $ts = new TaxScheme(); @@ -1513,9 +1513,9 @@ private function standardizeTaxSchemeId(string $tax_name): string private function resolveScheme(bool $is_client = false): string { - $vat_number = $is_client ? preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->client->vat_number) : preg_replace("/[^a-zA-Z0-9]/", "", $this->company->settings->vat_number); - $tax_number = $is_client ? preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->client->id_number) : preg_replace("/[^a-zA-Z0-9]/", "", $this->company->settings->id_number); - $country_code = $is_client ? $this->invoice->client->country->iso_3166_2 : $this->company->country()->iso_3166_2; + $vat_number = $is_client ? preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->client->vat_number ?? '') : preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->company->settings->vat_number ?? ''); + $tax_number = $is_client ? preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->client->id_number ?? ''): preg_replace("/[^a-zA-Z0-9]/", "", $this->invoice->company->settings->id_number ?? ''); + $country_code = $is_client ? $this->invoice->client->country->iso_3166_2 : $this->invoice->company->country()->iso_3166_2; return '0037'; } diff --git a/app/Services/EDocument/Standards/ZugferdEDocument.php b/app/Services/EDocument/Standards/ZugferdEDocument.php index 5c26e4d1d7b..4e23d0e366e 100644 --- a/app/Services/EDocument/Standards/ZugferdEDocument.php +++ b/app/Services/EDocument/Standards/ZugferdEDocument.php @@ -12,6 +12,7 @@ namespace App\Services\EDocument\Standards; +use DateTime; use App\Models\Quote; use App\Models\Client; use App\Models\Credit; @@ -21,8 +22,8 @@ use App\DataMapper\InvoiceItem; use App\Services\AbstractService; use App\Helpers\Invoice\InvoiceSum; -use DateTime; use horstoeko\zugferd\ZugferdProfiles; +use App\Helpers\Invoice\InvoiceSumInclusive; use horstoeko\zugferd\ZugferdDocumentBuilder; use horstoeko\zugferd\codelists\ZugferdDocumentType; use horstoeko\zugferd\codelists\ZugferdDutyTaxFeeCategories; @@ -35,7 +36,7 @@ class ZugferdEDocument extends AbstractService private Client $client; - private InvoiceSum | InvoiceInclusiveSum $calc; + private InvoiceSum | InvoiceSumInclusive $calc; /** * __construct * @@ -108,14 +109,43 @@ private function setDocumentTaxes(): self return $this; } + // Get document level discount + $document_discount = $this->calc->getTotalDiscount(); + $total_taxable = $this->getTaxable(); + + // Process each tax rate group foreach ($this->calc->getTaxMap() as $item) { $tax_type = $this->getTaxType($item["tax_id"]); + + // Calculate proportional discount for this tax group + $tax_group_total = $item["base_amount"]; + $proportional_discount = 0; + + if ($document_discount > 0 && $total_taxable > 0) { + $proportional_discount = round(($tax_group_total / $total_taxable) * $document_discount, 2); + } + // Adjusted taxable amount for this tax group + $adjusted_taxable = $tax_group_total - $proportional_discount; + + // Add document level allowance (discount) if present + if ($proportional_discount > 0) { + $this->xdocument->addDocumentAllowanceCharge( + $proportional_discount, + false, // isCharge = false means it's a discount + $tax_type, + "VAT", + $item["tax_rate"] + ); + } + + // Add tax information $this->xdocument->addDocumentTax( $tax_type, "VAT", + $adjusted_taxable, // Taxable amount after discount + // ($item["tax_rate"] / 100) * $adjusted_taxable, // Tax amount $item["total"], - ($item["tax_rate"] / 100) * $item["total"], $item["tax_rate"], $tax_type == ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES ? ctrans('texts.intracommunity_tax_info') @@ -161,17 +191,22 @@ private function bootFlags(): self private function setDocumentSummation(): self { $document_discount = $this->calc->getTotalDiscount(); + $total_tax = $this->calc->getTotalTaxes(); + $subtotal = $this->calc->getTotal() - $total_tax; + // Calculate amounts after discount + $taxable_amount = $this->getTaxable(); + $this->xdocument->setDocumentSummation( - $this->document->amount, - $this->document->balance, - $this->calc->getSubTotal(), - $this->calc->getTotalSurcharges(), - $document_discount, - $this->calc->getSubTotal() - $document_discount, - $this->calc->getItemTotalTaxes(), - 0.0, - $this->document->amount - $this->document->balance + $this->document->amount, // Total amount with VAT + $this->document->balance, // Amount due + $subtotal, // Sum before tax + $this->calc->getTotalSurcharges(), // Total charges + $document_discount, // Total allowances + $taxable_amount, // Tax basis total (net) + $total_tax, // Total tax amount + 0.0, // Total prepaid amount + $this->document->amount - $this->document->balance // Amount already paid ); return $this; From e9fa48af0008b61721ed6f0665bcfbde25550b7d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 09:48:27 +1100 Subject: [PATCH 03/15] Prevent apple signups due to no email address provision --- app/Http/Controllers/Auth/LoginController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index fca74369e00..ec25a2d62c4 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -335,6 +335,10 @@ private function loginOrCreateFromSocialite($user, $provider) $name[1] = request()->has('last_name') ? request()->input('last_name') : $name[1]; } + if($provider == 'apple' && !$user->email){ + return response()->json(['message' => 'This signup method is not supported as no email was provided'], 403); + } + $new_account = [ 'first_name' => $name[0], 'last_name' => $name[1], From 45fe5da683f1276ccc278054e0df98f0ab3d519e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 09:52:53 +1100 Subject: [PATCH 04/15] Fixes for static analysis --- app/Http/Controllers/Bank/NordigenController.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Bank/NordigenController.php b/app/Http/Controllers/Bank/NordigenController.php index ef09ab34dae..5528f534c00 100644 --- a/app/Http/Controllers/Bank/NordigenController.php +++ b/app/Http/Controllers/Bank/NordigenController.php @@ -77,7 +77,7 @@ public function connect(ConnectNordigenBankIntegrationRequest $request): View|Re }))[0]; try { - $txDays = $data['tx_days'] ?? 0; + $txDays = $data['tx_days'] ?? 0; //@phpstan-ignore-line $agreement = $nordigen->firstValidAgreement($institution['id'], $data['access_days'] ?? 0, $txDays) ?? $nordigen->createAgreement($institution, $data['access_days'] ?? 9999, $txDays); @@ -173,6 +173,8 @@ public function confirm(ConfirmNordigenBankIntegrationRequest $request): View|Re if (isset($nordigen_account['error'])) { continue; } + + $bank_integration = false; try { $bank_integration = $this->findIntegrationBy('account', $nordigen_account, $company); @@ -194,6 +196,10 @@ public function confirm(ConfirmNordigenBankIntegrationRequest $request): View|Re $bank_integration->nickname = $nordigen_account['nickname']; $bank_integration->currency = $nordigen_account['account_currency']; } finally { + + if(!$bank_integration) + continue; + $bank_integration->auto_sync = true; $bank_integration->disabled_upstream = false; $bank_integration->balance = $nordigen_account['current_balance']; @@ -224,8 +230,6 @@ public function confirm(ConfirmNordigenBankIntegrationRequest $request): View|Re /** * Handles failure scenarios for Nordigen bank integrations * - * @param array{lang: string, redirect?: string}|null $context - * @param array{account: array}|null $company */ private function failed(string $reason, array $context, $company = null): View { From 9ec84b5fea713000cc3503eab5318716c93ad179 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 10:01:33 +1100 Subject: [PATCH 05/15] Fixes for payment status when viewed from client portal --- app/Models/Payment.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Models/Payment.php b/app/Models/Payment.php index df010785609..2775cf9e3ee 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -323,7 +323,10 @@ public function badgeForStatus(): string return '
'.ctrans('texts.payment_status_3').'
'; case self::STATUS_COMPLETED: - if ($this->amount > $this->applied) { + if($this->applied == 0){ + return '
' . ctrans('texts.unapplied') . '
'; + } + elseif ($this->amount > $this->applied) { return '
' . ctrans('texts.partially_unapplied') . '
'; } From 2db1542029d27f2e3de6e0d03ab0717ff9c5b159 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 10:02:32 +1100 Subject: [PATCH 06/15] Static analysis --- app/Helpers/Bank/Nordigen/Nordigen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Helpers/Bank/Nordigen/Nordigen.php b/app/Helpers/Bank/Nordigen/Nordigen.php index 4930116d1f6..d2c94420e9e 100644 --- a/app/Helpers/Bank/Nordigen/Nordigen.php +++ b/app/Helpers/Bank/Nordigen/Nordigen.php @@ -132,7 +132,7 @@ function (array $eua) use ($institutionId, $requiredScopes, $accessDays, $txDays * access_valid_for_days: int, * access_scope: string[], * accepted: string - * }|null Agreement details + * } Agreement details */ public function createAgreement(array $institution, int $accessDays, int $transactionDays): array { From e000fa127589ae50c8d92e228dbc17d8b10b2681 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 11:41:27 +1100 Subject: [PATCH 07/15] Fixes for Total Discount on invoice - zugferd --- app/Jobs/EDocument/CreateEDocument.php | 6 +- .../EDocument/Standards/ZugferdEDocument.php | 164 +++++++++--------- 2 files changed, 90 insertions(+), 80 deletions(-) diff --git a/app/Jobs/EDocument/CreateEDocument.php b/app/Jobs/EDocument/CreateEDocument.php index c8677fc7405..26b1efddd35 100644 --- a/app/Jobs/EDocument/CreateEDocument.php +++ b/app/Jobs/EDocument/CreateEDocument.php @@ -28,6 +28,7 @@ use App\Services\EDocument\Standards\RoEInvoice; use App\Services\EDocument\Standards\OrderXDocument; use App\Services\EDocument\Standards\FacturaEInvoice; +use App\Services\EDocument\Standards\ZugferdEDocument; use App\Services\EDocument\Standards\ZugferdEDokument; class CreateEDocument implements ShouldQueue @@ -85,7 +86,10 @@ public function handle(): string|ZugferdDocumentBuilder case "XInvoice-Extended": case "XInvoice-BasicWL": case "XInvoice-Basic": - $zugferd = (new ZugferdEDokument($this->document))->run(); + +// $zugferd = (new ZugferdEDokument($this->document))->run(); + +$zugferd = (new ZugferdEDocument($this->document))->run(); return $this->returnObject ? $zugferd->xdocument : $zugferd->getXml(); case "Facturae_3.2": diff --git a/app/Services/EDocument/Standards/ZugferdEDocument.php b/app/Services/EDocument/Standards/ZugferdEDocument.php index 4e23d0e366e..71dd63c44bf 100644 --- a/app/Services/EDocument/Standards/ZugferdEDocument.php +++ b/app/Services/EDocument/Standards/ZugferdEDocument.php @@ -110,47 +110,40 @@ private function setDocumentTaxes(): self } // Get document level discount - $document_discount = $this->calc->getTotalDiscount(); - $total_taxable = $this->getTaxable(); - + // $document_discount = $this->calc->getTotalDiscount(); + // $total_taxable = $this->getTaxable(); + $net_subtotal = $this->calc->getNetSubTotal(); + // Process each tax rate group foreach ($this->calc->getTaxMap() as $item) { $tax_type = $this->getTaxType($item["tax_id"]); - - // Calculate proportional discount for this tax group - $tax_group_total = $item["base_amount"]; - $proportional_discount = 0; - - if ($document_discount > 0 && $total_taxable > 0) { - $proportional_discount = round(($tax_group_total / $total_taxable) * $document_discount, 2); - } - - // Adjusted taxable amount for this tax group - $adjusted_taxable = $tax_group_total - $proportional_discount; - - // Add document level allowance (discount) if present - if ($proportional_discount > 0) { - $this->xdocument->addDocumentAllowanceCharge( - $proportional_discount, - false, // isCharge = false means it's a discount - $tax_type, - "VAT", - $item["tax_rate"] - ); - } - // Add tax information $this->xdocument->addDocumentTax( $tax_type, "VAT", - $adjusted_taxable, // Taxable amount after discount - // ($item["tax_rate"] / 100) * $adjusted_taxable, // Tax amount + $item["base_amount"], // Taxable amount after discount $item["total"], $item["tax_rate"], $tax_type == ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES ? ctrans('texts.intracommunity_tax_info') : '' ); + + if ($this->calc->getTotalDiscount() > 0) { + + $ratio = $item["base_amount"] / $net_subtotal; + + $this->xdocument->addDocumentAllowanceCharge( + round($this->calc->getTotalDiscount() * $ratio, 2), + false, + $tax_type, + "VAT", + $item["tax_rate"] + ); + } + + + } return $this; @@ -197,10 +190,22 @@ private function setDocumentSummation(): self // Calculate amounts after discount $taxable_amount = $this->getTaxable(); + nlog([ + $this->document->amount, // Total amount with VAT + $this->document->balance, // Amount due + $this->calc->getSubTotal(), // Sum before tax + $this->calc->getTotalSurcharges(), // Total charges + $document_discount, // Total allowances + $taxable_amount, // Tax basis total (net) + $total_tax, // Total tax amount + 0.0, // Total prepaid amount + $this->document->amount - $this->document->balance, + ]); + $this->xdocument->setDocumentSummation( $this->document->amount, // Total amount with VAT $this->document->balance, // Amount due - $subtotal, // Sum before tax + $this->calc->getSubTotal(), // Sum before tax $this->calc->getTotalSurcharges(), // Total charges $document_discount, // Total allowances $taxable_amount, // Tax basis total (net) @@ -211,66 +216,67 @@ private function setDocumentSummation(): self return $this; } -private function setLineItems(): self -{ - foreach ($this->document->line_items as $index => $item) { - /** @var InvoiceItem $item **/ - // 1. Start new position and set basic details - $this->xdocument->addNewPosition($index) - ->setDocumentPositionProductDetails( - strlen($item->product_key ?? '') >= 1 ? $item->product_key : "no product name defined", - $item->notes - ) - ->setDocumentPositionQuantity( - $item->quantity, - $item->type_id == 2 ? "HUR" : "H87" - ) - ->setDocumentPositionNetPrice( - $this->document->uses_inclusive_tax ? $item->net_cost : $item->cost - ); + private function setLineItems(): self + { + foreach ($this->document->line_items as $index => $item) { + /** @var InvoiceItem $item **/ - // 2. ALWAYS add tax information (even if zero) - if(strlen($item->tax_name1) > 1) { - $this->xdocument->addDocumentPositionTax( - $this->getTaxType($item->tax_id ?? '2'), - 'VAT', - $item->tax_rate1 - ); - } else { - // Add zero tax if no tax is specified - $this->xdocument->addDocumentPositionTax( - ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX, - 'VAT', - 0 - ); - } + // 1. Start new position and set basic details + $this->xdocument->addNewPosition($index) + ->setDocumentPositionProductDetails( + strlen($item->product_key ?? '') >= 1 ? $item->product_key : "no product name defined", + $item->notes + ) + ->setDocumentPositionQuantity( + $item->quantity, + $item->type_id == 2 ? "HUR" : "H87" + ) + ->setDocumentPositionNetPrice( + $this->document->uses_inclusive_taxes ? $item->net_cost : $item->cost + ); + + // 2. ALWAYS add tax information (even if zero) + if(strlen($item->tax_name1) > 1) { + $this->xdocument->addDocumentPositionTax( + $this->getTaxType($item->tax_id ?? '2'), + 'VAT', + $item->tax_rate1 + ); + } else { + // Add zero tax if no tax is specified + $this->xdocument->addDocumentPositionTax( + ZugferdDutyTaxFeeCategories::EXEMPT_FROM_TAX, + 'VAT', + 0 + ); + } - // 3. Add allowances/charges (discounts) if any - if($item->discount > 0) { - $line_discount = $this->calculateTotalItemDiscountAmount($item); - $this->xdocument->addDocumentPositionGrossPriceAllowanceCharge( - abs($line_discount), - false - ); + // 3. Add allowances/charges (discounts) if any + if($item->discount > 0) { + $line_discount = $this->calculateTotalItemDiscountAmount($item); + $this->xdocument->addDocumentPositionGrossPriceAllowanceCharge( + abs($line_discount), + false + ); + } + + // 4. Finally add monetary summation + $this->xdocument->setDocumentPositionLineSummation($item->line_total); } - // 4. Finally add monetary summation - $this->xdocument->setDocumentPositionLineSummation($item->line_total); + return $this; } - return $this; -} + private function calculateTotalItemDiscountAmount($item): float + { + if ($item->is_amount_discount) { + return $item->discount; + } -private function calculateTotalItemDiscountAmount($item): float -{ - if ($item->is_amount_discount) { - return $item->discount; + return ($item->cost * $item->quantity) * ($item->discount / 100); } - return ($item->cost * $item->quantity) * ($item->discount / 100); -} - private function setClientTaxRegistration(): self { From 4c6f4d055225351748a663fd90bef1c59ee90f93 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 22:09:12 +1100 Subject: [PATCH 08/15] Working on zugferd calculations - with surcharges --- app/Helpers/Invoice/InvoiceItemSum.php | 6 +- .../Invoice/InvoiceItemSumInclusive.php | 89 +- app/Helpers/Invoice/InvoiceSumInclusive.php | 9 +- .../Validation/XsltDocumentValidator.php | 12 + .../Zugferd/FACTUR-X_EN16931_codedb.xml | 5844 ++++++++ .../Validation/Zugferd/FACTUR-X_MINIMUM.xslt | 1931 +++ .../Zugferd/FACTUR-X_MINIMUM_codedb.xml | 919 ++ .../XSD/CrossIndustryInvoice_100pD22B.xsd | 25 + ...EDIFICAS-EU_AccountingAccountType_D11A.xsd | 18 + ..._EDIFICAS-EU_AccountingAmountType_D11A.xsd | 17 + ...d_ISO_ISO3AlphaCurrencyCode_2012-08-31.xsd | 191 + ...odelist_standard_UNECE_ActionCode_D22A.xsd | 130 + ...delist_standard_UNECE_AddressType_D22A.xsd | 19 + ...E_AdjustmentReasonDescriptionCode_D22A.xsd | 116 + ...AllowanceChargeIdentificationCode_D22A.xsd | 116 + ...d_UNECE_AllowanceChargeReasonCode_D22A.xsd | 116 + ...CE_AutomaticDataCaptureMethodCode_D22A.xsd | 21 + ...NECE_CargoOperationalCategoryCode_D22A.xsd | 36 + ...dard_UNECE_CargoTypeCode_1996Rev2Final.xsd | 20 + ...UNECE_CommodityIdentificationCode_D22A.xsd | 12 + ..._UNECE_CommunicationMeansTypeCode_D22A.xsd | 58 + ...tandard_UNECE_ContactFunctionCode_D22A.xsd | 114 + ...d_UNECE_DangerousGoodsPackingCode_D22A.xsd | 15 + ...NECE_DangerousGoodsRegulationCode_D22A.xsd | 35 + ...standard_UNECE_DateOnlyFormatCode_D21B.xsd | 21 + ..._standard_UNECE_DeliveryTermsCode_2020.xsd | 24 + ...d_UNECE_DeliveryTermsFunctionCode_D22A.xsd | 19 + ..._standard_UNECE_DimensionTypeCode_D22A.xsd | 35 + ...UNECE_DocumentNameCode_Accounting_D22A.xsd | 35 + ...t_standard_UNECE_DocumentNameCode_D22A.xsd | 819 ++ ...standard_UNECE_DocumentStatusCode_D22A.xsd | 61 + ...standard_UNECE_DutyTaxFeeTypeCode_D22A.xsd | 67 + ..._UNECE_DutyorTaxorFeeCategoryCode_D22A.xsd | 33 + ...imeReferenceCodePaymentTermsEvent_D22A.xsd | 16 + ...dard_UNECE_EventTimeReferenceCode_D22A.xsd | 76 + ...reightChargeQuantityUnitBasisCode_D22A.xsd | 12 + ...ard_UNECE_FreightChargeTariffCode_D22A.xsd | 25 + ...list_standard_UNECE_GoodsTypeCode_D22A.xsd | 12 + ...dard_UNECE_GoodsTypeExtensionCode_D22A.xsd | 12 + ...andard_UNECE_LocationFunctionCode_D22A.xsd | 326 + ...NECE_MeasurementUnitCommonCodeLinear_4.xsd | 17 + ...NECE_MeasurementUnitCommonCodeVolume_4.xsd | 18 + ...NECE_MeasurementUnitCommonCodeWeight_4.xsd | 15 + ...tandard_UNECE_MessageFunctionCode_D22A.xsd | 84 + ...st_standard_UNECE_PackageTypeCode_2006.xsd | 416 + ...andard_UNECE_PackagingMarkingCode_D22A.xsd | 63 + ..._UNECE_PartyRoleCode_ChargePaying_D22A.xsd | 32 + ...list_standard_UNECE_PartyRoleCode_D22A.xsd | 635 + ...d_UNECE_PaymentGuaranteeMeansCode_D22A.xsd | 23 + ...ard_UNECE_PaymentMeansChannelCode_D22A.xsd | 27 + ...t_standard_UNECE_PaymentMeansCode_D22A.xsd | 94 + ...andard_UNECE_PaymentTermsTypeCode_D22A.xsd | 90 + ...list_standard_UNECE_PriceTypeCode_D22A.xsd | 50 + ..._standard_UNECE_ReferenceTypeCode_D22A.xsd | 828 ++ ..._standard_UNECE_SealConditionCode_D22A.xsd | 16 + ...andard_UNECE_SealingPartyRoleCode_D22A.xsd | 18 + ...odelist_standard_UNECE_StatusCode_D22A.xsd | 527 + ...riptionCode_AccountingDebitCredit_D22A.xsd | 18 + ...standard_UNECE_TimeOnlyFormatCode_D21B.xsd | 16 + ...tandard_UNECE_TimePointFormatCode_D21B.xsd | 17 + ...CE_TransportEquipmentCategoryCode_D22A.xsd | 107 + ...CE_TransportEquipmentFullnessCode_D22A.xsd | 24 + ...dard_UNECE_TransportMeansTypeCode_2007.xsd | 145 + ...ist_standard_UNECE_TransportModeCode_2.xsd | 21 + ..._UNECE_TransportMovementStageCode_D22A.xsd | 41 + ...E_TransportPaymentArrangementCode_D22A.xsd | 15 + ...ct_data_standard_QualifiedDataType_100.xsd | 818 + ...AggregateBusinessInformationEntity_100.xsd | 6176 ++++++++ ..._data_standard_UnqualifiedDataType_100.xsd | 144 + ...wo-letterCountryCode_SecondEdition2006.xsd | 260 + ...rlist_standard_UNECE_FreightCostCode_4.xsd | 1722 +++ ...PaymentTermsDescriptionIdentifier_D22A.xsd | 18 + .../Validation/Zugferd/zugferd_16931.xslt | 12281 ++++++++++++++++ .../EDocument/Standards/ZugferdEDocument.php | 154 +- app/Services/Template/TemplateService.php | 4 +- tests/Integration/Einvoice/ZugferdTest.php | 432 + 76 files changed, 36736 insertions(+), 92 deletions(-) create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_EN16931_codedb.xml create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM_codedb.xml create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAccountType_D11A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAmountType_D11A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_ISO_ISO3AlphaCurrencyCode_2012-08-31.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ActionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AddressType_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AdjustmentReasonDescriptionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeIdentificationCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeReasonCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AutomaticDataCaptureMethodCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoOperationalCategoryCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoTypeCode_1996Rev2Final.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommodityIdentificationCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommunicationMeansTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ContactFunctionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsPackingCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsRegulationCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DateOnlyFormatCode_D21B.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsCode_2020.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsFunctionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DimensionTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_Accounting_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentStatusCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyTaxFeeTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyorTaxorFeeCategoryCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCodePaymentTermsEvent_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeQuantityUnitBasisCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeTariffCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeExtensionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_LocationFunctionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeLinear_4.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeVolume_4.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeWeight_4.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MessageFunctionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackageTypeCode_2006.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackagingMarkingCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_ChargePaying_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentGuaranteeMeansCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansChannelCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentTermsTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PriceTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ReferenceTypeCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealConditionCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealingPartyRoleCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusDescriptionCode_AccountingDebitCredit_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimeOnlyFormatCode_D21B.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimePointFormatCode_D21B.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentCategoryCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentFullnessCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMeansTypeCode_2007.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportModeCode_2.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMovementStageCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportPaymentArrangementCode_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_ISO_ISOTwo-letterCountryCode_SecondEdition2006.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_FreightCostCode_4.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_PaymentTermsDescriptionIdentifier_D22A.xsd create mode 100644 app/Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt create mode 100644 tests/Integration/Einvoice/ZugferdTest.php diff --git a/app/Helpers/Invoice/InvoiceItemSum.php b/app/Helpers/Invoice/InvoiceItemSum.php index 4af08d6dc00..4fdc35d3f25 100644 --- a/app/Helpers/Invoice/InvoiceItemSum.php +++ b/app/Helpers/Invoice/InvoiceItemSum.php @@ -347,7 +347,7 @@ private function calcTaxes() private function getPeppolSurchargeTaxes(): self { - if (!($this->client->getSetting('e_invoice_type') == 'PEPPOL')) { + if (!$this->client->getSetting('enable_e_invoice')) { return $this; } @@ -400,6 +400,10 @@ private function groupTax($tax_name, $tax_rate, $tax_total, $amount, $tax_id = ' $key = str_replace(' ', '', $tax_name.$tax_rate); + //Handles an edge case where a blank line is entered. + if($tax_rate > 0 && $amount == 0) + return; + $group_tax = ['key' => $key, 'total' => $tax_total, 'tax_name' => $tax_name.' '.Number::formatValueNoTrailingZeroes(floatval($tax_rate), $this->client).'%', 'tax_id' => $tax_id, 'tax_rate' => $tax_rate, 'base_amount' => $amount]; $this->tax_collection->push(collect($group_tax)); diff --git a/app/Helpers/Invoice/InvoiceItemSumInclusive.php b/app/Helpers/Invoice/InvoiceItemSumInclusive.php index 0d3e742b1e8..25d1433877c 100644 --- a/app/Helpers/Invoice/InvoiceItemSumInclusive.php +++ b/app/Helpers/Invoice/InvoiceItemSumInclusive.php @@ -109,6 +109,8 @@ class InvoiceItemSumInclusive private $tax_collection; + private $custom_surcharge_map; + private bool $calc_tax = false; private $total_discount; @@ -120,6 +122,8 @@ class InvoiceItemSumInclusive public function __construct(RecurringInvoice | Invoice | Quote | Credit | PurchaseOrder | RecurringQuote $invoice) { $this->tax_collection = collect([]); + $this->custom_surcharge_map = collect([]); + $this->total_discount = 0; $this->invoice = $invoice; @@ -141,7 +145,7 @@ public function process() return $this; } - $this->calcLineItems(); + $this->calcLineItems()->getPeppolSurchargeTaxes(); return $this; } @@ -288,13 +292,91 @@ private function calcTaxes() return $this; } + private function getPeppolSurchargeTaxes(): self + { + + if (!$this->client->getSetting('enable_e_invoice')) { + return $this; + } + + $this->custom_surcharge_map = collect([]); + + collect($this->invoice->line_items) + ->flatMap(function ($item) { + return collect([1, 2, 3]) + ->map(fn ($i) => [ + 'name' => $item->{"tax_name{$i}"} ?? '', + 'percentage' => $item->{"tax_rate{$i}"} ?? 0, + 'tax_id' => $item->tax_id ?? '1', + ]) + ->filter(fn ($tax) => strlen($tax['name']) > 1); + }) + ->unique(fn ($tax) => $tax['percentage'] . '_' . $tax['name']) + ->values() + ->each(function ($tax) { + + $tax_component = 0; + + if ($this->invoice->custom_surcharge1) { + $tax_component += round($this->invoice->custom_surcharge1 - ($this->invoice->custom_surcharge1 / (1 + ($tax['percentage'] / 100))), 2); + $this->setCustomSurchargeNetMap(['custom_surcharge1' => round($this->invoice->custom_surcharge1 / (1 + ($tax['percentage'] / 100)),2)]); + } + + if ($this->invoice->custom_surcharge2) { + $tax_component += round($this->invoice->custom_surcharge2 - ($this->invoice->custom_surcharge2 / (1 + ($tax['percentage'] / 100))), 2); + $this->setCustomSurchargeNetMap(['custom_surcharge2' => round($this->invoice->custom_surcharge2 / (1 + ($tax['percentage'] / 100)),2)]); + } + + if ($this->invoice->custom_surcharge3) { + $tax_component += round($this->invoice->custom_surcharge3 - ($this->invoice->custom_surcharge3 / (1 + ($tax['percentage'] / 100))), 2); + $this->setCustomSurchargeNetMap(['custom_surcharge3' => round($this->invoice->custom_surcharge3 / (1 + ($tax['percentage'] / 100)),2)]); + } + + if ($this->invoice->custom_surcharge4) { + $tax_component += round($this->invoice->custom_surcharge4 - ($this->invoice->custom_surcharge4 / (1 + ($tax['percentage'] / 100))), 2); + $this->setCustomSurchargeNetMap(['custom_surcharge4' => round($this->invoice->custom_surcharge4 / (1 + ($tax['percentage'] / 100)),2)]); + } + + $amount = $this->invoice->custom_surcharge4 + $this->invoice->custom_surcharge3 + $this->invoice->custom_surcharge2 + $this->invoice->custom_surcharge1; + + if ($tax_component > 0) { + $this->groupTax($tax['name'], $tax['percentage'], $tax_component, $amount, $tax['tax_id']); + } + + }); + + return $this; + } + + private function setCustomSurchargeNetMap(array $surcharge): self + { + $this->custom_surcharge_map->push($surcharge); + + return $this; + } + + public function getCustomSurchargeNetMap() + { + return $this->custom_surcharge_map; + } + + + + + + private function groupTax($tax_name, $tax_rate, $tax_total, $amount, $tax_id = '') { $group_tax = []; $key = str_replace(' ', '', $tax_name.$tax_rate); - $group_tax = ['key' => $key, 'total' => $tax_total, 'tax_name' => $tax_name.' '.Number::formatValueNoTrailingZeroes(floatval($tax_rate), $this->client).'%', 'tax_id' => $tax_id, 'base_amount' => $amount]; + //Handles an edge case where a blank line is entered. + if ($tax_rate > 0 && $amount == 0) { + return; + } + + $group_tax = ['key' => $key, 'total' => $tax_total, 'tax_name' => $tax_name.' '.Number::formatValueNoTrailingZeroes(floatval($tax_rate), $this->client).'%', 'tax_id' => $tax_id, 'tax_rate' => $tax_rate, 'base_amount' => $tax_rate > 0 ? round($amount/(1+($tax_rate/100)),2) : $amount]; $this->tax_collection->push(collect($group_tax)); } @@ -430,9 +512,10 @@ public function calcTaxesWithAmountDiscount() } + $this->getPeppolSurchargeTaxes(); + return $this; - // $this->setTotalTaxes($item_tax); } diff --git a/app/Helpers/Invoice/InvoiceSumInclusive.php b/app/Helpers/Invoice/InvoiceSumInclusive.php index cb8f0c812c5..1301100e416 100644 --- a/app/Helpers/Invoice/InvoiceSumInclusive.php +++ b/app/Helpers/Invoice/InvoiceSumInclusive.php @@ -216,6 +216,13 @@ public function getTotalSurcharges() return $this->total_custom_values; } + public function getTotalNetSurcharges() + { + $map = $this->invoice_items->getCustomSurchargeNetMap(); + + return $map->sum('custom_surcharge1') + $map->sum('custom_surcharge2') + $map->sum('custom_surcharge3') + $map->sum('custom_surcharge4'); + } + public function getRecurringInvoice() { $this->invoice->amount = $this->formatValue($this->getTotal(), $this->precision); @@ -365,7 +372,7 @@ public function setTaxMap() } $this->tax_map = collect(); - + $keys = $this->invoice_items->getGroupedTaxes()->pluck('key')->unique(); $values = $this->invoice_items->getGroupedTaxes(); diff --git a/app/Services/EDocument/Standards/Validation/XsltDocumentValidator.php b/app/Services/EDocument/Standards/Validation/XsltDocumentValidator.php index d19a31b8501..af6203bb6f8 100644 --- a/app/Services/EDocument/Standards/Validation/XsltDocumentValidator.php +++ b/app/Services/EDocument/Standards/Validation/XsltDocumentValidator.php @@ -110,6 +110,18 @@ private function validateXsd(): self return $this; } + public function setXsd(string $xsd): self + { + $this->ubl_xsd = $xsd; + + return $this; + } + + public function getXsd(): string + { + return $this->ubl_xsd; + } + public function setStyleSheets(array $stylesheets): self { $this->stylesheets = $stylesheets; diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_EN16931_codedb.xml b/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_EN16931_codedb.xml new file mode 100644 index 00000000000..ae1b08a2f1f --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_EN16931_codedb.xml @@ -0,0 +1,5844 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt b/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt new file mode 100644 index 00000000000..fed7601c8a7 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt @@ -0,0 +1,1931 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + + . + + + + +U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + +   +   +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Schema for Factur-X; 1.07.2; Accounting, MINIMUM + + + + + + + + + + + + + + FX-SCH-A-000001 + + + + + [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. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000002 + + + + + [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000003 + + + + + [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). + + + + + + + + + + FX-SCH-A-000004 + + + + + [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). + + + + + + + + + + FX-SCH-A-000005 + + + + + [BR-15]-An Invoice shall have the Amount due for payment (BT-115). + + + + + + + + + + FX-SCH-A-000006 + + + + + [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. + + + + + + + + + + FX-SCH-A-000007 + + + + + [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. + + + + + + + + + + FX-SCH-A-000008 + + + + + [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. + + + + + + + + + + FX-SCH-A-000009 + + + + + [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000010 + + + + + [BR-01]-An Invoice shall have a Specification identifier (BT-24). + + + + + + + + + + FX-SCH-A-000011 + + + + + [BR-02]-An Invoice shall have an Invoice number (BT-1). + + + + + + + + + + FX-SCH-A-000012 + + + + + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + + + + + + + + + + FX-SCH-A-000013 + + + + + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + + + + + + + + + + FX-SCH-A-000014 + + + + + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + + + + + + + + + + FX-SCH-A-000015 + + + + + [BR-06]-An Invoice shall contain the Seller name (BT-27). + + + + + + + + + + FX-SCH-A-000016 + + + + + [BR-07]-An Invoice shall contain the Buyer name (BT-44). + + + + + + + + + + FX-SCH-A-000017 + + + + + [BR-08]-An Invoice shall contain the Seller postal address (BG-5). + + + + + + + + + + FX-SCH-A-000018 + + + + + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000020 + + + + + Element 'ram:TypeCode' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000021 + + + + + Attribute '@format' is required in this context. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000022 + + + + + Value of '@format' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000023 + + + + + Value of 'ram:TypeCode' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000024 + + + + + Element 'ram:BusinessProcessSpecifiedDocumentContextParameter' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000025 + + + + + Element 'ram:GuidelineSpecifiedDocumentContextParameter' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000026 + + + + + Value of 'ram:ID' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000027 + + + + + Element 'ram:SellerTradeParty' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000028 + + + + + Element 'ram:BuyerTradeParty' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000029 + + + + + Element 'ram:IssuerAssignedID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + + Attribute @schemeID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + + Element 'ram:PostalTradeAddress' is marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + + + Element 'ram:SpecifiedTaxRegistration' is marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000030 + + + + + Element 'ram:Name' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000032 + + + + + Element 'ram:PostalTradeAddress' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000033 + + + + + Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="VA"]' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000034 + + + + + Element variant 'ram:SpecifiedTaxRegistration[ram:ID/@schemeID="FC"]' may occur at maximum 1 times. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000035 + + + + + Element 'ram:CountryID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000036 + + + + + Value of 'ram:CountryID' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000031 + + + + + Value of '@schemeID' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + + + Element variant 'ram:SpecifiedTaxRegistration[ not(ram:ID/@schemeID="VA") and not(ram:ID/@schemeID="FC")]' is marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000019 + + + + + Element 'ram:ID' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000037 + + + + + Attribute '@schemeID' is required in this context. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000038 + + + + + Element 'ram:InvoiceCurrencyCode' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000039 + + + + + Element 'ram:SpecifiedTradeSettlementHeaderMonetarySummation' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000040 + + + + + Value of 'ram:InvoiceCurrencyCode' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000041 + + + + + Element 'ram:TaxBasisTotalAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000042 + + + + + Element variant 'ram:TaxTotalAmount[@currencyID=../../ram:InvoiceCurrencyCode]' may occur at maximum 1 times. + + + + + + + + + + FX-SCH-A-000043 + + + + + Element 'ram:GrandTotalAmount' must occur exactly 1 times. + + + + + + + + + + FX-SCH-A-000044 + + + + + Element 'ram:DuePayableAmount' must occur exactly 1 times. + + + + + + + + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + + + Attribute @currencyID' marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + + + Element variant 'ram:TaxTotalAmount[ not(@currencyID=../../ram:InvoiceCurrencyCode) and not(@currencyID=../../ram:TaxCurrencyCode)]' is marked as not used in the given context. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000045 + + + + + Value of '@currencyID' is not allowed. + + + + + + + + + + + + + + + + + + + + + + + FX-SCH-A-000046 + + + + + Attribute '@currencyID' is required in this context. + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM_codedb.xml b/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM_codedb.xml new file mode 100644 index 00000000000..c07e49f4f2e --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM_codedb.xml @@ -0,0 +1,919 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd new file mode 100644 index 00000000000..fe7e60af531 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd @@ -0,0 +1,25 @@ + + + + + + + + + Cross Industry Invoice + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAccountType_D11A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAccountType_D11A.xsd new file mode 100644 index 00000000000..1a112b69c2e --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAccountType_D11A.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAmountType_D11A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAmountType_D11A.xsd new file mode 100644 index 00000000000..0bbff346c6d --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_EDIFICAS-EU_AccountingAmountType_D11A.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_ISO_ISO3AlphaCurrencyCode_2012-08-31.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_ISO_ISO3AlphaCurrencyCode_2012-08-31.xsd new file mode 100644 index 00000000000..66fb35f47d7 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_ISO_ISO3AlphaCurrencyCode_2012-08-31.xsd @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ActionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ActionCode_D22A.xsd new file mode 100644 index 00000000000..ae08866890a --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ActionCode_D22A.xsd @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AddressType_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AddressType_D22A.xsd new file mode 100644 index 00000000000..21a0718a57f --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AddressType_D22A.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AdjustmentReasonDescriptionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AdjustmentReasonDescriptionCode_D22A.xsd new file mode 100644 index 00000000000..ffc04cd2e8b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AdjustmentReasonDescriptionCode_D22A.xsd @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeIdentificationCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeIdentificationCode_D22A.xsd new file mode 100644 index 00000000000..6659fb533c8 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeIdentificationCode_D22A.xsd @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeReasonCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeReasonCode_D22A.xsd new file mode 100644 index 00000000000..2e0dfed673d --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AllowanceChargeReasonCode_D22A.xsd @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AutomaticDataCaptureMethodCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AutomaticDataCaptureMethodCode_D22A.xsd new file mode 100644 index 00000000000..a479f843b10 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_AutomaticDataCaptureMethodCode_D22A.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoOperationalCategoryCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoOperationalCategoryCode_D22A.xsd new file mode 100644 index 00000000000..4651dd5adde --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoOperationalCategoryCode_D22A.xsd @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoTypeCode_1996Rev2Final.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoTypeCode_1996Rev2Final.xsd new file mode 100644 index 00000000000..ae7ae2a4482 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CargoTypeCode_1996Rev2Final.xsd @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommodityIdentificationCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommodityIdentificationCode_D22A.xsd new file mode 100644 index 00000000000..629155aee69 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommodityIdentificationCode_D22A.xsd @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommunicationMeansTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommunicationMeansTypeCode_D22A.xsd new file mode 100644 index 00000000000..ab4fe6716c5 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_CommunicationMeansTypeCode_D22A.xsd @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ContactFunctionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ContactFunctionCode_D22A.xsd new file mode 100644 index 00000000000..618338085ef --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ContactFunctionCode_D22A.xsd @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsPackingCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsPackingCode_D22A.xsd new file mode 100644 index 00000000000..6fb688d6658 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsPackingCode_D22A.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsRegulationCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsRegulationCode_D22A.xsd new file mode 100644 index 00000000000..a8aedcd1571 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DangerousGoodsRegulationCode_D22A.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DateOnlyFormatCode_D21B.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DateOnlyFormatCode_D21B.xsd new file mode 100644 index 00000000000..8e13123e67b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DateOnlyFormatCode_D21B.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsCode_2020.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsCode_2020.xsd new file mode 100644 index 00000000000..875629c1e94 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsCode_2020.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsFunctionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsFunctionCode_D22A.xsd new file mode 100644 index 00000000000..19b8e79d62f --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DeliveryTermsFunctionCode_D22A.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DimensionTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DimensionTypeCode_D22A.xsd new file mode 100644 index 00000000000..e1e07756c9d --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DimensionTypeCode_D22A.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_Accounting_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_Accounting_D22A.xsd new file mode 100644 index 00000000000..5507f05b37c --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_Accounting_D22A.xsd @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_D22A.xsd new file mode 100644 index 00000000000..f6ee3c58527 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentNameCode_D22A.xsd @@ -0,0 +1,819 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentStatusCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentStatusCode_D22A.xsd new file mode 100644 index 00000000000..f1b245c0a0b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DocumentStatusCode_D22A.xsd @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyTaxFeeTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyTaxFeeTypeCode_D22A.xsd new file mode 100644 index 00000000000..58915fdcd9f --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyTaxFeeTypeCode_D22A.xsd @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyorTaxorFeeCategoryCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyorTaxorFeeCategoryCode_D22A.xsd new file mode 100644 index 00000000000..a8c83775842 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_DutyorTaxorFeeCategoryCode_D22A.xsd @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCodePaymentTermsEvent_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCodePaymentTermsEvent_D22A.xsd new file mode 100644 index 00000000000..df26dce42f9 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCodePaymentTermsEvent_D22A.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCode_D22A.xsd new file mode 100644 index 00000000000..b1039c2b58e --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_EventTimeReferenceCode_D22A.xsd @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeQuantityUnitBasisCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeQuantityUnitBasisCode_D22A.xsd new file mode 100644 index 00000000000..a5d54fa3d8b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeQuantityUnitBasisCode_D22A.xsd @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeTariffCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeTariffCode_D22A.xsd new file mode 100644 index 00000000000..63c82e3853e --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_FreightChargeTariffCode_D22A.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeCode_D22A.xsd new file mode 100644 index 00000000000..db0cc6346d1 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeCode_D22A.xsd @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeExtensionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeExtensionCode_D22A.xsd new file mode 100644 index 00000000000..42bc46801e7 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_GoodsTypeExtensionCode_D22A.xsd @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_LocationFunctionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_LocationFunctionCode_D22A.xsd new file mode 100644 index 00000000000..437690498ea --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_LocationFunctionCode_D22A.xsd @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeLinear_4.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeLinear_4.xsd new file mode 100644 index 00000000000..367cbf96a3d --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeLinear_4.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeVolume_4.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeVolume_4.xsd new file mode 100644 index 00000000000..e5efa9bfadc --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeVolume_4.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeWeight_4.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeWeight_4.xsd new file mode 100644 index 00000000000..fd8d78b8a78 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MeasurementUnitCommonCodeWeight_4.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MessageFunctionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MessageFunctionCode_D22A.xsd new file mode 100644 index 00000000000..8bb7bae773a --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_MessageFunctionCode_D22A.xsd @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackageTypeCode_2006.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackageTypeCode_2006.xsd new file mode 100644 index 00000000000..bcf7f733763 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackageTypeCode_2006.xsd @@ -0,0 +1,416 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackagingMarkingCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackagingMarkingCode_D22A.xsd new file mode 100644 index 00000000000..98276b1e4ba --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PackagingMarkingCode_D22A.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_ChargePaying_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_ChargePaying_D22A.xsd new file mode 100644 index 00000000000..e4e2a56dfbd --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_ChargePaying_D22A.xsd @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_D22A.xsd new file mode 100644 index 00000000000..5762914167a --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PartyRoleCode_D22A.xsd @@ -0,0 +1,635 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentGuaranteeMeansCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentGuaranteeMeansCode_D22A.xsd new file mode 100644 index 00000000000..30f0c82788d --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentGuaranteeMeansCode_D22A.xsd @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansChannelCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansChannelCode_D22A.xsd new file mode 100644 index 00000000000..70ae2525aea --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansChannelCode_D22A.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansCode_D22A.xsd new file mode 100644 index 00000000000..f0e440e7fcb --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentMeansCode_D22A.xsd @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentTermsTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentTermsTypeCode_D22A.xsd new file mode 100644 index 00000000000..d7729829545 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PaymentTermsTypeCode_D22A.xsd @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PriceTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PriceTypeCode_D22A.xsd new file mode 100644 index 00000000000..c7b3365d7fa --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_PriceTypeCode_D22A.xsd @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ReferenceTypeCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ReferenceTypeCode_D22A.xsd new file mode 100644 index 00000000000..60498aedef0 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_ReferenceTypeCode_D22A.xsd @@ -0,0 +1,828 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealConditionCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealConditionCode_D22A.xsd new file mode 100644 index 00000000000..4d4df8b30eb --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealConditionCode_D22A.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealingPartyRoleCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealingPartyRoleCode_D22A.xsd new file mode 100644 index 00000000000..1ec83c77a10 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_SealingPartyRoleCode_D22A.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusCode_D22A.xsd new file mode 100644 index 00000000000..7f01861ca16 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusCode_D22A.xsd @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusDescriptionCode_AccountingDebitCredit_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusDescriptionCode_AccountingDebitCredit_D22A.xsd new file mode 100644 index 00000000000..38248b6e1c5 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_StatusDescriptionCode_AccountingDebitCredit_D22A.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimeOnlyFormatCode_D21B.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimeOnlyFormatCode_D21B.xsd new file mode 100644 index 00000000000..b515598deb8 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimeOnlyFormatCode_D21B.xsd @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimePointFormatCode_D21B.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimePointFormatCode_D21B.xsd new file mode 100644 index 00000000000..c35b8f0fd2c --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TimePointFormatCode_D21B.xsd @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentCategoryCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentCategoryCode_D22A.xsd new file mode 100644 index 00000000000..6cd2ad5389a --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentCategoryCode_D22A.xsd @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentFullnessCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentFullnessCode_D22A.xsd new file mode 100644 index 00000000000..c7f7597fc26 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportEquipmentFullnessCode_D22A.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMeansTypeCode_2007.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMeansTypeCode_2007.xsd new file mode 100644 index 00000000000..63e933e474d --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMeansTypeCode_2007.xsd @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportModeCode_2.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportModeCode_2.xsd new file mode 100644 index 00000000000..7a38164ed7f --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportModeCode_2.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMovementStageCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMovementStageCode_D22A.xsd new file mode 100644 index 00000000000..b02c9d1de28 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportMovementStageCode_D22A.xsd @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportPaymentArrangementCode_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportPaymentArrangementCode_D22A.xsd new file mode 100644 index 00000000000..2eaba0d51d5 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_codelist_standard_UNECE_TransportPaymentArrangementCode_D22A.xsd @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd new file mode 100644 index 00000000000..2ef0e164baf --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd @@ -0,0 +1,818 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd new file mode 100644 index 00000000000..0e90653a8a9 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd @@ -0,0 +1,6176 @@ + + + + + + + Advance Payment + + + + + Paid Amount + + + + + Formatted Received Date Time + + + + + Included Tax + + + + + Invoice Document + + + + + + + Applied Allowance/Charge + + + + + Actual Amount + + + + + Description + + + + + Reason Code + + + + + Calculation Percent + + + + + Basis Amount + + + + + Charge Indicator + + + + + Tax Category + + + + + + + Applied Tax + + + + + Calculated Amount + + + + + Type Code + + + + + Calculated Rate + + + + + Basis Amount + + + + + Tax Point Date + + + + + + + Available Period + + + + + Start Date Time + + + + + End Date Time + + + + + Description + + + + + + + Basic Work Item + + + + + ID + + + + + Reference ID + + + + + Primary Classification Code + + + + + Alternative Classification Code + + + + + Type Code + + + + + Comment + + + + + Total Quantity + + + + + Total Quantity Classification Code + + + + + Index Text + + + + + Requested Action Code + + + + + Price List Item ID + + + + + Contractual Language Code + + + + + Complex Description + + + + + Total Quantity Analysis + + + + + Calculated Unit Price + + + + + Calculated Total Price + + + + + Recorded Changed Status + + + + + Item Basic Work Item + + + + + Referenced Binary File + + + + + + + Branch Financial Institution + + + + + Sort Code + + + + + Name + + + + + Address + + + + + + + Calculated Price + + + + + Type Code + + + + + Charge Amount + + + + + Applied Allowance/Charge + + + + + + + Contact Person + + + + + Given Name + + + + + Middle Name + + + + + Family Name + + + + + + + Creditor Financial Account + + + + + IBAN ID + + + + + Name + + + + + Proprietary ID + + + + + + + Creditor Financial Institution + + + + + BIC ID + + + + + CHIPS Universal ID + + + + + New Zealand NCC ID + + + + + Irish NSC ID + + + + + UK Sort Code ID + + + + + CHIPS Participant ID + + + + + Swiss BC ID + + + + + Fedwire Routing Number ID + + + + + Portuguese NCC ID + + + + + Russian Central Bank ID + + + + + Italian Domestic ID + + + + + Austrian Bankleitzahl ID + + + + + Canadian Payments Association ID + + + + + SIC ID + + + + + German Bankleitzahl ID + + + + + Spanish Domestic Interbanking ID + + + + + South African NCC ID + + + + + Hong Kong Bank ID + + + + + Australian BSB ID + + + + + Indian Financial System ID + + + + + Hellenic Bank ID + + + + + Polish National Clearing ID + + + + + Name + + + + + Clearing System Name + + + + + Japan Financial Institution Common ID + + + + + Address + + + + + Branch + + + + + + + Cross-Border Customs Valuation + + + + + Added Adjustment Amount + + + + + Deducted Adjustment Amount + + + + + Added Adjustment Percent + + + + + Deducted Adjustment Percent + + + + + Method Code + + + + + WTO Addition Code + + + + + Charge Apportion Method Code + + + + + Other Charge Amount + + + + + Buyer Seller Relationship Indicator + + + + + Buyer Seller Relationship Price Influence Indicator + + + + + Sale Restriction Indicator + + + + + Sale Price Condition Indicator + + + + + Royalty Licence Fee Indicator + + + + + Type Code + + + + + Sale Restriction Text + + + + + Applicable Currency Exchange + + + + + + + Cross-Border Regulatory Procedure + + + + + Type Code + + + + + Transaction Nature Code + + + + + Tariff Amount + + + + + Non-Tariff Charge Amount + + + + + Total Charge Amount + + + + + Remark + + + + + Trade Tax + + + + + + + Debtor Financial Account + + + + + IBAN ID + + + + + Name + + + + + Proprietary ID + + + + + + + Debtor Financial Institution + + + + + BIC ID + + + + + Clearing System Name + + + + + CHIPS Universal ID + + + + + New Zealand NCC ID + + + + + Irish NSC ID + + + + + UK Sort Code ID + + + + + CHIPS Participant ID + + + + + Swiss BC ID + + + + + Fedwire Routing Number ID + + + + + Portuguese NCC ID + + + + + Russian Central Bank ID + + + + + Italian Domestic ID + + + + + Austrian Bankleitzahl ID + + + + + Canadian Payments Association ID + + + + + SIC ID + + + + + German Bankleitzahl ID + + + + + Spanish Domestic Interbanking ID + + + + + South African NCC ID + + + + + Hong Kong Bank ID + + + + + Australian BSB ID + + + + + Indian Financial System ID + + + + + Hellenic Bank ID + + + + + Polish National Clearing ID + + + + + Name + + + + + Japan Financial Institution Common ID + + + + + Address + + + + + Branch + + + + + + + Delivery Adjustment + + + + + Reason Code + + + + + Reason Text + + + + + Actual Amount + + + + + Actual Quantity + + + + + Actual Date Time + + + + + + + Disposal Instructions + + + + + Material ID + + + + + Recycling Description Code + + + + + Description + + + + + Recycling Procedure Text + + + + + + + Document Authentication + + + + + Actual Date Time + + + + + ID + + + + + Information + + + + + Signatory Text + + + + + Signatory Image Binary Object + + + + + Category Code + + + + + + + Document Context Parameter + + + + + ID + + + + + Value Text + + + + + Version + + + + + + + Document Line + + + + + Line ID + + + + + Parent Line ID + + + + + Status Code + + + + + Status Reason Code + + + + + Category Code + + + + + Response Reason Code + + + + + Note + + + + + Reference Document + + + + + + + Document Version + + + + + ID + + + + + Name + + + + + Issue Date Time + + + + + + + Exchanged Document Context + + + + + Transaction ID + + + + + Test Indicator + + + + + Business Process + + + + + BIM + + + + + Scenario + + + + + Application + + + + + Guideline + + + + + Subset + + + + + Message Standard + + + + + User Specified Parameter + + + + + + + Exchanged Document + + + + + ID + + + + + Name + + + + + Type Code + + + + + Issue Date Time + + + + + + + + Purpose Text + + + + + Control Requirement Indicator + + + + + Language Code + + + + + Purpose Code + + + + + Revision Date Time + + + + + Version ID + + + + + Global ID + + + + + Revision ID + + + + + Previous Revision ID + + + + + Category Code + + + + + Response Request Type Code + + + + + Creation Date Time + + + + + First Version Issue Date Time + + + + + Subtype Code + + + + + Note + + + + + Reference Document + + + + + Signatory Authentication + + + + + Effective Period + + + + + Issuer + + + + + Attached File + + + + + + + Financial Adjustment + + + + + Reason Code + + + + + Reason Text + + + + + Actual Amount + + + + + Actual Quantity + + + + + Actual Date Time + + + + + Direction Code + + + + + Claim Related Party + + + + + Reference Invoice Document + + + + + Related Tax + + + + + + + Financial Institution Address + + + + + Postcode + + + + + Building Number + + + + + Line One + + + + + Line Two + + + + + Line Three + + + + + Line Four + + + + + Line Five + + + + + Street Name + + + + + City Name + + + + + Country Sub-Division Code + + + + + Country Code + + + + + Type Code + + + + + Department Name + + + + + Post Office Box + + + + + City ID + + + + + Country Sub-Division Name + + + + + Country Name + + + + + + + Geographical Coordinate + + + + + Altitude + + + + + Latitude + + + + + Longitude + + + + + System ID + + + + + + + Grouped Work Item + + + + + ID + + + + + Primary Classification Code + + + + + Alternative Classification Code + + + + + Type Code + + + + + Comment + + + + + Total Quantity + + + + + Index Text + + + + + Requested Action Code + + + + + Price List Item ID + + + + + Contractual Language Code + + + + + Total Calculated Price + + + + + Item Grouped Work Item + + + + + Item Basic Work Item + + + + + Changed Recorded Status + + + + + Complex Description + + + + + Binary File + + + + + + + Header Trade Agreement + + + + + Reference Text + + + + + Buyer Reference Text + + + + + Seller + + + + + Buyer + + + + + Sales Agent + + + + + Buyer Requisitioner + + + + + Buyer Assigned Accountant + + + + + Seller Assigned Accountant + + + + + Buyer Tax Representative + + + + + Seller Tax Representative + + + + + End User + + + + + Trade Delivery Terms + + + + + Seller Order Document + + + + + Buyer Order Document + + + + + Quotation Document + + + + + Order Response Document + + + + + Contract Document + + + + + Demand Forecast Document + + + + + Supply Instruction Document + + + + + Promotional Deal Document + + + + + Price List Document + + + + + Additional Document + + + + + Requisitioner Document + + + + + Buyer Agent + + + + + Purchase Conditions Document + + + + + Procuring Project + + + + + Ultimate Customer Order Document + + + + + Pricing Base Applicable Logistics Location + + + + + + + Header Trade Delivery + + + + + Related Consignment + + + + + Ship To Party + + + + + Ultimate Ship To Party + + + + + Ship From Party + + + + + Actual Despatch Event + + + + + Actual Pick-Up Event + + + + + Actual Delivery Event + + + + + Actual Receipt Event + + + + + Additional Document + + + + + Despatch Advice Document + + + + + Receiving Advice Document + + + + + Delivery Note Document + + + + + Consumption Report Document + + + + + Previous Delivery Event + + + + + Packing List Document + + + + + + + Header Trade Settlement + + + + + Due Payable Amount + + + + + Creditor Reference Type Code + + + + + Creditor Reference Type Text + + + + + Creditor Reference Issuer ID + + + + + Creditor Reference ID + + + + + Payment Reference Text + + + + + Tax Currency Code + + + + + Invoice Currency Code + + + + + Payment Currency Code + + + + + Invoice Issuer Reference Text + + + + + Invoice Date Time + + + + + Next Invoice Date Time + + + + + Credit Reason Code + + + + + Credit Reason Text + + + + + Invoicer + + + + + Invoicee + + + + + Payee + + + + + Payer + + + + + Tax Currency Exchange + + + + + Invoice Currency Exchange + + + + + Payment Currency Exchange + + + + + Payment Means + + + + + Trade Tax + + + + + Billing Period + + + + + Allowance/Charge + + + + + Subtotal Calculated Tax + + + + + Logistics Service Charge + + + + + Payment Terms + + + + + Monetary Summation + + + + + Financial Adjustment + + + + + Invoice Document + + + + + Pro-Forma Invoice Document + + + + + Letter Of Credit Document + + + + + Factoring Agreement Document + + + + + Factoring List Document + + + + + Accounts Payable + + + + + Accounts Receivable + + + + + Purchase Accounting Account + + + + + Sales Accounting Account + + + + + Financial Card + + + + + Advance Payment + + + + + Ultimate Payee + + + + + + + Legal Organization + + + + + Legal Classification Code + + + + + Name + + + + + ID + + + + + Trading Name + + + + + Postal Address + + + + + Authorized Registration + + + + + + + Legal Registration + + + + + Type Code + + + + + ID + + + + + + + Line Trade Agreement + + + + + Buyer Reference Text + + + + + Buyer Requisitioner + + + + + Trade Delivery Terms + + + + + Seller Order Document + + + + + Buyer Order Document + + + + + Quotation Document + + + + + Contract Document + + + + + Demand Forecast Document + + + + + Promotional Deal Document + + + + + Additional Document + + + + + Product Gross Price + + + + + Product Net Price + + + + + Requisitioner Document + + + + + Item Seller + + + + + Item Buyer + + + + + Marketplace + + + + + Ultimate Customer Order Document + + + + + + + Line Trade Delivery + + + + + Requested Quantity + + + + + Received Quantity + + + + + Billed Quantity + + + + + Charge Free Quantity + + + + + Package Quantity + + + + + Product Unit Quantity + + + + + Per Package Unit Quantity + + + + + Net Weight + + + + + Gross Weight + + + + + Theoretical Weight + + + + + Despatched Quantity + + + + + Delivery Adjustment + + + + + Included Packaging + + + + + Related Consignment + + + + + Ship To Party + + + + + Ultimate Ship To Party + + + + + Ship From Party + + + + + Actual Despatch Event + + + + + Actual Pick-Up Event + + + + + Requested Delivery Event + + + + + Actual Delivery Event + + + + + Actual Receipt Event + + + + + Additional Document + + + + + Despatch Advice Document + + + + + Receiving Advice Document + + + + + Delivery Note Document + + + + + Consumption Report Document + + + + + Packing List Document + + + + + + + Line Trade Settlement + + + + + Payment Reference Text + + + + + Invoice Issuer Reference Text + + + + + Total Adjustment Amount + + + + + Discount Indicator + + + + + Invoice Date Time + + + + + Trade Tax + + + + + Billing Period + + + + + Allowance/Charge + + + + + Subtotal Calculated Tax + + + + + Logistics Service Charge + + + + + Payment Terms + + + + + Monetary Summation + + + + + Financial Adjustment + + + + + Invoice Document + + + + + Additional Document + + + + + Accounts Payable + + + + + Accounts Receivable + + + + + Purchase Accounting Account + + + + + Sales Accounting Account + + + + + Financial Card + + + + + + + Logistics Location + + + + + ID + + + + + Name + + + + + Type Code + + + + + Description + + + + + Country Code + + + + + Country Sub-Division ID + + + + + Geographical Coordinates + + + + + Postal Address + + + + + Subordinate Location + + + + + + + Logistics Seal + + + + + ID + + + + + Maximum ID + + + + + Type Code + + + + + Condition Code + + + + + Sealing Party Role Code + + + + + Issuing Party + + + + + + + Logistics Service Charge + + + + + ID + + + + + Description + + + + + Payment Arrangement Code + + + + + Tariff Class Code + + + + + Charge Category Code + + + + + Service Category Code + + + + + Disbursement Amount + + + + + Applied Amount + + + + + Allowance/Charge Text + + + + + Paying Party Role Code + + + + + Calculation Basis Code + + + + + Calculation Basis Text + + + + + Transport Payment Method Code + + + + + Payment Place + + + + + Applied From Location + + + + + Applied To Location + + + + + Trade Tax + + + + + + + Logistics Transport Equipment + + + + + ID + + + + + Loading Length + + + + + Category Code + + + + + Size/Type Code + + + + + Characteristic Text + + + + + Full/Empty Code + + + + + Carrier Assigned Booking ID + + + + + Sealed Indicator + + + + + Returnable Indicator + + + + + Affixed Seal + + + + + Dimensions + + + + + Applicable Note + + + + + + + Logistics Transport Means + + + + + Type Code + + + + + Type Text + + + + + ID + + + + + Name + + + + + Owner + + + + + + + Logistics Transport Movement + + + + + Stage Code + + + + + Mode Code + + + + + Mode Text + + + + + ID + + + + + Status Code + + + + + Service Code + + + + + Service Text + + + + + Type Text + + + + + Cycle Text + + + + + Used Transport Means + + + + + + + Material Goods Characteristic + + + + + Description + + + + + Type Code + + + + + Constituent Percent + + + + + Absolute Presence Weight + + + + + Absolute Presence Volume + + + + + + + Note + + + + + Subject Text + + + + + Content Code + + + + + Content Text + + + + + Subject Code + + + + + ID + + + + + + + Packaging Marking + + + + + Type Code + + + + + Content Text + + + + + Content Date Time + + + + + Content Amount + + + + + Barcode Type Code + + + + + Content Code + + + + + Automatic Data Capture Method Type Code + + + + + + + Procuring Project + + + + + ID + + + + + Description + + + + + Name + + + + + + + Product Characteristic Condition + + + + + Type Code + + + + + Name + + + + + Value + + + + + + + Product Characteristic + + + + + ID + + + + + Type Code + + + + + Description + + + + + Value Measure + + + + + Measurement Method Code + + + + + Value Text + + + + + Value Code + + + + + Value Date Time + + + + + Value Indicator + + + + + Content Type Code + + + + + Value Binary File + + + + + Applicable Condition + + + + + Applicable Referenced Standard + + + + + + + Product Classification + + + + + System ID + + + + + System Name + + + + + Class Code + + + + + Class Name + + + + + Sub-Class Code + + + + + Product Class Characteristic + + + + + Applicable Referenced Standard + + + + + + + Recorded Status + + + + + Condition Code + + + + + Changer Name + + + + + Changed Date Time + + + + + + + Referenced Document + + + + + Issuer Assigned ID + + + + + URI + + + + + Status Code + + + + + Copy Indicator + + + + + Line ID + + + + + Type Code + + + + + Global ID + + + + + Revision ID + + + + + Name + + + + + Receipt Date Time + + + + + Attached Binary Object + + + + + Information + + + + + Category Code + + + + + Reference Type Code + + + + + Section Name + + + + + Previous Revision ID + + + + + Formatted Issue Date Time + + + + + Page ID + + + + + Subordinate Line ID + + + + + Subtype Code + + + + + Effective Period + + + + + Issuer + + + + + Attached Binary File + + + + + Included Note + + + + + + + Referenced Product + + + + + ID + + + + + Global ID + + + + + Seller Assigned ID + + + + + Buyer Assigned ID + + + + + Manufacturer Assigned ID + + + + + Industry Assigned ID + + + + + Name + + + + + Description + + + + + Relationship Type Code + + + + + Unit Quantity + + + + + + + Referenced Standard + + + + + ID + + + + + Version ID + + + + + Element Version ID + + + + + URI + + + + + Part ID + + + + + Agency ID + + + + + + + Reference Price + + + + + Charge Amount + + + + + Basis Quantity + + + + + Net Price Indicator + + + + + Comparison Method Code + + + + + + + Registered Tax + + + + + Type Code + + + + + Exemption Reason Code + + + + + Exemption Reason Text + + + + + Currency Code + + + + + Jurisdiction Text + + + + + Description + + + + + Customs Duty Indicator + + + + + + + Returnable Asset Instructions + + + + + Material ID + + + + + Terms And Conditions Text + + + + + Terms And Conditions Code + + + + + Deposit Amount + + + + + Deposit Validity Period + + + + + + + Spatial Dimensions + + + + + Value Measure + + + + + Type Code + + + + + Description + + + + + Width + + + + + Length + + + + + Height + + + + + ID + + + + + Diameter + + + + + + + Specification Query + + + + + ID + + + + + Type Code + + + + + Content Text + + + + + Contractual Language Code + + + + + + + Specification Response + + + + + ID + + + + + Query ID + + + + + Type Code + + + + + Content Text + + + + + Contractual Language Code + + + + + + + Binary File + + + + + ID + + + + + Title + + + + + Author Name + + + + + Version ID + + + + + Name + + + + + URI + + + + + MIME Code + + + + + Encoding Code + + + + + Character Set Code + + + + + Included Binary Object + + + + + Access Text + + + + + Description + + + + + Size + + + + + Access Availability Period + + + + + + + Marketplace + + + + + ID + + + + + Name + + + + + Virtual Indicator + + + + + Website + + + + + Sales Method Code + + + + + Available Ordering Period + + + + + + + Period + + + + + Duration Measure + + + + + Inclusive Indicator + + + + + Description + + + + + Start Date Time + + + + + End Date Time + + + + + Complete Date Time + + + + + Open Indicator + + + + + Season Code + + + + + ID + + + + + Name + + + + + Sequence Number + + + + + Start Date Flexibility Code + + + + + Continuous Indicator + + + + + Purpose Code + + + + + + + Subordinate Line Trade Agreement + + + + + Seller Order Document + + + + + Buyer Order Document + + + + + Additional Document + + + + + Gross Price + + + + + Net Price + + + + + + + Subordinate Line Trade Delivery + + + + + Package Quantity + + + + + Product Unit Quantity + + + + + Per Package Unit Quantity + + + + + Billed Quantity + + + + + Included Packaging + + + + + Actual Delivery Event + + + + + + + Subordinate Line Trade Settlement + + + + + Amount Direction Code + + + + + Trade Tax + + + + + Invoice Document + + + + + Specified Financial Adjustment + + + + + Specified Allowance Charge + + + + + + + Subordinate Location + + + + + ID + + + + + Name + + + + + Type Code + + + + + Physical Geographical Coordinate + + + + + + + Subordinate Trade Line Item + + + + + ID + + + + + Response Reason Code + + + + + Category Code + + + + + Referenced Product + + + + + Applicable Product + + + + + Subordinate Line Trade Agreement + + + + + Subordinate Line Trade Delivery + + + + + Subordinate Line Trade Settlement + + + + + + + Supply Chain Consignment Item + + + + + Goods Type Code + + + + + Goods Type Extension Code + + + + + Declared Value For Customs Amount + + + + + Declared Value For Statistics Amount + + + + + Invoice Amount + + + + + Gross Weight + + + + + Net Weight + + + + + Tariff Quantity + + + + + Global ID + + + + + Cargo Nature Identification + + + + + Transport Dangerous Goods + + + + + Previous Administrative Document + + + + + Applicable Note + + + + + + + Supply Chain Consignment + + + + + ID + + + + + Gross Weight + + + + + Net Weight + + + + + Gross Volume + + + + + Chargeable Weight + + + + + Insurance Premium Amount + + + + + Associated Invoice Amount + + + + + Total Charge Amount + + + + + Declared Value For Customs Amount + + + + + Number Of Packages + + + + + Net Volume Measure + + + + + Consignor + + + + + Consignee + + + + + Carrier + + + + + Freight Forwarder + + + + + Delivery Party + + + + + Customs Import Agent + + + + + Customs Export Agent + + + + + Grouping Centre + + + + + Transit Location + + + + + Transport Contract Document + + + + + Associated Document + + + + + Included Consignment Item + + + + + Used Transport Equipment + + + + + Specified Transport Movement + + + + + Cargo Insurance + + + + + Regulatory Procedure + + + + + Customs Valuation + + + + + + + Supply Chain Event + + + + + ID + + + + + Occurrence Date Time + + + + + Type Code + + + + + Description + + + + + Description Binary Object + + + + + Unit Quantity + + + + + Latest Occurrence Date Time + + + + + Earliest Occurrence Date Time + + + + + Occurrence Time + + + + + Occurrence Period + + + + + Location + + + + + + + Supply Chain Packaging + + + + + Type Code + + + + + Type Text + + + + + Description + + + + + Condition Code + + + + + Disposal Method Code + + + + + Weight + + + + + Maximum Stackability Quantity + + + + + Maximum Stackability Weight + + + + + Customer Facing Total Unit Quantity + + + + + Layer Total Unit Quantity + + + + + Content Layer Quantity + + + + + Additional Instruction Code + + + + + Additional Instruction Indicator + + + + + Dimensions + + + + + Minimum Dimensions + + + + + Maximum Dimensions + + + + + Marking + + + + + Goods Characteristic + + + + + Disposal Instructions + + + + + Returnable Asset Instructions + + + + + + + Supply Chain Trade Line Item + + + + + Description Code + + + + + Associated Document Line + + + + + Trade Product + + + + + Additional Information Note + + + + + Line Trade Agreement + + + + + Line Trade Delivery + + + + + Line Trade Settlement + + + + + Included Subordinate Trade Line Item + + + + + + + Supply Chain Trade Transaction + + + + + Included Trade Line Item + + + + + Header Trade Agreement + + + + + Header Trade Delivery + + + + + Header Trade Settlement + + + + + + + Tax Registration + + + + + ID + + + + + IOSS ID + + + + + Registered Tax + + + + + + + Trade Accounting Account + + + + + ID + + + + + Set Trigger Code + + + + + Type Code + + + + + Amount Type Code + + + + + Name + + + + + Cost Reference Dimension Pattern Text + + + + + + + Trade Address + + + + + ID + + + + + Postcode + + + + + Post Office Box + + + + + Building Name + + + + + Line One + + + + + Line Two + + + + + Line Three + + + + + Line Four + + + + + Line Five + + + + + Street Name + + + + + City Name + + + + + City Sub-Division Text + + + + + Country Code + + + + + Country Name + + + + + Country Sub-Division Code + + + + + Country Sub-Division Name + + + + + Attention Of + + + + + Care Of + + + + + Building Number + + + + + Department Name + + + + + Additional Street Name + + + + + City ID + + + + + Type Code + + + + + + + Trade Allowance/Charge + + + + + Charge Indicator + + + + + ID + + + + + Sequence Number + + + + + Calculation Percent + + + + + Basis Amount + + + + + Basis Quantity + + + + + Prepaid Indicator + + + + + Actual Amount + + + + + Unit Basis Amount + + + + + Reason Code + + + + + Reason Text + + + + + Type Code + + + + + Tax Category + + + + + Actual Currency Exchange + + + + + + + Trade Contact + + + + + ID + + + + + Person Name + + + + + Department Name + + + + + Type Code + + + + + Job Title + + + + + Responsibility Text + + + + + Person ID + + + + + Telephone + + + + + Direct Telephone + + + + + Mobile Telephone + + + + + Fax + + + + + Email Address + + + + + Telex + + + + + VOIP + + + + + Instant Messaging + + + + + Note + + + + + Person + + + + + + + Trade Country Sub-Division + + + + + ID + + + + + Name + + + + + + + Trade Country + + + + + Code + + + + + Name + + + + + Sub-Division + + + + + + + Trade Currency Exchange + + + + + Source Currency Code + + + + + Source Unit Basis + + + + + Target Currency Code + + + + + Target Unit Basis + + + + + Market ID + + + + + Conversion Rate + + + + + Conversion Rate Date Time + + + + + Associated Document + + + + + + + Trade Delivery Terms + + + + + Code + + + + + Description + + + + + Function Code + + + + + Delivery Discontinuation Code + + + + + Partial Delivery Allowed Indicator + + + + + Relevant Location + + + + + + + Trade Location + + + + + Country Code + + + + + Country Name + + + + + ID + + + + + Name + + + + + + + Trade Party + + + + + ID + + + + + Global ID + + + + + Type Code + + + + + Name + + + + + Role Code + + + + + Description + + + + + Registered ID + + + + + Role Text + + + + + Legal Organization + + + + + Defined Contact Details + + + + + Postal Address + + + + + URI + + + + + Logistics Location + + + + + Tax Registration + + + + + End Point URI + + + + + Logo Binary File + + + + + + + Trade Payment Discount Terms + + + + + Basis Date Time + + + + + Basis Period Measure + + + + + Basis Amount + + + + + Calculation Percent + + + + + Actual Discount Amount + + + + + + + Trade Payment Penalty Terms + + + + + Basis Date Time + + + + + Basis Period Measure + + + + + Basis Amount + + + + + Calculation Percent + + + + + Actual Penalty Amount + + + + + + + Trade Payment Terms + + + + + ID + + + + + From Event Code + + + + + Settlement Period Measure + + + + + Description + + + + + Due Date Date Time + + + + + Type Code + + + + + Instruction Type Code + + + + + Direct Debit Mandate ID + + + + + Partial Payment Percent + + + + + Payment Means ID + + + + + Partial Payment Amount + + + + + Due Date Time + + + + + Bill Start Date Time + + + + + Payment Penalty Terms + + + + + Payment Discount Terms + + + + + Payee + + + + + + + Trade Price + + + + + Type Code + + + + + Charge Amount + + + + + Basis Quantity + + + + + Minimum Quantity + + + + + Maximum Quantity + + + + + Change Reason Text + + + + + Order Unit Conversion Factor + + + + + Type Text + + + + + Basis Date Time + + + + + Applied Allowance/Charge + + + + + Validity Period + + + + + Included Tax + + + + + Delivery Location + + + + + Trade Comparison Price + + + + + Associated Document + + + + + + + Trade Product Instance + + + + + Global Serial ID + + + + + Batch ID + + + + + Kanban ID + + + + + Supplier Assigned Serial ID + + + + + Best Before Date Time + + + + + Expiry Date Time + + + + + Sell By Date Time + + + + + Serial ID + + + + + Registration ID + + + + + Production Event + + + + + Packaging Event + + + + + Material Goods Characteristic + + + + + Product Characteristic + + + + + + + Trade Product + + + + + ID + + + + + Global ID + + + + + Seller Assigned ID + + + + + Buyer Assigned ID + + + + + Manufacturer Assigned ID + + + + + Industry Assigned ID + + + + + Model ID + + + + + Name + + + + + Trade Name + + + + + Description + + + + + Type Code + + + + + Net Weight + + + + + Gross Weight + + + + + Status Code + + + + + Product Group ID + + + + + Net Volume + + + + + Gross Volume + + + + + End Item Type Code + + + + + End Item Name + + + + + Customer Assigned ID + + + + + Batch ID + + + + + Area Density Measure + + + + + Use Description + + + + + Concise Description + + + + + Additional Description + + + + + Brand Name + + + + + Sub-Brand Name + + + + + Drained Net Weight + + + + + Variable Measure Indicator + + + + + Configurable Indicator + + + + + Colour Code + + + + + Colour Description + + + + + Recycling Type Code + + + + + Unit Type Code + + + + + Content Unit Quantity + + + + + Common Name + + + + + Model Name + + + + + Designation Text + + + + + Announced Launch Cancellation Formatted Date Time + + + + + Latest Product Data Change Formatted Date Time + + + + + Export Indicator + + + + + Ultimate Customer Assigned Extension ID + + + + + Size Code + + + + + Characteristic + + + + + Material Goods Characteristic + + + + + Classification + + + + + Individual Product Instance + + + + + Certification Evidence Document + + + + + Inspection Document + + + + + Origin Country + + + + + Dimensions + + + + + Minimum Dimensions + + + + + Maximum Dimensions + + + + + Manufacturer + + + + + Presentation Binary File + + + + + MSDS Document + + + + + Additional Document + + + + + Legal Rights Owner + + + + + Brand Owner + + + + + Included Product + + + + + Information Note + + + + + Buyer Supplied Parts Reference Document + + + + + + + Trade Settlement Financial Card + + + + + Microchip Indicator + + + + + ID + + + + + Type Code + + + + + Cardholder Name + + + + + Expiry Date + + + + + Verification Number + + + + + Valid From Date + + + + + Credit Limit Amount + + + + + Credit Available Amount + + + + + Interest Rate + + + + + Issuing Company Name + + + + + Description + + + + + + + Trade Settlement Header Monetary Summation + + + + + Line Total Amount + + + + + Charge Total Amount + + + + + Allowance Total Amount + + + + + Tax Basis Total Amount + + + + + Tax Total Amount + + + + + Rounding Amount + + + + + Grand Total Amount + + + + + Information Amount + + + + + Total Prepaid Amount + + + + + Total Discount Amount + + + + + Total Allowance/Charge Amount + + + + + Due Payable Amount + + + + + Retail Value Excluding Tax Information Amount + + + + + Total Deposit Fee Information Amount + + + + + Product Value Excluding Tobacco Tax Information Amount + + + + + Total Retail Value Information Amount + + + + + Gross Line Total Amount + + + + + Net Line Total Amount + + + + + Net Including Taxes Line Total Amount + + + + + Insurance Charge Total Amount + + + + + Line Total Amount Including Taxes + + + + + + + Trade Settlement Line Monetary Summation + + + + + Line Total Amount + + + + + Charge Total Amount + + + + + Allowance Total Amount + + + + + Tax Basis Total Amount + + + + + Tax Total Amount + + + + + Grand Total Amount + + + + + Information Amount + + + + + Total Allowance/Charge Amount + + + + + Total Retail Value Information Amount + + + + + Gross Line Total Amount + + + + + Net Line Total Amount + + + + + Net Including Taxes Line Total Amount + + + + + Product Weight Loss Information Amount + + + + + Line Total Amount Including Taxes + + + + + + + Trade Settlement Payment Means + + + + + Payment Channel Code + + + + + Type Code + + + + + Guarantee Method Code + + + + + Payment Method Code + + + + + Information + + + + + ID + + + + + Financial Card + + + + + Payer Debtor Financial Account + + + + + Payee Creditor Financial Account + + + + + Payer Debtor Financial Institution + + + + + Payee Creditor Financial Institution + + + + + + + Trade Tax + + + + + Calculated Amount + + + + + Type Code + + + + + Exemption Reason Text + + + + + Calculated Rate + + + + + Calculation Sequence Number + + + + + Basis Quantity + + + + + Basis Amount + + + + + Unit Basis Amount + + + + + Line Total Basis Amount + + + + + Allowance/Charge Basis Amount + + + + + Category Code + + + + + Currency Code + + + + + Jurisdiction Text + + + + + Customs Duty Indicator + + + + + Exemption Reason Code + + + + + Basis Allowance Rate + + + + + Tax Point Date + + + + + Type Text + + + + + Information Amount + + + + + Category Name + + + + + Due Date Type Code + + + + + Applicable Rate Percent + + + + + Grand Total Amount + + + + + Tax Calculation Method Code + + + + + Trade Accounting Account + + + + + Service Supply Country + + + + + Buyer Repayable Tax Accounting Account + + + + + Seller Payable Tax Accounting Account + + + + + Seller Refundable Tax Accounting Account + + + + + Buyer Deductible Tax Accounting Account + + + + + Buyer Non-Deductible Tax Accounting Account + + + + + Applicable Location + + + + + + + Transport Cargo Insurance + + + + + Coverage Code + + + + + Coverage Description + + + + + Contract General Conditions Text + + + + + Coverage Party + + + + + + + Transport Cargo + + + + + Type Code + + + + + Identification Text + + + + + Operational Category Code + + + + + Statistical Classification Code + + + + + + + Transport Dangerous Goods + + + + + UNDG ID + + + + + Regulation Code + + + + + Regulation Name + + + + + Technical Name + + + + + EMS ID + + + + + Packaging Danger Level Code + + + + + Hazard Classification ID + + + + + Additional Hazard Classification ID + + + + + Proper Shipping Name + + + + + + + Communication + + + + + URI + + + + + Channel Code + + + + + Complete Number + + + + + + + Valuation Breakdown Statement + + + + + ID + + + + + Name + + + + + Description + + + + + Measurement Method ID + + + + + Creation Date Time + + + + + Default Currency Code + + + + + Default Language Code + + + + + Comment + + + + + Type Code + + + + + Requested Action Code + + + + + Price List ID + + + + + Contractual Language Code + + + + + Grouped Work Item + + + + + Basic Work Item + + + + + Total Calculated Price + + + + + Changed Recorded Status + + + + + Creation Binary File + + + + + Reader Binary File + + + + + Referenced Binary File + + + + + + + Work Item Complex Description + + + + + Abstract + + + + + Content Text + + + + + Contractual Language Code + + + + + Requesting Specification Query + + + + + Responding Specification Answer + + + + + Subset Complex Description + + + + + + + Work Item Dimension + + + + + ID + + + + + Measure + + + + + Description + + + + + Type Code + + + + + Contractual Language Code + + + + + Component Dimension + + + + + + + Work Item Quantity Analysis + + + + + ID + + + + + Actual Quantity + + + + + Description + + + + + Actual Quantity Percent + + + + + Type Code + + + + + Primary Classification Code + + + + + Alternative Classification Code + + + + + Contractual Language Code + + + + + Actual Quantity Dimension + + + + + Quantity Breakdown Analysis + + + + + Changed Recorded Status + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd new file mode 100644 index 00000000000..4e1c2cbe8f1 --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_ISO_ISOTwo-letterCountryCode_SecondEdition2006.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_ISO_ISOTwo-letterCountryCode_SecondEdition2006.xsd new file mode 100644 index 00000000000..93265d2203b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_ISO_ISOTwo-letterCountryCode_SecondEdition2006.xsd @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_FreightCostCode_4.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_FreightCostCode_4.xsd new file mode 100644 index 00000000000..40334d62bfe --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_FreightCostCode_4.xsd @@ -0,0 +1,1722 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_PaymentTermsDescriptionIdentifier_D22A.xsd b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_PaymentTermsDescriptionIdentifier_D22A.xsd new file mode 100644 index 00000000000..8e861d0a4ff --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B_urn_un_unece_uncefact_identifierlist_standard_UNECE_PaymentTermsDescriptionIdentifier_D22A.xsd @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt b/app/Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt new file mode 100644 index 00000000000..8e89802e16b --- /dev/null +++ b/app/Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt @@ -0,0 +1,12281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + *: + + [namespace-uri()=' + + '] + + + + [ + + ] + + + + / + + @ + + + @*[local-name()=' + + ' and namespace-uri()=' + + '] + + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + / + + + [ + + ] + + + + /@ + + + + + + + + + + + + + + + + + + + + + + + . + + + + U + + U + + + + U. + + n + + + + U. + + _ + + _ + + + + + + + + + + + + + + + + + + + + + + + + EN16931-CII-Model + EN16931-CII-Model + + + + + + + + EN16931-CII-Syntax + EN16931-CII-Syntax + + + + + + + + EN16931-Codes + EN16931-Codes + + + + + + + EN16931 model bound to CII + + + + + + + + + + BR-66 + fatal + + + + [BR-66]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator. + + + + + + + + + + + + + + BR-52 + fatal + + + + [BR-52]-Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122). + + + + + + + + + + + + + + BR-51 + fatal + + + + [BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-97). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown. + + + + + + + + + + + + + + BR-50 + fatal + + + + [BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice. + + + + + + + + + BR-61 + fatal + + + + [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. + + + + + + + + + + + + + + BR-57 + fatal + + + + [BR-57]-Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80). + + + + + + + + + + + + + + BR-31 + fatal + + + + [BR-31]-Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92). + + + + + + + + + BR-32 + fatal + + + + [BR-32]-Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95). + + + + + + + + + BR-33 + fatal + + + + [BR-33]-Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98). + + + + + + + + + BR-CO-05 + fatal + + + + [BR-CO-05]-Document level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance. + + + + + + + + + BR-CO-21 + fatal + + + + [BR-CO-21]-Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both. + + + + + + + + + BR-DEC-01 + fatal + + + + [BR-DEC-01]-The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2. + + + + + + + + + BR-DEC-02 + fatal + + + + [BR-DEC-02]-The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2. + + + + + + + + + + + + + + BR-36 + fatal + + + + [BR-36]-Each Document level charge (BG-21) shall have a Document level charge amount (BT-99). + + + + + + + + + BR-37 + fatal + + + + [BR-37]-Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102). + + + + + + + + + BR-38 + fatal + + + + [BR-38]-Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105). + + + + + + + + + BR-CO-06 + fatal + + + + [BR-CO-06]-Document level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge. + + + + + + + + + BR-CO-22 + fatal + + + + [BR-CO-22]-Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both. + + + + + + + + + BR-DEC-05 + fatal + + + + [BR-DEC-05]-The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2. + + + + + + + + + BR-DEC-06 + fatal + + + + [BR-DEC-06]-The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2. + + + + + + + + + + + + + + BR-12 + fatal + + + + [BR-12]-An Invoice shall have the Sum of Invoice line net amount (BT-106). + + + + + + + + + BR-13 + fatal + + + + [BR-13]-An Invoice shall have the Invoice total amount without VAT (BT-109). + + + + + + + + + BR-14 + fatal + + + + [BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112). + + + + + + + + + BR-15 + fatal + + + + [BR-15]-An Invoice shall have the Amount due for payment (BT-115). + + + + + + + + + BR-53 + fatal + + + + [BR-53]-If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided. + + + + + + + + + BR-CO-10 + fatal + + + + [BR-CO-10]-Sum of Invoice line net amount (BT-106) = Σ Invoice line net amount (BT-131). + + + + + + + + + BR-CO-11 + fatal + + + + [BR-CO-11]-Sum of allowances on document level (BT-107) = Σ Document level allowance amount (BT-92). + + + + + + + + + BR-CO-12 + fatal + + + + [BR-CO-12]-Sum of charges on document level (BT-108) = Σ Document level charge amount (BT-99). + + + + + + + + + BR-CO-13 + fatal + + + + [BR-CO-13]-Invoice total amount without VAT (BT-109) = Σ Invoice line net amount (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108). + + + + + + + + + BR-CO-16 + fatal + + + + [BR-CO-16]-Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) -Paid amount (BT-113) +Rounding amount (BT-114). + + + + + + + + + BR-DEC-09 + fatal + + + + [BR-DEC-09]-The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2. + + + + + + + + + BR-DEC-10 + fatal + + + + [BR-DEC-10]-The allowed maximum number of decimals for the Sum of allowanced on document level (BT-107) is 2. + + + + + + + + + BR-DEC-11 + fatal + + + + [BR-DEC-11]-The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2. + + + + + + + + + BR-DEC-12 + fatal + + + + [BR-DEC-12]-The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2. + + + + + + + + + BR-DEC-14 + fatal + + + + [BR-DEC-14]-The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2. + + + + + + + + + BR-DEC-13 + fatal + + + + [BR-DEC-13]-The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2. + + + + + + + + + BR-DEC-15 + fatal + + + + [BR-DEC-15]-The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2. + + + + + + + + + BR-DEC-16 + fatal + + + + [BR-DEC-16]-The allowed maximum number of decimals for the Paid amount (BT-113) is 2. + + + + + + + + + BR-DEC-17 + fatal + + + + [BR-DEC-17]-The allowed maximum number of decimals for the Rounding amount (BT-114) is 2. + + + + + + + + + BR-DEC-18 + fatal + + + + [BR-DEC-18]-The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2. + + + + + + + + + + + + + + BR-01 + fatal + + + + [BR-01]-An Invoice shall have a Specification identifier (BT-24). + + + + + + + + + BR-02 + fatal + + + + [BR-02]-An Invoice shall have an Invoice number (BT-1). + + + + + + + + + BR-03 + fatal + + + + [BR-03]-An Invoice shall have an Invoice issue date (BT-2). + + + + + + + + + BR-04 + fatal + + + + [BR-04]-An Invoice shall have an Invoice type code (BT-3). + + + + + + + + + BR-05 + fatal + + + + [BR-05]-An Invoice shall have an Invoice currency code (BT-5). + + + + + + + + + BR-06 + fatal + + + + [BR-06]-An Invoice shall contain the Seller name (BT-27). + + + + + + + + + BR-07 + fatal + + + + [BR-07]-An Invoice shall contain the Buyer name (BT-44). + + + + + + + + + BR-08 + fatal + + + + [BR-08]-An Invoice shall contain the Seller postal address (BG-5). + + + + + + + + + BR-09 + fatal + + + + [BR-09]-The Seller postal address (BG-5) shall contain a Seller country code (BT-40). + + + + + + + + + BR-10 + fatal + + + + [BR-10]-An Invoice shall contain the Buyer postal address (BG-8). + + + + + + + + + BR-11 + fatal + + + + [BR-11]-The Buyer postal address shall contain a Buyer country code (BT-55). + + + + + + + + + BR-16 + fatal + + + + [BR-16]-An Invoice shall have at least one Invoice line (BG-25). + + + + + + + + + BR-62 + fatal + + + + [BR-62]-The Seller electronic address (BT-34) shall have a Scheme identifier. + + + + + + + + + BR-63 + fatal + + + + [BR-63]-The Buyer electronic address (BT-49) shall have a Scheme identifier. + + + + + + + + + BR-CO-15 + fatal + + + + [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110). + + + + + + + + + BR-CO-25 + fatal + + + + [BR-CO-25]-In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present. + + + + + + + + + BR-S-01 + fatal + + + + [BR-S-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated". + + + + + + + + + BR-Z-01 + fatal + + + + [BR-Z-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Zero rated" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Zero rated". + + + + + + + + + BR-E-01 + fatal + + + + [BR-E-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Exempt from VAT" shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT". + + + + + + + + + BR-AE-01 + fatal + + + + [BR-AE-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Reverse charge" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "VAT reverse charge". + + + + + + + + + BR-IC-01 + fatal + + + + [BR-IC-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Intra-community supply" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Intra-community supply". + + + + + + + + + BR-G-01 + fatal + + + + [BR-G-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU". + + + + + + + + + BR-O-01 + fatal + + + + [BR-O-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Not subject to VAT" shall contain exactly one VAT breakdown group (BG-23) with the VAT category code (BT-118) equal to "Not subject to VAT". + + + + + + + + + BR-AF-01 + fatal + + + + [BR-AF-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC". + + + + + + + + + BR-AG-01 + fatal + + + + [BR-AG-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI". + + + + + + + + + BR-B-01 + fatal + + + + [BR-B-01]-An Invoice where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment” shall be a domestic Italian invoice. + + + + + + + + + BR-B-02 + fatal + + + + [BR-B-02]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Split payment" shall not contain an invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is “Standard rated”. + + + + + + + + + + + + + + BR-21 + fatal + + + + [BR-21]-Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126). + + + + + + + + + BR-22 + fatal + + + + [BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129). + + + + + + + + + BR-23 + fatal + + + + [BR-23]-An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130). + + + + + + + + + BR-24 + fatal + + + + [BR-24]-Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131). + + + + + + + + + BR-25 + fatal + + + + [BR-25]-Each Invoice line (BG-25) shall contain the Item name (BT-153). + + + + + + + + + BR-26 + fatal + + + + [BR-26]-Each Invoice line (BG-25) shall contain the Item net price (BT-146). + + + + + + + + + BR-27 + fatal + + + + [BR-27]-The Item net price (BT-146) shall NOT be negative. + + + + + + + + + BR-28 + fatal + + + + [BR-28]-The Item gross price (BT-148) shall NOT be negative. + + + + + + + + + BR-64 + fatal + + + + [BR-64]-The Item standard identifier (BT-157) shall have a Scheme identifier. + + + + + + + + + BR-65 + fatal + + + + [BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier. + + + + + + + + + BR-CO-04 + fatal + + + + [BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151). + + + + + + + + + BR-CO-18 + fatal + + + + [BR-CO-18]-An Invoice shall at least have one VAT breakdown group (BG-23). + + + + + + + + + BR-DEC-23 + fatal + + + + [BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2. + + + + + + + + + + + + + + BR-41 + fatal + + + + [BR-41]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136). + + + + + + + + + BR-42 + fatal + + + + [BR-42]-Each Invoice line allowance (BG-27) shall have an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140). + + + + + + + + + BR-CO-07 + fatal + + + + [BR-CO-07]-Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason. + + + + + + + + + BR-CO-23 + fatal + + + + [BR-CO-23]-Each Invoice line allowance (BG-27) shall contain an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140), or both. + + + + + + + + + BR-DEC-24 + fatal + + + + [BR-DEC-24]-The allowed maximum number of decimals for the Invoice line allowance amount (BT-136) is 2. + + + + + + + + + BR-DEC-25 + fatal + + + + [BR-DEC-25]-The allowed maximum number of decimals for the Invoice line allowance base amount (BT-137) is 2. + + + + + + + + + + + + + + BR-43 + fatal + + + + [BR-43]-Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141). + + + + + + + + + BR-44 + fatal + + + + [BR-44]-Each Invoice line charge (BG-28) shall have an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145). + + + + + + + + + BR-CO-08 + fatal + + + + [BR-CO-08]-Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason. + + + + + + + + + BR-CO-24 + fatal + + + + [BR-CO-24]-Each Invoice line charge (BG-28) shall contain an Invoice line charge reason (BT-144) or an Invoice line charge reason code (BT-145), or both. + + + + + + + + + BR-DEC-27 + fatal + + + + [BR-DEC-27]-The allowed maximum number of decimals for the Invoice line charge amount (BT-141) is 2. + + + + + + + + + BR-DEC-28 + fatal + + + + [BR-DEC-28]-The allowed maximum number of decimals for the Invoice line charge base amount (BT-142) is 2. + + + + + + + + + + + + + + BR-30 + fatal + + + + [BR-30]-If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134). + + + + + + + + + BR-CO-20 + fatal + + + + [BR-CO-20]-If Invoice line period (BG-26) is used, the Invoice line period start date (BT-134) or the Invoice line period end date (BT-135) shall be filled, or both. + + + + + + + + + + + + + + BR-29 + fatal + + + + [BR-29]-If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73). + + + + + + + + + BR-CO-19 + fatal + + + + [BR-CO-19]-If Invoicing period (BG-14) is used, the Invoicing period start date (BT-73) or the Invoicing period end date (BT-74) shall be filled, or both. + + + + + + + + + + + + + + BR-54 + fatal + + + + [BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161). + + + + + + + + + + + + + + BR-17 + fatal + + + + [BR-17]-The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4). + + + + + + + + + + + + + + BR-49 + fatal + + + + [BR-49]-A Payment instruction (BG-16) shall specify the Payment means type code (BT-81). + + + + + + + + + BR-CO-27 + fatal + + + + [BR-CO-27]- Either the IBAN or a Proprietary ID (BT-84) shall be used. + + + + + + + + + + + + + + BR-55 + fatal + + + + [BR-55]-Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25). + + + + + + + + + + + + + + BR-CO-26 + fatal + + + + [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. + + + + + + + + + + + + + + BR-18 + fatal + + + + [BR-18]-The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + BR-19 + fatal + + + + [BR-19]-The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + BR-20 + fatal + + + + [BR-20]-The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11). + + + + + + + + + BR-56 + fatal + + + + [BR-56]-Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63). + + + + + + + + + + + + + + BR-CO-14 + fatal + + + + [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117). + + + + + + + + + + + + + + BR-CO-09 + fatal + + + + [BR-CO-09]-The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’. + + + + + + + + + + + + + + BR-AE-08 + fatal + + + + [BR-AE-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Reverse charge". + + + + + + + + + BR-AE-09 + fatal + + + + [BR-AE-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Reverse charge" shall be 0 (zero). + + + + + + + + + BR-AE-10 + fatal + + + + [BR-AE-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Reverse charge" shall have a VAT exemption reason code (BT-121), meaning "Reverse charge" or the VAT exemption reason text (BT-120) "Reverse charge" (or the equivalent standard text in another language). + + + + + + + + + + + + + + BR-AE-03 + fatal + + + + [BR-AE-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Reverse charge" 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) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47). + + + + + + + + + BR-AE-06 + fatal + + + + [BR-AE-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Reverse charge" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + BR-AE-04 + fatal + + + + [BR-AE-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" 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) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47). + + + + + + + + + BR-AE-07 + fatal + + + + [BR-AE-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Reverse charge" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + BR-AE-02 + fatal + + + + [BR-AE-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" 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) and the Buyer VAT identifier (BT-48) and/or the Buyer legal registration identifier (BT-47). + + + + + + + + + BR-AE-05 + fatal + + + + [BR-AE-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Reverse charge" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + BR-AF-08 + fatal + + + + [BR-AF-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + + + + BR-AF-09 + fatal + + + + [BR-AF-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + + + + + BR-AF-10 + fatal + + + + [BR-AF-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). + + + + + + + + + + + + + + BR-AF-02 + fatal + + + + [BR-AF-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" 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-AF-05 + fatal + + + + [BR-AF-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). + + + + + + + + + + + + + + BR-AF-03 + fatal + + + + [BR-AF-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" 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-AF-06 + fatal + + + + [BR-AF-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + BR-AF-04 + fatal + + + + [BR-AF-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" 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-AF-07 + fatal + + + + [BR-AF-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + BR-AG-08 + fatal + + + + [BR-AG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + + + + BR-AG-09 + fatal + + + + [BR-AG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + + + + + BR-AG-10 + fatal + + + + [BR-AG-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + BR-AG-02 + fatal + + + + [BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" 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-AG-05 + fatal + + + + [BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + BR-AG-03 + fatal + + + + [BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" 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-AG-06 + fatal + + + + [BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + BR-AG-04 + fatal + + + + [BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" 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-AG-07 + fatal + + + + [BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero. + + + + + + + + + + + + + + BR-E-08 + fatal + + + + [BR-E-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Exempt from VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Exempt from VAT". + + + + + + + + + BR-E-09 + fatal + + + + [BR-E-09]-The VAT category tax amount (BT-117) In a VAT breakdown (BG-23) where the VAT category code (BT-118) equals "Exempt from VAT" shall equal 0 (zero). + + + + + + + + + BR-E-10 + fatal + + + + [BR-E-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Exempt from VAT" shall have a VAT exemption reason code (BT-121) or a VAT exemption reason text (BT-120). + + + + + + + + + + + + + + BR-E-03 + fatal + + + + [BR-E-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT" 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-E-06 + fatal + + + + [BR-E-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Exempt from VAT", the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + BR-E-04 + fatal + + + + [BR-E-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT" 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-E-07 + fatal + + + + [BR-E-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Exempt from VAT", the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + BR-E-02 + fatal + + + + [BR-E-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT" 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-E-05 + fatal + + + + [BR-E-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Exempt from VAT", the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + BR-G-08 + fatal + + + + [BR-G-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Export outside the EU". + + + + + + + + + BR-G-09 + fatal + + + + [BR-G-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Export outside the EU" shall be 0 (zero). + + + + + + + + + BR-G-10 + fatal + + + + [BR-G-10]-A VAT Breakdown (BG-23) with the VAT Category code (BT-118) "Export outside the EU" shall have a VAT exemption reason code (BT-121), meaning "Export outside the EU" or the VAT exemption reason text (BT-120) "Export outside the EU" (or the equivalent standard text in another language). + + + + + + + + + + + + + + BR-G-03 + fatal + + + + [BR-G-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + + + + + BR-G-06 + fatal + + + + [BR-G-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Export outside the EU" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + BR-G-04 + fatal + + + + [BR-G-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + + + + + BR-G-07 + fatal + + + + [BR-G-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Export outside the EU" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + BR-G-02 + fatal + + + + [BR-G-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" shall contain the Seller VAT Identifier (BT-31) or the Seller tax representative VAT identifier (BT-63). + + + + + + + + + BR-G-05 + fatal + + + + [BR-G-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Export outside the EU" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + BR-IC-08 + fatal + + + + [BR-IC-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Intra-community supply". + + + + + + + + + BR-IC-09 + fatal + + + + [BR-IC-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" shall be 0 (zero). + + + + + + + + + BR-IC-10 + fatal + + + + [BR-IC-10]-A VAT Breakdown (BG-23) with the VAT Category code (BT-118) "Intra-community supply" shall have a VAT exemption reason code (BT-121), meaning "Intra-community supply" or the VAT exemption reason text (BT-120) "Intra-community supply" (or the equivalent standard text in another language). + + + + + + + + + BR-IC-11 + fatal + + + + [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. + + + + + + + + + BR-IC-12 + fatal + + + + [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-03 + fatal + + + + [BR-IC-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) 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). + + + + + + + + + BR-IC-06 + fatal + + + + [BR-IC-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Intra-community supply" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + BR-IC-04 + fatal + + + + [BR-IC-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) 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). + + + + + + + + + BR-IC-07 + fatal + + + + [BR-IC-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Intra-community supply" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + BR-IC-02 + fatal + + + + [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). + + + + + + + + + BR-IC-05 + fatal + + + + [BR-IC-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Intracommunity supply" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + BR-O-08 + fatal + + + + [BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is " Not subject to VAT" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Not subject to VAT". + + + + + + + + + BR-O-09 + fatal + + + + [BR-O-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Not subject to VAT" shall be 0 (zero). + + + + + + + + + BR-O-10 + fatal + + + + [BR-O-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) " Not subject to VAT" shall have a VAT exemption reason code (BT-121), meaning " Not subject to VAT" or a VAT exemption reason text (BT-120) " Not subject to VAT" (or the equivalent standard text in another language). + + + + + + + + + BR-O-11 + fatal + + + + [BR-O-11]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain other VAT breakdown groups (BG-23). + + + + + + + + + BR-O-12 + fatal + + + + [BR-O-12]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is not "Not subject to VAT". + + + + + + + + + BR-O-13 + fatal + + + + [BR-O-13]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level allowances (BG-20) where Document level allowance VAT category code (BT-95) is not "Not subject to VAT". + + + + + + + + + BR-O-14 + fatal + + + + [BR-O-14]-An Invoice that contains a VAT breakdown group (BG-23) with a VAT category code (BT-118) "Not subject to VAT" shall not contain Document level charges (BG-21) where Document level charge VAT category code (BT-102) is not "Not subject to VAT". + + + + + + + + + + + + + + BR-O-03 + fatal + + + + [BR-O-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + + + + + BR-O-06 + fatal + + + + [BR-O-06]-A Document level allowance (BG-20) where VAT category code (BT-95) is "Not subject to VAT" shall not contain a Document level allowance VAT rate (BT-96). + + + + + + + + + + + + + + BR-O-04 + fatal + + + + [BR-O-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + + + + + BR-O-07 + fatal + + + + [BR-O-07]-A Document level charge (BG-21) where the VAT category code (BT-102) is "Not subject to VAT" shall not contain a Document level charge VAT rate (BT-103). + + + + + + + + + + + + + + BR-O-02 + fatal + + + + [BR-O-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Not subject to VAT" shall not contain the Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) or the Buyer VAT identifier (BT-48). + + + + + + + + + BR-O-05 + fatal + + + + [BR-O-05]-An Invoice line (BG-25) where the VAT category code (BT-151) is "Not subject to VAT" shall not contain an Invoiced item VAT rate (BT-152). + + + + + + + + + + + + + + BR-S-08 + fatal + + + + [BR-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "Standard rated", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "Standard rated" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119). + + + + + + + + + BR-S-09 + fatal + + + + [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119). + + + + + + + + + BR-S-10 + fatal + + + + [BR-S-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Standard rate" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + BR-S-02 + fatal + + + + [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-S-05 + fatal + + + + [BR-S-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Standard rated" the Invoiced item VAT rate (BT-152) shall be greater than zero. + + + + + + + + + + + + + + BR-S-03 + fatal + + + + [BR-S-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) 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-S-06 + fatal + + + + [BR-S-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Standard rated" the Document level allowance VAT rate (BT-96) shall be greater than zero. + + + + + + + + + + + + + + BR-S-04 + fatal + + + + [BR-S-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) 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-S-07 + fatal + + + + [BR-S-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Standard rated" the Document level charge VAT rate (BT-103) shall be greater than zero. + + + + + + + + + + + + + + BR-Z-08 + fatal + + + + [BR-Z-08]-In a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amount (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Zero rated". + + + + + + + + + BR-Z-09 + fatal + + + + [BR-Z-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Zero rated" shall equal 0 (zero). + + + + + + + + + BR-Z-10 + fatal + + + + [BR-Z-10]-A VAT Breakdown (BG-23) with VAT Category code (BT-118) "Zero rated" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120). + + + + + + + + + + + + + + BR-Z-03 + fatal + + + + [BR-Z-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero 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-Z-06 + fatal + + + + [BR-Z-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "Zero rated" the Document level allowance VAT rate (BT-96) shall be 0 (zero). + + + + + + + + + + + + + + BR-Z-04 + fatal + + + + [BR-Z-04]-An Invoice that contains a Document level charge where the Document level charge VAT category code (BT-102) is "Zero 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-Z-07 + fatal + + + + [BR-Z-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "Zero rated" the Document level charge VAT rate (BT-103) shall be 0 (zero). + + + + + + + + + + + + + + BR-Z-02 + fatal + + + + [BR-Z-02]-An Invoice that contains an Invoice line where the Invoiced item VAT category code (BT-151) is "Zero 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-Z-05 + fatal + + + + [BR-Z-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "Zero rated" the Invoiced item VAT rate (BT-152) shall be 0 (zero). + + + + + + + + + + + + + + BR-45 + fatal + + + + [BR-45]-Each VAT breakdown (BG-23) shall have a VAT category taxable amount (BT-116). + + + + + + + + + BR-46 + fatal + + + + [BR-46]-Each VAT breakdown (BG-23) shall have a VAT category tax amount (BT-117). + + + + + + + + + BR-47 + fatal + + + + [BR-47]-Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118). + + + + + + + + + BR-48 + fatal + + + + [BR-48]-Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT. + + + + + + + + + BR-CO-03 + fatal + + + + [BR-CO-03]-Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive. + + + + + + + + + BR-CO-17 + fatal + + + + [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals. + + + + + + + + + BR-DEC-19 + fatal + + + + [BR-DEC-19]-The allowed maximum number of decimals for the VAT category taxable amount (BT-116) is 2. + + + + + + + + + BR-DEC-20 + fatal + + + + [BR-DEC-20]-The allowed maximum number of decimals for the VAT category tax amount (BT-117) is 2. + + + + + + + + + + + + + + + + + + + CII-SR-001 + warning + + + + [CII-SR-001] - SpecifiedTransactionID should not be present + + + + + + + + + CII-SR-002 + warning + + + + [CII-SR-002] - TestIndicator should not be present + + + + + + + + + CII-SR-003 + warning + + + + [CII-SR-003] - BusinessProcessSpecifiedDocumentContextParameter should exist maximum once + + + + + + + + + CII-SR-006 + warning + + + + [CII-SR-006] - BIMSpecifiedDocumentContextParameter should not be present + + + + + + + + + CII-SR-007 + warning + + + + [CII-SR-007] - ScenarioSpecifiedDocumentContextParameter should not be present + + + + + + + + + CII-SR-008 + warning + + + + [CII-SR-008] - ApplicationSpecifiedDocumentContextParameter should not be present + + + + + + + + + CII-SR-009 + fatal + + + + [CII-SR-009] - GuidelineSpecifiedDocumentContextParameter must exist exactly once + + + + + + + + + CII-SR-010 + fatal + + + + [CII-SR-010] - ID must exist exactly once + + + + + + + + + CII-SR-011 + warning + + + + [CII-SR-011] - SubsetSpecifiedDocumentContextParameter should not be present + + + + + + + + + CII-SR-012 + warning + + + + [CII-SR-012] - MessageStandardSpecifiedDocumentContextParameter should not be present + + + + + + + + + + + + + + CII-SR-013 + warning + + + + [CII-SR-013] - Name should not be present + + + + + + + + + CII-SR-014 + fatal + + + + [CII-SR-014] - TypeCode must exist exactly once + + + + + + + + + CII-SR-015 + warning + + + + [CII-SR-015] - DateTime should not be present + + + + + + + + + CII-SR-016 + warning + + + + [CII-SR-016] - CopyIndicator should not be present + + + + + + + + + CII-SR-017 + warning + + + + [CII-SR-017] - Purpose should not be present + + + + + + + + + CII-SR-018 + warning + + + + [CII-SR-018] - ControlRequirementIndicator should not be present + + + + + + + + + CII-SR-019 + warning + + + + [CII-SR-019] - LanguageID should not be present + + + + + + + + + CII-SR-020 + warning + + + + [CII-SR-020] - PurposeCode should not be present + + + + + + + + + CII-SR-021 + warning + + + + [CII-SR-021] - RevisionDateTime should not be present + + + + + + + + + CII-SR-022 + warning + + + + [CII-SR-022] - VersionID should not be present + + + + + + + + + CII-SR-023 + warning + + + + [CII-SR-023] - GlobalID should not be present + + + + + + + + + CII-SR-024 + warning + + + + [CII-SR-024] - RevisionID should not be present + + + + + + + + + CII-SR-025 + warning + + + + [CII-SR-025] - PreviousRevisionID should not be present + + + + + + + + + CII-SR-026 + warning + + + + [CII-SR-026] - CategoryCode should not be present + + + + + + + + + CII-SR-027 + warning + + + + [CII-SR-027] - Subject should not be present + + + + + + + + + CII-SR-028 + warning + + + + [CII-SR-028] - ContentCode should not be present + + + + + + + + + CII-SR-032 + warning + + + + [CII-SR-032] - ID should not be present + + + + + + + + + CII-SR-033 + warning + + + + [CII-SR-033] - EffectiveSpecifiedPeriod should not be present + + + + + + + + + CII-SR-034 + warning + + + + [CII-SR-034] - IssuerTradeParty should not be present + + + + + + + + + + + + + + CII-SR-030 + warning + + + + [CII-SR-030] - Content should exist maximum once + + + + + + + + + + + + + + CII-SR-035 + warning + + + + [CII-SR-035] - DescriptionCode should not be present + + + + + + + + + CII-SR-036 + warning + + + + [CII-SR-036] - ParentLineID should not be present + + + + + + + + + CII-SR-037 + warning + + + + [CII-SR-037] - LineStatusCode should not be present + + + + + + + + + CII-SR-038 + warning + + + + [CII-SR-038] - LineStatusReasonCode should not be present + + + + + + + + + CII-SR-221 + warning + + + + [CII-SR-221] - IncludedSubordinateTradeLineItem should not be present + + + + + + + + + + + + + + CII-SR-039 + warning + + + + [CII-SR-039] - IncludedNote should exist maximum once + + + + + + + + + CII-SR-040 + warning + + + + [CII-SR-040] - Content should exist maximum once + + + + + + + + + CII-SR-041 + warning + + + + [CII-SR-041] - SubjectCode should not be present + + + + + + + + + CII-SR-042 + warning + + + + [CII-SR-042] - ID should not be present + + + + + + + + + CII-SR-043 + warning + + + + [CII-SR-043] - CategoryCode should not be present + + + + + + + + + CII-SR-044 + warning + + + + [CII-SR-044] - Subject should not be present + + + + + + + + + + + + + + CII-SR-045 + warning + + + + [CII-SR-045] - ID should not be present + + + + + + + + + CII-SR-046 + fatal + + + + [CII-SR-046] - schemeID must be present if GlobalID is present + + + + + + + + + CII-SR-048 + warning + + + + [CII-SR-048] - ManufacturerAssignedID should not be present + + + + + + + + + CII-SR-049 + warning + + + + [CII-SR-049] - TradeName should not be present + + + + + + + + + CII-SR-050 + warning + + + + [CII-SR-050] - TypeCode should not be present + + + + + + + + + CII-SR-051 + warning + + + + [CII-SR-051] - NetWeightMeasure should not be present + + + + + + + + + CII-SR-052 + warning + + + + [CII-SR-052] - GrossWeightMeasure should not be present + + + + + + + + + CII-SR-053 + warning + + + + [CII-SR-053] - ProductGroupID should not be present + + + + + + + + + CII-SR-054 + warning + + + + [CII-SR-054] - EndItemTypeCode should not be present + + + + + + + + + CII-SR-055 + warning + + + + [CII-SR-055] - EndItemName should not be present + + + + + + + + + CII-SR-056 + warning + + + + [CII-SR-056] - AreaDensityMeasure should not be present + + + + + + + + + CII-SR-057 + warning + + + + [CII-SR-057] - UseDescription should not be present + + + + + + + + + CII-SR-058 + warning + + + + [CII-SR-058] - BrandName should not be present + + + + + + + + + CII-SR-059 + warning + + + + [CII-SR-059] - SubBrandName should not be present + + + + + + + + + CII-SR-060 + warning + + + + [CII-SR-060] - DrainedNetWeightMeasure should not be present + + + + + + + + + CII-SR-061 + warning + + + + [CII-SR-061] - VariableMeasureIndicator should not be present + + + + + + + + + CII-SR-062 + warning + + + + [CII-SR-062] - ColourCode should not be present + + + + + + + + + CII-SR-063 + warning + + + + [CII-SR-063] - ColourDescription should not be present + + + + + + + + + CII-SR-064 + warning + + + + [CII-SR-064] - Designation should not be present + + + + + + + + + CII-SR-065 + warning + + + + [CII-SR-065] - FormattedCancellationAnnouncedLaunchDateTime should not be present + + + + + + + + + CII-SR-066 + warning + + + + [CII-SR-066] - FormattedLatestProductDataChangeDateTime should not be present + + + + + + + + + CII-SR-067 + warning + + + + [CII-SR-067] - ID should not be present + + + + + + + + + CII-SR-068 + warning + + + + [CII-SR-068] - TypeCode should not be present + + + + + + + + + CII-SR-070 + warning + + + + [CII-SR-070] - ValueMeasure should not be present + + + + + + + + + CII-SR-071 + warning + + + + [CII-SR-071] - MeasurementMethodCode should not be present + + + + + + + + + CII-SR-073 + warning + + + + [CII-SR-073] - ValueCode should not be present + + + + + + + + + CII-SR-074 + warning + + + + [CII-SR-074] - ValueDateTime should not be present + + + + + + + + + CII-SR-075 + warning + + + + [CII-SR-075] - ValueIndicator should not be present + + + + + + + + + CII-SR-076 + warning + + + + [CII-SR-076] - ContentTypeCode should not be present + + + + + + + + + CII-SR-077 + warning + + + + [CII-SR-077] - ValueSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-078 + warning + + + + [CII-SR-078] - ApplicableProductCharacteristicCondition should not be present + + + + + + + + + CII-SR-079 + warning + + + + [CII-SR-079] - ApplicableReferencedStandard should not be present + + + + + + + + + CII-SR-080 + warning + + + + [CII-SR-080] - ApplicableMaterialGoodsCharacteristic should not be present + + + + + + + + + CII-SR-081 + warning + + + + [CII-SR-081] - SystemID should not be present + + + + + + + + + CII-SR-082 + warning + + + + [CII-SR-082] - SystemName should not be present + + + + + + + + + CII-SR-083 + warning + + + + [CII-SR-083] - ClassName should not be present + + + + + + + + + CII-SR-084 + warning + + + + [CII-SR-084] - SubClassCode should not be present + + + + + + + + + CII-SR-085 + warning + + + + [CII-SR-085] - ClassProductCharacteristic should not be present + + + + + + + + + CII-SR-086 + warning + + + + [CII-SR-086] - ApplicableReferencedStandard should not be present + + + + + + + + + CII-SR-087 + warning + + + + [CII-SR-087] - IndividualTradeProductInstance should not be present + + + + + + + + + CII-SR-088 + warning + + + + [CII-SR-088] - CertificationEvidenceReferenceReferencedDocument should not be present + + + + + + + + + CII-SR-089 + warning + + + + [CII-SR-089] - InspectionReferenceReferencedDocument should not be present + + + + + + + + + CII-SR-090 + fatal + + + + [CII-SR-090] - ID should exist maximum once. + + + + + + + + + CII-SR-091 + warning + + + + [CII-SR-091] - Name should not be present + + + + + + + + + CII-SR-092 + warning + + + + [CII-SR-092] - SubordinateTradeCountrySubDivision should not be present + + + + + + + + + CII-SR-093 + warning + + + + [CII-SR-093] - LinearSpatialDimension should not be present + + + + + + + + + CII-SR-094 + warning + + + + [CII-SR-094] - MinimumLinearSpatialDimension should not be present + + + + + + + + + CII-SR-095 + warning + + + + [CII-SR-095] - MaximumLinearSpatialDimension should not be present + + + + + + + + + CII-SR-096 + warning + + + + [CII-SR-096] - ManufacturerTradeParty should not be present + + + + + + + + + CII-SR-097 + warning + + + + [CII-SR-097] - PresentationSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-098 + warning + + + + [CII-SR-098] - MSDSReferenceReferencedDocument should not be present + + + + + + + + + CII-SR-099 + warning + + + + [CII-SR-099] - AdditionalReferenceReferencedDocument should not be present + + + + + + + + + CII-SR-100 + warning + + + + [CII-SR-100] - LegalRightsOwnerTradeParty should not be present + + + + + + + + + CII-SR-101 + warning + + + + [CII-SR-101] - BrandOwnerTradeParty should not be present + + + + + + + + + CII-SR-102 + warning + + + + [CII-SR-102] - IncludedReferencedProduct should not be present + + + + + + + + + CII-SR-103 + warning + + + + [CII-SR-103] - InformationNote should not be present + + + + + + + + + + + + + + CII-SR-069 + fatal + + + + [CII-SR-069] - Description should exist maximum once. + + + + + + + + + CII-SR-072 + fatal + + + + [CII-SR-072] - Value should exist maximum once. + + + + + + + + + + + + + + CII-SR-104 + warning + + + + [CII-SR-104] - BuyerReference should not be present + + + + + + + + + CII-SR-105 + warning + + + + [CII-SR-105] - BuyerRequisitionerTradeParty should not be present + + + + + + + + + CII-SR-106 + warning + + + + [CII-SR-106] - ApplicableTradeDeliveryTerms should not be present + + + + + + + + + CII-SR-107 + warning + + + + [CII-SR-107] - SellerOrderReferencedDocument should not be present + + + + + + + + + CII-SR-108 + warning + + + + [CII-SR-108] - IssuerAssignedID should not be present + + + + + + + + + CII-SR-109 + warning + + + + [CII-SR-109] - QuotationReferencedDocument should not be present + + + + + + + + + CII-SR-110 + warning + + + + [CII-SR-110] - ContractReferencedDocument should not be present + + + + + + + + + CII-SR-111 + warning + + + + [CII-SR-111] - DemandForecastReferencedDocument should not be present + + + + + + + + + CII-SR-112 + warning + + + + [CII-SR-112] - PromotionalDealReferencedDocument should not be present + + + + + + + + + CII-SR-113 + warning + + + + [CII-SR-113] - AdditionalReferencedDocument should not be present + + + + + + + + + CII-SR-114 + warning + + + + [CII-SR-114] - TypeCode should not be present + + + + + + + + + CII-SR-115 + warning + + + + [CII-SR-115] - MinimumQuantity should not be present + + + + + + + + + CII-SR-116 + warning + + + + [CII-SR-116] - MaximumQuantity should not be present + + + + + + + + + CII-SR-117 + warning + + + + [CII-SR-117] - ChangeReason should not be present + + + + + + + + + CII-SR-118 + warning + + + + [CII-SR-118] - OrderUnitConversionFactorNumeric should not be present + + + + + + + + + CII-SR-439 + fatal + + + + [CII-SR-439] - ChargeAmount should exist maximum once + + + + + + + + + CII-SR-119 + warning + + + + [CII-SR-119] - Only allowances on price a price should be present + + + + + + + + + CII-SR-120 + warning + + + + [CII-SR-120] - ID should not be present + + + + + + + + + CII-SR-121 + warning + + + + [CII-SR-121] - SequenceNumeric should not be present + + + + + + + + + CII-SR-122 + warning + + + + [CII-SR-122] - CalculationPercent should not be present + + + + + + + + + CII-SR-123 + warning + + + + [CII-SR-123] - BasisAmount should not be present + + + + + + + + + CII-SR-124 + warning + + + + [CII-SR-124] - BasisQuantityshould not be present + + + + + + + + + CII-SR-125 + warning + + + + [CII-SR-125] - PrepaidIndicator should not be present + + + + + + + + + CII-SR-126 + warning + + + + [CII-SR-126] - UnitBasisAmount should not be present + + + + + + + + + CII-SR-127 + warning + + + + [CII-SR-127] - ReasonCode should not be present + + + + + + + + + CII-SR-128 + warning + + + + [CII-SR-128] - Reason should not be present + + + + + + + + + CII-SR-129 + warning + + + + [CII-SR-129] - TypeCode should not be present + + + + + + + + + CII-SR-130 + warning + + + + [CII-SR-130] - CategoryTradeTax should not be present + + + + + + + + + CII-SR-131 + warning + + + + [CII-SR-131] - ActualTradeCurrencyExchange should not be present + + + + + + + + + CII-SR-440 + fatal + + + + [CII-SR-440] - ActualAmount should exist maximum once + + + + + + + + + CII-SR-445 + warning + + + + [CII-SR-445] - IncludedTradeTax should not be present + + + + + + + + + CII-SR-132 + warning + + + + [CII-SR-132] - ValiditySpecifiedPeriod should not be present + + + + + + + + + CII-SR-133 + warning + + + + [CII-SR-133] - DeliveryTradeLocation should not be present + + + + + + + + + CII-SR-134 + warning + + + + [CII-SR-134] - TradeComparisonReferencePrice should not be present + + + + + + + + + CII-SR-135 + warning + + + + [CII-SR-135] - AssociatedReferencedDocument should not be present + + + + + + + + + CII-SR-136 + warning + + + + [CII-SR-136] - TypeCode should not be present + + + + + + + + + CII-SR-138 + warning + + + + [CII-SR-138] - MinimumQuantity should not be present + + + + + + + + + CII-SR-139 + warning + + + + [CII-SR-139] - MaximumQuantity should not be present + + + + + + + + + CII-SR-140 + warning + + + + [CII-SR-140] - ChangeReason should not be present + + + + + + + + + CII-SR-141 + warning + + + + [CII-SR-141] - OrderUnitConversionFactorNumeric should not be present + + + + + + + + + CII-SR-142 + warning + + + + [CII-SR-142] - AppliedTradeAllowanceCharge should not be present + + + + + + + + + CII-SR-446 + warning + + + + [CII-SR-446] - IncludedTradeTax should not be present + + + + + + + + + CII-SR-143 + warning + + + + [CII-SR-143] - ValiditySpecifiedPeriod should not be present + + + + + + + + + CII-SR-144 + warning + + + + [CII-SR-144] - DeliveryTradeLocation should not be present + + + + + + + + + CII-SR-145 + warning + + + + [CII-SR-145] - TradeComparisonReferencePrice should not be present + + + + + + + + + CII-SR-146 + warning + + + + [CII-SR-146] - AssociatedReferencedDocument should not be present + + + + + + + + + CII-SR-441 + fatal + + + + [CII-SR-441] - ChargeAmount should exist maximum once + + + + + + + + + CII-SR-147 + warning + + + + [CII-SR-147] - RequisitionerReferencedDocument should not be present + + + + + + + + + CII-SR-148 + warning + + + + [CII-SR-148] - ItemSellerTradeParty should not be present + + + + + + + + + CII-SR-149 + warning + + + + [CII-SR-149] - ItemBuyerTradeParty should not be present + + + + + + + + + CII-SR-150 + warning + + + + [CII-SR-150] - IncludedSpecifiedMarketplace should not be present + + + + + + + + + CII-SR-447 + warning + + + + [CII-SR-447] - UltimateCustomerOrderReferencedDocument should not be present + + + + + + + + + + + + + + CII-SR-151 + warning + + + + [CII-SR-151] - RequestedQuantity should not be present + + + + + + + + + CII-SR-152 + warning + + + + [CII-SR-152] - ReceivedQuantity should not be present + + + + + + + + + CII-SR-153 + warning + + + + [CII-SR-153] - ChargeFreeQuantity should not be present + + + + + + + + + CII-SR-154 + warning + + + + [CII-SR-154] - PackageQuantity should not be present + + + + + + + + + CII-SR-155 + warning + + + + [CII-SR-155] - ProductUnitQuantity should not be present + + + + + + + + + CII-SR-156 + warning + + + + [CII-SR-156] - PerPackageUnitQuantity should not be present + + + + + + + + + CII-SR-157 + warning + + + + [CII-SR-157] - NetWeightMeasure should not be present + + + + + + + + + CII-SR-158 + warning + + + + [CII-SR-158] - GrossWeightMeasure should not be present + + + + + + + + + CII-SR-159 + warning + + + + [CII-SR-159] - TheoreticalWeightMeasure should not be present + + + + + + + + + CII-SR-160 + warning + + + + [CII-SR-160] - DespatchedQuantity should not be present + + + + + + + + + CII-SR-161 + warning + + + + [CII-SR-161] - SpecifiedDeliveryAdjustment should not be present + + + + + + + + + CII-SR-162 + warning + + + + [CII-SR-162] - IncludedSupplyChainPackaging should not be present + + + + + + + + + CII-SR-163 + warning + + + + [CII-SR-163] - RelatedSupplyChainConsignment should not be present + + + + + + + + + CII-SR-164 + warning + + + + [CII-SR-164] - ShipToTradeParty should not be present + + + + + + + + + CII-SR-165 + warning + + + + [CII-SR-165] - UltimateShipToTradeParty should not be present + + + + + + + + + CII-SR-166 + warning + + + + [CII-SR-166] - ShipFromTradeParty should not be present + + + + + + + + + CII-SR-167 + warning + + + + [CII-SR-167] - ActualDespatchSupplyChainEvent should not be present + + + + + + + + + CII-SR-168 + warning + + + + [CII-SR-168] - ActualPickUpSupplyChainEvent should not be present + + + + + + + + + CII-SR-169 + warning + + + + [CII-SR-169] - RequestedDeliverySupplyChainEvent should not be present + + + + + + + + + CII-SR-170 + warning + + + + [CII-SR-170] - ActualDeliverySupplyChainEvent should not be present + + + + + + + + + CII-SR-171 + warning + + + + [CII-SR-171] - ActualReceiptSupplyChainEvent should not be present + + + + + + + + + CII-SR-172 + warning + + + + [CII-SR-172] - AdditionalReferencedDocument should not be present + + + + + + + + + CII-SR-173 + warning + + + + [CII-SR-173] - DespatchAdviceReferencedDocument should not be present + + + + + + + + + CII-SR-174 + warning + + + + [CII-SR-174] - ReceivingAdviceReferencedDocument should not be present + + + + + + + + + CII-SR-175 + warning + + + + [CII-SR-175] - DeliveryNoteReferencedDocument should not be present + + + + + + + + + CII-SR-176 + warning + + + + [CII-SR-176] - ConsumptionReportReferencedDocument should not be present + + + + + + + + + CII-SR-177 + warning + + + + [CII-SR-177] - RequestedQuantity should not be present + + + + + + + + + + + + + + CII-SR-178 + warning + + + + [CII-SR-178] - PaymentReference should not be present + + + + + + + + + CII-SR-179 + warning + + + + [CII-SR-179] - InvoiceIssuerReference should not be present + + + + + + + + + CII-SR-180 + warning + + + + [CII-SR-180] - TotalAdjustmentAmount should not be present + + + + + + + + + CII-SR-181 + warning + + + + [CII-SR-181] - DiscountIndicator should not be present + + + + + + + + + CII-SR-182 + warning + + + + [CII-SR-182] - CalculatedAmount should not be present + + + + + + + + + CII-SR-183 + warning + + + + [CII-SR-183] - IndicatorString should not be present + + + + + + + + + CII-SR-184 + warning + + + + [CII-SR-184] - ID should not be present + + + + + + + + + CII-SR-185 + warning + + + + [CII-SR-185] - SequenceNumeric should not be present + + + + + + + + + CII-SR-186 + warning + + + + [CII-SR-186] - @format should not be present + + + + + + + + + CII-SR-187 + warning + + + + [CII-SR-187] - BasisQuantity should not be present + + + + + + + + + CII-SR-188 + warning + + + + [CII-SR-188] - PrepaidIndicator should not be present + + + + + + + + + CII-SR-189 + warning + + + + [CII-SR-189] - UnitBasisAmount should not be present + + + + + + + + + CII-SR-190 + warning + + + + [CII-SR-190] - TypeCode should not be present + + + + + + + + + CII-SR-191 + warning + + + + [CII-SR-191] - CategoryTradeTax should not be present + + + + + + + + + CII-SR-192 + warning + + + + [CII-SR-192] - ActualTradeCurrencyExchange should not be present + + + + + + + + + CII-SR-193 + warning + + + + [CII-SR-193] - ID should not be present + + + + + + + + + CII-SR-194 + warning + + + + [CII-SR-194] - SubtotalCalculatedTradeTax should not be present + + + + + + + + + CII-SR-195 + warning + + + + [CII-SR-195] - SpecifiedLogisticsServiceCharge should not be present + + + + + + + + + CII-SR-196 + warning + + + + [CII-SR-196] - SpecifiedTradePaymentTerms should not be present + + + + + + + + + CII-SR-197 + warning + + + + [CII-SR-197] - ChargeTotalAmount should not be present + + + + + + + + + CII-SR-198 + warning + + + + [CII-SR-198] - AllowanceTotalAmount should not be present + + + + + + + + + CII-SR-199 + warning + + + + [CII-SR-199] - TaxBasisTotalAmount should not be present + + + + + + + + + CII-SR-200 + warning + + + + [CII-SR-200] - TaxTotalAmount should not be present + + + + + + + + + CII-SR-201 + warning + + + + [CII-SR-201] - GrandTotalAmount should not be present + + + + + + + + + CII-SR-202 + warning + + + + [CII-SR-202] - InformationAmount should not be present + + + + + + + + + CII-SR-203 + warning + + + + [CII-SR-203] - TotalAllowanceChargeAmount should not be present + + + + + + + + + CII-SR-204 + warning + + + + [CII-SR-204] - TotalRetailValueInformationAmount should not be present + + + + + + + + + CII-SR-205 + warning + + + + [CII-SR-205] - GrossLineTotalAmount should not be present + + + + + + + + + CII-SR-206 + warning + + + + [CII-SR-206] - NetLineTotalAmount should not be present + + + + + + + + + CII-SR-207 + warning + + + + [CII-SR-207] - NetIncludingTaxesLineTotalAmount should not be present + + + + + + + + + CII-SR-208 + warning + + + + [CII-SR-208] - ProductWeightLossInformationAmount should not be present + + + + + + + + + CII-SR-209 + warning + + + + [CII-SR-209] - SpecifiedFinancialAdjustment should not be present + + + + + + + + + CII-SR-210 + warning + + + + [CII-SR-210] - InvoiceReferencedDocument should not be present + + + + + + + + + CII-SR-212 + warning + + + + [CII-SR-212] - PayableSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-SR-213 + warning + + + + [CII-SR-213] - SetTriggerCode should not be present + + + + + + + + + CII-SR-214 + warning + + + + [CII-SR-214] - TypeCode should not be present + + + + + + + + + CII-SR-215 + warning + + + + [CII-SR-215] - AmountTypeCode should not be present + + + + + + + + + CII-SR-216 + warning + + + + [CII-SR-216] - Name should not be present + + + + + + + + + CII-SR-217 + warning + + + + [CII-SR-217] - CostReferenceDimensionPattern should not be present + + + + + + + + + CII-SR-218 + warning + + + + [CII-SR-218] - PurchaseSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-SR-219 + warning + + + + [CII-SR-219] - SalesSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-SR-220 + warning + + + + [CII-SR-220] - SpecifiedTradeSettlementFinancialCard should not be present + + + + + + + + + + + + + + CII-SR-442 + warning + + + + [CII-SR-442] - Reference should not be present + + + + + + + + + CII-SR-222 + warning + + + + [CII-SR-222] - RoleCode should not be present + + + + + + + + + CII-SR-223 + warning + + + + [CII-SR-223] - LegalClassificationCode should not be present + + + + + + + + + CII-SR-224 + warning + + + + [CII-SR-224] - Name should not be present + + + + + + + + + CII-SR-225 + warning + + + + [CII-SR-225] - PostalTradeAddress should not be present + + + + + + + + + CII-SR-226 + warning + + + + [CII-SR-226] - RoleCode should not be present + + + + + + + + + CII-SR-227 + warning + + + + [CII-SR-227] - ID should not be present + + + + + + + + + CII-SR-228 + warning + + + + [CII-SR-228] - TypeCode should not be present + + + + + + + + + CII-SR-229 + warning + + + + [CII-SR-229] - JobTitle should not be present + + + + + + + + + CII-SR-230 + warning + + + + [CII-SR-230] - Responsibility should not be present + + + + + + + + + CII-SR-231 + warning + + + + [CII-SR-231] - PersonID should not be present + + + + + + + + + CII-SR-232 + warning + + + + [CII-SR-232] - URIID should not be present + + + + + + + + + CII-SR-233 + warning + + + + [CII-SR-233] - ChannelCode should not be present + + + + + + + + + CII-SR-234 + warning + + + + [CII-SR-234] - DirectTelephoneUniversalCommunication should not be present + + + + + + + + + CII-SR-235 + warning + + + + [CII-SR-235] - MobileTelephoneUniversalCommunication should not be present + + + + + + + + + CII-SR-236 + warning + + + + [CII-SR-236] - FaxUniversalCommunication should not be present + + + + + + + + + CII-SR-237 + warning + + + + [CII-SR-237] - ChannelCode should not be present + + + + + + + + + CII-SR-238 + warning + + + + [CII-SR-238] - CompleteNumber should not be present + + + + + + + + + CII-SR-239 + warning + + + + [CII-SR-239] - TelexUniversalCommunication should not be present + + + + + + + + + CII-SR-240 + warning + + + + [CII-SR-240] - VOIPUniversalCommunication should not be present + + + + + + + + + CII-SR-241 + warning + + + + [CII-SR-241] - InstantMessagingUniversalCommunication should not be present + + + + + + + + + CII-SR-242 + warning + + + + [CII-SR-242] - SpecifiedNote should not be present + + + + + + + + + CII-SR-243 + warning + + + + [CII-SR-243] - SpecifiedContactPerson should not be present + + + + + + + + + CII-SR-244 + warning + + + + [CII-SR-244] - ChannelCode should not be present + + + + + + + + + CII-SR-245 + warning + + + + [CII-SR-245] - CompleteNumber should not be present + + + + + + + + + CII-SR-246 + warning + + + + [CII-SR-246] - AssociatedRegisteredTax should not be present + + + + + + + + + CII-SR-247 + warning + + + + [CII-SR-247] - EndPointURIUniversalCommunication should not be present + + + + + + + + + CII-SR-248 + warning + + + + [CII-SR-248] - LogoAssociatedSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-249 + warning + + + + [CII-SR-249] - RoleCode should not be present + + + + + + + + + CII-SR-250 + warning + + + + [CII-SR-250] - Description should not be present + + + + + + + + + CII-SR-251 + warning + + + + [CII-SR-251] - LegalClassificationCode should not be present + + + + + + + + + CII-SR-252 + warning + + + + [CII-SR-252] - Name should not be present + + + + + + + + + CII-SR-254 + warning + + + + [CII-SR-254] - PostalTradeAddress should not be present + + + + + + + + + CII-SR-255 + warning + + + + [CII-SR-255] - AuthorizedLegalRegistration should not be present + + + + + + + + + CII-SR-256 + warning + + + + [CII-SR-256] - ID should not be present + + + + + + + + + CII-SR-257 + warning + + + + [CII-SR-257] - TypeCode should not be present + + + + + + + + + CII-SR-258 + warning + + + + [CII-SR-258] - JobTitle should not be present + + + + + + + + + CII-SR-259 + warning + + + + [CII-SR-259] - Responsibility should not be present + + + + + + + + + CII-SR-260 + warning + + + + [CII-SR-260] - PersonID should not be present + + + + + + + + + CII-SR-261 + warning + + + + [CII-SR-261] - URIID should not be present + + + + + + + + + CII-SR-262 + warning + + + + [CII-SR-262] - ChannelCode should not be present + + + + + + + + + CII-SR-263 + warning + + + + [CII-SR-263] - DirectTelephoneUniversalCommunication should not be present + + + + + + + + + CII-SR-264 + warning + + + + [CII-SR-264] - MobileTelephoneUniversalCommunication should not be present + + + + + + + + + CII-SR-265 + warning + + + + [CII-SR-265] - FaxUniversalCommunication should not be present + + + + + + + + + CII-SR-266 + warning + + + + [CII-SR-266] - ChannelCode should not be present + + + + + + + + + CII-SR-267 + warning + + + + [CII-SR-267] - CompleteNumber should not be present + + + + + + + + + CII-SR-268 + warning + + + + [CII-SR-268] - TelexUniversalCommunication should not be present + + + + + + + + + CII-SR-269 + warning + + + + [CII-SR-269] - VOIPUniversalCommunication should not be present + + + + + + + + + CII-SR-270 + warning + + + + [CII-SR-270] - InstantMessagingUniversalCommunication should not be present + + + + + + + + + CII-SR-271 + warning + + + + [CII-SR-271] - SpecifiedNote should not be present + + + + + + + + + CII-SR-272 + warning + + + + [CII-SR-272] - SpecifiedContactPerson should not be present + + + + + + + + + CII-SR-273 + warning + + + + [CII-SR-273] - ChannelCode should not be present + + + + + + + + + CII-SR-274 + warning + + + + [CII-SR-274] - CompleteNumber should not be present + + + + + + + + + CII-SR-275 + warning + + + + [CII-SR-275] - AssociatedRegisteredTax should not be present + + + + + + + + + CII-SR-276 + warning + + + + [CII-SR-276] - EndPointURIUniversalCommunication should not be present + + + + + + + + + CII-SR-277 + warning + + + + [CII-SR-277] - LogoAssociatedSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-278 + warning + + + + [CII-SR-278] - SalesAgentTradeParty should not be present + + + + + + + + + CII-SR-279 + warning + + + + [CII-SR-279] - BuyerRequisitionerTradeParty should not be present + + + + + + + + + CII-SR-280 + warning + + + + [CII-SR-280] - BuyerAssignedAccountantTradeParty should not be present + + + + + + + + + CII-SR-281 + warning + + + + [CII-SR-281] - SellerAssignedAccountantTradeParty should not be present + + + + + + + + + CII-SR-282 + warning + + + + [CII-SR-282] - BuyerTaxRepresentativeTradeParty should not be present + + + + + + + + + CII-SR-283 + warning + + + + [CII-SR-283] - GlobalID should not be present + + + + + + + + + CII-SR-284 + warning + + + + [CII-SR-284] - RoleCode should not be present + + + + + + + + + CII-SR-285 + warning + + + + [CII-SR-285] - Description should not be present + + + + + + + + + CII-SR-286 + warning + + + + [CII-SR-286] - SpecifiedLegalOrganization should not be present + + + + + + + + + CII-SR-287 + warning + + + + [CII-SR-287] - DefinedTradeContact should not be present + + + + + + + + + CII-SR-288 + warning + + + + [CII-SR-288] - URIUniversalCommunication should not be present + + + + + + + + + CII-SR-289 + warning + + + + [CII-SR-289] - AssociatedRegisteredTax should not be present + + + + + + + + + CII-SR-290 + warning + + + + [CII-SR-290] - EndPointURIUniversalCommunication should not be present + + + + + + + + + CII-SR-291 + warning + + + + [CII-SR-291] - LogoAssociatedSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-292 + warning + + + + [CII-SR-292] - ProductEndUserTradeParty should not be present + + + + + + + + + CII-SR-293 + warning + + + + [CII-SR-293] - ApplicableTradeDeliveryTerms should not be present + + + + + + + + + CII-SR-294 + warning + + + + [CII-SR-294] - LineID should not be present + + + + + + + + + CII-SR-295 + warning + + + + [CII-SR-295] - LineID should not be present + + + + + + + + + CII-SR-296 + warning + + + + [CII-SR-296] - QuotationReferencedDocument should not be present + + + + + + + + + CII-SR-297 + warning + + + + [CII-SR-297] - OrderResponseReferencedDocument should not be present + + + + + + + + + CII-SR-298 + warning + + + + [CII-SR-298] - LineID should not be present + + + + + + + + + CII-SR-299 + warning + + + + [CII-SR-299] - DemandForecastReferencedDocument should not be present + + + + + + + + + CII-SR-300 + warning + + + + [CII-SR-300] - SupplyInstructionReferencedDocument should not be present + + + + + + + + + CII-SR-301 + warning + + + + [CII-SR-301] - PromotionalDealReferencedDocument should not be present + + + + + + + + + CII-SR-302 + warning + + + + [CII-SR-302] - PriceListReferencedDocument should not be present + + + + + + + + + CII-SR-303 + warning + + + + [CII-SR-303] - LineID should not be present + + + + + + + + + CII-SR-304 + warning + + + + [CII-SR-304] - RequisitionerReferencedDocument should not be present + + + + + + + + + CII-SR-305 + warning + + + + [CII-SR-305] - BuyerAgentTradeParty should not be present + + + + + + + + + CII-SR-306 + warning + + + + [CII-SR-306] - PurchaseConditionsReferencedDocument should not be present + + + + + + + + + CII-SR-307 + warning + + + + [CII-SR-307] - Description should not be present + + + + + + + + + CII-SR-448 + warning + + + + [CII-SR-448] - UltimateCustomerOrderReferencedDocument should not be present + + + + + + + + + CII-SR-450 + warning + + + + [CII-SR-450] - Only one buyer identifier should be present (either the ID or the Global ID) + + + + + + + + + + + + + + CII-SR-308 + warning + + + + [CII-SR-308] - RelatedSupplyChainConsignment should not be present + + + + + + + + + CII-SR-309 + warning + + + + [CII-SR-309] - RoleCode should not be present + + + + + + + + + CII-SR-310 + warning + + + + [CII-SR-310] - Description should not be present + + + + + + + + + CII-SR-311 + warning + + + + [CII-SR-311] - SpecifiedLegalOrganization should not be present + + + + + + + + + CII-SR-312 + warning + + + + [CII-SR-312] - DefinedTradeContact should not be present + + + + + + + + + CII-SR-313 + warning + + + + [CII-SR-313] - URIUniversalCommunication should not be present + + + + + + + + + CII-SR-314 + warning + + + + [CII-SR-314] - SpecifiedTaxRegistration should not be present + + + + + + + + + CII-SR-315 + warning + + + + [CII-SR-315] - EndPointURIUniversalCommunication should not be present + + + + + + + + + CII-SR-316 + warning + + + + [CII-SR-316] - LogoAssociatedSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-317 + warning + + + + [CII-SR-317] - UltimateShipToTradeParty should not be present + + + + + + + + + CII-SR-318 + warning + + + + [CII-SR-318] - ShipFromTradeParty should not be present + + + + + + + + + CII-SR-319 + warning + + + + [CII-SR-319] - ActualDespatchSupplyChainEvent should not be present + + + + + + + + + CII-SR-320 + warning + + + + [CII-SR-320] - ActualPickUpSupplyChainEvent should not be present + + + + + + + + + CII-SR-321 + warning + + + + [CII-SR-321] - ID should not be present + + + + + + + + + CII-SR-322 + warning + + + + [CII-SR-322] - DateTime should not be present + + + + + + + + + CII-SR-323 + warning + + + + [CII-SR-323] - TypeCode should not be present + + + + + + + + + CII-SR-324 + warning + + + + [CII-SR-324] - Description should not be present + + + + + + + + + CII-SR-325 + warning + + + + [CII-SR-325] - DescriptionBinaryObject should not be present + + + + + + + + + CII-SR-326 + warning + + + + [CII-SR-326] - UnitQuantity should not be present + + + + + + + + + CII-SR-327 + warning + + + + [CII-SR-327] - LatestOccurrenceDateTime should not be present + + + + + + + + + CII-SR-328 + warning + + + + [CII-SR-328] - EarliestOccurrenceDateTime should not be present + + + + + + + + + CII-SR-329 + warning + + + + [CII-SR-329] - OccurrenceSpecifiedPeriod should not be present + + + + + + + + + CII-SR-330 + warning + + + + [CII-SR-330] - OccurrenceLogisticsLocation should not be present + + + + + + + + + CII-SR-331 + warning + + + + [CII-SR-331] - ActualReceiptSupplyChainEvent should not be present + + + + + + + + + CII-SR-332 + warning + + + + [CII-SR-332] - AdditionalReferencedDocument should not be present + + + + + + + + + CII-SR-333 + warning + + + + [CII-SR-333] - LineID should not be present + + + + + + + + + CII-SR-334 + warning + + + + [CII-SR-334] - LineID should not be present + + + + + + + + + CII-SR-335 + warning + + + + [CII-SR-335] - DeliveryNoteReferencedDocument should not be present + + + + + + + + + CII-SR-336 + warning + + + + [CII-SR-336] - ConsumptionReportReferencedDocument should not be present + + + + + + + + + CII-SR-337 + warning + + + + [CII-SR-337] - PreviousDeliverySupplyChainEvent should not be present + + + + + + + + + CII-SR-338 + warning + + + + [CII-SR-338] - PackingListReferencedDocument should not be present + + + + + + + + + CII-SR-449 + warning + + + + [CII-SR-449] - Only one delivery to location identifier should be present (either the ID or the Global ID) + + + + + + + + + + + + + + CII-SR-339 + warning + + + + [CII-SR-339] - DuePayableAmount should not be present + + + + + + + + + CII-SR-340 + warning + + + + [CII-SR-340] - CreditorReferenceTypeCode should not be present + + + + + + + + + CII-SR-341 + warning + + + + [CII-SR-341] - CreditorReferenceType should not be present + + + + + + + + + CII-SR-342 + warning + + + + [CII-SR-342] - CreditorReferenceIssuerID should not be present + + + + + + + + + CII-SR-344 + warning + + + + [CII-SR-344] - PaymentCurrencyCode should not be present + + + + + + + + + CII-SR-345 + warning + + + + [CII-SR-345] - InvoiceIssuerReference should not be present + + + + + + + + + CII-SR-346 + warning + + + + [CII-SR-346] - InvoiceDateTime should not be present + + + + + + + + + CII-SR-347 + warning + + + + [CII-SR-347] - NextInvoiceDateTime should not be present + + + + + + + + + CII-SR-348 + warning + + + + [CII-SR-348] - CreditReasonCode should not be present + + + + + + + + + CII-SR-349 + warning + + + + [CII-SR-349] - CreditReason should not be present + + + + + + + + + CII-SR-350 + warning + + + + [CII-SR-350] - InvoicerTradeParty should not be present + + + + + + + + + CII-SR-351 + warning + + + + [CII-SR-351] - InvoiceeTradeParty should not be present + + + + + + + + + CII-SR-352 + warning + + + + [CII-SR-352] - RoleCode should not be present + + + + + + + + + CII-SR-353 + warning + + + + [CII-SR-353] - Description should not be present + + + + + + + + + CII-SR-354 + warning + + + + [CII-SR-354] - LegalClassificationCode should not be present + + + + + + + + + CII-SR-355 + warning + + + + [CII-SR-355] - Name should not be present + + + + + + + + + CII-SR-356 + warning + + + + [CII-SR-356] - TradingBusinessName should not be present + + + + + + + + + CII-SR-357 + warning + + + + [CII-SR-357] - PostalTradeAddress should not be present + + + + + + + + + CII-SR-358 + warning + + + + [CII-SR-358] - AuthorizedLegalRegistration should not be present + + + + + + + + + CII-SR-359 + warning + + + + [CII-SR-359] - DefinedTradeContact should not be present + + + + + + + + + CII-SR-360 + warning + + + + [CII-SR-360] - PostalTradeAddress should not be present + + + + + + + + + CII-SR-361 + warning + + + + [CII-SR-361] - URIUniversalCommunication should not be present + + + + + + + + + CII-SR-362 + warning + + + + [CII-SR-362] - SpecifiedTaxRegistration should not be present + + + + + + + + + CII-SR-363 + warning + + + + [CII-SR-363] - EndPointURIUniversalCommunication should not be present + + + + + + + + + CII-SR-364 + warning + + + + [CII-SR-364] - LogoAssociatedSpecifiedBinaryFile should not be present + + + + + + + + + CII-SR-451 + warning + + + + [CII-SR-451] - Only one payee identifier should be present (either the ID or the Global ID) + + + + + + + + + CII-SR-365 + warning + + + + [CII-SR-365] - PayerTradeParty should not be present + + + + + + + + + CII-SR-366 + warning + + + + [CII-SR-366] - TaxApplicableTradeCurrencyExchange should not be present + + + + + + + + + CII-SR-367 + warning + + + + [CII-SR-367] - InvoiceApplicableTradeCurrencyExchange should not be present + + + + + + + + + CII-SR-368 + warning + + + + [CII-SR-368] - PaymentApplicableTradeCurrencyExchange should not be present + + + + + + + + + CII-SR-369 + warning + + + + [CII-SR-369] - PaymentChannelCode should not be present + + + + + + + + + CII-SR-370 + warning + + + + [CII-SR-370] - GuaranteeMethodCode should not be present + + + + + + + + + CII-SR-371 + warning + + + + [CII-SR-371] - PaymentMethodCode should not be present + + + + + + + + + CII-SR-443 + warning + + + + [CII-SR-443] - ID should not be present + + + + + + + + + CII-SR-372 + warning + + + + [CII-SR-372] - MicrochipIndicator should not be present + + + + + + + + + CII-SR-373 + warning + + + + [CII-SR-373] - TypeCode should not be present + + + + + + + + + CII-SR-375 + warning + + + + [CII-SR-375] - ExpiryDate should not be present + + + + + + + + + CII-SR-376 + warning + + + + [CII-SR-376] - VerificationNumeric should not be present + + + + + + + + + CII-SR-377 + warning + + + + [CII-SR-377] - ValidFromDateTime should not be present + + + + + + + + + CII-SR-378 + warning + + + + [CII-SR-378] - CreditLimitAmount should not be present + + + + + + + + + CII-SR-379 + warning + + + + [CII-SR-379] - CreditAvailableAmount should not be present + + + + + + + + + CII-SR-380 + warning + + + + [CII-SR-380] - InterestRatePercent should not be present + + + + + + + + + CII-SR-381 + warning + + + + [CII-SR-381] - Description should not be present + + + + + + + + + CII-SR-382 + warning + + + + [CII-SR-382] - AccountName should not be present + + + + + + + + + CII-SR-444 + warning + + + + [CII-SR-444] - ProprietaryID should not be present + + + + + + + + + CII-SR-384 + warning + + + + [CII-SR-384] - ClearingSystemName should not be present + + + + + + + + + CII-SR-385 + warning + + + + [CII-SR-385] - Name should not be present + + + + + + + + + CII-SR-386 + warning + + + + [CII-SR-386] - LocationFinancialInstitutionAddress should not be present + + + + + + + + + CII-SR-388 + warning + + + + [CII-SR-388] - ID should not be present + + + + + + + + + CII-SR-389 + warning + + + + [CII-SR-389] - SequenceNumeric should not be present + + + + + + + + + CII-SR-390 + warning + + + + [CII-SR-390] - BasisQuantity should not be present + + + + + + + + + CII-SR-391 + warning + + + + [CII-SR-391] - PrepaidIndicator should not be present + + + + + + + + + CII-SR-392 + warning + + + + [CII-SR-392] - UnitBasisAmount should not be present + + + + + + + + + CII-SR-393 + warning + + + + [CII-SR-393] - TypeCode should not be present + + + + + + + + + CII-SR-394 + warning + + + + [CII-SR-394] - ActualTradeCurrencyExchange should not be present + + + + + + + + + CII-SR-395 + warning + + + + [CII-SR-395] - SubtotalCalculatedTradeTax should not be present + + + + + + + + + CII-SR-396 + warning + + + + [CII-SR-396] - SpecifiedLogisticsServiceCharge should not be present + + + + + + + + + CII-SR-397 + warning + + + + [CII-SR-397] - ID should not be present + + + + + + + + + CII-SR-398 + warning + + + + [CII-SR-398] - FromEventCode should not be present + + + + + + + + + CII-SR-399 + warning + + + + [CII-SR-399] - SettlementPeriodMeasure should not be present + + + + + + + + + CII-SR-400 + warning + + + + [CII-SR-400] - DateTime should not be present + + + + + + + + + CII-SR-401 + warning + + + + [CII-SR-401] - TypeCode should not be present + + + + + + + + + CII-SR-402 + warning + + + + [CII-SR-402] - InstructionTypeCode should not be present + + + + + + + + + CII-SR-404 + warning + + + + [CII-SR-404] - PartialPaymentPercent should not be present + + + + + + + + + CII-SR-405 + warning + + + + [CII-SR-405] - PaymentMeansID should not be present + + + + + + + + + CII-SR-406 + warning + + + + [CII-SR-406] - PartialPaymentAmount should not be present + + + + + + + + + CII-SR-407 + warning + + + + [CII-SR-407] - ApplicableTradePaymentPenaltyTerms should not be present + + + + + + + + + CII-SR-408 + warning + + + + [CII-SR-408] - ApplicableTradePaymentDiscountTerms should not be present + + + + + + + + + CII-SR-409 + warning + + + + [CII-SR-409] - PayeeTradeParty should not be present + + + + + + + + + CII-SR-421 + warning + + + + [CII-SR-421] - SpecifiedFinancialAdjustment should not be present + + + + + + + + + CII-SR-422 + warning + + + + [CII-SR-422] - LineID should not be present + + + + + + + + + CII-SR-423 + warning + + + + [CII-SR-423] - ProFormaInvoiceReferencedDocument should not be present + + + + + + + + + CII-SR-424 + warning + + + + [CII-SR-424] - LetterOfCreditReferencedDocument should not be present + + + + + + + + + CII-SR-425 + warning + + + + [CII-SR-425] - FactoringAgreementReferencedDocument should not be present + + + + + + + + + CII-SR-426 + warning + + + + [CII-SR-426] - FactoringListReferencedDocument should not be present + + + + + + + + + CII-SR-427 + warning + + + + [CII-SR-427] - PayableSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-SR-428 + warning + + + + [CII-SR-428] - SetTriggerCode should not be present + + + + + + + + + CII-SR-429 + warning + + + + [CII-SR-429] - TypeCode should not be present + + + + + + + + + CII-SR-430 + warning + + + + [CII-SR-430] - AmountTypeCode should not be present + + + + + + + + + CII-SR-431 + warning + + + + [CII-SR-431] - Name should not be present + + + + + + + + + CII-SR-432 + warning + + + + [CII-SR-432] - CostReferenceDimensionPattern should not be present + + + + + + + + + CII-SR-433 + warning + + + + [CII-SR-433] - PurchaseSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-SR-434 + warning + + + + [CII-SR-434] - SalesSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-SR-435 + warning + + + + [CII-SR-435] - SpecifiedTradeSettlementFinancialCard should not be present + + + + + + + + + CII-SR-436 + warning + + + + [CII-SR-436] - SpecifiedAdvancePayment should not be present + + + + + + + + + CII-SR-437 + warning + + + + [CII-SR-437] - UltimatePayeeTradeParty should not be present + + + + + + + + + + + + + + CII-SR-411 + warning + + + + [CII-SR-411] - InformationAmount should not be present + + + + + + + + + CII-SR-412 + warning + + + + [CII-SR-412] - TotalDiscountAmount should not be present + + + + + + + + + CII-SR-413 + warning + + + + [CII-SR-413] - TotalAllowanceChargeAmount should not be present + + + + + + + + + CII-SR-414 + warning + + + + [CII-SR-414] - RetailValueExcludingTaxInformationAmount should not be present + + + + + + + + + CII-SR-415 + warning + + + + [CII-SR-415] - TotalDepositFeeInformationAmount should not be present + + + + + + + + + CII-SR-416 + warning + + + + [CII-SR-416] - ProductValueExcludingTobaccoTaxInformationAmount should not be present + + + + + + + + + CII-SR-417 + warning + + + + [CII-SR-417] - TotalRetailValueInformationAmount should not be present + + + + + + + + + CII-SR-418 + warning + + + + [CII-SR-418] - GrossLineTotalAmount should not be present + + + + + + + + + CII-SR-419 + warning + + + + [CII-SR-419] - NetLineTotalAmount should not be present + + + + + + + + + CII-SR-420 + warning + + + + [CII-SR-420] - NetIncludingTaxesLineTotalAmount should not be present + + + + + + + + + + + + + + CII-DT-013 + fatal + + + + [CII-DT-013] - languageID should not be present + + + + + + + + + CII-DT-014 + fatal + + + + [CII-DT-014] - languageLocaleID should not be present + + + + + + + + + CII-SR-438 + warning + + + + [CII-SR-438] - ValuationBreakdownStatement should not be present + + + + + + + + + + + + + + CII-SR-04 + warning + + + + [CII-SR-004] - Value should not be present + + + + + + + + + CII-SR-05 + warning + + + + [CII-SR-005] - SpecifiedDocumentVersion should not be present + + + + + + + + + + + + + + CII-DT-001 + fatal + + + + [CII-DT-001] - schemeName should not be present + + + + + + + + + CII-DT-002 + fatal + + + + [CII-DT-002] - schemeAgencyName should not be present + + + + + + + + + CII-DT-003 + fatal + + + + [CII-DT-003] - schemeDataURI should not be present + + + + + + + + + CII-DT-004 + fatal + + + + [CII-DT-004] - schemeURI should not be present + + + + + + + + + + + + + + CII-DT-005 + fatal + + + + [CII-DT-005] - schemeID should not be present + + + + + + + + + CII-DT-006 + fatal + + + + [CII-DT-006] - schemeAgencyID should not be present + + + + + + + + + CII-DT-007 + fatal + + + + [CII-DT-007] - schemeVersionID should not be present + + + + + + + + + + + + + + CII-DT-008 + fatal + + + + [CII-DT-008] - name should not be present + + + + + + + + + CII-DT-009 + fatal + + + + [CII-DT-009] - listURI should not be present + + + + + + + + + + + + + + CII-DT-010 + fatal + + + + [CII-DT-010] - listID should not be present + + + + + + + + + CII-DT-011 + fatal + + + + [CII-DT-011] - listAgencyID should not be present + + + + + + + + + CII-DT-012 + fatal + + + + [CII-DT-012] - listVersionID should not be present + + + + + + + + + + + + + + CII-DT-045 + warning + + + + [CII-DT-045] - @listID should not be present + + + + + + + + + CII-DT-046 + warning + + + + [CII-DT-046] - @listAgencyID should not be present + + + + + + + + + CII-DT-047 + warning + + + + [CII-DT-047] - @listVersionID should not be present + + + + + + + + + CII-DT-048 + warning + + + + [CII-DT-048] - @listURI should not be present + + + + + + + + + + + + + + CII-DT-015 + fatal + + + + [CII-DT-015] - URIID should not be present + + + + + + + + + CII-DT-016 + fatal + + + + [CII-DT-016] - StatusCode should not be present + + + + + + + + + CII-DT-017 + fatal + + + + [CII-DT-017] - CopyIndicator should not be present + + + + + + + + + CII-DT-018 + fatal + + + + [CII-DT-018] - TypeCode should not be present + + + + + + + + + CII-DT-019 + fatal + + + + [CII-DT-019] - GlobalID should not be present + + + + + + + + + CII-DT-020 + fatal + + + + [CII-DT-020] - RevisionID should not be present + + + + + + + + + CII-DT-021 + fatal + + + + [CII-DT-021] - Name should not be present + + + + + + + + + CII-DT-022 + fatal + + + + [CII-DT-022] - AttachmentBinaryObject should not be present + + + + + + + + + CII-DT-023 + fatal + + + + [CII-DT-023] - Information should not be present + + + + + + + + + CII-DT-024 + fatal + + + + [CII-DT-024] - ReferenceTypeCode should not be present + + + + + + + + + CII-DT-025 + fatal + + + + [CII-DT-025] - SectionName should not be present + + + + + + + + + CII-DT-026 + fatal + + + + [CII-DT-026] - PreviousRevisionID should not be present + + + + + + + + + CII-DT-027 + fatal + + + + [CII-DT-027] - FormattedIssueDateTime should not be present + + + + + + + + + CII-DT-028 + fatal + + + + [CII-DT-028] - EffectiveSpecifiedPeriod should not be present + + + + + + + + + CII-DT-029 + fatal + + + + [CII-DT-029] - IssuerTradeParty should not be present + + + + + + + + + CII-DT-030 + fatal + + + + [CII-DT-030] - AttachedSpecifiedBinaryFile should not be present + + + + + + + + + + + + + + CII-DT-031 + fatal + + + + [CII-DT-031] - currencyID should not be present + + + + + + + + + CII-DT-032 + fatal + + + + [CII-DT-032] - currencyCodeListVersionID should not be present + + + + + + + + + + + + + + CII-DT-033 + fatal + + + + [CII-DT-033] - unitCode should not be present + + + + + + + + + CII-DT-034 + fatal + + + + [CII-DT-034] - unitCodeListID should not be present + + + + + + + + + CII-DT-035 + fatal + + + + [CII-DT-035] - unitCodeListAgencyID should not be present + + + + + + + + + CII-DT-036 + fatal + + + + [CII-DT-036] - unitCodeListAgencyName should not be present + + + + + + + + + + + + + + CII-DT-037 + fatal + + + + [CII-DT-037] - TypeCode shall be 'VAT' + + + + + + + + + CII-DT-038 + warning + + + + [CII-DT-038] - CalculatedRate should not be present + + + + + + + + + CII-DT-039 + warning + + + + [CII-DT-039] - CalculationSequenceNumeric should not be present + + + + + + + + + CII-DT-040 + warning + + + + [CII-DT-040] - BasisQuantity should not be present + + + + + + + + + CII-DT-041 + warning + + + + [CII-DT-041] - BasisAmount should not be present + + + + + + + + + CII-DT-042 + warning + + + + [CII-DT-042] - UnitBasisAmount should not be present + + + + + + + + + CII-DT-043 + warning + + + + [CII-DT-043] - LineTotalBasisAmount should not be present + + + + + + + + + CII-DT-044 + warning + + + + [CII-DT-044] - AllowanceChargeBasisAmount should not be present + + + + + + + + + CII-DT-049 + warning + + + + [CII-DT-049] - CurrencyCode should not be present + + + + + + + + + CII-DT-050 + warning + + + + [CII-DT-050] - Jurisdiction should not be present + + + + + + + + + CII-DT-051 + warning + + + + [CII-DT-051] - CustomsDutyIndicator should not be present + + + + + + + + + CII-DT-052 + warning + + + + [CII-DT-052] - ExemptionReasonCode should not be present + + + + + + + + + CII-DT-098 + warning + + + + [CII-DT-098] - ExemptionReason should not be present + + + + + + + + + CII-DT-053 + warning + + + + [CII-DT-053] - TaxBasisAllowanceRate should not be present + + + + + + + + + CII-DT-054 + warning + + + + [CII-DT-054] - TaxPointDate should not be present + + + + + + + + + CII-DT-055 + warning + + + + [CII-DT-055] - Type should not be present + + + + + + + + + CII-DT-056 + warning + + + + [CII-DT-056] - InformationAmount should not be present + + + + + + + + + CII-DT-057 + warning + + + + [CII-DT-057] - CategoryName should not be present + + + + + + + + + CII-DT-058 + warning + + + + [CII-DT-058] - DueDateTypeCode should not be present + + + + + + + + + CII-DT-059 + warning + + + + [CII-DT-059] - @format should not be present + + + + + + + + + CII-DT-060 + warning + + + + [CII-DT-060] - SpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-DT-061 + warning + + + + [CII-DT-061] - ServiceSupplyTradeCountry should not be present + + + + + + + + + CII-DT-062 + warning + + + + [CII-DT-062] - BuyerRepayableTaxSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-DT-063 + warning + + + + [CII-DT-063] - SellerPayableTaxSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-DT-064 + warning + + + + [CII-DT-064] - SellerRefundableTaxSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-DT-065 + warning + + + + [CII-DT-065] - BuyerDeductibleTaxSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-DT-066 + warning + + + + [CII-DT-066] - BuyerNonDeductibleTaxSpecifiedTradeAccountingAccount should not be present + + + + + + + + + CII-DT-067 + warning + + + + [CII-DT-067] - PlaceApplicableTradeLocation should not be present + + + + + + + + + + + + + + CII-DT-068 + fatal + + + + [CII-DT-068] - DateTime shall not be used. + + + + + + + + + CII-DT-069 + fatal + + + + [CII-DT-069] - DurationMeasure shall not be used. + + + + + + + + + CII-DT-070 + fatal + + + + [CII-DT-070] - InclusiveIndicator shall not be used. + + + + + + + + + CII-DT-071 + fatal + + + + [CII-DT-071] - Description shall not be used. + + + + + + + + + CII-DT-072 + fatal + + + + [CII-DT-072] - DateTime shall not be used. + + + + + + + + + CII-DT-073 + fatal + + + + [CII-DT-073] - CompleteDateTime shall not be used. + + + + + + + + + CII-DT-074 + fatal + + + + [CII-DT-074] - OpenIndicator shall not be used. + + + + + + + + + CII-DT-075 + fatal + + + + [CII-DT-075] - SeasonCode shall not be used. + + + + + + + + + CII-DT-076 + fatal + + + + [CII-DT-076] - ID shall not be used. + + + + + + + + + CII-DT-077 + fatal + + + + [CII-DT-077] - Name shall not be used. + + + + + + + + + CII-DT-078 + fatal + + + + [CII-DT-078] - SequenceNumeric shall not be used. + + + + + + + + + CII-DT-079 + fatal + + + + [CII-DT-079] - StartDateFlexibilityCode shall not be used. + + + + + + + + + CII-DT-080 + fatal + + + + [CII-DT-080] - ContinuousIndicator shall not be used. + + + + + + + + + CII-DT-081 + fatal + + + + [CII-DT-081] - PurposeCode shall not be used. + + + + + + + + + + + + + + CII-DT-082 + fatal + + + + [CII-DT-082] - ID shall not be used. + + + + + + + + + CII-DT-083 + fatal + + + + [CII-DT-083] - PostOfficeBox shall not be used. + + + + + + + + + CII-DT-084 + fatal + + + + [CII-DT-084] - BuildingName shall not be used. + + + + + + + + + CII-DT-086 + fatal + + + + [CII-DT-086] - LineFour shall not be used. + + + + + + + + + CII-DT-087 + fatal + + + + [CII-DT-087] - LineFive shall not be used. + + + + + + + + + CII-DT-088 + fatal + + + + [CII-DT-088] - StreetName shall not be used. + + + + + + + + + CII-DT-089 + fatal + + + + [CII-DT-089] - CitySubDivisionName shall not be used. + + + + + + + + + CII-DT-090 + fatal + + + + [CII-DT-090] - CountryName shall not be used. + + + + + + + + + CII-DT-091 + fatal + + + + [CII-DT-091] - CountrySubDivisionID shall not be used. + + + + + + + + + CII-DT-092 + fatal + + + + [CII-DT-092] - AttentionOf shall not be used. + + + + + + + + + CII-DT-093 + fatal + + + + [CII-DT-093] - CareOf shall not be used. + + + + + + + + + CII-DT-094 + fatal + + + + [CII-DT-094] - BuildingNumber shall not be used. + + + + + + + + + CII-DT-095 + fatal + + + + [CII-DT-095] - DepartmentName shall not be used. + + + + + + + + + CII-DT-096 + fatal + + + + [CII-DT-096] - AdditionalStreetName shall not be used. + + + + + + + + + + + + + + CII-DT-097 + fatal + + + + [CII-DT-097] - Date time string with format attribute 102 shall be YYYYMMDD. + + + + + + + + + + + + + + + + + + + BR-CL-01 + fatal + + + + [BR-CL-01]-The document type code MUST be coded by the invoice and credit note related code lists of UNTDID 1001. + + + + + + + + + + + + + + BR-CL-03 + fatal + + + + [BR-CL-03]-currencyID MUST be coded using ISO code list 4217 alpha-3 + + + + + + + + + + + + + + BR-CL-04 + fatal + + + + [BR-CL-04]-Invoice currency code MUST be coded using ISO code list 4217 alpha-3 + + + + + + + + + + + + + + BR-CL-05 + fatal + + + + [BR-CL-05]-Tax currency code MUST be coded using ISO code list 4217 alpha-3 + + + + + + + + + + + + + + BR-CL-06 + fatal + + + + [BR-CL-06]-Value added tax point date code MUST be coded using a restriction of UNTDID 2475. + + + + + + + + + + + + + + BR-CL-07 + fatal + + + + [BR-CL-07]-Object identifier identification scheme identifier MUST be coded using a restriction of UNTDID 1153. + + + + + + + + + + + + + + BR-CL-08 + fatal + + + + [BR-CL-08]-Subject Code MUST be coded using a restriction of UNTDID 4451. + + + + + + + + + + + + + + BR-CL-10 + fatal + + + + [BR-CL-10]-Any identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + BR-CL-11 + fatal + + + + [BR-CL-11]-Any registration identifier identification scheme identifier MUST be coded using one of the ISO 6523 ICD list. + + + + + + + + + + + + + + BR-CL-13 + fatal + + + + [BR-CL-13]-Item classification identifier identification scheme identifier MUST be coded using one of the UNTDID 7143 list. + + + + + + + + + + + + + + BR-CL-14 + fatal + + + + [BR-CL-14]-Country codes in an invoice MUST be coded using ISO code list 3166-1 + + + + + + + + + + + + + + BR-CL-15 + fatal + + + + [BR-CL-15]-Country codes in an invoice MUST be coded using ISO code list 3166-1 + + + + + + + + + + + + + + BR-CL-16 + fatal + + + + [BR-CL-16]-Payment means in an invoice MUST be coded using UNTDID 4461 code list + + + + + + + + + + + + + + BR-CL-17 + fatal + + + + [BR-CL-17]-Invoice tax categories MUST be coded using UNCL 5305 code list + + + + + + + + + + + + + + BR-CL-18 + fatal + + + + [BR-CL-18]-Invoice tax categories MUST be coded using UNCL 5305 code list + + + + + + + + + + + + + + BR-CL-19 + fatal + + + + [BR-CL-19]-Coded allowance reasons MUST belong to the UNCL 5189 code list + + + + + + + + + + + + + + BR-CL-20 + fatal + + + + [BR-CL-20]-Coded charge reasons MUST belong to the UNCL 7161 code list + + + + + + + + + + + + + + BR-CL-21 + fatal + + + + [BR-CL-21]-Item standard identifier scheme identifier MUST belong to the ISO 6523 ICD + code list + + + + + + + + + + + + + + BR-CL-22 + fatal + + + + [BR-CL-22]-Tax exemption reason code identifier scheme identifier MUST belong to the CEF VATEX code list + + + + + + + + + + + + + + BR-CL-23 + fatal + + + + [BR-CL-23]-Unit code MUST be coded according to the UN/ECE Recommendation 20 with Rec 21 extension + + + + + + + + + + + + + + BR-CL-24 + fatal + + + + [BR-CL-24]-For Mime code in attribute use MIMEMediaType. + + + + + + + + + + + + + + BR-CL-25 + fatal + + + + [BR-CL-25]-Endpoint identifier scheme identifier MUST belong to the CEF EAS code list + + + + + + + + + + + + + + BR-CL-26 + fatal + + + + [BR-CL-26]-Delivery location identifier scheme identifier MUST belong to the ISO 6523 ICD + code list + + + + + + + + + + diff --git a/app/Services/EDocument/Standards/ZugferdEDocument.php b/app/Services/EDocument/Standards/ZugferdEDocument.php index 71dd63c44bf..e6893a23ea9 100644 --- a/app/Services/EDocument/Standards/ZugferdEDocument.php +++ b/app/Services/EDocument/Standards/ZugferdEDocument.php @@ -52,10 +52,8 @@ public function __construct(public \App\Models\Invoice | \App\Models\Quote | \Ap public function run(): self { - /** @var \App\Models\Company $company */ $this->company = $this->document->company; - /** @var \App\Models\Client $client */ $this->client = $this->document->client; $profile = $this->client->getSetting('e_invoice_type'); @@ -86,12 +84,39 @@ public function run(): self ->setPaymentMeans() // 2. Then payment means ->setPaymentTerms() // 3. Then payment terms ->setLineItems() // 4. Then line items + ->setCustomSurcharges() // 4a. Surcharges ->setDocumentSummation(); // 5. Finally document summation return $this; } + private function setCustomSurcharges(): self + { + $item = $this->calc->getTaxMap()->first(); + + if($this->document->custom_surcharge1 > 0){ + $surcharge = $this->document->uses_inclusive_taxes ? ($this->document->custom_surcharge1 / (1 + ($item["tax_rate"] / 100))) : $this->document->custom_surcharge1; + $this->xdocument->addDocumentAllowanceCharge($surcharge, true, $this->getTaxType($item["tax_id"] ?? '2'), "VAT", $item["tax_rate"]); + } + + if($this->document->custom_surcharge2 > 0){ + $surcharge = $this->document->uses_inclusive_taxes ? ($this->document->custom_surcharge2 / (1 + ($item["tax_rate"] / 100))) : $this->document->custom_surcharge2; + $this->xdocument->addDocumentAllowanceCharge($surcharge, true, $this->getTaxType($item["tax_id"] ?? '2'), "VAT", $item["tax_rate"]); + } + + if($this->document->custom_surcharge3 > 0){ + $surcharge = $this->document->uses_inclusive_taxes ? ($this->document->custom_surcharge3 / (1 + ($item["tax_rate"] / 100))) : $this->document->custom_surcharge3; + $this->xdocument->addDocumentAllowanceCharge($surcharge, true, $this->getTaxType($item["tax_id"] ?? '2'), "VAT", $item["tax_rate"]); + } + + if($this->document->custom_surcharge4 > 0){ + $surcharge = $this->document->uses_inclusive_taxes ? ($this->document->custom_surcharge4 / (1 + ($item["tax_rate"] / 100))) : $this->document->custom_surcharge4; + $this->xdocument->addDocumentAllowanceCharge($surcharge, true, $this->getTaxType($item["tax_id"] ?? '2'), "VAT", $item["tax_rate"]); + } + + return $this; + } private function setDocumentTaxes(): self { @@ -109,19 +134,23 @@ private function setDocumentTaxes(): self return $this; } - // Get document level discount - // $document_discount = $this->calc->getTotalDiscount(); - // $total_taxable = $this->getTaxable(); - $net_subtotal = $this->calc->getNetSubTotal(); - + $tax_map = $this->calc->getTaxMap(); + $net_subtotal = $tax_map->sum('base_amount'); + + $total_tax = $this->calc->getTotalTaxes(); + $taxable_amount = $this->document->amount - $total_tax; + + //taxable amount and net subtotal should be the same + $adjustment = round($taxable_amount-$net_subtotal,2); + // Process each tax rate group - foreach ($this->calc->getTaxMap() as $item) { + foreach ($tax_map as $item) { $tax_type = $this->getTaxType($item["tax_id"]); // Add tax information $this->xdocument->addDocumentTax( $tax_type, "VAT", - $item["base_amount"], // Taxable amount after discount + $item["base_amount"]+$adjustment, // Taxable amount after discount $item["total"], $item["tax_rate"], $tax_type == ZugferdDutyTaxFeeCategories::VAT_EXEMPT_FOR_EEA_INTRACOMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES @@ -142,8 +171,7 @@ private function setDocumentTaxes(): self ); } - - + $adjustment = 0; } return $this; @@ -184,33 +212,50 @@ private function bootFlags(): self private function setDocumentSummation(): self { $document_discount = $this->calc->getTotalDiscount(); - $total_tax = $this->calc->getTotalTaxes(); - $subtotal = $this->calc->getTotal() - $total_tax; + $total_tax = round($this->calc->getTotalTaxes(),2); + $taxable_amount = $this->document->amount - $total_tax; + $base_taxable_amount = $this->calc->getTaxMap()->sum('base_amount'); + + // $subtotal = $this->document->uses_inclusive_taxes ? ($this->calc->getSubTotal() - $total_tax) : ($this->calc->getSubTotal()); + + + $subtotal = $this->document->uses_inclusive_taxes ? ($taxable_amount - $this->calc->getTotalNetSurcharges()) : ($this->calc->getSubTotal()); + + nlog($this->calc->getTotalTaxes()); + nlog($this->calc->getSubTotal()); + nlog($this->calc->getTotalSurcharges()); + + nlog($this->calc->getSubTotal() - $this->calc->getTotalSurcharges() - $this->calc->getTotalTaxes()); + nlog($this->document->total_taxes); + +// $subtotal = $this->document->uses_inclusive_taxes ? ($this->calc->getNetSubTotal() - $total_tax) : ($this->calc->getSubTotal()); // Calculate amounts after discount - $taxable_amount = $this->getTaxable(); + nlog([ $this->document->amount, // Total amount with VAT $this->document->balance, // Amount due - $this->calc->getSubTotal(), // Sum before tax + $subtotal, // Sum before tax $this->calc->getTotalSurcharges(), // Total charges $document_discount, // Total allowances $taxable_amount, // Tax basis total (net) $total_tax, // Total tax amount - 0.0, // Total prepaid amount + 0, + // round($this->document->amount - ($base_taxable_amount+$total_tax),2), // Total prepaid amount $this->document->amount - $this->document->balance, ]); $this->xdocument->setDocumentSummation( $this->document->amount, // Total amount with VAT $this->document->balance, // Amount due - $this->calc->getSubTotal(), // Sum before tax - $this->calc->getTotalSurcharges(), // Total charges + $subtotal, // Sum before tax + $this->document->uses_inclusive_taxes ? $this->calc->getTotalNetSurcharges() : $this->calc->getTotalSurcharges(), // Total charges $document_discount, // Total allowances $taxable_amount, // Tax basis total (net) - $total_tax, // Total tax amount - 0.0, // Total prepaid amount + round($total_tax,2), // Total tax amount + 0, + // round($this->document->amount - ($base_taxable_amount+$total_tax),2), // Total rounding amount $this->document->amount - $this->document->balance // Amount already paid ); @@ -252,6 +297,8 @@ private function setLineItems(): self ); } + $line_discount = 0; + // 3. Add allowances/charges (discounts) if any if($item->discount > 0) { $line_discount = $this->calculateTotalItemDiscountAmount($item); @@ -260,9 +307,8 @@ private function setLineItems(): self false ); } - // 4. Finally add monetary summation - $this->xdocument->setDocumentPositionLineSummation($item->line_total); + $this->xdocument->setDocumentPositionLineSummation($this->document->uses_inclusive_taxes ? ($item->line_total-$item->tax_amount) : $item->line_total); } return $this; @@ -278,20 +324,6 @@ private function calculateTotalItemDiscountAmount($item): float } - private function setClientTaxRegistration(): self - { - if (empty($this->client->vat_number)) { - - return $this; - - } - - $this->xdocument->addDocumentBuyerTaxRegistration("VA", $this->client->vat_number); - - return $this; - - } - private function setCompanyTaxRegistration(): array { if (str_contains($this->company->getSetting('vat_number'), "/")) @@ -343,7 +375,7 @@ private function setPaymentMeans(): self private function setDeliveryAddress(): self { - if (isset($client->shipping_address1) && $client->shipping_country) { + if (isset($this->client->shipping_address1) && $this->client->shipping_country) { $this->xdocument->setDocumentShipToAddress( $this->client->shipping_address1, $this->client->shipping_address2, @@ -491,52 +523,4 @@ private function getTaxType(string $tax_id): string return $tax_type; } - private function getTaxable(): float - { - $total = 0; - - foreach ($this->document->line_items as $item) { - $line_total = $item->quantity * $item->cost; - - if ($item->discount != 0) { - if ($this->document->is_amount_discount) { - $line_total -= $item->discount; - } else { - $line_total -= $line_total * $item->discount / 100; - } - } - - $total += $line_total; - } - - $total = round($total, 2); - - if ($this->document->discount > 0) { - if ($this->document->is_amount_discount) { - $total -= $this->document->discount; - } else { - $total *= (100 - $this->document->discount) / 100; - - } - } - - //** Surcharges are taxable regardless, if control is needed over taxable components, add it as a line item! */ - if ($this->document->custom_surcharge1 > 0) { - $total += $this->document->custom_surcharge1; - } - - if ($this->document->custom_surcharge2 > 0) { - $total += $this->document->custom_surcharge2; - } - - if ($this->document->custom_surcharge3 > 0) { - $total += $this->document->custom_surcharge3; - } - - if ($this->document->custom_surcharge4 > 0) { - $total += $this->document->custom_surcharge4; - } - - return round($total, 2); - } } diff --git a/app/Services/Template/TemplateService.php b/app/Services/Template/TemplateService.php index ed1ed2839a5..d9e8061d340 100644 --- a/app/Services/Template/TemplateService.php +++ b/app/Services/Template/TemplateService.php @@ -37,6 +37,7 @@ use App\Utils\Traits\MakesDates; use App\Utils\HostedPDF\NinjaPdf; use App\Utils\Traits\Pdf\PdfMaker; +use Illuminate\Support\Facades\App; use Twig\Extra\Intl\IntlExtension; use League\CommonMark\CommonMarkConverter; use Twig\Extra\Markdown\MarkdownExtension; @@ -89,7 +90,6 @@ public function __construct(public ?Design $template = null) */ private function init(): self { - $this->commonmark = new CommonMarkConverter([ 'allow_unsafe_links' => false, ]); @@ -141,7 +141,7 @@ public function load($class) $this->twig->addFilter($filter); $allowedTags = ['if', 'for', 'set', 'filter']; - $allowedFilters = ['split','replace', 'escape', 'e', 'upper', 'lower', 'capitalize', 'filter', 'length', 'merge','format_currency', 'format_number','format_percent_number','map', 'join', 'first', 'date', 'sum', 'number_format','nl2br','striptags','markdown_to_html']; + $allowedFilters = ['format_spellout_number','split','replace', 'escape', 'e', 'upper', 'lower', 'capitalize', 'filter', 'length', 'merge','format_currency', 'format_number','format_percent_number','map', 'join', 'first', 'date', 'sum', 'number_format','nl2br','striptags','markdown_to_html']; $allowedFunctions = ['range', 'cycle', 'constant', 'date','img','t']; $allowedProperties = ['type_id']; // $allowedMethods = ['img','t']; diff --git a/tests/Integration/Einvoice/ZugferdTest.php b/tests/Integration/Einvoice/ZugferdTest.php new file mode 100644 index 00000000000..b3163c30736 --- /dev/null +++ b/tests/Integration/Einvoice/ZugferdTest.php @@ -0,0 +1,432 @@ +markTestSkipped("do not run in CI"); + } + + $this->withoutMiddleware( + ThrottleRequests::class + ); + + + $this->makeTestData(); + + } + + + private function setupTestData(array $params = []): array + { + + $settings = CompanySettings::defaults(); + $settings->vat_number = $params['company_vat'] ?? 'DE123456789'; + $settings->id_number = $params['company_id_number'] ?? ''; + $settings->classification = $params['company_classification'] ?? 'business'; + $settings->country_id = Country::where('iso_3166_2', 'DE')->first()->id; + $settings->email = $this->faker->safeEmail(); + $settings->e_invoice_type = 'XInvoice_3_0'; + $settings->currency_id = '3'; + $settings->name = 'Test Company'; + $settings->address1 = 'Line 1 of address of the seller'; + // $settings->address2 = 'Line 2 of address of the seller'; + $settings->city = 'Hamburg'; + // $settings->state = 'Berlin'; + $settings->postal_code = 'X123433'; + + $tax_data = new TaxModel(); + $tax_data->regions->EU->has_sales_above_threshold = $params['over_threshold'] ?? false; + $tax_data->regions->EU->tax_all_subregions = true; + $tax_data->seller_subregion = $params['company_country'] ?? 'DE'; + + $einvoice = new \InvoiceNinja\EInvoice\Models\Peppol\Invoice(); + + $fib = new \InvoiceNinja\EInvoice\Models\Peppol\BranchType\FinancialInstitutionBranch(); + $fib->ID = "DEUTDEMMXXX"; //BIC + + $pfa = new \InvoiceNinja\EInvoice\Models\Peppol\FinancialAccountType\PayeeFinancialAccount(); + $id = new \InvoiceNinja\EInvoice\Models\Peppol\IdentifierType\ID(); + $id->value = 'DE89370400440532013000'; + $pfa->ID = $id; + $pfa->Name = 'PFA-NAME'; + + $pfa->FinancialInstitutionBranch = $fib; + + $pm = new \InvoiceNinja\EInvoice\Models\Peppol\PaymentMeans(); + $pm->PayeeFinancialAccount = $pfa; + + $pmc = new \InvoiceNinja\EInvoice\Models\Peppol\CodeType\PaymentMeansCode(); + $pmc->value = '30'; + + $pm->PaymentMeansCode = $pmc; + + $einvoice->PaymentMeans[] = $pm; + + $stub = new \stdClass(); + $stub->Invoice = $einvoice; + + $this->company->settings = $settings; + $this->company->tax_data = $tax_data; + $this->company->calculate_taxes = true; + $this->company->legal_entity_id = 290868; + $this->company->e_invoice = $stub; + $this->company->save(); + $company = $this->company; + + $client = Client::factory()->create([ + 'user_id' => $this->user->id, + 'company_id' => $this->company->id, + 'country_id' => Country::where('iso_3166_2', $params['client_country'] ?? 'FR')->first()->id, + 'vat_number' => $params['client_vat'] ?? '', + 'classification' => $params['classification'] ?? 'individual', + 'has_valid_vat_number' => $params['has_valid_vat'] ?? false, + 'name' => 'Test Client', + 'is_tax_exempt' => $params['is_tax_exempt'] ?? false, + 'id_number' => $params['client_id_number'] ?? '', + ]); + + $contact = ClientContact::factory()->create([ + 'client_id' => $client->id, + 'company_id' =>$client->company_id, + 'user_id' => $client->user_id, + 'first_name' => $this->faker->firstName(), + 'last_name' => $this->faker->lastName(), + 'email' => $this->faker->safeEmail() + ]); + + $invoice = \App\Models\Invoice::factory()->create([ + 'client_id' => $client->id, + 'company_id' => $this->company->id, + 'user_id' => $this->user->id, + 'date' => now()->addDay()->format('Y-m-d'), + 'due_date' => now()->addDays(2)->format('Y-m-d'), + 'uses_inclusive_taxes' => false, + 'tax_rate1' => 0, + 'tax_name1' => '', + 'tax_rate2' => 0, + 'tax_name2' => '', + 'tax_rate3' => 0, + 'tax_name3' => '', + ]); + + $items = $invoice->line_items; + foreach($items as &$item) + { + $item->tax_name2 = ''; + $item->tax_rate2 = 0; + $item->tax_name3 = ''; + $item->tax_rate3 = 0; + $item->uses_inclusive_taxes = false; + } + unset($item); + + $invoice->line_items = array_values($items); + $invoice = $invoice->calc()->getInvoice(); + + return compact('company', 'client', 'invoice'); + } + + + public function testZugFerdValidation() + { + + $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + + // $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt'; + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $invoice = $invoice->calc()->getInvoice(); + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + } + + + public function testZugFerdValidationWithInclusiveTaxes() + { + + $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + + // $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt'; + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $invoice->uses_inclusive_taxes = true; + $invoice = $invoice->calc()->getInvoice(); + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + } + + + public function testZugFerdValidationWithInclusiveTaxesAndTotalAmountDiscount() + { + + $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + + // $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt'; + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $invoice->uses_inclusive_taxes = true; + $invoice = $invoice->calc()->getInvoice(); + $invoice->discount=20; + $invoice->is_amount_discount = true; + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + } + + + public function testZugFerdValidationWithInclusiveTaxesAndTotalPercentDiscount() + { + + $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + + // $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt'; + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $invoice->uses_inclusive_taxes = true; + $invoice = $invoice->calc()->getInvoice(); + $invoice->discount=20; + $invoice->is_amount_discount = false; + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + } + + public function testZugFerdValidationWithInclusiveTaxesAndTotalPercentDiscountOnLineItemsAlso() + { + + $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + + // $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt'; + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $invoice->uses_inclusive_taxes = true; + $invoice = $invoice->calc()->getInvoice(); + $invoice->discount=20; + $invoice->is_amount_discount = false; + + $items = $invoice->line_items; + + foreach($items as &$item){ + $item->discount=10; + $item->is_amount_discount = false; + } + unset($item); + + $invoice->line_items = $items; + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + } + + + public function testZugFerdValidationWithInclusiveTaxesAndTotalAmountDiscountOnLineItemsAlso() + { + + $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $invoice->uses_inclusive_taxes = true; + $invoice = $invoice->calc()->getInvoice(); + $invoice->discount=20; + $invoice->is_amount_discount = true; + + $items = $invoice->line_items; + + foreach($items as &$item){ + $item->discount=5; + $item->is_amount_discount = true; + } + unset($item); + + $invoice->line_items = $items; + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + } +} From 173ae034492e298cf5c88cbb2e2744e36f6fbd0d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 20 Jan 2025 22:44:48 +1100 Subject: [PATCH 09/15] Working on zugferd calculations - with surcharges --- app/Services/EDocument/Standards/ZugferdEDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/EDocument/Standards/ZugferdEDocument.php b/app/Services/EDocument/Standards/ZugferdEDocument.php index e6893a23ea9..16656293456 100644 --- a/app/Services/EDocument/Standards/ZugferdEDocument.php +++ b/app/Services/EDocument/Standards/ZugferdEDocument.php @@ -216,10 +216,10 @@ private function setDocumentSummation(): self $taxable_amount = $this->document->amount - $total_tax; $base_taxable_amount = $this->calc->getTaxMap()->sum('base_amount'); - // $subtotal = $this->document->uses_inclusive_taxes ? ($this->calc->getSubTotal() - $total_tax) : ($this->calc->getSubTotal()); + $subtotal = $this->document->uses_inclusive_taxes ? ($this->calc->getTotal() - $total_tax - $this->calc->getTotalNetSurcharges() + $this->calc->getTotalDiscount()) : ($this->calc->getSubTotal()); - $subtotal = $this->document->uses_inclusive_taxes ? ($taxable_amount - $this->calc->getTotalNetSurcharges()) : ($this->calc->getSubTotal()); + // $subtotal = $this->document->uses_inclusive_taxes ? ($taxable_amount - $this->calc->getTotalNetSurcharges()) : ($this->calc->getSubTotal()); nlog($this->calc->getTotalTaxes()); nlog($this->calc->getSubTotal()); From e7b5b5b4e1ecdb86ed35c7a3e349f762eb2fef08 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jan 2025 08:20:51 +1100 Subject: [PATCH 10/15] Updates for stripe form handling --- resources/views/portal/ninja2020/plan/trial.blade.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/views/portal/ninja2020/plan/trial.blade.php b/resources/views/portal/ninja2020/plan/trial.blade.php index f7cb93c7e00..cd0164ef660 100644 --- a/resources/views/portal/ninja2020/plan/trial.blade.php +++ b/resources/views/portal/ninja2020/plan/trial.blade.php @@ -1836,6 +1836,10 @@ class="bg-primary-blue hover:opacity-80 text-white text-center button w-full p-[ const form = document.getElementById('card-form'); +form.addEventListener('submit', (event) => { + event.preventDefault(); // Prevent default form submission +}); + var e = document.getElementById("country"); var country_value = e.options[e.selectedIndex].value; From a79f785653927c2c26e9d2a3eed4dd47234eb801 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jan 2025 08:21:16 +1100 Subject: [PATCH 11/15] Updates for stripe form handling --- app/Services/Template/TemplateService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Template/TemplateService.php b/app/Services/Template/TemplateService.php index ed1ed2839a5..1c28e3e61a9 100644 --- a/app/Services/Template/TemplateService.php +++ b/app/Services/Template/TemplateService.php @@ -141,7 +141,7 @@ public function load($class) $this->twig->addFilter($filter); $allowedTags = ['if', 'for', 'set', 'filter']; - $allowedFilters = ['split','replace', 'escape', 'e', 'upper', 'lower', 'capitalize', 'filter', 'length', 'merge','format_currency', 'format_number','format_percent_number','map', 'join', 'first', 'date', 'sum', 'number_format','nl2br','striptags','markdown_to_html']; + $allowedFilters = ['format_spellout_number', 'split','replace', 'escape', 'e', 'upper', 'lower', 'capitalize', 'filter', 'length', 'merge','format_currency', 'format_number','format_percent_number','map', 'join', 'first', 'date', 'sum', 'number_format','nl2br','striptags','markdown_to_html']; $allowedFunctions = ['range', 'cycle', 'constant', 'date','img','t']; $allowedProperties = ['type_id']; // $allowedMethods = ['img','t']; From a879e9391e3c5a846c176eb4eeccfc9230c600ae Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jan 2025 09:41:30 +1100 Subject: [PATCH 12/15] Minor fixes for buttons --- app/Services/Pdf/Purify.php | 2 +- app/Utils/HtmlEngine.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/Pdf/Purify.php b/app/Services/Pdf/Purify.php index b737dd58dde..444e6ef1cb5 100644 --- a/app/Services/Pdf/Purify.php +++ b/app/Services/Pdf/Purify.php @@ -18,7 +18,7 @@ class Purify // Text Elements 'span', 'strong', 'em', 'b', 'i', 'u', 'small', - 'sub', 'sup', 'del', 'ins', + 'sub', 'sup', 'del', 'ins', // Line Breaks 'br', 'hr', diff --git a/app/Utils/HtmlEngine.php b/app/Utils/HtmlEngine.php index 1e81c04787d..b8b5d52fa74 100644 --- a/app/Utils/HtmlEngine.php +++ b/app/Utils/HtmlEngine.php @@ -1202,7 +1202,7 @@ private function buildViewButton(string $link, string $text): string - '. $text .' + '. $text .' From 87d6645ddb0970d23d887ba5451fd6fd89250ad5 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jan 2025 11:07:14 +1100 Subject: [PATCH 13/15] Add opt in for this zugferd builder --- app/Jobs/EDocument/CreateEDocument.php | 12 +- config/ninja.php | 1 + tests/Integration/Einvoice/ZugferdTest.php | 148 ++++++++++++++++++++- 3 files changed, 150 insertions(+), 11 deletions(-) diff --git a/app/Jobs/EDocument/CreateEDocument.php b/app/Jobs/EDocument/CreateEDocument.php index 26b1efddd35..9a8f7eb3bf3 100644 --- a/app/Jobs/EDocument/CreateEDocument.php +++ b/app/Jobs/EDocument/CreateEDocument.php @@ -87,10 +87,14 @@ public function handle(): string|ZugferdDocumentBuilder case "XInvoice-BasicWL": case "XInvoice-Basic": -// $zugferd = (new ZugferdEDokument($this->document))->run(); - -$zugferd = (new ZugferdEDocument($this->document))->run(); - + // + if(config('ninja.zugferd_version_two')){ + $zugferd = (new ZugferdEDocument($this->document))->run(); + } + else { + $zugferd = (new ZugferdEDokument($this->document))->run(); + } + return $this->returnObject ? $zugferd->xdocument : $zugferd->getXml(); case "Facturae_3.2": case "Facturae_3.2.1": diff --git a/config/ninja.php b/config/ninja.php index d65f56995ac..d81e0b811e7 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -262,4 +262,5 @@ 'hosted_einvoice_secret' => env('HOSTED_EINVOICE_SECRET', null), 'e_invoice_quota_warning' => env('E_INVOICE_QUOTA_WARNING', 15), 'disable_purify_html' => env('DISABLE_PURIFY_HTML', false), + 'zugferd_version_two' => env('ZUGFERD_VERSION_TWO', false), ]; diff --git a/tests/Integration/Einvoice/ZugferdTest.php b/tests/Integration/Einvoice/ZugferdTest.php index b3163c30736..59c1bab3b86 100644 --- a/tests/Integration/Einvoice/ZugferdTest.php +++ b/tests/Integration/Einvoice/ZugferdTest.php @@ -23,6 +23,7 @@ use App\DataMapper\Tax\TaxModel; use App\DataMapper\ClientSettings; use App\DataMapper\CompanySettings; +use App\Repositories\InvoiceRepository; use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\Foundation\Testing\DatabaseTransactions; @@ -31,6 +32,42 @@ class ZugferdTest extends TestCase use MockAccountData; use DatabaseTransactions; + // 1. surcharges inclusive taxes and discounts amount total amount and line items + // 2. surcharges inclusive taxes and discounts amount total percent and line items + // 3. surcharges inclusive taxes and discounts amount total percent + // 4. surcharges inclusive taxes and discounts amount total + // 5. surcharges inclusive taxes + // 6. surcharges + // 7. Exclusive TAXES +DISC+amount+linedisc + // 8. Exclusive TAXES +DISC+perc+linedisc + // 9. INCLUSIVE TAXES +DISC+amount+linedisc + // 10. INCLUSIVE TAXES +DISC+per+linedisc + // 11. INCLUSIVE TAXES +DISC+amount + // 12. INCLUSIVE TAXES +DISC + // 13. INCLUSIVE TAXES + // 14. TOTAL DISCOUNT + // 15. NO DISCOUNTS + + private array $inclusive_scenarios = [ + '{"status_id":1,"number":"V2025-0419","discount":"11.000000","is_amount_discount":true,"po_number":"surcharges inclusive taxes and discounts amount total amount and line items","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"d5be23a5-2d2a-4f86-af38-778dfca3e819","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1117.58,"tax_amount":178.29,"gross_line_total":1117.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":312.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"d48502a3-0929-40e0-bfa2-062b4240ee61","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"33","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":92.78,"gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.77,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"92378d04-f9e9-4f7c-9041-927d7d6b9b12","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":359.79,"gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.21,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"4c2c85cc-4281-4e3b-8142-234b2e8a89fd","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":126.02,"gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.1,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"e9e31815-7c1b-4e3e-9107-0e639840abf2","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1276.97,"gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.09,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"7c64d513-d525-45be-8608-b00dc841bc1d","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":107.9,"gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.3,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"uses_inclusive_taxes":1,"custom_surcharge1":"123.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"13537.150000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null}', + '{"assigned_user_id":null,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0418","discount":"10.000000","is_amount_discount":false,"po_number":"surcharges inclusive taxes and discounts amount total percent and line items","date":"2025-01-20","last_sent_date":null,"due_date":"2025-02-19","is_deleted":false,"line_items":[{"_id":"acef1cc3-96da-47db-ba03-4f08ab10d0eb","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1014.82,"tax_amount":"145.83","gross_line_total":1014.82,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":255.84,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"122eab54-d048-4afb-94bd-0ad5f08589e3","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":"83.57","gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":146.62,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"b38cebe8-3ca2-4d51-921a-90cadd2befe6","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":"324.08","gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":568.56,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"14699f8b-87b1-41e0-9812-bf7386b50268","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":"113.52","gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":199.15,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"4ed0b507-e31a-4b90-a269-9d3021a29630","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":"1150.21","gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":605.38,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"42083848-bb2c-4789-b8b6-515e4bea5b45","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":"97.19","gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":170.51,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":"

Footer:<\/strong> If you have any questions regarding this invoice, please contact us at [email\/phone number]. Thank you for your business! All payments should be made to [Company Name] via [Payment Methods, e.g., bank transfer, credit card, etc.]. Our banking details are listed above for your convenience.<\/p>","public_notes":null,"terms":"

Terms:<\/strong> Payment is due within 30 days from the invoice date unless otherwise agreed in writing. Late payments may incur interest at a rate of [specify rate, e.g., 1.5% per month] from the due date. Please include the invoice number when making payments to ensure proper allocation.<\/p>","tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"1934.040000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":"2025-01-21 01:00:00","custom_surcharge1":"123.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"12113.150000","balance":"12113.150000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737373562,"updated_at":1737415557,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"YQdJWA9eOG","status":-2}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0417","discount":"10.000000","is_amount_discount":false,"po_number":"surcharges inclusive taxes and discounts amount total percent","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"cc269f6f-3974-41bb-ab12-c3fb5e837a1c","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":"162.03","gross_line_total":1127.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":284.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"6e81fcf0-2e11-4015-bce7-1ed5cb859512","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":"83.57","gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":146.62,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"be1a65c1-a42d-46a7-b988-2735adc71f58","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":"324.08","gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":568.56,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"a09f1edb-f581-4fd2-86d0-572c2aef6f07","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":"113.52","gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":199.15,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"0c4529cb-e91c-4c33-b742-2014c0b72e0b","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":"1150.21","gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":605.38,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"65a1fd4f-682a-4d38-82b9-69687949cd89","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":"97.19","gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":170.51,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":"

Footer:<\/strong> If you have any questions regarding this invoice, please contact us at [email\/phone number]. Thank you for your business! All payments should be made to [Company Name] via [Payment Methods, e.g., bank transfer, credit card, etc.]. Our banking details are listed above for your convenience.<\/p>","public_notes":null,"terms":"

Terms:<\/strong> Payment is due within 30 days from the invoice date unless otherwise agreed in writing. Late payments may incur interest at a rate of [specify rate, e.g., 1.5% per month] from the due date. Please include the invoice number when making payments to ensure proper allocation.<\/p>","tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"1950.240000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"123.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"12214.630000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737373538,"updated_at":1737373538,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"YRdGWxrdDz","status":1}', + '{"assigned_user_id":null,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0416","discount":"10.000000","is_amount_discount":true,"po_number":"surcharges inclusive taxes and discounts amount total","date":"2025-01-20","last_sent_date":null,"due_date":"2025-02-19","is_deleted":false,"line_items":[{"_id":"815ea432-eadc-41ce-aa5f-42060cd2adc6","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":179.9,"gross_line_total":1127.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":315.61,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"4b895f38-e8a0-45c4-87e0-0b6f612d1ff6","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":92.79,"gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"484565c9-4055-4e2e-9a24-150ca2773658","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":359.82,"gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"2acb1625-e632-4c9c-ae31-8cc291c4dbed","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":126.03,"gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.11,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"3df61628-becb-40c0-aed5-cd0989b93ff2","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1277.06,"gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"a49cf0a7-d529-4543-9eee-19df9024a544","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":107.91,"gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.31,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":"

Footer:<\/strong> If you have any questions regarding this invoice, please contact us at [email\/phone number]. Thank you for your business! All payments should be made to [Company Name] via [Payment Methods, e.g., bank transfer, credit card, etc.]. Our banking details are listed above for your convenience.<\/p>","public_notes":null,"terms":"

Terms:<\/strong> Payment is due within 30 days from the invoice date unless otherwise agreed in writing. Late payments may incur interest at a rate of [specify rate, e.g., 1.5% per month] from the due date. Please include the invoice number when making payments to ensure proper allocation.<\/p>","tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2163.150000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":"2025-01-21 01:00:00","custom_surcharge1":"123.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"13548.150000","balance":"13548.150000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737373514,"updated_at":1737414252,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"4oeEWvmb0B","status":-2}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0415","discount":"0.000000","is_amount_discount":true,"po_number":"surcharges inclusive taxes","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"ee8fc6cc-7a56-4fca-a5fc-b842ef28d414","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":180.03,"gross_line_total":1127.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":315.85,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"bbb5090d-094e-46e3-b545-0d0569f3deb1","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":92.86,"gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.91,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"47150725-8659-4c77-b3b1-425a9ddfaf41","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":360.09,"gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.73,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"e6f1dd96-6342-4090-83f1-2db8cf7a1d70","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":126.13,"gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.28,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"0febc16b-5e6b-4105-bb73-00fef81f0c56","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1278.01,"gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.64,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"d9256048-3fa5-43e7-b09f-160c8ac39de6","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":107.99,"gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.45,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":"

Footer:<\/strong> If you have any questions regarding this invoice, please contact us at [email\/phone number]. Thank you for your business! All payments should be made to [Company Name] via [Payment Methods, e.g., bank transfer, credit card, etc.]. Our banking details are listed above for your convenience.<\/p>","public_notes":null,"terms":"

Terms:<\/strong> Payment is due within 30 days from the invoice date unless otherwise agreed in writing. Late payments may incur interest at a rate of [specify rate, e.g., 1.5% per month] from the due date. Please include the invoice number when making payments to ensure proper allocation.<\/p>","tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2164.750000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"123.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"13558.150000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737354726,"updated_at":1737363334,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"BDbDWrAal2","status":1}', + '{"assigned_user_id":null,"status_id":4,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0414","discount":"0.000000","is_amount_discount":true,"po_number":"surcharges","date":"2025-01-20","last_sent_date":null,"due_date":"2025-02-19","is_deleted":false,"line_items":[{"_id":"8e1f8f95-71a1-4d95-b042-2fb82527bcb0","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":214.24,"gross_line_total":1341.82,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":312.81,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"dfe998b1-ded4-441a-b545-14fc59bb2b23","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":110.5,"gross_line_total":692.08,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"04779abc-f6f0-430a-96b6-c461834ca126","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":428.5,"gross_line_total":2683.78,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"b46fe9ba-57cd-4a47-bec4-b26d152073ad","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":150.09,"gross_line_total":940.0500000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.11,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"9e08da6b-6c63-4977-a7cf-5a4874173956","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1520.84,"gross_line_total":9525.24,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"8dc7574d-9177-4857-9917-f031b95669b9","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":128.51,"gross_line_total":804.86,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.31,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2576.050000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"123.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"16134.200000","balance":"0.000000","partial":null,"partial_due_date":null,"last_viewed":null,"created_at":1737353147,"updated_at":1737414241,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"16134.200000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"46dB9p2b79","status":4}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0413","discount":"10.000000","is_amount_discount":true,"po_number":"Exclusive TAXES +DISC+amount+linedisc","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"e85b0c8c-c6ef-491a-a3a1-f9bb5748f9db","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1117.58,"tax_amount":212.18,"gross_line_total":1329.76,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":312.81,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"d42329c4-bf31-4420-96da-0afdcc88f8d8","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":110.42,"gross_line_total":692,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"1186564d-2084-41c9-aa7e-049e315125bd","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":428.18,"gross_line_total":2683.46,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"bd5f8f63-bbdb-4e00-8c10-31bf6025ae83","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":149.98,"gross_line_total":939.94,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.11,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"4f9744b4-df4b-4822-b46d-03cf619fb2e2","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1519.7,"gross_line_total":9524.1,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"57898c16-28ca-4f20-9576-564bb3f4a829","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":128.41,"gross_line_total":804.76,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.31,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2548.870000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"15964.020000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737351493,"updated_at":1737417393,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"KQe13pobJY","status":1}', + '{"assigned_user_id":null,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0412","discount":"10.000000","is_amount_discount":false,"po_number":"Exclusive TAXES +DISC+perc+linedisc","date":"2025-01-20","last_sent_date":null,"due_date":"2025-02-19","is_deleted":false,"line_items":[{"_id":"719edafa-25bc-4245-a09d-95e9e643e237","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1014.82,"tax_amount":173.53,"gross_line_total":1188.3500000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":312.81,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"6fedc57a-0fdc-4b52-8465-e3a884d78ffa","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":99.45,"gross_line_total":681.0300000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"58294dae-eb4a-41b1-a925-80404cb4ea38","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":385.65,"gross_line_total":2640.9300000000003,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"5cb2f313-1c27-4f7e-889a-c9651e6e7b4a","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":135.08,"gross_line_total":925.0400000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.11,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"44c86f63-3b1b-4f5a-8a3a-9c0afa95eda4","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1368.75,"gross_line_total":9373.15,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"eb059361-dffe-443f-8f01-acaa986eb641","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":115.66,"gross_line_total":792.01,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.31,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2278.120000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":"2025-01-21 01:00:00","custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"14268.270000","balance":"14268.270000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737351156,"updated_at":1737417445,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"oQeZrGEepZ","status":-2}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0411","discount":"10.000000","is_amount_discount":true,"po_number":"INCLUSIVE TAXES +DISC+amount+linedisc","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"37e101e4-9462-460b-b9e3-87188da13f7d","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1117.58,"tax_amount":178.3,"gross_line_total":1117.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":312.81,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"e5d25491-8a17-42ac-91f9-359b8d0af9b1","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":92.79,"gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"eb4499af-0c18-44ea-a20e-b31c654bf519","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":359.82,"gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"1a9942be-503a-463a-9a95-47d169b8cd12","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":126.03,"gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.11,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"198d88c7-ab59-4544-8090-00afcee73382","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1277.06,"gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"84bb0eab-3fe1-462e-92e2-e5229e362cec","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":107.91,"gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.31,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2141.910000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"13415.150000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737351131,"updated_at":1737417505,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"4QbYqY9bzq","status":1}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0410","discount":"10.000000","is_amount_discount":false,"po_number":"INCLUSIVE TAXES +DISC+per+linedisc","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"1437777f-e583-4b2c-8343-b281929fcb84","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1014.82,"tax_amount":"145.83","gross_line_total":1014.82,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":255.84,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"f318d9e2-6571-487c-9165-384356646988","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":"83.57","gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":146.62,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"77452b0e-310d-4d7d-9d5c-0524d159fbb6","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":"324.08","gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":568.56,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"de8b0d05-63cf-4015-9e66-5fa13d24ad45","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":"113.52","gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":199.15,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"6d431838-185e-406a-b643-08145a92c5af","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":"1150.21","gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":605.38,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"94bc670f-72d0-441b-af9b-79ab60a7bbf8","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":"97.19","gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":170.51,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"1914.400000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"11990.150000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737351110,"updated_at":1737417533,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"QBeXpXleyK","status":1}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0409","discount":"10.000000","is_amount_discount":true,"po_number":"INCLUSIVE TAXES +DISC+amount","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"188776d4-ea51-416e-9e55-8cb21008bad3","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":10,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1117.58,"tax_amount":178.3,"gross_line_total":1117.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":312.81,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"5b347e3b-9e54-4720-9a97-07aed93e9ad2","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":92.79,"gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.79,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"01b623da-6fa8-484e-b80c-ee9ade330720","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":359.82,"gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"477bd5e7-9e03-4cf6-a26c-cf19f606cf47","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":126.03,"gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.11,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"6b3bd92f-8f47-4ad9-b953-223a50f5bff0","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1277.06,"gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"720e9975-881a-43cd-b0c4-13d2afe1037b","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":true,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":107.91,"gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.31,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2141.910000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"13415.150000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737351038,"updated_at":1737417629,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"lNbWoKXbyg","status":1}', + '{"assigned_user_id":null,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0408","discount":"10.000000","is_amount_discount":false,"po_number":"INCLUSIVE TAXES +DISC","date":"2025-01-20","last_sent_date":null,"due_date":"2025-02-19","is_deleted":false,"line_items":[{"_id":"1f240fb7-5b2a-41fd-823f-18f72f7821b0","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":"162.03","gross_line_total":1127.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":284.26,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"b3db4c01-159c-44ca-89de-68a0a8fe32ba","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":"83.57","gross_line_total":581.58,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":146.62,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"34fe45ed-c343-4d2e-9453-4d3941dab014","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":"324.08","gross_line_total":2255.28,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":568.56,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"8a47d310-651a-4915-8d9a-5acdf0ecf1af","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"3","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":"113.52","gross_line_total":789.96,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":199.15,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"bf43fe30-3126-463e-a252-d8a44a05c5cc","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":"1150.21","gross_line_total":8004.4,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":605.38,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"bea7de26-b434-4c1d-8944-ce0b45fd3b59","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":"97.19","gross_line_total":676.35,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":170.51,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"1930.600000","uses_inclusive_taxes":1,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":"2025-01-21 01:00:00","custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"12091.630000","balance":"12091.630000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737342681,"updated_at":1737417655,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"y5eVn29eEP","status":-2}', + '{"assigned_user_id":null,"status_id":2,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0407","discount":"0.000000","is_amount_discount":false,"po_number":"INCLUSIVE TAXES","date":"2025-01-20","last_sent_date":null,"due_date":"2025-02-19","is_deleted":false,"line_items":[{"_id":"83c232de-6564-44df-9c57-5a19a0f3f3a7","quantity":3,"cost":375.86,"product_key":"Adresse des travaux<\/b><\/br>Address of works","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":214.24,"gross_line_total":1341.82,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":315.85,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"de17bee4-0bee-4816-9a3e-c5f8bed14754","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":110.5,"gross_line_total":692.08,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":162.91,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"802af6a4-ba3d-4edf-8f08-b0ffc16e1e66","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":428.5,"gross_line_total":2683.78,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":631.73,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"62f59019-fa78-4ecd-a2ed-fc644f6c72fd","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":150.09,"gross_line_total":940.0500000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":221.28,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"b093f33b-4dc2-4d4f-956f-99d3e266a427","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1520.84,"gross_line_total":9525.24,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":672.64,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"94d43d38-a3b0-4d81-adfc-52749f8993c2","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":128.51,"gross_line_total":804.86,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":189.45,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"1c0b145f-74d5-443b-8d47-66c35d3c3136","quantity":1,"cost":0,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"MwSt.","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":0,"tax_amount":0,"gross_line_total":0,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"1","net_cost":0,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2552.680000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":"2025-01-21 01:00:00","custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"15987.830000","balance":"15987.830000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737338859,"updated_at":1737417694,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"APdRjK0dGy","status":-2}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0406","discount":"5.000000","is_amount_discount":false,"po_number":"TOTAL DISCOUNT","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"6ac927ac-dbef-4dc8-91b9-a79741e272b3","quantity":3,"cost":375.86,"product_key":"","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":203.53,"gross_line_total":1331.11,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":294.12,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"e6c11a74-5ff8-49df-aa33-66579028db08","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":104.98,"gross_line_total":686.5600000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":143.8,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"f5dd855e-a0d0-4203-84f5-99bffe9be095","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":407.08,"gross_line_total":2662.36,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":582.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"c7a4c232-8b0d-41d9-90b1-d3651a3f7f72","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":142.59,"gross_line_total":932.5500000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":0,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"250d9086-90f1-4db6-8698-574f77446ee1","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1444.79,"gross_line_total":9449.189999999999,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":593.74,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"89d38e95-2f50-4536-8567-76d2ac43827c","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":122.08,"gross_line_total":798.4300000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":176.42,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2425.050000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"15188.440000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737331244,"updated_at":1737417740,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"YqaQgKqdnj","status":1}', + '{"assigned_user_id":null,"status_id":1,"project_id":null,"vendor_id":null,"recurring_id":null,"design_id":2,"number":"V2025-0405","discount":"0.000000","is_amount_discount":false,"po_number":"NO DISCOUNTS","date":"2025-01-20","last_sent_date":null,"due_date":null,"is_deleted":false,"line_items":[{"_id":"35b17be0-e101-473c-a85a-979a923c7571","quantity":3,"cost":375.86,"product_key":"","product_cost":0,"notes":"34343","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":1127.58,"tax_amount":214.24,"gross_line_total":1341.82,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":294.12,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"c9f21206-0980-4fd9-912d-7186822dd0c5","quantity":3,"cost":193.86,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":581.58,"tax_amount":110.5,"gross_line_total":692.08,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":143.8,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"a7f5eff6-e569-4eb7-889a-456f24527121","quantity":3,"cost":751.76,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":2255.28,"tax_amount":428.5,"gross_line_total":2683.78,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":582.14,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"da55da19-7cbd-4864-b2a4-7dcadc70c7b1","quantity":3,"cost":263.32,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":789.96,"tax_amount":150.09,"gross_line_total":940.0500000000001,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":0,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"aab699dc-2173-411b-a29d-8b00bc220399","quantity":10,"cost":800.44,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":8004.4,"tax_amount":1520.84,"gross_line_total":9525.24,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":593.74,"task_id":"","expense_id":"","unit_code":"C62"},{"_id":"494d53fb-51de-4f83-9d09-07c30baa3dfc","quantity":3,"cost":225.45,"product_key":"","product_cost":0,"notes":"","discount":0,"is_amount_discount":false,"tax_name1":"mwst","tax_rate1":19,"tax_name2":"","tax_rate2":0,"tax_name3":"","tax_rate3":0,"sort_id":"0","line_total":676.35,"tax_amount":128.51,"gross_line_total":804.86,"date":"","custom_value1":"","custom_value2":"","custom_value3":"","custom_value4":"","type_id":"1","tax_id":"7","net_cost":176.42,"task_id":"","expense_id":"","unit_code":"C62"}],"backup":null,"footer":null,"public_notes":null,"terms":null,"tax_name1":"","tax_rate1":"0.000000","tax_name2":"","tax_rate2":"0.000000","tax_name3":"","tax_rate3":"0.000000","total_taxes":"2552.680000","uses_inclusive_taxes":0,"custom_value1":null,"custom_value2":null,"custom_value3":null,"custom_value4":null,"next_send_date":null,"custom_surcharge1":"0.000000","custom_surcharge2":"0.000000","custom_surcharge3":"0.000000","custom_surcharge4":"0.000000","custom_surcharge_tax1":false,"custom_surcharge_tax2":false,"custom_surcharge_tax3":false,"custom_surcharge_tax4":false,"exchange_rate":"0.945332","amount":"15987.830000","balance":"0.000000","partial":"0.000000","partial_due_date":null,"last_viewed":null,"created_at":1737331204,"updated_at":1737417787,"deleted_at":null,"reminder1_sent":null,"reminder2_sent":null,"reminder3_sent":null,"reminder_last_sent":null,"auto_bill_enabled":1,"paid_to_date":"0.000000","subscription_id":null,"auto_bill_tries":0,"is_proforma":0,"tax_data":null,"e_invoice":null,"sync":null,"gateway_fee":"0.000000","hashed_id":"WZdPWKlbKg","status":1}', + ]; + + private string $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + protected function setUp(): void { parent::setUp(); @@ -67,6 +104,7 @@ private function setupTestData(array $params = []): array $settings->city = 'Hamburg'; // $settings->state = 'Berlin'; $settings->postal_code = 'X123433'; + $settings->enable_e_invoice = true; $tax_data = new TaxModel(); $tax_data->regions->EU->has_sales_above_threshold = $params['over_threshold'] ?? false; @@ -160,11 +198,105 @@ private function setupTestData(array $params = []): array return compact('company', 'client', 'invoice'); } + public function testInclusiveScenarios() + { + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $repo = new InvoiceRepository(); + + foreach($this->inclusive_scenarios as $scenario){ + + $invoice_data = json_decode($scenario, true); + $invoice = $repo->save($invoice_data, $invoice); + $invoice = $invoice->calc()->getInvoice(); + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$this->zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + + nlog($invoice->toArray()); + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + + } + } + + + public function testExclusiveScenarios() + { + + $scenario = [ + 'company_vat' => 'DE923356489', + 'company_country' => 'DE', + 'client_country' => 'DE', + 'client_vat' => 'DE923356488', + 'classification' => 'business', + 'has_valid_vat' => true, + 'over_threshold' => true, + 'legal_entity_id' => 290868, + ]; + + $data = $this->setupTestData($scenario); + + $invoice = $data['invoice']; + $repo = new InvoiceRepository(); + + foreach($this->inclusive_scenarios as $scenario){ + + $invoice_data = json_decode($scenario, true); + + $invoice_data['uses_inclusive_taxes'] = false; + + $invoice = $repo->save($invoice_data, $invoice); + $invoice = $invoice->calc()->getInvoice(); + + $xml = $invoice->service()->getEInvoice(); + + $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); + $validator->setStyleSheets([$this->zug_16931]); + $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); + $validator->validate(); + + if (count($validator->getErrors()) > 0) { + + nlog($invoice->toArray()); + nlog($xml); + nlog($validator->getErrors()); + } + + $this->assertCount(0, $validator->getErrors()); + + + } + } + public function testZugFerdValidation() { - $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/zugferd_16931.xslt'; + // $zug_16931 = 'Services/EDocument/Standards/Validation/Zugferd/FACTUR-X_MINIMUM.xslt'; @@ -187,7 +319,7 @@ public function testZugFerdValidation() $xml = $invoice->service()->getEInvoice(); $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); - $validator->setStyleSheets([$zug_16931]); + $validator->setStyleSheets([$this->zug_16931]); $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); $validator->validate(); @@ -228,7 +360,7 @@ public function testZugFerdValidationWithInclusiveTaxes() $xml = $invoice->service()->getEInvoice(); $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); - $validator->setStyleSheets([$zug_16931]); + $validator->setStyleSheets([$this->zug_16931]); $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); $validator->validate(); @@ -271,7 +403,7 @@ public function testZugFerdValidationWithInclusiveTaxesAndTotalAmountDiscount() $xml = $invoice->service()->getEInvoice(); $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); - $validator->setStyleSheets([$zug_16931]); + $validator->setStyleSheets([$this->zug_16931]); $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); $validator->validate(); @@ -314,7 +446,7 @@ public function testZugFerdValidationWithInclusiveTaxesAndTotalPercentDiscount() $xml = $invoice->service()->getEInvoice(); $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); - $validator->setStyleSheets([$zug_16931]); + $validator->setStyleSheets([$this->zug_16931]); $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); $validator->validate(); @@ -366,7 +498,7 @@ public function testZugFerdValidationWithInclusiveTaxesAndTotalPercentDiscountOn $xml = $invoice->service()->getEInvoice(); $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); - $validator->setStyleSheets([$zug_16931]); + $validator->setStyleSheets([$this->zug_16931]); $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); $validator->validate(); @@ -417,7 +549,7 @@ public function testZugFerdValidationWithInclusiveTaxesAndTotalAmountDiscountOnL $xml = $invoice->service()->getEInvoice(); $validator = new \App\Services\EDocument\Standards\Validation\XsltDocumentValidator($xml); - $validator->setStyleSheets([$zug_16931]); + $validator->setStyleSheets([$this->zug_16931]); $validator->setXsd('/Services/EDocument/Standards/Validation/Zugferd/Schema/XSD/CrossIndustryInvoice_100pD22B.xsd'); $validator->validate(); @@ -429,4 +561,6 @@ public function testZugFerdValidationWithInclusiveTaxesAndTotalAmountDiscountOnL $this->assertCount(0, $validator->getErrors()); } + + } From 8ccb0b798c258e47768cd167ffa86b609e22badf Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jan 2025 11:08:56 +1100 Subject: [PATCH 14/15] Updated validator --- tests/Integration/Einvoice/ZugferdTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Integration/Einvoice/ZugferdTest.php b/tests/Integration/Einvoice/ZugferdTest.php index 59c1bab3b86..c4017d7dfff 100644 --- a/tests/Integration/Einvoice/ZugferdTest.php +++ b/tests/Integration/Einvoice/ZugferdTest.php @@ -281,8 +281,8 @@ public function testExclusiveScenarios() if (count($validator->getErrors()) > 0) { - nlog($invoice->toArray()); - nlog($xml); + // nlog($invoice->toArray()); + // nlog($xml); nlog($validator->getErrors()); } From a0cab6c89d26f9c5b404576ae17c04f58a9d4e12 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 21 Jan 2025 11:17:06 +1100 Subject: [PATCH 15/15] v5.11.28 --- VERSION.txt | 2 +- config/ninja.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index d610ad308e7..3b500778e7c 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.11.27 \ No newline at end of file +5.11.28 \ No newline at end of file diff --git a/config/ninja.php b/config/ninja.php index d81e0b811e7..73b5294b9e1 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -17,8 +17,8 @@ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION', '5.11.27'), - 'app_tag' => env('APP_TAG', '5.11.27'), + 'app_version' => env('APP_VERSION', '5.11.28'), + 'app_tag' => env('APP_TAG', '5.11.28'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false),