@@ -52,7 +52,7 @@ public static List<EmployeeBillableItemModel> GetBillableEmployees(
5252 foreach ( var employeeProject in employeeProjects )
5353 {
5454 double billableHours = employeeProject . BillableHours ;
55- int billedDays = GetBilledDays ( billableHours ) ;
55+ int billedDays = GetBilledDays ( e , employeeProject , out billableHours ) ;
5656 billedProjects . Add ( new BilledProject
5757 {
5858 BilledDays = billedDays ,
@@ -174,28 +174,44 @@ public static BookingStatus GetBookingStatus(GetEmployeeModel employee, DateTime
174174 return BookingStatus . Unknown ;
175175 }
176176
177- public static int GetBilledDays ( double billableHours )
178- {
179- const int HOURS_PER_DAY = 8 ;
180-
181- return ( int ) Math . Ceiling ( billableHours / HOURS_PER_DAY ) ;
182- }
183-
184- public static int GetTotalBilledDays ( List < GetEmployeeProjectModel > Projects , out double billableHours )
185- {
186- billableHours = 0 ;
187-
188- if ( Projects == null || ! Projects . Any ( ) )
189- {
190- return 0 ;
191- }
192-
193- foreach ( var project in Projects )
194- {
195- billableHours += project . BillableHours ;
196- }
197-
198- return GetBilledDays ( billableHours ) ;
177+ // public static int GetBilledDays(double billableHours)
178+ // {
179+ // const int HOURS_PER_DAY = 8;
180+ //
181+ // return (int)Math.Ceiling(billableHours / HOURS_PER_DAY);
182+ // }
183+ //
184+ // public static int GetTotalBilledDays(List<GetEmployeeProjectModel> Projects, out double billableHours)
185+ // {
186+ // billableHours = 0;
187+ //
188+ // if (Projects == null || !Projects.Any())
189+ // {
190+ // return 0;
191+ // }
192+ //
193+ // foreach (var project in Projects)
194+ // {
195+ // billableHours += project.BillableHours;
196+ // }
197+ //
198+ // return GetBilledDays(billableHours);
199+ // }
200+
201+ public static int GetBilledDays ( GetEmployeeModel employee , GetEmployeeProjectModel project , out double billableHours )
202+ {
203+
204+
205+ if ( project != null && project . CustomerName != "SSW" )
206+ {
207+ billableHours = project ? . BillableHours ?? 0 ;
208+ }
209+ else {
210+ billableHours = 0 ;
211+ }
212+
213+
214+ return billableHours == 0 ? 0 : ( int ) Math . Ceiling ( billableHours / 8 ) ;
199215 }
200216
201217 public static int GetBookedDays ( GetEmployeeModel employee , DateTime startDate )
0 commit comments