MHP[ 1]="оНЛНЫЭ"
MHP[ 2]="дНАЮБ."
MHP[ 3]="яОХЯНЙ"
MHP[ 4]="оНХЯЙ "
MHP[ 5]="тХКЭРП"
MHP[ 6]="яСЛЛЮ "
MHP[ 7]="оЕВЮРЭ"
MHP[ 8]="сДЮК. "
MHP[ 9]="гЮОХЯЭ"
MHP[10]="бШУНД "
// лЮЯЯХБ НОЖХИ ЦКЮБМНЦН ЛЕМЧ ЯХЯРЕЛШ
MOP[ 1]=" ~н~ОЕПЮЖХХ "
MOP[ 2]=" ~я~ОПЮБНВМХЙХ "
MOP[ 3]=" Н~р~ВЕРШ "
MOP[ 4]=" ~ю~ПУХБ "
MOP[ 5]=" ~п~ЮГМНЕ "
MOP[ 6]=" ~б~ШУНД "
// лЮЯЯХБ ЙННПДХМЮР ЦКЮБМНЦН ЛЕМЧ ЯХЯРЕЛШ
MCO[ 1]=2
MCO[ 2]=12
MCO[ 3]=25
MCO[ 4]=33
MCO[ 5]=40
MCO[ 6]=48
// лЮЯЯХБ ЯРПНЙ ОНЛНЫХ
MMS[ 1]="нТНПЛКЕМХЕ ОНЙСОЙХ/ОПНДЮФХ БЮКЧРШ"
MMS[ 2]=" бБНД ЯОПЮБНВМШУ ДЮММШУ "
MMS[ 3]=" бШБНД НРВЕРНБ "
MMS[ 4]=" пЮАНРЮ Я ЮПУХБНЛ "
MMS[ 5]=" мЮЯРПНИЙХ ЯХЯРЕЛШ "
MMS[ 6]=" бШУНД Б MS DOS "
// лЮЯЯХБ МЮГБЮМХИ ЛЕЯЪЖЕБ
MNT[ 1]="ъМБЮПЪ"
MNT[ 2]="тЕБПЮКЪ"
MNT[ 3]="лЮПРЮ"
MNT[ 4]="юОПЕКЪ"
MNT[ 5]="лЮЪ"
MNT[ 6]="хЧМЪ"
MNT[ 7]="хЧКЪ"
MNT[ 8]="юБЦСЯРЮ"
MNT[ 9]="яЕМРЪАПЪ"
MNT[10]="нЙРЪАПЪ"
MNT[11]="мНЪАПЪ"
MNT[12]="дЕЙЮАПЪ"
setcolor(At_M0_F)
@ 00,00,24,79 BOX " - --"
setcolor(At_M0_N)
@ 00,01 SAY "нАЛЕММШИ ОСМЙР АЮМЙЮ"
// оПНБЕПЙЮ ОЮПНКЪ ОНКЭГНБЮРЕКЪ (3 ОНОШРЙХ)
for II=1 to 3
setcursor(CUR_STYLE)
setcolor(AT_E_F)
_open_n(07,22,11,57)
setcolor(AT_E_N)
_saystr(09,24,"бБЕДХРЕ бЮЬ ОЮПНКЭ :")
KL=0
TST=""
do while .T.
KL=inkey(0)
do case
case KL=8
TST=substr(TST,1,len(TST)-1)
case KL=13
exit
otherwise
TST=TST+chr(KL)
endcase
@ 09,45 SAY repl(" ",len(TST)+1)
@ 09,45 SAY repl(" ╩,len(TST))
if len(TST)=10
exit
endif
enddo
if TST=PAROL
@ 09,24 SAY ╚OK ╚
exit
else
@ 09,24 SAY ╚оЮПНКЭ МЕОПЮБХКЭМШИ ╚
tone(1500,2)
tone(1700,2)
endif
next
if TST<>PAROL
setcolor("W/N")
clear screen
return
endif
restore screen
// мЮЯРПНИЙЮ ОПХМРЕПЮ
if M__EN=2
set printer to BUFFER.PRN
else
M__EN=1
set printer to
endif
setcursor(0)
FM=.F.
setcolor(At_M0_F)
@ 00,01 SAY space(80)
do while .T. // цКЮБМНЕ ЛЕМЧ ЯХЯРЕЛШ
if FM
setcolor(At_M0_F)
@ 00,00,24,79 BOX " - --"
@ 00,01 SAY space(80)
FM=.F.
endif
setcolor("+W/B,+GR/R,,,+BG/B")
MEN=selopt(MEN,MOP,MCO,MMS,0,.F.,.T.,At_M0_S,At_M0_U)
if lastkey()=27.or.MEN=0
if doors()
exit
else
loop
endif
endif
MSCR=savescreen(0,0,24,79)
do case
case MEN=1
operation()
case MEN=2
dictonary()
case MEN=3
report()
case MEN=4
arch()
case MEN=5
system()
case MEN=6
if doors()
exit
endif
endcase
restscreen(0,0,24,79,MSCR)
enddo
setcolor()
release all
return 0
Function OPERATION
local M1[5],M2[5],M3[5],MENU
M1[1]=" ~о~НЙСОЙЮ БЮКЧРШ "
M1[2]=" О~п~НДЮФЮ БЮКЧРШ "
M1[3]=" ~й~НМБЕПЯХЪ БЮКЧРШ "
M2[1]=2
M2[2]=3
M2[3]=4
MENU=1
_open_n(1,0,7,23,B_SINGLE+" ",AT_M1_F)
do while .T.
MENU=selopt(MENU,M1,M2,M3,2,.T.,.F.,AT_M1_S,AT_M1_U)
if MENU=0.or.lastkey()=27
clear type
exit
endif
operCurrency(MENU)
enddo
return 0
Function DICTONARY
local M1[4],M2[4],M3[4],MENU,CL
M1[1]=" ~я~ОХЯНЙ БЮКЧР "
M1[2]=" ~й~СПЯНШ БЮКЧР "
M1[3]=" ЙНДШ ~ж~ЕММНЯРЕИ "
M1[4]=" йНДШ ~д~НЙСЛЕМРНБ "
M2[1]=2
M2[2]=3
M2[3]=4
M2[4]=5
MENU=1
_open_n(1,10,6,32,B_SINGLE+" ",AT_M1_F)
do while .T.
MENU=selopt(MENU,M1,M2,M3,12,.T.,.F.,AT_M1_S,AT_M1_U)
if MENU=0.or.lastkey()=27
clear type
exit
endif
dictonEdit(MENU)
enddo
clear type
return 0
Function REPORT
local M1[4],M2[4],M3[4],MENU,CL
M1[1]=" пЕЕЯРП ОН ОН~й~СОЙЕ БЮКЧРШ "
M1[2]=" пЕЕЯРП ОН ~о~ПНДЮФЕ БЮКЧРШ "
M1[3]=" пЕЕЯРП ОН ~й~НМБЕПЯХХ БЮКЧРШ "
M1[4]=" ЯОПЮБЙЮ НА ~н~ЯРЮРЙЮУ МЮКХВМНИ БЮКЧРШ "
M2[1]=2
M2[2]=3
M2[3]=4
M2[4]=5
MENU=1
_open_n(1,23,7,64,B_SINGLE+" ",AT_M1_F)
do while .T.
MENU=selopt(MENU,M1,M2,M3,25,.T.,.F.,AT_M1_S,AT_M1_U)
if MENU=0.or.lastkey()=27
clear type
exit
endif
reportOut(MENU)
enddo
clear type
return 0
Function SYSTEM
private M1,M2,M3,MENU
declare M1[4],M2[4],M3[4]
M1[1]=" ~с~ЯРЮМНБЙХ "
M1[2]=" ~й~НОХЪ ДЮММШУ "
M1[3]=" ~х~МДЕЙЯМШЕ ТЮИКШ "
M1[4]=" ~я~ВЕРЮ АЮМЙЮ "
M2[1]=2
M2[2]=3
M2[3]=4
M2[4]=5
MENU=1
SCRS=savescreen(0,0,24,79)
_open_n(1,38,6,58,B_SINGLE+" ",AT_M1_F)
do while .T.
MENU=selopt(MENU,M1,M2,M3,40,.T.,.F.,AT_M1_S,AT_M1_U)
if MENU=0.or.lastkey()=27
clear type
exit
endif
do case
case MENU=1
setupm(M1[MENU])
case MENU=2
dublicat(M1[MENU])
case MENU=3
case MENU=4
GetAccount()
endcase
enddo
restscreen(0,0,24,79,SCRS)
clear type
return 0
Function SETUPM
parameters OPT
private SCR,M1[4],M2[4],M3[4],MENU,OPT,A__RCROAD,P__AROL,D__ATROAD,D__UBLDSK,U__SERDSK,P__AGELEN,P__AGESIZ,E__TLF,U__KZGL,U__KTXT,S__ETNUM,FMOD
ROW=row()
M1[1]=" ~о~ЮПНКЭ "
M1[2]=" ОСРХ Й ~д~ЮММШЛ "
M1[3]=" ~с~ЯРЮМНБЙХ ОПХМРЕПЮ "
M1[4]=" ~ж~БЕРЮ "
M2[1]=ROW+2
M2[2]=ROW+3
M2[3]=ROW+4
M2[4]=ROW+5
MENU=1
FMOD=0
SCR=savescreen(0,0,24,79)
do while .T.
_open_n(ROW+1,38,ROW+6,61,B_SINGLE+" ",AT_M2_F)
MENU=selopt(MENU,M1,M2,M3,40,.T.,.F.,AT_M2_S,AT_M2_U)
if MENU=0.or.lastkey()=27
clear type
exit
endif
if MENU=4
FM=.T.
endif
save screen to SESCR
FMOD=setup(MENU)
restore screen from SESCR
enddo
restscreen(0,0,24,79,SCR)
if FMOD=1
P__AROL = crpt(KEYCR,trim(P__AROL))
D__ATROAD = trim(D__ATROAD)
A__RCROAD = trim(A__RCROAD)
U__KZGL = trim(U__KZGL)
U__KTXT = trim(U__KTXT)
if M__EN=2
set Printer to BUFFER.PRN
else
M__EN=1
set Printer to
endif
if Z__PR=2
ZEROPRINT=.F.
else
Z__PR=1
ZEROPRINT=.T.
endif
save all like ?__* to v
PAROL =uncrpt(KEYCR,P__AROL)
DATROAD =D__ATROAD
ARCROAD =A__RCROAD
DUBLDSK =D__UBLDSK
USERDSK =U__SERDSK
PAGELEN =P__AGELEN
PAGESIZ =P__AGESIZ
ETLF =E__TLF
UKZGL =U__KZGL
SETNUM =S__ETNUM
UKTXT =U__KTXT
endif
clear type
return 0
Function DUBLICAT
parameters OPT
private M1,M2,M3,MENU,OPT,DSCR,ROW
ROW=row()
declare M1[2],M2[2],M3[2]
M1[1]=" ~я~НУПЮМЕМХЕ ДЮММШУ "
M1[2]=" ~б~НЯЯРЮМНБКЕМХЕ ДЮММШУ "
M2[1]=ROW+2
M2[2]=ROW+3
MENU=1
popmenu(ROW,38,ROW+5,64,OPT,2,AT_M2_F)
do while .T.
MENU=selopt(MENU,M1,M2,M3,40,.T.,.F.,AT_M2_S,AT_M2_U)
if MENU=0.or.lastkey()=27
clear type
exit
endif
save screen to DSCR
do case
case MENU=1
OPT=M1[MENU]
savedata(OPT)
case MENU=2
OPT=M1[MENU]
restdata(OPT)
endcase
restore screen from DSCR
enddo
clear type
return 0
Function OPERCURRENCY
#Include "Inkey.ch"
#Include "Box.ch"
parameters N_OPER
do case
case N_OPER=1
ByeCurrency()
case N_OPER=2
SaleCurrency()
case N_OPER=3
ConvertCurrency()
endcase
return 0
Function ByeCurrency
local SCR
use (DATROAD+"Document") index (DATROAD+"Document") alias DOC new
SCR=savescreen(1,0,23,61)
CLR=setcolor(AT_G_F)
_open_n(1,0,20,59,B_SINGLE+" ",AT_G_F)
@ 08,0 say "+----------------------------------------------------------+"
@ 14,0 say "+----------------------------------------------------------+"
setcolor(AT_G_N+","+AT_G_S+",,,"+AT_G_U)
set key K_F3 to getcode()
_nort("1010000001")
FINIT=.T.
do while .T.
if FINIT
SER =space(2)
NUM =0
FIO =space(35)
DOC =space(10)
CDOC =0
DSER =space(10)
DNUM =0
REZ =space(1)
NREZ =space(1)
BCODC =10
BCODCUR=2
BSUM =0
SCODC =0
SCODCUR=0
SSUM =0
SSUMS=""
BSUMS=""
@ 12,2 say space(57)
@ 13,2 say space(57)
@ 18,2 say space(57)
@ 19,2 say space(57)
setcolor(AT_G_U)
@ 11,8 say 0 picture "999999999999"
endif
setcolor(AT_G_N+","+AT_G_S+",,,"+AT_G_U)
@ 02,17 say "яопюбйю" get SER picture "XX" valid !empty(SER)
@ 02,28 say "╧" get NUM picture "9999999" valid !empty(NUM)
@ 03,15 say str(day(date()),2)+" "+MNT[month(date())]+;
" "+str(year(date()),4)
@ 04,02 say "бШДЮМЮ" get FIO picture "@S30" valid !empty(FIO)
@ 05,02 say "оПЕДЗЪБКЕМ" get CDOC picture "9999"
@ 05,29 say "ЯЕПХЪ" get DSER picture "XXXXXXXXXX"
@ 05,46 say "╧" get DNUM picture "9999999999"
@ 06,02 say "пЕГХДЕМР [ ]"
@ 06,12 get REZ Picture "L"
@ 08,02 say "онксвемн йкхемрнл:"
@ 09,02 say "йНД ЖЕММНЯРХ" get BCODC picture "9999"
@ 10,02 say "йНД БЮКЧРШ " get BCODCUR picture "9999"
@ 11,02 say "яСЛЛЮ"
@ 14,02 say "опхмърн нр йкхемрю:"
@ 15,02 say "йНД ЖЕММНЯРХ" get SCODC picture "9999"
@ 16,02 say "йНД БЮКЧРШ " get SCODCUR picture "9999"
@ 17,02 say "яСЛЛЮ" get SSUM picture "999999999999" ;
valid saysale(SSUM,18,2,52,AT_G_U,@SSUMS,SCODCUR)
setcursor(CUR_STYLE)
read
setcursor(0)
if lastkey()=K_ESC
exit
endif
if _err(06,40,"дЮММШЕ ББЕДЕМШ ОПЮБХКЭМН?","",""," ~д~Ю "," ~м~ЕР ","")=1
append blank
replace field->SER_ with SER ,;
field->NUM_ with NUM ,;
field->FIO_ with FIO ,;
field->DOC_ with DOC ,;
field->DSER_ with DSER ,;
field->DNUM_ with DNUM ,;
field->REZ_ with !empty(REZ),;
field->BCODC_ with BCODC ,;
field->BCODCUR_ with BCODCUR,;
field->BSUM_ with BSUM ,;
field->SCODC_ with SCODC ,;
field->SCODCUR_ with SCODCUR,;
field->SSUM_ with SSUM,;
field->DATE_ with date(),;
field->OPERATION_ with 1
commit
if _err(06,40,"оЕВЮРЮРЭ ЯОПЮБЙС?","",""," ~д~Ю "," ~м~ЕР ","")=1
// printspr()
endif
FINIT=.T.
loop
else
FINIT=.F.
endif
enddo
_nort()
set key K_F3 to
restscreen(1,0,23,61,SCR)
dbcloseall()
return 0
Function SaleCurrency
local SCR
use (DATROAD+"Document") index (DATROAD+"Document") alias DOC new
SCR=savescreen(1,0,23,61)
CLR=setcolor(AT_G_F)
_open_n(1,0,20,59,B_SINGLE+" ",AT_G_F)
@ 08,0 say "+----------------------------------------------------------+"
@ 14,0 say "+----------------------------------------------------------+"
setcolor(AT_G_N+","+AT_G_S+",,,"+AT_G_U)
set key K_F3 to getcode()
_nort("1010000001")
FINIT=.T.
do while .T.
if FINIT
SER =space(2)
NUM =0
FIO =space(35)
DOC =space(10)
DSER =space(10)
DNUM =0
REZ =space(1)
NREZ =space(1)
CDOC =0
BCODC =0
BCODCUR=0
BSUM =0
SCODC =0
SCODCUR=0
SSUM =0
SSUMS=""
BSUMS=""
@ 12,2 say space(57)
@ 13,2 say space(57)
@ 18,2 say space(57)
@ 19,2 say space(57)
setcolor(AT_G_U)
@ 11,8 say 0 picture "999999999999"
endif
setcolor(AT_G_N+","+AT_G_S+",,,"+AT_G_U)
@ 02,17 say "яопюбйю" get SER picture "XX" valid !empty(SER)
@ 02,28 say "╧" get NUM picture "9999999" valid !empty(NUM)
@ 03,15 say str(day(date()),2)+" "+MNT[month(date())]+" "+str(year(date()),4)
@ 04,02 say "бШДЮМЮ" get FIO picture "@S30" valid !empty(FIO)
@ 05,02 say "оПЕДЗЪБКЕМ" get CDOC picture "9999"
@ 05,29 say "ЯЕПХЪ" get DSER picture "XXXXXXXXXX"
@ 05,46 say "╧" get DNUM picture "9999999999"
@ 06,02 say "пЕГХДЕМР [ ]"
@ 06,12 get REZ Picture "L"
@ 08,02 say "опхмърн нр йкхемрю:"
@ 09,02 say "йНД ЖЕММНЯРХ" get SCODC picture "9999"
@ 10,02 say "йНД БЮКЧРШ " get SCODCUR picture "9999"
@ 11,02 say "яСЛЛЮ"
@ 14,02 say "онксвемн йкхемрнл:"
@ 15,02 say "йНД ЖЕММНЯРХ" get BCODC picture "9999"
@ 16,02 say "йНД БЮКЧРШ " get BCODCUR picture "9999"
@ 17,02 say "яСЛЛЮ" get BSUM picture "999999999999" valid saybye(BSUM,17,2,52,AT_G_U,@BSUMS,BCODCUR)
setcursor(CUR_STYLE)
read
setcursor(0)
if lastkey()=K_ESC
exit
endif
if _err(06,40,"дЮММШЕ ББЕДЕМШ ОПЮБХКЭМН?","",""," ~д~Ю "," ~м~ЕР ","")=1
append blank
replace field->SER_ with SER ,;
field->NUM_ with NUM ,;
field->FIO_ with FIO ,;
field->DOC_ with DOC ,;
field->DSER_ with DSER ,;
field->DNUM_ with DNUM ,;
field->REZ_ with !empty(REZ),;
field->BCODC_ with BCODC ,;
field->BCODCUR_ with BCODCUR,;
field->BSUM_ with BSUM ,;
field->SCODC_ with SCODC ,;
field->SCODCUR_ with SCODCUR,;
field->SSUM_ with SSUM,;
field->DATE_ with date(),;
field->OPERATION_ with 1
commit
if _err(06,40,"оЕВЮРЮРЭ ЯОПЮБЙС?","",""," ~д~Ю "," ~м~ЕР ","")=1