# Date: 19/07/06 # Version: 105 $PATTERN(.FUND_OPERDAY_SETCOUNTER) name=Следующее значение счетчика class=3 product=ALD_FUND pattern_text=$TEXT(17265033) if %DOC_TYPE%=1 begin update t_operday set doc_in_counter=isnull(t_operday.doc_in_counter,10) + 10 where t_operday.id = .CNT_VAR(@operday_id,DEPO_TST) end if %DOC_TYPE%=2 begin update t_operday set doc_out_counter=isnull(t_operday.doc_out_counter,10) + 10 where t_operday.id = .CNT_VAR(@operday_id,DEPO_TST) end if %DOC_TYPE%=0 begin update t_operday set doc_home_counter=isnull(t_operday.doc_home_counter,10) + 10 where t_operday.id = .CNT_VAR(@operday_id,DEPO_TST) end $ENDTEXT(17265033) $ENDPATTERN $PATTERN(.FUND_OPERDAY_GETCOUNTER) name=Значение счетчика class=2 product=ALD_FUND pattern_text=$TEXT(17265033) if %DOC_TYPE%=1 begin select .CNT_VAR(@count,DEPO_TST)=(select isnull(t_operday.doc_in_counter,10) from t_operday where t_operday.id = .CNT_VAR(@operday_id,DEPO_TST)) end if %DOC_TYPE%=2 begin select .CNT_VAR(@count,DEPO_TST)=(select isnull(t_operday.doc_out_counter,10) from t_operday where t_operday.id = .CNT_VAR(@operday_id,DEPO_TST)) end if %DOC_TYPE%=0 begin select .CNT_VAR(@count,DEPO_TST)=(select isnull(t_operday.doc_home_counter,10) from t_operday where t_operday.id = .CNT_VAR(@operday_id,DEPO_TST)) end $ENDTEXT(17265033) $ENDPATTERN