2月的情况有点特殊,需手动处理截止日期
define var year as int.
define var month as int.
define var day as int.
for each vo_mstr where vo_domain = 'smrnbhx' and vo_due_date > today and
(DAY(vo_due_date) = 1 or DAY(vo_due_date) = 2),
each ap_mstr where ap_mstr.ap_domain = vo_mstr.vo_domain
and ap_mstr.ap_ref = vo_mstr.vo_ref
and ap_type = 'VO'
and ap_mstr.ap_open = yes:
year = year(vo_due_date).
month = month(vo_due_date).
day = 1.
/* disp VO_DUE_DATE date(month,day,year) - 1 AP_OPEN ap_mstr.ap_open
ap_type. */
update vo_due_date = date(month,day,year) - 1.
end.
评论区