-
Notifications
You must be signed in to change notification settings - Fork 0
/
LICEV.PRG
182 lines (181 loc) · 5.03 KB
/
LICEV.PRG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// ‘ç¥â稪¨ ¯® ¯®âॡ¨â¥«î
PROCEDURE Licevoj
LOCAL pos,old_sel:=select(),TmpRecNo
LOCAL Ba:="",Rs:="",Ks:="",Mf:=""
Local oDlg,aSizeDeskTop,aPos,oProgress
PRIVATE rec_buff,ord_buf,buff,color_buf,nm1,nm2,nm3,nm4,t1,l1,b1,r1,name
PRIVATE IsRecalc:=.F.,PlombaIsOut:=.F.,PlombaIsPresent:=.F.
rec_buff=recno()
ord_buf=indexord()
buff=savescreen(0,0,24,79)
color_buf=setcolor()
if urov<1
if (.not. file(schet_Share+'licevoj.dbf')).or.(.not. file(schet_Share+'lic_sch.ntx')).or.(.not.file(shet_share+'schetchi.ntx'))
sign(2)
set color to (color_buf)
restscreen(0,0,24,79,buff)
return
else
select 77
endif
else
if (.not. file(schet_share+'licevoj.dbf')).or.(.not. file(schet_share+'lic_sch.ntx')).or.;
(.not.file(schet_share+'schetchi.ntx')).or.(.not.file(DDir+'licevoj2.dbf'))
sign(2)
set color to (color_buf)
restscreen(0,0,24,79,buff)
return
else
if select()#77
select 77
endif
endif
endif
if .not.found
if al_box({'® ¯®âॡ¨â¥«î áç¥â稪®¢ ¥ ©¤¥®'},2,;
{' த®«¦¨âì '," ‚ë室 "})==1
dalshe=.t.
else
dalshe=.f.
endif
else
dalshe=.t.
endif
if dalshe
message("†¤¨â¥, ¨¤¥â ¯®¨áª áç¥â稪®¢ ...")
select licevoj2
zap
select licevoj
seek main->lic_schet
if found()
Ba:=Bank; Rs:=R_Schet; Ks:=K_Schet; Mf:=Mfo
restscreen(0,0,24,79,buff)
do while lic_sch==main->lic_schet
message(" € «¨§ áç¥â稪 "+alltrim(schetchik)+space(len(schetchik)-len(alltrim(schetchik))))
select licevoj2
append blank
select licevoj
TmpRecNo:=RecNo()
Select Licevoj2
replace recno with TmpRecNo
Select Licevoj
pos=1
do while .t.
FName:=Fieldname(pos)
IF .not.empty(FName)
Select Licevoj2
replace &FName with Licevoj->&FName
Select Licevoj
ELSE
exit
ENDIF
pos++
enddo
Select Licevoj2
Replace Bank With Ba
Replace R_Schet With Rs
Replace K_Schet With Ks
Replace Mfo With Mf
Select Licevoj
skip
enddo
endif
select licevoj2
// set filter to lic_sch=schet
colorwin(6,0,23,79,'bg/bg')
name=alltrim('‘ç¥â稪¨ ¯®âॡ¨â¥«ï '+main->potrebitel)
@ 6,0 say Center(Name,79," ",.t.)
declare zgl[1]
declare fil[1]
nm1=loarr('zgl','®¬¥à áç¥â稪 ')
nm2=loarr('fil','schetchik')
inp='0'
go top
t1=7
l1=1
b1=23
r1=78
FClose(FCreate(DDir+ReportFile))
fsbrowse(7,20,20,48,'fil','zgl',inp,urov,kl)
restscreen(0,0,24,79,buff)
select licevoj2
set deleted off
temp_=39/reccount()
kol_kl=0
go top
// IF IsRecalc
// obrabot("¥à¥à áç¥â á «ì¤® ⥪ã饣® ¬¥áïæ ")
// do outex with month(new_date)
// ENDIF
// obrabot("Žç¨á⪠¢à¥¬¥®£® ¡ãä¥à ")
oDlg := XbpDialog():new(AppDesktop(),SetAppWindow(),,,,.F.)
aSizeDesktop := oMainWindow:currentSize()
oDlg:create(oMainWindow ,, {100,50}, {aSizeDeskTop[1]-200,90} )
oDlg:title := "Žç¨á⪠¢à¥¬¥®£® ¡ãä¥à "
oDlg:SysMenu := .F.
oDlg:Configure()
oDlg:Show()
aSizeDesktop := oDlg:currentSize()
aPos := oDlg:CurrentPos()
oProgress := ProgressBar():new(oDlg ,, {5,10}, {aSizeDeskTop[1]-18,30},, .F. ) // Progress Bar Create
oProgress:create()
oProgress:minimum := 1
oProgress:maximum := RecCount()
do while !eof()
oProgress:increment() // Progress Bar Increment
// kol_kl=kol_kl+temp_
// colorwin(12,21,12,21+kol_kl,'n/n')
RecDeleted:=deleted()
select licevoj
if licevoj2->recno!=0
go licevoj2->recno
else
if netappend(0)
unlock
endif
endif
//--------------------- ˆ§¬¥¥¨¥ ¯®«¥© ¢ ¡ §¥ ¤ ëå LICEVOJ ¯®«ï¬¨ LICEVOJ2
if reclock()
pos=1
do while .t.
FName:=Fieldname(pos)
IF .not.empty(FName)
IF (licevoj->&FName)!=(licevoj2->&FName)
replace &FName with licevoj2->&FName
ENDIF
ELSE
exit
ENDIF
pos++
enddo
if RecDeleted
delete
endif
unlock
endif
//------------------------------------------------------------------------
select licevoj2
skip
enddo
set deleted on
zap
IF IsRecalc
// obrabot("¥à¥à áç¥â á «ì¤® ⥪ã饣® ¬¥áïæ ")
do outex with month(New_date)
ENDIF
oProgress:destroy() // Progress Bar Destroy
oDlg:Destroy()
// set filter to
endif
IF Dalshe==.F.
// oProgress:destroy() // Progress Bar Destroy
// oDlg:Destroy()
ENDIF
//commit
select(old_sel)
set color to (color_buf)
set order to ord_buf
go rec_buff
restscreen(0,0,24,79,buff)
return
*********************************