narsil/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs

52 lines
1.5 KiB
C#
Raw Permalink Normal View History

2010-03-02 17:56:21 +00:00
using System;
using System.Runtime.Serialization;
using System.Collections.Generic;
2010-03-02 17:56:21 +00:00
namespace Tanshu.Accounts.Contracts
{
2010-03-02 17:56:21 +00:00
public class VoucherBO
{
public Guid VoucherID { get; set; }
public DateTime? Date { get; set; }
public string Narration { get; set; }
public Guid UserID { get; set; }
public DateTime CreationDate { get; set; }
public DateTime LastEditDate { get; set; }
public int Floor { get; set; }
public string BillID { get; set; }
public string TableID { get; set; }
public Guid WaiterID { get; set; }
public Guid CustomerID { get; set; }
public Guid? AdvanceID { get; set; }
public PaidStatus PaidStatus { get; set; }
public string VoidReason { get; set; }
public bool Printed { get; set; }
public DateTime? Alarm { get; set; }
public string KotID { get; set; }
public IList<InventoryBO> Inventories { get; set; }
public AdvanceBO Advance { get; set; }
public WaiterBO Waiter { get; set; }
public UserBO User { get; set; }
public CustomerBO Customer { get; set; }
public decimal Amount
{
get
{
decimal amount = 0;
foreach (var inv in Inventories)
{
amount += inv.Amount;
}
if (AdvanceID.HasValue)
{
amount -= Advance.Amount;
}
return amount;
}
}
2010-03-02 17:56:21 +00:00
}
}