719dbd49d2
Added Void or Reprint Report. Changed Product.SalePrice -> Price Changed Inventory.Rate -> Price
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using Tanshu.Accounts.Contracts;
|
|
|
|
namespace Tanshu.Accounts.Entities
|
|
{
|
|
public class Inventory
|
|
{
|
|
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 Price { get; set; }
|
|
public virtual decimal FullPrice { 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 * Price * (1 - Discount) * (1 + ServiceCharge) * (1 + Tax)")]
|
|
public virtual decimal Amount
|
|
{
|
|
get { return Quantity * Price * (1 + Tax) * (1 + ServiceCharge) * (1 - Discount); }
|
|
private set { }
|
|
}
|
|
}
|
|
} |