Программное обеспечение пункта обмена валюты банкаРефераты >> Программирование и компьютеры >> Программное обеспечение пункта обмена валюты банка
@ 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
// printspr()
endif
FINIT=.T.
loop
else
FINIT=.F.
endif
enddo
_nort()
set key K_F3 to
restscreen(1,0,23,56,SCR)
dbcloseall()
return 0
Функция регистрации конверсии валюты
Function ConvertCurrency
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"