Multiple settlement options. Upgrade SQL Script included.
This commit is contained in:
@ -1,18 +1,25 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using FluentNHibernate.Mapping;
|
||||
using System.Collections.Generic;
|
||||
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 Rate { get; set; }
|
||||
public virtual decimal Tax { get; set; }
|
||||
@ -21,18 +28,12 @@ namespace Tanshu.Accounts.Entities
|
||||
|
||||
[Cascade]
|
||||
public virtual IList<InventoryModifier> InventoryModifier { get; set; }
|
||||
|
||||
[Formula(Formula = "Quantity * Rate * (1 - Discount) * (1 + ServiceCharge) * (1 + Tax)")]
|
||||
public virtual decimal Amount
|
||||
{
|
||||
get
|
||||
{
|
||||
return Quantity * Rate * (1 + Tax) * (1 + ServiceCharge) * (1 - Discount);
|
||||
}
|
||||
get { return Quantity * Rate * (1 + Tax) * (1 + ServiceCharge) * (1 - Discount); }
|
||||
private set { }
|
||||
}
|
||||
public Inventory()
|
||||
{
|
||||
InventoryModifier = new List<InventoryModifier>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user