Files
Samuele Locatelli 8f074be9c9 OK x update documento
2023-02-01 11:32:54 +01:00

65 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace SHERPA.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("RigheFatt")]
public partial class RigheFattModel
{
public int Id { get; set; }
public int? IdxDoc { get; set; }
public string? Descrizione { get; set; }
public string? Um { get; set; }
public decimal? PrezzoUm { get; set; }
public float Qta { get; set; }
public float Sconto { get; set; }
public int? CIva { get; set; }
public bool NoRitenuta { get; set; }
public string Valuta { get; set; } = null!;
public int? IdFatt { get; set; }
public string CodExt { get; set; } = null!;
public double QuotaProj { get; set; }
public int numRiga { get; set; } = 0;
[NotMapped]
public decimal Iva
{
get => (decimal)(VatNav?.Iva ?? 0);
}
[NotMapped]
public string VoceIva
{
get => VatNav?.Descrizione ?? $"{Iva:P2}";
}
[NotMapped]
public decimal Netto
{
get => (decimal)((PrezzoUm ?? 0) * (decimal)Qta);
}
[NotMapped]
public decimal QuotaIva
{
get => Iva * Netto;
}
[NotMapped]
public decimal Importo
{
get => Netto * (1 + Iva);
}
[NotMapped]
public int IdxVatExt
{
get => VatNav?.id_ext >= 0 ? VatNav.id_ext : 0;
}
public virtual VatModel? VatNav { get; set; }
public virtual AccoDocModel? FattureNav { get; set; }
}
}