using System;
using System.Collections.Generic;
using BeWo.Data.Entities;
using BeWo.Report.ReportObjects;
using BS.Shared.Core;


namespace BeWo.SeWo
{
	public class SeWoMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
	{
	    public override bool AddServiceRecordToDuration(ServiceRecord item)
		{
			if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
			{
			    var p = item.ServiceDescription.ServiceCategory.Percentage;
                
                if (p != 100 && p > 0)
                {
                    item.RoundedDuration *= (p/100);
                    item.GroupRoundedDuration *= (p / 100);
                }
			}
			return true;
		}

	    //public override List<DateTime> GetFeiertage(int year)
		//{
		//	var list = base.GetFeiertage(year);
			
		//	list.Remove(new DateTime(year, 12, 24));
			
		//	return list;
		//}


	}
}
