$PBExportHeader$f_sys_publ_operator.srf
global type f_sys_publ_operator from function_object
end type

forward prototypes
global function integer f_sys_publ_operator (datawindow arg_dw)
global function string f_sys_publ_operator ()
end prototypes

global function integer f_sys_publ_operator (datawindow arg_dw);String ls_modify_str
Int i

Long Columns

Columns = Long(arg_dw.Describe("DataWindow.Column.Count"))
FOR i = 1 TO Columns
	
	ls_modify_str = arg_dw.Describe("#" + String(i) + ".name")
	ls_modify_str = Lower(ls_modify_str)
	
	IF Pos(ls_modify_str,'status') > 0 AND sys_option_change_status <> ''  THEN
		IF Len(ls_modify_str) = Len('status') OR Pos(ls_modify_str,'_status') > 0 THEN
			IF Not (Pos(ls_modify_str,'u_saletask_status') > 0 OR &
			        Pos(ls_modify_str,'u_buytask_status') > 0 OR &
					  Pos(ls_modify_str,'u_order_ml_status') > 0 OR &
					  Pos(ls_modify_str,'u_order_wfjg_status') > 0 OR &
					  Pos(ls_modify_str,'u_saletask_ll_status') > 0 OR &
					  Pos(ls_modify_str,'u_rs_empinfo_status') > 0 ) THEN
				arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_status+"'")
			END IF
		END IF
	END IF
	
	IF Pos(ls_modify_str,'status_mode') > 0 AND sys_option_change_status <> ''  THEN
		arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_status+"'")
	END IF
	
	
	IF Pos(ls_modify_str,'woodcode') > 0 AND sys_option_change_woodcode <> ''  THEN
		IF Len(ls_modify_str) = Len('woodcode') OR Pos(ls_modify_str,'_woodcode') > 0 THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_woodcode+"'")
		END IF
	END IF
	
	
	IF Pos(ls_modify_str,'pcode') > 0 AND sys_option_change_pcode <> ''  THEN
		IF Len(ls_modify_str) = Len('pcode') OR Pos(ls_modify_str,'_pcode') > 0 THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_pcode+"'")
		END IF
	END IF
	
	IF Pos(ls_modify_str,'mtrlsectype') > 0 AND sys_option_change_mtrlsectype <> ''  THEN
		IF Len(ls_modify_str) = Len('mtrlsectype') OR Pos(ls_modify_str,'_mtrlsectype') > 0 THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_mtrlsectype+"'")
		END IF
	END IF
	
	IF Pos(ls_modify_str,'zxmtrlmode') > 0 AND sys_option_change_zxmtrlmode <> ''  THEN
		IF Len(ls_modify_str) = Len('zxmtrlmode') OR Pos(ls_modify_str,'_zxmtrlmode') > 0 THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_zxmtrlmode+"'")
		END IF
	END IF

	IF Pos(ls_modify_str,'usermtrlmode') > 0 AND sys_option_change_usermtrlmode <> ''  THEN
		IF Len(ls_modify_str) = Len('usermtrlmode') OR Pos(ls_modify_str,'usermtrlmode') > 0 THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_usermtrlmode+"'")
		END IF
	END IF

	IF (Pos(ls_modify_str,'u_outware_otheramt') > 0 or Pos(ls_modify_str,'u_saletask_otheramt') > 0 )AND sys_option_change_otheramt <> ''  THEN
		IF (Len(ls_modify_str) = Len('u_outware_otheramt') OR Pos(ls_modify_str,'u_outware_otheramt') > 0) or &
		(Len(ls_modify_str) = Len('u_saletask_otheramt') OR Pos(ls_modify_str,'u_saletask_otheramt') > 0) THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_otheramt+"'")
		END IF
	END IF
	
	IF Pos(ls_modify_str,'u_inware_otheramt') > 0 AND sys_option_change_otheramt_buy <> ''  THEN
		IF Len(ls_modify_str) = Len('u_inware_otheramt') OR Pos(ls_modify_str,'u_inware_otheramt') > 0 THEN
			arg_dw.Modify(ls_modify_str+'_t'+ ".text='"+sys_option_change_otheramt_buy+"'")
		END IF
	END IF	
NEXT
RETURN 1




end function

global function string f_sys_publ_operator ();return publ_operator
end function

