上传的图像用于项目: 'CST技术支持'
  1. CST技术支持
  2. SLAL2-780

薪资公式:获取离职日期所在的那个月的工作日天数

XMLWord打印

    • Icon: Change Change
    • 解决结果: 完成
    • Icon: Medium Medium
    • 202007
    • Y-易路产品-
    • lvmh
    • 基础通用功能
    • 隐藏

      def F_GetDepartureMonthCalendarDays(value_type=1):
      departure_time = individual_dict['ref_departure_time']

      if departure_time:
      departure_time = departure_time.encode("utf-8")
      lower_date = "%s01" % departure_time[:8]
      departure_time = datetime.datetime.strptime(departure_time,'%Y-%m-%d').replace(day=28) + datetime.timedelta(days=4)
      upper_date = (departure_time-datetime.timedelta(days=departure_time.day)).strftime('%Y-%m-%d')
      else:
      return 0
      days = F_GetDaysof(lower_date, upper_date, value_type)
      return days

      显示
      def F_GetDepartureMonthCalendarDays(value_type=1): departure_time = individual_dict ['ref_departure_time'] if departure_time: departure_time = departure_time.encode("utf-8") lower_date = "%s01" % departure_time [:8] departure_time = datetime.datetime.strptime(departure_time,'%Y-%m-%d').replace(day=28) + datetime.timedelta(days=4) upper_date = (departure_time-datetime.timedelta(days=departure_time.day)).strftime('%Y-%m-%d') else: return 0 days = F_GetDaysof(lower_date, upper_date, value_type) return days

      薪资项:【离职年假折算】中,原来【当月实际工作日】是直接获取的当月工作天数(系统公式直接获取的),现在希望可以获取员工【最后工作日】所在的那个月的工作天数

            wenqiang.liu 刘文强
            qiany 钱颖
            表决:
            0 为这个问题表决

              创建日期:
              已更新:
              已解决: