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

39 lines
1.2 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using Tanshu.Accounts.Contracts;
2010-03-02 17:56:21 +00:00
namespace Tanshu.Accounts.Entities
2010-03-02 17:56:21 +00:00
{
public class Inventory
2010-03-02 17:56:21 +00:00
{
public Inventory()
{
// ReSharper disable DoNotCallOverridableMethodsInConstructor
InventoryModifier = new List<InventoryModifier>();
// ReSharper restore DoNotCallOverridableMethodsInConstructor
}
public virtual int InventoryID { get; set; }
[NotNull]
public virtual Kot Kot { get; set; }
[NotNull]
public virtual Product Product { get; set; }
public virtual decimal Quantity { get; set; }
public virtual decimal Rate { get; set; }
public virtual decimal Tax { get; set; }
public virtual decimal Discount { get; set; }
public virtual decimal ServiceCharge { get; set; }
[Cascade]
public virtual IList<InventoryModifier> InventoryModifier { get; set; }
[Formula(Formula = "Quantity * Rate * (1 - Discount) * (1 + ServiceCharge) * (1 + Tax)")]
public virtual decimal Amount
2010-03-02 17:56:21 +00:00
{
get { return Quantity * Rate * (1 + Tax) * (1 + ServiceCharge) * (1 - Discount); }
private set { }
2010-03-02 17:56:21 +00:00
}
}
}