37 lines
922 B
C#
37 lines
922 B
C#
using System;
|
|
using System.Data;
|
|
using System.Linq;
|
|
|
|
namespace bdGrupoSanchoToro.db
|
|
{
|
|
public partial class cajas
|
|
{
|
|
public double SaldoPendienteCierre
|
|
{
|
|
get
|
|
{
|
|
return this.movimientoscaja.Where(x => x.idMovimientoCierre.HasValue == false).Sum(x => x.Importe);
|
|
}
|
|
}
|
|
public double SaldoActual
|
|
{
|
|
get
|
|
{
|
|
return Math.Round(Math.Round(this.SaldoAlCierre, 2, MidpointRounding.AwayFromZero) + Math.Round(SaldoPendienteCierre, 2, MidpointRounding.AwayFromZero), 2, MidpointRounding.AwayFromZero);
|
|
}
|
|
}
|
|
public string DescripcionTipo
|
|
{
|
|
get
|
|
{
|
|
return ((TipoCajaEnum)this.Tipo).ToString();
|
|
}
|
|
}
|
|
public enum TipoCajaEnum
|
|
{
|
|
CONTADO = 0,
|
|
BANCO = 1
|
|
}
|
|
|
|
}
|
|
} |