Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Readme for all projects #259

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 35 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,60 @@
[![Build](https://img.shields.io/github/actions/workflow/status/MewsSystems/fiscalizations/publish-all.yml?branch=master&label=publish)](https://github.com/MewsSystems/fiscalizations/actions/workflows/publish-all.yml)
[![License](https://img.shields.io/github/license/MewsSystems/fiscalizations)](https://github.com/MewsSystems/fiscalizations/blob/master/LICENSE)

**Mews.Fiscalizations** is a .NET library that was built to help reporting of e-invoices to different government authorities.
**Mews.Fiscalizations** is a .NET library designed to support reporting of e-invoices to government authorities in multiple countries.

## 📃 Description
## 📃 Overview

This repository contains multiple projects. Each project supports reporting of e-invoices to the corresponding country's government authority. Each project folder has its own documentation. Use the link in the table below to get there.
This repository contains a set of projects, each focused on facilitating e-invoice reporting to the appropriate governmental authority in different regions. Refer to the documentation in each project folder for details on specific implementations.

**Please note that we're not responsible for how these libraries are used and whether the data provided is correct or not.**
**Also, it is important to note that these libraries were created to meet our usages, so they might be missing some data that can be important in your case (feel free to extend any library and create a PR).**
>Disclaimer: These libraries were developed for internal use, so additional customization may be necessary to meet your specific needs. We cannot guarantee the accuracy of data produced by the libraries. Contributions are welcome if you'd like to extend functionality.

## ⚙️ Installation

For the reporting of e-invoices to a specific authority, install the package that corresponds to that country through NuGet or by using the following commands.
To use a fiscalization package for a specific country, install it via NuGet

For example, installing the Spanish fiscalization package in order to report invoices to the Spanish authorities (SII).
Here’s how to get started with the Spanish fiscalization package, for example:
```bash
Install-Package Mews.Fiscalizations.Spain
```

To install the package that supports reporting e-invoices for all the supported countries.
To install the package that covers all supported countries:
```bash
Install-Package Mews.Fiscalizations.All
```

## 🎯 Features
## 🎯 Key Features

- Functional approach via [FuncSharp](https://github.com/MewsSystems/FuncSharp). Definitely check out the examples of usage, so you're not surprised. At the very least IOptions and ITries.
- 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.
- Code examples for each project.
- Cross-platform (uses .NET 8).
- 6 countries + Basque region supported.
- Logging support for some fiscalizations.
- Functional programming approach using [FuncSharp](https://github.com/MewsSystems/FuncSharp). with an emphasis on 'Option' and 'Try'.
- Early validation of data inputs.
- Asynchronous I/O operations.
- Comprehensive test coverage for all endpoints.
- Intuitive and immutable Data Transfer Objects (DTOs).
- CI/CD pipelines compatible with both Windows and Linux.
- Code examples provided within each project.
- Cross-platform compatibility (.NET 8).
- Support for fiscalizations across six countries and the Basque region.
- Logging capabilities for selected implementations.

## ⚠ Warning
Since our production servers are now on .NET Core, we no longer need to use ConfigureAwait when awaiting tasks. as .NET Core does not have a SynchronizationContext, so it won't matter if we use ConfigureAwait or not. But if you need to, you may need to create another branch and include this.
## ⚠ Important Notes
Our production environments run on .NET 8, which doesn’t require `ConfigureAwait` since there’s no `SynchronizationContext`. However, if you rely on `ConfigureAwait` in your application, consider creating a separate branch to accommodate this.

## 👀 Examples

Please visit the desired fiscalization project to see its code examples.
Each fiscalization project includes code examples. Refer to the project-specific documentation for practical implementations and use cases.

## 🧬 Projects

| **Project** | **Nuget Package** | **Notes** |
| **Project** | **Nuget Package** | **Description** |
| ----------- | ----------------- | --------- |
| All | [Mews.Fiscalizations.All](https://www.nuget.org/packages/Mews.Fiscalizations.All) |
| [Core](https://github.com/MewsSystems/fiscalizations/tree/master/src/Core) | [Mews.Fiscalizations.Core](https://www.nuget.org/packages/Mews.Fiscalizations.Core) |
| [Austria](https://github.com/MewsSystems/fiscalizations/tree/master/src/Austria) | [Mews.Fiscalizations.Austria](https://www.nuget.org/packages/Mews.Fiscalizations.Austria) |
| [Germany](https://github.com/MewsSystems/fiscalizations/tree/master/src/Germany) | [Mews.Fiscalizations.Germany](https://www.nuget.org/packages/Mews.Fiscalizations.Germany) |
| [Hungary](https://github.com/MewsSystems/fiscalizations/tree/master/src/Hungary) | [Mews.Fiscalizations.Hungary](https://www.nuget.org/packages/Mews.Fiscalizations.Hungary) |
| [Italy](https://github.com/MewsSystems/fiscalizations/tree/master/src/Italy) | [Mews.Fiscalizations.Italy](https://www.nuget.org/packages/Mews.Fiscalizations.Italy) |
| [Spain](https://github.com/MewsSystems/fiscalizations/tree/master/src/Spain) | [Mews.Fiscalizations.Spain](https://www.nuget.org/packages/Mews.Fiscalizations.Spain) |
| [Basque](https://github.com/MewsSystems/fiscalizations/tree/master/src/Basque) | [Mews.Fiscalizations.Basque](https://www.nuget.org/packages/Mews.Fiscalizations.Basque) |
| All | [Mews.Fiscalizations.All](https://www.nuget.org/packages/Mews.Fiscalizations.All) | A package for all supported countries |
| [Core](https://github.com/MewsSystems/fiscalizations/tree/master/src/Core) | [Mews.Fiscalizations.Core](https://www.nuget.org/packages/Mews.Fiscalizations.Core) | Core library supporting shared functionality |
| [Austria](https://github.com/MewsSystems/fiscalizations/tree/master/src/Austria) | [Mews.Fiscalizations.Austria](https://www.nuget.org/packages/Mews.Fiscalizations.Austria) | Austria-specific fiscalization library (RKSV) |
| [Germany](https://github.com/MewsSystems/fiscalizations/tree/master/src/Germany) | [Mews.Fiscalizations.Germany](https://www.nuget.org/packages/Mews.Fiscalizations.Germany) | Germany-specific fiscalization library (KassenSichV) |
| [Hungary](https://github.com/MewsSystems/fiscalizations/tree/master/src/Hungary) | [Mews.Fiscalizations.Hungary](https://www.nuget.org/packages/Mews.Fiscalizations.Hungary) | Hungary-specific fiscalization library (NAV) |
| [Italy](https://github.com/MewsSystems/fiscalizations/tree/master/src/Italy) | [Mews.Fiscalizations.Italy](https://www.nuget.org/packages/Mews.Fiscalizations.Italy) | Italy-specific fiscalization library (SDI) |
| [Spain](https://github.com/MewsSystems/fiscalizations/tree/master/src/Spain) | [Mews.Fiscalizations.Spain](https://www.nuget.org/packages/Mews.Fiscalizations.Spain) | Spain-specific fiscalization library (SII) |
| [Basque](https://github.com/MewsSystems/fiscalizations/tree/master/src/Basque) | [Mews.Fiscalizations.Basque](https://www.nuget.org/packages/Mews.Fiscalizations.Basque) | Basque region-specific fiscalization library (TicketBAI) |

## 🧑 Authors
<table>
Expand All @@ -73,16 +72,13 @@ Please visit the desired fiscalization project to see its code examples.
</tr>
</table>

## 👍 Contribute
## 👍 Contributing

If you want to support the development of `Mews.Fiscalizations`, feel free to create a PR with a clear description of what was fixed or introduced.
Also, please make sure to introduce tests when applicable.
We welcome contributions! If you’d like to support the project, please create a pull request with a clear description of your changes and ensure that tests are included if applicable.

## ☕ Donate

There is no need to donate to the project, but thanks for considering it! Instead, if you like the project, star it here on GitHub :-) Thanks!

If you still insist on donating, we accept gummy bears at Mews Systems s.r.o., Náměstí IP Pavlova 5, Vinohrady 120 00 Prague. This project was, of course, powered by a huge pile of gummy bears ;-)
If you’d like to show support, please star this project on GitHub! While no monetary donations are needed, we do accept gummy bears at Mews Systems s.r.o., Náměstí IP Pavlova 5, Vinohrady 120 00 Prague. 🍬

## 🏢 About us

Expand All @@ -96,8 +92,8 @@ The hoteliers who choose Mews share our passion for innovation and they don’t

Hospitality brands are heavily scrutinized. The day a guest checks-out, their rating goes online. Ultimately we’re designing Mews for our customer’s customer because every guest experience must be remarkable.

More information on https://www.mews.com/en/about-us
For more, visit https://www.mews.com/en/about-us

## ⚠️ License

[MIT](https://github.com/MewsSystems/fiscalizations/blob/master/LICENSE)
Licensed under the [MIT](https://github.com/MewsSystems/fiscalizations/blob/master/LICENSE)
51 changes: 26 additions & 25 deletions src/Austria/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<img alt="Mews" src="https://user-images.githubusercontent.com/51375082/120493257-16938780-c3bb-11eb-8cb5-0b56fd08240d.png">
</a>
<br><br>
<b>Mews.Fiscalizations.Austria</b> is a .NET library that allows you to generate QR codes compliant with Austrian fiscal law (RKSV2017). Currently offers a signer based on A-Trust WS RK.Online API.
<b>Current supported version is 2.0.</b>
<b>Mews.Fiscalizations.Austria</b> A .NET library for generating QR codes that comply with Austrian fiscal law (RKSV2017), featuring A-Trust WS RK.Online API-based signing.
<b>Current supported version: 2.0</b>
<br><br>
<a href="https://www.nuget.org/packages/Mews.Fiscalizations.Austria/">
<img src="https://img.shields.io/nuget/v/Mews.Fiscalizations.Austria">
Expand All @@ -22,35 +22,36 @@

## 📃 Description

This library uses the [A-Trust](https://www.a-trust.at/de/Registrierkasse/) to generate the QR codes, please check their [Documentation](https://labs.a-trust.at/developer/pdf/asignRKHSM_basic_advanced_premium.pdf).
The `Mews.Fiscalizations.Austria` library leverages [A-Trust](https://www.a-trust.at/de/Registrierkasse/) services to create QR codes compliant with Austrian fiscal regulations. For further details, refer to A-Trust’s [Documentation](https://labs.a-trust.at/developer/pdf/asignRKHSM_basic_advanced_premium.pdf).

## ⚙️ Installation

The library can be installed through NuGet packages or the command line as mentioned below:
You can install the library via NuGet Package Manager or the command line:
```bash
Install-Package Mews.Fiscalizations.Austria
```

## 🎯 Features
## 🎯 Key Features

- Functional approach via [FuncSharp](https://github.com/siroky/FuncSharp).
- No Austrian 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).
- Functional programming approach using [FuncSharp](https://github.com/MewsSystems/FuncSharp).
- Early validation of data inputs.
- Asynchronous I/O operations.
- Comprehensive test coverage for all endpoints.
- Intuitive and immutable Data Transfer Objects (DTOs).
- CI/CD pipelines compatible with both Windows and Linux.
- Cross-platform compatibility (.NET 8).

## 📦 NuGet
## 📦 NuGet Package

We have published the library as [Mews.Fiscalizations.Austria](https://www.nuget.org/packages/Mews.Fiscalizations.Austria/).
Available on NuGet as [Mews.Fiscalizations.Austria](https://www.nuget.org/packages/Mews.Fiscalizations.Austria/).

## 👀 Code Examples

Listed below are some of the common examples. If you want to see more code examples, please check the [Tests](https://github.com/MewsSystems/fiscalizations/tree/master/src/Austria/Mews.Fiscalizations.Austria.Tests).
Below are some sample use cases. For a full list, see the [test cases](https://github.com/MewsSystems/fiscalizations/tree/master/src/Austria/Mews.Fiscalizations.Austria.Tests).

### Creating QR data from bills
### Generating QR Data for Receipts

Create QrData from a receipt, including standard rates, register identifier, and previous JWS representation:
```csharp
var qrData = new QrData(new Receipt(
number: new ReceiptNumber("83469"),
Expand All @@ -70,21 +71,21 @@ var qrData = new QrData(new Receipt(
);
```

### Using A-Trust RK.Online signer
### Using the A-Trust RK.Online Signer
Sign the generated QR data using A-Trust’s API:
```csharp
var signer = new ATrustSigner(Credentials, ATrustEnvironment.Test);
var output = signer.Sign(qrData);
var output = await signer.SignAsync(qrData);
```

### SignerOutput Usage
### Handling Signer Output
Use `SignerOutput` for setting fiscal record details:
```csharp
fiscalRecord.JwsRepresentation = output.JwsRepresentation.Value;
fiscalRecord.QrData = output.SignedQrData.Value;
fiscalRecord.Signature = output.JwsRepresentation.Signature.Value;
```

## 🔐 Security protocol
- TLS 1.1 and TLS 1.2 protocols must be enabled, that can be achieved by adding the following line to your code:
```csharp
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11
```
### ⚠️ License

Licensed under the [MIT](https://github.com/MewsSystems/fiscalizations/blob/master/LICENSE)
31 changes: 15 additions & 16 deletions src/Basque/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img alt="Mews" src="https://user-images.githubusercontent.com/51375082/120493257-16938780-c3bb-11eb-8cb5-0b56fd08240d.png">
</a>
<br><br>
<b>Mews.Fiscalizations.Basque</b> is a .NET library that was built to help reporting invoices to the Basque countries tax authorities (TicketBai - TBAI).
<b>Mews.Fiscalizations.Basque</b> A .NET library for reporting invoices to the Basque Country tax authorities via TicketBAI (TBAI) compliance.
<br><br>
<a href="https://www.nuget.org/packages/Mews.Fiscalizations.Basque/">
<img src="https://img.shields.io/nuget/v/Mews.Fiscalizations.Basque">
Expand All @@ -22,32 +22,31 @@

## 📃 Description

The library uses TicketBai (Gipuzkoa) API to report the invoices, for more information, please check the [Documentation](https://www.gipuzkoa.eus/es/web/ogasuna/ticketbai/documentacion-y-normativa).
The `Mews.Fiscalizations.Basque` library integrates with the TicketBai API, enabling compliant invoice reporting to tax authorities in all three Basque Country regions: Araba, Gipuzkoa, and Bizkaia. For further details, refer to the official documentation of each region: [Araba](https://web.araba.eus/es/hacienda/ticketbai/documentacion-tecnica), [Gipuzkoa](https://www.gipuzkoa.eus/es/web/ogasuna/ticketbai/documentacion-y-normativa), and [Bizkaia](https://www.batuz.eus/es/documentacion-tecnica).

## ⚙️ Installation

The library can be installed through NuGet packages or the command line as mentioned below:
You can install the library via NuGet Package Manager or the command line:
```bash
Install-Package Mews.Fiscalizations.Basque
```

## 🎯 Features
## 🎯 Key Features

- Functional approach via [FuncSharp](https://github.com/siroky/FuncSharp).
- No Spanish/Basque 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).
- Functional programming approach using [FuncSharp](https://github.com/MewsSystems/FuncSharp).
- Early validation of data inputs.
- Asynchronous I/O operations.
- Comprehensive test coverage for all endpoints.
- Intuitive and immutable Data Transfer Objects (DTOs).
- CI/CD pipelines compatible with both Windows and Linux.
- Cross-platform compatibility (.NET 8).

## 📦 NuGet
## 📦 NuGet Package

We have published the library as [Mews.Fiscalizations.Basque](https://www.nuget.org/packages/Mews.Fiscalizations.Basque/).
Available on NuGet as [Mews.Fiscalizations.Basque](https://www.nuget.org/packages/Mews.Fiscalizations.Basque/).

## 👀 Code Examples

For code examples, please check the [Tests](https://github.com/MewsSystems/fiscalizations/tree/master/src/Basque/Mews.Fiscalizations.Basque.Tests).
Please refer to the [Tests](https://github.com/MewsSystems/fiscalizations/tree/master/src/Basque/Mews.Fiscalizations.Basque.Tests) for detailed code examples and usage scenarios.

Please note that you will need a valid certificate in order to use the API, please check the documentation.
>Note: A valid certificate is required to access the API. Please consult the documentation for guidance on obtaining and configuring certificates.
17 changes: 11 additions & 6 deletions src/Core/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Mews.Fiscalizations.Core

Core library for implementing other fiscalization libraries.
A foundational .NET library for building fiscalization solutions, providing core components for data validation and early error detection.

## Content
## ? Overview
**Mews.Fiscalizations.Core** offers essential functionality to help you build fiscalization libraries with confidence and ease. It includes robust validation tools and strongly-typed data structures, ensuring data integrity at every step.

There is a Check class which has various methods for validating conditions. In case a condition is not met, an exception is thrown.
## ? Features

There are various data types that serve for early validation. For example an instance of `LimitedString1To50` is always guaranteed to have a string that has length between 1 and 50 characters. You can use this to create a strongly-typed model that guarantees it is valid on creation.
**Validation with the Check Class**
The Check class provides methods to enforce specific conditions within your application. If a condition is not met, an exception is thrown immediately, helping you catch issues early in the development cycle.

# NuGet
**Strongly-Typed Data Models**
Various data types, such as LimitedString1To50, ensure early validation by enforcing specific constraints. For example, an instance of LimitedString1To50 is always guaranteed to contain a string between 1 and 50 characters in length. These types enable the creation of models that are valid by design, reducing the likelihood of runtime errors.

We have published the library as [Mews.Fiscalizations.Core](https://www.nuget.org/packages/Mews.Fiscalizations.Core/).
## ? Installation

You can install the library from NuGet: [Mews.Fiscalizations.Core](https://www.nuget.org/packages/Mews.Fiscalizations.Core/).
Loading
Loading