Смекни!
smekni.com

Программное обеспечение пункта обмена валюты банка (стр. 11 из 11)

// 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"

@ 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 GETCODE

local CL

AKTIV=getactive()

RS=row()

CS=col()+5

do case

case AKTIV:name="BCODCUR"

S=incod(1,@BCODCUR)

case AKTIV:name="BCODC"

S=incod(3,@BCODC)

case AKTIV:name="SCODCUR"

S=incod(1,@SCODCUR)

case AKTIV:name="SCODC"

S=incod(3,@SCODC)

case AKTIV:name="CDOC"

S=incod(4,@CDOC)

otherwise

S=""

endcase

CL=setcolor(AT_G_N)

@ RS,CS say substr(S,1,30)

if !empty(S)

keyboard chr(13)

endif

setcolor(CL)

return .T.

тСМЙЖХЪ БШБНДЮ ЯСЛЛШ ОНЙСОЙХ ОПНОХЯЭЧ

Function SAYB

parameters NUM,Y,X,L,C,S,CC

local CL

S=numstring(NUM,CC)

CL=setcolor(C)

@ Y,X say padr(substr(S,1,L),L)

@ Y+1,2 say padr(substr(S,L+1,57),57)

setcolor(AT_G_U)

@ Y-1,8 say NUM picture "999999999999"

setcolor(CL)

return .T.

тСМЙЖХЪ БШБНДЮ ЯСЛЛШ ОПНДЮФХ ОПНОХЯЭЧ

Function SAYS

parameters NUM,Y,X,L,C,S,CC

local CL

S=numstring(NUM,CC)

CL=setcolor(C)

@ Y,X say padr(substr(S,1,L),L)

@ Y+1,2 say padr(substr(S,L+1,57),57)

setcolor(AT_G_U)

@ Y-1,8 say NUM picture "999999999999"

setcolor(CL)

return .T.

тСМЙЖХЪ БШВХЯКЕМХЪ ЯСЛЛШ НОЕПЮЖХХ ОНЙСОЙХ

Function SAYBYE

parameters NUM,Y,X,L,C,S,CC

local CL,OBL,RESULT

RESULT=.F.

OBl=select()

use (DATROAD+"currency") index (DATROAD+"currency") new

seek CC

if found()

BSUM=KURS*NUM

use

S=numstring(NUM,CC)

CL=setcolor(C)

@ Y,X say padr(substr(S,1,L),L)

@ Y+1,2 say padr(substr(S,L+1,57),57)

says(SSUM,12,2,57,AT_G_U,@SSUMS,SCODCUR)

RESULT=.T.

else

use

endif

setcolor(CL)

select(OBL)

return RESULT

тСМЙЖХЪ БШВХЯКЕМХЪ ЯСЛЛШ НОЕПЮЖХХ ОПНДЮФХ

Function SAYSALE

parameters NUM,Y,X,L,C,S,CC

local CL,OBL,RESULT

RESULT=.F.

OBl=select()

use (DATROAD+"currency") index (DATROAD+"currency") new

seek CC

if found()

BSUM=KURS*NUM

use

S=numstring(NUM,CC)

CL=setcolor(C)

@ Y,X say padr(substr(S,1,L),L)

@ Y+1,2 say padr(substr(S,L+1,57),57)

sayb(BSUM,12,2,57,AT_G_U,@BSUMS,BCODCUR)

RESULT=.T.

else

use

endif

setcolor(CL)

select(OBL)

return RESULT

тсмйжхъ бшбндю ЯОХЯЙЮ ДНЙСЛЕМРНБ ДМЪ

Function Docrep

local SCR

use (DATROAD+"Currency") index (DATROAD+"Currency") alias CUR new

use (DATROAD+"Document") index (DATROAD+"Document") alias DOC new

set relation to BCODCUR_ into CUR

SCR=savescreen(1,0,23,79)

_open_n(1,0,22,77,B_SINGLE+" ",AT_S_F)

_nort("1000001001")

declare MF[5],MZ[5]

MF[1]={|| SER_+str(NUM_,9)}

MF[2]={|| FIO_ }

MF[3]={|| iif(REZ_,"п","м")}

MF[4]={|| CUR->SHORT_NAME+" "+str(BSUM_)}

MF[5]={|| getShort_Name(SCODCUR_)+" "+str(SSUM_)}

MZ[1]="яОПЮБЙЮ"

MZ[2]="тЮЛХКХЪ хЛЪ нРВЕЯРБН"

MZ[3]="п/м"

MZ[4]="бШДЮМН"

MZ[5]="оПХМЪРН"

TERM=" оПНБЕДЕММШЕ ДНЙСЛЕМРШ ДМЪ "

setcolor(AT_M1_S)

@ 01,(70-len(TERM))/2 SAY TERM

setcolor(AT_S_N+","+AT_S_S+",,,"+AT_S_U)

clear type

oBrow := TBrowseDB(2,1,21,76)

oBrow:headSep := "=T="

oBrow:colSep := " і "

for i := 1 TO len(MF)

oBrow:addColumn(TBColumnNew(MZ[i], MF[i]))

next

while (!oBrow:stabilize()) ; end

lKeyWaiting := .F.

lBrowse := .T.

do while (lBrowse)

if (!lKeyWaiting)

do while (!oBrow:stabilize())

// оПЕПБЮРЭ ЯРЮАХКХГЮЖХЧ, ЕЯКХ МЮФЮРЮ ЙКЮБХЬЮ

if ((nKey := Inkey()) != 0)

lKeyWaiting := .T.

exit

endif

enddo

endif

// еЯКХ МЕР МЮФЮРХЪ, РН ФДЮРЭ ЕЦН

if (!lKeyWaiting)

nKey := Inkey(0)

endif

do case

case (nKey == K_DOWN)

oBrow:down()

case (nKey == K_UP)

oBrow:up()

case (nKey == K_PGDN)

oBrow:pageDown()

case (nKey == K_PGUP)

oBrow:pageUp()

case (nKey == K_CTRL_PGUP)

oBrow:goTop()

case (nKey == K_CTRL_PGDN)

oBrow:goBottom()

case (nKey == K_RIGHT)

oBrow:right()

case (nKey == K_LEFT)

oBrow:left()

case (nKey == K_HOME)

oBrow:home()

case (nKey == K_END)

oBrow:end()

case (nKey == K_CTRL_LEFT)

oBrow:panLeft()

case (nKey == K_CTRL_RIGHT)

oBrow:panRight()

case (nKey == K_CTRL_HOME)

oBrow:panHome()

case (nKey == K_CTRL_END)

oBrow:panEnd()

case (nKey == K_F7)

// printspr()

case (nKey == K_ESC).or.(nKey == K_F10)

lBrowse := .F.

endcase

lKeyWaiting := .F.

enddo

restscreen(1,0,23,79,SCR)

dbcloseall()

_nort()

return 0

тсмйжхъ гюйпшрхъ ноепюжхнммнцн дмъ

Function CloseDay()

if _err(07,05,"бШ ДЕИЯРБХРЕКЭМН ФЕКЮЕРЕ ГЮЙПШРЭ","НОЕПЮЖХНММШИ ДЕМЭ ?",""," дЮ "," мЕР ","")<>1

return 0

endif

ArBase=strtran(str(day(MDATE),2)+str(month(MDATE),2)+substr(str(year(MDATE),4),3,2)," ","0")

use (DATROAD+"Operatio")

copy to (ARCROAD+"Op"+ArBase)

delete all

pack

use (DATROAD+"Document")

copy to (ARCROAD+"Do"+ArBase)

delete all

pack

use (DATROAD+"Currency")

copy to (ARCROAD+"Cu"+ArBase)

use (DATROAD+"Kurses")

copy to (ARCROAD+"Ku"+ArBase)

use (DATROAD+"Codes")

copy to (ARCROAD+"Co"+ArBase)

ODATE=MDATE

SCR=savescreen(07,05,12,47)

_open_n(07,05,10,45,B_SINGLE+" ",AT_G_F)

CL=setcolor(AT_G_U)

@ 08,22 say ODATE

do while(.T.)

setcolor(AT_G_N+","+AT_G_S+",,,"+AT_G_U)

@ 08,07 say "рЕЙСЫЮЪ ДЮРЮ :"

@ 09,07 say " мНБЮЪ ДЮРЮ :" get MDATE

setcursor(CUR_STYLE)

read

setcursor(0)

if _err(10,15,"дЮРЮ ББЕДЕМЮ ОПЮБХКЭМН?","",""," дЮ "," мЕР ","")=1

save all like MDATE to d

exit

endif

enddo

dbcloseall()

restscreen(07,05,12,47,SCR)

setcolor(CL)

return 0

кХРЕПЮРСПЮ

1. CA-Clipper 5.02 ╚Users Guide╩ - пСЙНБНДЯРБН ОН ОПНЦПЮЛЛХПНБЮМХЧ МЮ ЪГШЙЕ Clipper

2. ю.ю.оНОНБ ╚оПНЦПЮЛЛХПНБЮМХЕ Б ЯПЕДЕ FoxPro. оНЯРПНЕМХЕ ЯХЯРЕЛ НАПЮАНРЙХ ДЮММШУ. (╚пЮДХН Х яБЪГЭ╩ л. 1993Ц.)

3. ╚RS-Club╩ ╧╧1-7 1996Ц. (Miktor Ky. Union Publisher Inc. 1996Ц.)

4. о.мНПРНМ, о.хЮН ╚оПНЦПЮЛЛХПНБЮМХЕ МЮ я++ Б ЯПЕДЕ Windows╩ (╚дХЮКЕЙРХЙЮ╩ йХЕБ 1993Ц.)

5. хМЯРПСЙЖХЪ жа пт ╚н ОНПЪДЙЕ НПЦЮМХГЮЖХХ ПЮАНРШ НАЛЕММШУ ОСМЙРНБ МЮ РЕППХРНПХХ пНЯЯХИЯЙНИ ТЕДЕПЮЖХХ, ЯНБЕПЬЕМХЪ Х СВЕРЮ БЮКЧРМН - НАЛЕММШУ НОЕПЮЖХИ СОНКМНЛНВЕММШЛХ АЮМЙЮЛХ╩ ╧27 НР 27.02.1995Ц.