Автоматизированное рабочее место


****************************************************************************
*********                         Дополнение\Изменение данных
   **
*********************************************************************

PROCEDURE ins    && Процедура Дополнения\Изменения

PARAMETERS d_ins
ord_a=order()
CLEAR
RELEASE KW,GW,XW,KS,ELC,TL,RD,OT,OR1,LG_TA
HIDE POPUP serv
ON KEY LABEL F1 DO HELP WITH 8
ON KEY LABEL F7 DO N_YDOS_AND_KOD
sele a
STORE .F. TO _PAD_OTCH
DEFINE POPUP YL FROM 4,10
n=recno()
m=1
br=1
DIMENSION yl_za(100,1)
go top
i=1
yl_za(i,1)=yl
DO WHILE !EOF()
DEFINE BAR (br) OF YL PROMPT yl_za(i,1)
      IF yl=yl_za(i,1)
      skip
      loop
      ENDIF
      m=m+1
      i=i+1
      yl_za(i,1)=yl
      br=br+1
ENDDO
DIMENSION yl_za(m,1)
ON SELECTION POPUP YL DO YLIZ WITH PROMPT()
define window hp from 12,28 to 20,60 shadow color scheme 16
DO CASE
CASE d_ins=1
SCATTER MEMVAR BLANK
STORE 1 TO red
set skip to
CLOSE DATA
SELE i
USE HELP
SELE a
USE RABOT
SELE d
USE LGOT
CASE d_ins=2
IF RECCOUNT()=0
RETURN
ELSE
GO _REC
kw=kw_l
gw=g_w_l
xw=x_w_l
ks=k_ys_l
ot=otop_l
elc=el_c_l
tl=tel_l
rd=rad_l
lg_ta=lgot
or1=or_r
yl_ins=yl
dom_ins=dom
k_ins=kw_ra
SCATTER  MEMVAR
STORE 2 TO red
ENDIF
ENDCASE
ACTIVATE WINDOW INS
=POS_CH2()
@ 1,10 GET m.fam
@ 2,10 GET m.tab picture '9999' VALID unic() ERROR 'Повтор Табеля'
@ 2,28 GET m.tel picture '99999999'
@ 3,10 GET m.yl  WHEN yliz_s()
@ 3,30 GET m.dom PICTURE 'NNNN'
@ 3,40 GET m.kw_ra picture 'nnnn'
@ 4,10 GET m.kv_m picture '###.##' default ''
*@ 5,39 GET m.kol_vo DISABLE
*@ 3,2 GET yl_z FUNCTION '*I ' VALID YLIZ1() WHEN INS2() DEFA 1 SIZE 1,7
@ 5,35 GET m.elec picture '999999'
@ 6,35 GET m.elec1 picture '999999'
@ 5,43 GET or1 FUNCTION '*C Ордер' VALID O_R() DEFA 0 COLOR SCHEME 16
@ 6,43 GET lg_ta FUNC  '*C Льгота' VALID vib_lg() DEFA .f.COLOR SCHEME 16
@ 8,1 to 8,70 double
@ 12,2  GET kw FUNCTION '*C Квартплата' DEFAULT .F. VALID KW_INS() COLOR
SCHEME 16
@ 13,2 GET gw FUNCTION '*C Горячая вода' VALID GW_INS() defa .f.  COLOR
SCHEME 16
@ 14,2 GET xw FUNCTION '*C Холодная вода' VALID XW_INS() DEFA .F. COLOR
SCHEME 16
@ 15,2 GET ks FUNC '*C Комунальные услуги' VALI KS_INS() DEFA .F. COLO
SCHEME 16
@ 16,2 GET ot FUNCTION '*C Отопление' VALID OT_INS() DEFA .F. COLOR SCHEME
16
@ 17,2 GET elc FUNC '*C Электроэнергия' VALID ELC_INS() DEFA .F. COLOR
SCHEME 16
@ 18,2 GET tl FUNCTION '*C Телефон' VALID TL() WHEN TL1() DEFA .F. COLOR
SCHEME 16
@ 19,2 GET rd FUNCTION '*C Радио' VALID rd() WHEN rd1() DEFA .F. COLOR
SCHEME 16
*@ 10,30 SAY 'Категория'
*@ 10,47 get d.info
@ 11,30 say 'Действительна с' COLOR SCHEME 17
@ 11,47 get m.dat_c COLOR SCHEME 17
@ 11,58 say 'по' COLOR SCHEME 17
@ 11,61 get m.dat_po VALID IIF(m.dat_c=