Greeva.Core 1.0.5

dotnet add package Greeva.Core --version 1.0.5
                    
NuGet\Install-Package Greeva.Core -Version 1.0.5
                    
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="Greeva.Core" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Greeva.Core" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Greeva.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Greeva.Core --version 1.0.5
                    
#r "nuget: Greeva.Core, 1.0.5"
                    
#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.
#:package Greeva.Core@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Greeva.Core&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Greeva.Core&version=1.0.5
                    
Install as a Cake Tool

Greeva.Core

Core domain models and interfaces for Greeva electronic invoicing library.

Overview

Greeva.Core provides the foundational domain models, interfaces, and business logic for electronic invoicing in Peru according to SUNAT standards.

Key Features

  • Domain Models: Invoice, Note, Summary, Despatch, Perception, Retention
  • UBL 2.1 Support: Complete implementation of UBL 2.1 standard
  • Client & Company: Customer and company information models
  • Address Management: Peruvian address structure with ubigeo support
  • Tax Calculations: IGV, ISC, ICBPER tax handling
  • Document References: Support for document relationships

Core Entities

Invoice (Factura)

  • Electronic invoices with full tax calculations
  • Support for national and export operations
  • Multiple payment terms and methods

Note (Nota de Crédito/Débito)

  • Credit and debit notes
  • Reference to original documents
  • Automatic tax adjustments

Summary (Resumen Diario)

  • Daily summary documents
  • Batch processing for multiple documents
  • SUNAT required for some document types

Despatch (Guía de Remisión)

  • Electronic despatch guides
  • Transport information
  • Goods tracking

Usage

using Greeva.Core.Domain.Sale;
using Greeva.Core.Domain.Company;
using Greeva.Core.Domain.Clients;

// Create an invoice
var invoice = new Invoice
{
    UblVersion = UblVersion.UblVersion21,
    TipoOperacion = TipoOperacion.VentaInterna,
    TipoDoc = TipoDocumento.Factura,
    Serie = "F001",
    Correlativo = "123",
    FechaEmision = DateTime.Now.Date,
    TipoMoneda = TipoMoneda.NuevoSol,
    
    Company = new Company
    {
        Ruc = "20123456789",
        RazonSocial = "MI EMPRESA S.A.C.",
        Address = new Address
        {
            Ubigeo = "150101",
            Departamento = "LIMA",
            Provincia = "LIMA", 
            Distrito = "LIMA",
            Direccion = "AV. PRINCIPAL 123"
        }
    },
    
    Client = new Client
    {
        TipoDoc = TipoDocumento.Dni,
        NumDoc = "12345678",
        RznSocial = "CLIENTE EJEMPLO"
    },
    
    Details = new List<InvoiceDetail>
    {
        new InvoiceDetail
        {
            CodProducto = "PROD001",
            Descripcion = "PRODUCTO DE EJEMPLO",
            Cantidad = 1,
            UnidadMedida = "NIU",
            MtoValorUnitario = 100.00m,
            MtoValorVenta = 100.00m,
            MtoBaseIgv = 100.00m,
            PorcentajeIgv = 18.00m,
            Igv = 18.00m,
            TipAfeIgv = TipoAfectacionIgv.GravadoOperacionOnerosa,
            MtoPrecioUnitario = 118.00m
        }
    }
};

// Calculate totals
invoice.MtoOperGravadas = 100.00m;
invoice.MtoIGV = 18.00m;
invoice.MtoImpVenta = 118.00m;

Dependencies

  • .NET 8.0
  • System.ComponentModel.DataAnnotations
  • Newtonsoft.Json (for JSON serialization)
  • Greeva.Xml: XML generation and templates
  • Greeva.Xml.Sign: Digital signature functionality
  • Greeva.Sunat.GRE: SUNAT web services integration
  • Greeva.Domain.Validator: Business rule validation
  • Greeva.Ubl.Validator: UBL XML schema validation

License

MIT License - see LICENSE file for details.

Support

For issues and questions, please visit: https://github.com/augustoteles/greeva/issues

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Greeva.Core:

Package Downloads
Greeva.Sunat.GRE

SUNAT web services integration for Greeva electronic invoicing - CPE services and authentication

Greeva.Domain.Validator

FluentValidation-based domain model validators for Greeva electronic invoicing

Greeva.Xml

XML generation and template engine for Greeva electronic invoicing using RazorLight

Greeva.WebApi

Greeva library optimized for Web APIs with DI support and embedded templates

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 324 11/21/2025
1.0.4 466 11/18/2025
1.0.3 346 11/13/2025
1.0.2 308 11/13/2025
1.0.1 198 10/24/2025
1.0.0 169 10/12/2025