narsil/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs
2010-03-02 23:26:21 +05:30

53 lines
1.3 KiB
C#

using System;
using System.Runtime.Serialization;
namespace Tanshu.Accounts.Contracts
{
[DataContract]
public class SalarySheetBO
{
[DataMember]
public Guid SalarySheetID { get; set; }
[DataMember]
public Guid VoucherID { get; set; }
[DataMember]
public Guid LedgerID { get; set; }
[DataMember]
public int Salary { get; set; }
[DataMember]
public decimal WorkingDays { get; set; }
[DataMember]
public decimal Present { get; set; }
[DataMember]
public decimal Offs { get; set; }
[DataMember]
public decimal Overtime { get; set; }
[DataMember]
public int Deductions { get; set; }
[DataMember]
public int TotalSalary
{
get
{
decimal amount = 0;
// Salary
amount = (Present + Offs + Overtime) * Salary / WorkingDays;
// Less Deductions
amount -= Deductions;
// Roundoff
amount = Math.Round(amount);
return Convert.ToInt32(amount);
}
}
[DataMember]
public string Remarks { get; set; }
[DataMember]
public byte[] timestamp { get; set; }
}
}