BrainEnterprise.Core.Accounting 3.0.3 The ID prefix of this package has been reserved for one of the owners of this package by Prefix Reserved

.NET Standard 2.0 .NET Framework 2.0
Install-Package BrainEnterprise.Core.Accounting -Version 3.0.3
dotnet add package BrainEnterprise.Core.Accounting --version 3.0.3
<PackageReference Include="BrainEnterprise.Core.Accounting" Version="3.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BrainEnterprise.Core.Accounting --version 3.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BrainEnterprise.Core.Accounting, 3.0.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install BrainEnterprise.Core.Accounting as a Cake Addin
#addin nuget:?package=BrainEnterprise.Core.Accounting&version=3.0.3

// Install BrainEnterprise.Core.Accounting as a Cake Tool
#tool nuget:?package=BrainEnterprise.Core.Accounting&version=3.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


This library contains some accounting classes and utilities:

  • Margin: static class for calculating margins and markups
  • VatHelper: static class for the calculation / unbundling of VAT and verification of the VAT number
  • TaxCodeHelper: static class class for the calculation and verification of the Italian Tax Code

How To Use


Used to calculate various types of margins and profits:

  • MarginPercent;
  • MarkupPercent;
  • OperatingProfit: from revenues and characteristics costs;
  • GrossProfit: from sales price and variable costs;


Check if Vat Registration Number is Valid

BrainEnterprise.Core.Accounting.Vat.VatHelper.CheckVatCode("IT 02201060981");

This function actually supports only Italian Vat Registration Number. For other European countries only a RegEx format check is performed

Vat Calculation and Unbundling

var vat = BrainEnterprise.Core.Accounting.Vat.VatHelper.GetVatAmount(500, 22);
var basePrice = BrainEnterprise.Core.Accounting.Vat.VatHelper.VatUnbundling(1220, 22);


Change the value of VatDecimalRound (default value 2) to set different Rounding Rule

BrainEnterprise.Core.Accounting.Vat.VatHelper.VatDecimalRound = 3;
var vat = BrainEnterprise.Core.Accounting.Vat.VatHelper.GetVatAmount(500, 22);


Used to calculate and Check Italian Fiscal Code

using BrainEnterprise.Core.Accounting.Vat

// Checks only the control character

// Checks the Entire Fiscal Code against a specific name and Data
Assert.IsTrue(TaxCodeHelper.Italian.CheckFiscalCode("PLVGLC73M14B157A", "Gianluca", "Plevani", new DateTime(1973, 8, 14), 'M', "B157"));

// Fiscal Code Calculation
var foo1 = TaxCodeHelper.Italian.CalculateFiscalCode("Gianluca", "Plevani", new DateTime(1974, 8, 12), 'M', "B157");
var foo2 = TaxCodeHelper.Italian.CalculateFiscalCode("Luigi", "Fo", new DateTime(1980, 1, 1), 'M', "B157");
var foo3 = TaxCodeHelper.Italian.CalculateFiscalCode("Anna", "Mia", new DateTime(1980, 1, 1), 'F', "B157");
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net20 net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 2.0

    • No dependencies.
  • .NETFramework 4.0

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

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
3.0.3 71 2/17/2022
3.0.2 132 10/30/2021
3.0.1 173 10/28/2021
3.0.0 119 10/28/2021

The check are currently implemented for the Italian VAT and Tax Code; contributions related to other countries are welcome