***********************
* CM110.PRG *
*受注票入力・営業員コード*
***********************
set color to G
@ 3, 6 say "外交受注票 入力・・・・・・・・・・・[11]"
set color to
select 1
use TRAN
copy structure to &TEMP.TRAN_A
use &TEMP.TRAN_A alias TRAN
select 2
use TRAN index TR_CS_CD alias TRAN_O
select 3
use TRAN_BP
select 4
use EIGYO index EI_EI_CD
select 5
use CUS index CS_CS_CD
select 6
use ITEM index IT_IT_CD
select 7
use NIPO index NP_NP_DT
store " " to CS_CODE
store " " to CS_SIME
store " " to CS_NO
store " " to IT_CODE
store 0 to CM110CT
store " " to CM110PLUS
store 0 to NP_BPKYA
store " " to NP_BP
do CM110_DS
do while .T.
store YY to CM110YY
store MM to CM110MM
store DD to CM110DD
@ 5,46 say WEEK
@ 7, 4
set color to G
@ 7, 4 say "入力日付 [ ]戻る"
set color to
@ 7,14 say "ESC"
?? chr(BELL)
if TYPE="CLEAR"
clear typeahead
endif
@ 5,33 get CM110YY picture "99"
@ 5,37 get CM110MM picture "99"
@ 5,41 get CM110DD picture "99"
read
clear gets
if readkey()=0.or.readkey()=12
close databases
return
endif
if val(CM110MM) <=0 .or. val(CM110MM) >=13 .or. ;
val(CM110DD) <=0 .or. val(CM110DD) >=32
?? chr(7)
loop
endif
store CM110YY+CM110MM+CM110DD to TR_DATE
store left(cdow(ctod(str(val(CM110YY)+1988,4)+"/"+CM110MM+"/"+CM110DD)),2) to WEEK2
@ 5,46 say WEEK2
do while .T.
store 0 to NP_KYAKU
select EIGYO
@ 7, 4
set color to G
@ 7, 4 say "[ ]日付 [ ]終了"
set color to
@ 7, 5 say "ESC"
@ 7,16 say "."
do while .T.
*******LP100(営業員コード)**********
?? chr(BELL)
if TYPE="CLEAR"
clear typeahead
endif
store " " to EI_CODE
@ 3,67 get EI_CODE picture "!"
read
clear gets
if EI_CODE="."
close databases
return to master
endif
if val(EI_CODE)<>0
?? chr(7)
loop
endif
if readkey()=0.or.readkey()=12.or.EI_CODE="\"
@ 3,68 say " "
exit
endif
goto top
seek EI_CODE
if eof()
?? chr(7)
if HELP="HELP"
?? chr(BELL)
?? chr(BELL)
locate for left(EIGYO_CODE,1)=EI_CODE.or.val(EIGYO_CODE)=0
store 0 to CP_CT
do while CP_CT<13.and..not.eof()
store CP_CT+1 to CP_CT
@ 8+CP_CT,62 say EIGYO_CODE+" "+EIGYO_NAME
continu
enddo
endif
loop
endif
exit
enddo &&(******LP110********)
if readkey()=0.or.readkey()=12
exit
endif
store EIGYO_NAME to EI_NAME
store EIGYO_BUTU to EI_BUTU
@ 5,67 say EI_NAME
@ 9,62 clear to 21,77
do CM110_1
enddo
if readkey()=0.or.readkey()=12
loop
endif
enddo
|
コメント 0