narsil/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs
unknown 0172fc4e01 Added Service Tax and CIN Information to the bill printout
Added Nc Option in settlement
Merged Vouchers and SaleVoucher table. Need to update the Sql Schema
2014-08-08 17:35:38 +05:30

84 lines
1.8 KiB
C#

using System;
using System.Runtime.Serialization;
namespace Tanshu.Accounts.Contracts
{
public class InventoryBO
{
public Guid InventoryID { get; set; }
public Guid VoucherID { get; set; }
public Guid ProductID { get; set; }
public string ProductName { get; set; }
private decimal quantity;
public decimal Quantity
{
get { return quantity; }
set
{
quantity = value;
amount = null;
}
}
private decimal rate;
public decimal Rate
{
get { return rate; }
set
{
rate = value;
amount = null;
}
}
decimal vat;
public decimal Vat
{
get { return vat; }
set
{
vat = value;
amount = null;
}
}
decimal serviceTax;
public decimal ServiceTax
{
get { return serviceTax; }
set
{
serviceTax = value;
amount = null;
}
}
decimal discount;
public decimal Discount
{
get { return discount; }
set
{
discount = value;
amount = null;
}
}
decimal? amount;
public decimal Amount
{
get
{
if (!amount.HasValue)
CalculateAmount();
return amount.Value;
}
}
private void CalculateAmount()
{
amount = quantity * rate * (1 + vat + serviceTax) * (1 - discount);
}
}
}