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

51 lines
1.3 KiB
C#

using System;
using System.Runtime.Serialization;
using FluentNHibernate.Mapping;
using System.Collections.Generic;
using Tanshu.Accounts.Contracts;
namespace Tanshu.Accounts.Entities
{
public class Inventory
{
public virtual int InventoryID { get; set; }
public virtual Voucher Voucher { get; set; }
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; }
public virtual decimal Amount
{
get
{
return Quantity * Rate * (1 + Tax) * (1 + ServiceCharge) * (1 - Discount);
}
set
{ }
}
//public decimal DiscountAmount
//{
// get
// {
// return quantity * rate * (1 + tax) * (1 + serviceCharge) * discount;
// }
//}
public Inventory()
{
InventoryModifier = new List<InventoryModifier>();
}
}
}