Mews.Fiscalizations.Hungary 11.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Mews.Fiscalizations.Hungary --version 11.0.0                
NuGet\Install-Package Mews.Fiscalizations.Hungary -Version 11.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mews.Fiscalizations.Hungary" Version="11.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mews.Fiscalizations.Hungary --version 11.0.0                
#r "nuget: Mews.Fiscalizations.Hungary, 11.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mews.Fiscalizations.Hungary as a Cake Addin
#addin nuget:?package=Mews.Fiscalizations.Hungary&version=11.0.0

// Install Mews.Fiscalizations.Hungary as a Cake Tool
#tool nuget:?package=Mews.Fiscalizations.Hungary&version=11.0.0                

<p align="center"> <a href="https://mews.com"> <img alt="Mews" src="https://user-images.githubusercontent.com/51375082/120493257-16938780-c3bb-11eb-8cb5-0b56fd08240d.png"> </a> <br><br> <b>Mews.Fiscalizations.Hungary</b> is a .NET library that was built to help reporting of e-invoices to the Hungarian authorities (Online Szamla - Nemzeti Adó- és Vámhivatal). <b>Current supported version is 3.0.</b> <br><br> <a href="https://www.nuget.org/packages/Mews.Fiscalizations.Hungary/"> <img src="https://img.shields.io/nuget/v/Mews.Fiscalizations.Hungary"> </a> <a href="https://github.com/MewsSystems/fiscalizations/blob/master/LICENSE"> <img src="https://img.shields.io/github/license/MewsSystems/fiscalizations"> </a> <a href="https://github.com/MewsSystems/fiscalizations/actions/workflows/publish-hungary.yml"> <img src="https://img.shields.io/github/actions/workflow/status/MewsSystems/fiscalizations/publish-hungary.yml?branch=master&label=publish"> </a> <a href="https://onlineszamla.nav.gov.hu/api/files/container/download/Online%20Szamla_Interfesz%20specifikacio_EN_v3.0.pdf"> <img src="https://img.shields.io/badge/v3.0-NAV-lightgrey"> </a> </p>

📃 Description

This library uses the NAV Online Invoice System to report e-invoices, please check their Documentation.

<b>Useful links:</b> API documentation Test environment Production environment

⚙️ Installation

The library can be installed through NuGet packages or the command line as mentioned below:

Install-Package Mews.Fiscalizations.Hungary

🎯 Features

  • Functional approach via FuncSharp.
  • No Hungarian abbreviations.
  • Early data validation.
  • Asynchronous I/O.
  • All endpoints are covered with tests.
  • Intuitive immutable DTOs.
  • Pipelines that run on both Windows and Linux operating systems.
  • Cross platform (uses .NET 6).

📦 NuGet

We have published the library as Mews.Fiscalizations.Hungary.

👀 Code Examples

Listed below are some of the common examples. If you want to see more code examples, please check the Tests.

Creating NAV client There are 3 required properties that need to be provided when creating the NAV client

  1. Technical user: technical user credentials can be obtained from the NAV website dashboard
  2. Software identification: Contains information regarding the software performing data reporting
  3. NAV Environment: (Test/Production)
var technicalUser = new TechnicalUser(
    login: Login,
    password: Password,
    signingKey: SigningKey,
    taxId: TaxPayerId,
    encryptionKey: EncryptionKey
);
var softwareIdentification = new SoftwareIdentification(
    id: "123456789123456789",
    name: "Test",
    type: SoftwareType.LocalSoftware,
    mainVersion: "1.0",
    developerName: "Test",
    developerContact: "test@test.com"
);
var navClient = new NavClient(technicalUser, softwareIdentification, NavEnvironment.Test);

Obtaining the Exchange token which is required for each request

var exchangeToken = await client.GetExchangeTokenAsync();

Creating the supplier info

var supplierInfo = new SupplierInfo(
    taxpayerId: supplierTaxpayerId,
    vatCode: VatCode.Create("2").Success.Get() // check the documentation for more information about each VatCode.,
    name: Name.Create("supplier name").Success.Get(),
    address: supplierAddress
);

Creating invoice items

var itemAmount = new Amount(net: new AmountValue(1694.92m), gross: new AmountValue(2000), tax: new AmountValue(305.08m));
var unitAmount = new ItemAmounts(itemAmount, itemAmount, 0.18m);
var items = new[]
{
    new InvoiceItem(
        consumptionDate: DateTime.UtcNow.Date,
        totalAmounts: new ItemAmounts(itemAmount, itemAmount, 0.18m),
        description: Description.Create("Item 1 description").Success.Get(),
        measurementUnit: MeasurementUnit.Night,
        quantity: 1,
        unitAmounts: unitAmount,
        exchangeRate: ExchangeRate.Create(1).Success.Get()
    )
};

Creating an invoice

var invoice = new Invoice(
    number: invoiceNumber ?? InvoiceNumber.Create($"INVOICE-{Guid.NewGuid()}").Success.Get(),
    issueDate: nowUtc,
    supplierInfo: supplierInfo,
    receiver: receiver,
    items: Sequence.FromPreordered(items, startIndex: 1).Get(),
    paymentDate: nowUtc,
    currencyCode: CurrencyCode.Create("EUR").Success.Get(),
    paymentMethod: PaymentMethod.Card
);

Reporting invoices

return await client.SendInvoicesAsync(
    token: exchangeToken.SuccessResult,
    invoices: Sequence.FromPreordered(new[] { invoice }, startIndex: 1).Get()
);

In case of rebating/modifying/changing an invoice It is possible to report the modified invoice through SendModificationDocumentsAsync API.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.0.0 329 1/29/2024
12.0.0 591 8/27/2023
11.0.2 663 8/2/2023
11.0.1 604 7/26/2023
11.0.0 617 7/24/2023
10.0.3 900 10/21/2022
10.0.2 882 10/17/2022
10.0.1 869 9/13/2022
10.0.0 840 9/6/2022
9.0.0 965 9/6/2022
8.0.0 889 8/30/2022
7.0.0 892 8/29/2022
6.0.2 899 7/4/2022
6.0.1 950 4/14/2022
6.0.0 902 11/8/2021
5.0.1 842 11/5/2021
5.0.0 830 7/21/2021
4.0.4 846 7/13/2021
4.0.3 834 7/8/2021
4.0.2 868 6/7/2021
4.0.1 863 6/7/2021
4.0.0 948 6/1/2021
3.0.1 1,270 5/28/2021
3.0.0 1,570 5/24/2021