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

51 lines
1.3 KiB
C#
Raw Normal View History

2010-03-02 17:56:21 +00:00
using System;
using System.Runtime.Serialization;
using FluentNHibernate.Mapping;
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 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; }
2010-03-02 17:56:21 +00:00
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
2010-03-02 17:56:21 +00:00
{
get
{
return Quantity * Rate * (1 + Tax) * (1 + ServiceCharge) * (1 - Discount);
2010-03-02 17:56:21 +00:00
}
set
{ }
2010-03-02 17:56:21 +00:00
}
//public decimal DiscountAmount
//{
// get
// {
// return quantity * rate * (1 + tax) * (1 + serviceCharge) * discount;
// }
//}
public Inventory()
2010-03-02 17:56:21 +00:00
{
InventoryModifier = new List<InventoryModifier>();
2010-03-02 17:56:21 +00:00
}
}
}