Multiple settlement options. Upgrade SQL Script included.

This commit is contained in:
unknown
2011-03-12 00:19:48 +05:30
parent 9ed5843dbd
commit aea41a9d24
42 changed files with 1917 additions and 1550 deletions

View File

@ -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>();
}
}
}
}