func cleanServiceOrders(array []ServiceOrder) []ServiceOrder {
	array = revertServiceOrder(array)
	var ordersClean []ServiceOrder
	for i := 0; i < len(array); i++ {
		if array[i].Quantity > array[i].AlreadyMade && array[i].Deadline > (int64(array[i].WindowPeriod)*86400+getTime()) {
			ordersClean = append(ordersClean, array[i])
		}
	}
	return ordersClean
}
// This method cleans the array of ServiceOrder and leave only the orders that are not complete and the window period time is not started
This method cleans the array of ServiceOrder and leave only the orders that are not complete and the window period time is not started
// This method cleans the array of ServiceOrder and leave only the orders that are not complete and the window period time is not started
func cleanServiceOrders(array []ServiceOrder) []ServiceOrder {
	array = revertServiceOrder(array)
	var ordersClean []ServiceOrder
	for i := 0; i < len(array); i++ {
		if array[i].Quantity > array[i].AlreadyMade && array[i].Deadline > (int64(array[i].WindowPeriod)*86400+getTime()) {
			ordersClean = append(ordersClean, array[i])
		}
	}
	return ordersClean
}
func cleanServiceOrders ( array [ ] ServiceOrder ) [ ] ServiceOrder { array = revertServiceOrder ( array ) var ordersClean [ ] ServiceOrder for i := 0 ; i < len ( array ) ; i ++ { if array [ i ] . Quantity > array [ i ] . AlreadyMade && array [ i ] . Deadline > ( int64 ( array [ i ] . WindowPeriod ) * 86400 + getTime ( ) ) { ordersClean = append ( ordersClean , array [ i ] ) } } return ordersClean }
This method cleans the array of ServiceOrder and leave only the orders that are not complete and the window period time is not started
This method cleans the array of ServiceOrder and leave only the orders that are not complete and the window period time is not started