-
Notifications
You must be signed in to change notification settings - Fork 0
/
HIGHSP.PRG
49 lines (49 loc) · 2.16 KB
/
HIGHSP.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
********************************************
* ”®à¬¨à®¢ ¨¥ ®âç¥â ® ¯à¥¢ë襨¨ «¨¬¨â®¢ *
********************************************
Function HighSpisok()
private recno,old_screen,select,month,poisk,seekbase,kol_kl,_temp,ras_hod
month=month_menu()
if month>0
limit=0
save screen to old_screen
obrabot("Žâç¥â ® ¯à¥¢ë襨¨ «¨¬¨â®¢")
desc=fcreate(Ddir+'otchet.gkv')
fwrite(desc,stroka+" § "+mesqc(month)+" "+alltrim(str(year(New_date)))+chr(13)+chr(10))
fwrite(desc,'Žá®¢®© â à¨ä '+alltrim(str(schet_1new))+" Š®íää¨æ¨¥â "+alltrim(str(HighKoeff))+chr(13)+chr(10))
fwrite(desc,center('‹/áç',len(str(main->lic_schet)),' ',.t.)+'| '+;
center('®âॡ¨â¥«ì',40,' ',.t.)+'|'+;
center('‹¨¬¨â',len(str(limit,6,1)),' ',.t.)+'|'+;
center(' áå',len(str(limit,6,1)),' ',.t.)+'|'+;
center('ॢ',len(str(limit,6,1)),' ',.t.)+'|'+chr(13)+chr(10)+chr(13)+chr(10))
temp_=39/reccount()
kol_kl=0
recno=recno()
select=select()
go top
do while !eof()
kol_kl=kol_kl+temp_
colorwin(12,21,12,21+kol_kl,'n/n')
ras_hod=round(GetRasHigh(Lic_Schet,Month)/1000,1)
Limit:=GetLimit(Month,Lic_Schet)
IF Ras_Hod>Limit.And.round(Ras_Hod-Limit,1)>0.1.and.main->lim_tar1=0.and.Main->Lic_Schet!=723.and.Main->Lic_Schet!=2102
write_string=rangerepl('','',str(main->lic_schet)+;
'| '+substr(main->potrebitel,1,40)+'|'+str( limit,6,1)+'|'+;
str(ras_hod,6,1)+'|'+str(ras_hod-limit,6,1)+'|'+str(round(schet_1new*1000*HighKoeff*(ras_hod-limit),0)),'H')
fwrite(desc,write_string+chr(13)+chr(10))
ENDIF
ras_hod=0
select(select)
skip
if inkey()=27
IF Al_Box({"à¥à¢ âì à áç¥â"},2)==1
exit
ENDIF
endif
enddo
fclose(desc)
select(select)
go recno
restore screen from old_screen
endif
RETURN NIL