AssignmentCostSettings.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using InABox.Configuration;
  2. using InABox.Core;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace Comal.Classes
  7. {
  8. public enum AssignmentCostFillAlgorithm
  9. {
  10. /// <summary>
  11. /// Each assignment is costed as <c>(Finish - Start) * HourlyRate</c>
  12. /// </summary>
  13. Basic,
  14. /// <summary>
  15. /// The assignments are stacked into a single block, and scaled to fit the duration of the <see cref="TimeSheet"/>, either up or down.
  16. /// </summary>
  17. /// <remarks>
  18. /// Any unpaid overtime intervals are removed from the time sheet, so the total duration of the scaled assignments will be
  19. /// <c>TimeSheet.Duration - Unpaid.Duration</c>
  20. /// </remarks>
  21. Scale,
  22. /// <summary>
  23. /// The assignments are, one by one, extended to fill the length of the timesheet; the first assignment will be adjusted to start at the beginning
  24. /// of the day; any other assignments are extended to finish at the beginning of the next assignment. Assignments falling outside of the timesheet
  25. /// are chopped, and thus are uncosted.
  26. /// </summary>
  27. Extend,
  28. /// <summary>
  29. /// The assignments are not adjusted in size, except for chopping overlapping blocks, and then lost time blocks are created to fill the space left
  30. /// on the timesheet. Assignments outside of the timesheet are chopped. Overtime is taken into account, but the invented lost time blocks are only
  31. /// transient, and forgotten about later.
  32. /// </summary>
  33. FillTimeSheet
  34. }
  35. public class AssignmentCostSettings : BaseObject, IGlobalConfigurationSettings
  36. {
  37. public AssignmentCostFillAlgorithm Algorithm { get; set; }
  38. [ScriptEditor]
  39. public string Script { get; set; }
  40. }
  41. }