//===========================¡ÒâÒÂ==============================
procedure sub11
set cursor on
set intensity on
set color to w/b
set confirm on
cls
_no = 0
_memid = 0
_proid = 0
_memname = " "
_memnick = " "
use bigsale
sort on no to ss
close
use ss
goto bottom
_no = no + 1
close
@ 1,10 say "F2 = ´Ù¢éÍÁÙÅÊÁÒªÔ¡ F3 = ´Ù¢éÍÁÙÅÊÔ¹¤éÒ ESC = ¡ÅѺÊÙèàÁ¹ÙËÅÑ¡"
set date to british
set color to w/r
@ 2,6 clear to 6,74
@ 2,5 to 6,75 double
@ 3,35 say "¢ÒÂÊÔ¹¤éÒ"
@ 4,6 say "àÅ¢·ÕèãºàÊÃç¨ :"+ltrim(str(_no))
@ 4,55 say "Çѹ·Õè¢Ò :"+dtoc(date())
@ 4,35 say "======="
use member
sort on memid to tem
use tem
copy to member
use member
@ 5,6 say "ÃËÑÊÊÁÒªÔ¡ : "get _memid pict '99999'
set key -1 to hmem
read
locate for memid = _memid
if found()
@ 5,25 say "ª×èÍ-Ê¡ØÅ :"+memname
@ 5,55 say "ª×èÍàÅè¹ : " +memnick
close
else
@ 5,20 say "äÁèÁÕÃËÑÊÊÁÒªÔ¡¹Õé"
endif
use bigsale
append blank
replace no with _no
replace sdate with date()
replace memid with _memid
close
set color to w/b
@ 24,1 clear to 24,80
set color to w/r
@ 8,5 clear to 20,74
@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"
@ 8,18 say "ÍÑźÑéÁ"
@ 8,33 say "ÃÒ¤Ò¢ÒÂ"
@ 8,42 say "¨Ó¹Ç¹¤§¤Åѧ"
@ 8,55 say "¨Ó¹Ç¹¢ÒÂ"
@ 8,68 say "ÃÇÁ"
ans = "Y"
i = 1
_proid = 0
tscore = 0
tta = 0
_amount = 0
_inven=0
total=0
a = 0
_sprice = 0
cash = 0
change = 0
_type = 0
tt=0
tcd=0
use product
sort on proid to temm
close
use temm
copy to product
close
sele 1;use product
sele 2;use member
sele 3;use subsale
@ 7,5 to 20,75 double
while upper(ans) = "Y" .and. lastkey() != 27
sele 1
@ 8+i,6 get _proid pict '999999'
set key -2 to hpro
read
locate for proid = _proid
if found()
@ 8+i,18 say album
@ 8+i,33 say ltrim(str(sprice))
_sprice = sprice
@ 8+i,42 say ltrim(str(inven))
@ 8+i,55 get _amount pict '9999'
read
if _amount > inven
@ 8+i,65 say "äÁè¾Í¢ÒÂ"
@ 8+i,55 get _amount pict '9999'
read
@ 8+i,65 clear to 8+i,74
endif
_inven = inven - _amount
replace inven with _inven
sele 3
append blank
replace no with _no
replace proid with _proid
replace samount with _amount
a = _sprice * _amount //total of 1 piece
@ 8+i,68 say ltrim(str(a))
total = total + a // total of a
tta = tta + _amount //total of amount
if left(str(_proid),1) = "1"
tt = tt+1 //total of tape
endif
if left(str(_proid),1) = "2"
tcd = tcd +1 // total of cd
endif
else
@ 8+i,25 say "äÁèÁÕÊÔ¹¤éÒÃËÑʹÕé "
endif
@ 22,20 say "µéͧ¡Ò÷ÓÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N)" get ans
read
if upper(ans)= "Y"
i++
_proid = 0
_album =" "
_sprice = 0
_amount = 0
if i = 7
i = 1
@ 8+i,6 clear to 20,74
endif
else
set color to /b
cls
set color to w/r
@ 8,5 clear to 20,74
@ 9,6 say"---------------------------------------------------------------------"
@ 10,10 say "ÃÇÁ¢ÒÂÊÔ¹¤éÒ·Ñé§ÊÔé¹ :"+ltrim(str(tta))+" ªÔé¹"
@ 11,10 say "à»ç¹à§Ô¹·Ñé§ÊÔé¹ :"+ltrim(str(total))+" ºÒ·"
@ 12,10 say "à·» :"+ltrim(str(tt))+" ÃÒ¡ÒÃ"
@ 12,35 say "CD :"+ltrim(str(tcd))+" ÃÒ¡ÒÃ"
sele 2
locate for memid = _memid
if found()
_tscore = tscore + tta
replace tscore with _tscore
@ 13,10 say "ä´é¤Ðá¹¹à¾ÔèÁ : "+ltrim(str(tta))
@ 13,35 say "¢³Ð¹Õé¤Ø³ÁÕ¤Ðá¹¹ÊÐÊÁ : "+ltrim(str(tscore))
@ 15,10 say "ÃѺà§Ô¹ : " get cash pict '99999'
read
change = cash - total
@ 15,35 say "·Í¹à§Ô¹ : "+ltrim(str(change))
if tscore >= 100
@ 17,10 say "¤Ø³ÁÕ¤Ðá¹¹ÊÐÊÁ¤Ãº 100 ¤Ðá¹¹áÅéÇ ä´éÃѺ¢Í§ÃÒ§ÇÑÅ...ÂÔ¹´Õ´éǤèÐ"
replace tscore with 0
endif
else
@ 13,20 say "äÁèä´éÃѺ¤Ðá¹¹à¾ÃÒФسäÁèä´éà»ç¹ÊÁÒªÔ¡ÃéÒ¹"
endif
inkey()
endif
end
inkey(0)
close all
return
//===========================¡ÒÃÊÑ觫×éÍ==============================
procedure sub12
set cursor on
set intensity on
set color to w/b
set confirm on
cls
_no = 0
_proid = 0
use order
sort on no to oo
close
use oo
goto bottom
_no = no + 1
close
@ 1,15 say "F3 = ´Ù¢éÍÁÙÅÊÔ¹¤éÒ ¡´ Esc = ¡ÅѺÊÙèàÁ¹ÙËÅÑ¡"
set date to british
set color to w/r
@ 2,6 clear to 6,74
@ 2,5 to 6,75 double
@ 3,35 say "«×éÍÊÔ¹¤éÒ"
@ 4,35 say "======"
@ 5,10 say "àÅ¢·ÕèãºÊÑ觫×éÍ :"+ltrim(str(_no))
use order
append blank
replace no with _no
@ 5,35 say "Çѹ·ÕèÊÑ觫×éÍ :"+dtoc(date())
replace ordate with date()
close
set color to w/b
@ 24,1 clear to 24,80
@ 5,65 say time()
inkey(0.2)
set color to w/r
@ 8,5 clear to 20,74
@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"
@ 8,25 say "ÍÑźÑéÁ"
@ 8,43 say "ÃÒ¤Ò«×éÍ"
@ 8,58 say "¨Ó¹Ç¹"
@ 8,68 say "ÃÇÁ"
ans = "Y"
i = 1
_notget = 0
_album =" "
_amount = 0
tta=0
total=0
a = 0
_oprice = 0
_type = 0
tt=0
tcd=0
use product
sort on proid to temm
close
use temm
copy to product
close
sele 1;use notget
sele 2;use product
sele 3;use suborder
@ 7,5 to 20,75 double
while upper(ans) = "Y" .and. lastkey() != 27
sele 2
@ 8+i,6 get _proid pict '999999'
set key -2 to hpro
read
locate for proid = _proid
if found()
@ 8+i,25 say album
@ 8+i,43 say ltrim(str(oprice))
@ 8+i,58 get _amount pict '9999'
read
_oprice = oprice
sele 3
append blank
replace no with _no
replace proid with _proid
replace amount with _amount
a = _oprice * _amount //total of 1 piece
@ 8+i,68 say ltrim(str(a))
total = total + a // total of a
tta = tta + _amount //total of amount
if left(str(_proid),1) = "1"
tt = tt+1 //total of tape
endif
if left(str(_proid),1) = "2"
tcd = tcd +1 // total of cd
endif
_proid = proid
_amount = amount
sele 1
append blank
replace proid with _proid
_notget = notget + _amount
replace notget with _notget
replace status with "N"
replace no with _no
else
@ 8+i,25 say "äÁèÁÕÊÔ¹¤éÒÃËÑʹÕé "
endif
@ 22,20 say "µéͧ¡Ò÷ÓÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N)" get ans
read
if upper(ans)= "Y"
i++
_proid = 0
_album =" "
_price = 0
_amount = 0
if i = 10
i = 1
@ 8+i,6 clear to 20,74
endif
else
set color to /b
cls
set color to w/r
@ 8,5 clear to 20,74
@ 9,6 say"---------------------------------------------------------------------"
@ 10,10 say "ÃÇÁÊÑè§ÊÔ¹¤éÒ·Ñé§ÊÔé¹ :"+ltrim(str(tta))+" ªÔé¹"
@ 11,10 say "à»ç¹à§Ô¹·Ñé§ÊÔé¹ :"+ltrim(str(total))+" ºÒ·"
@ 12,10 say "à·» :"+ltrim(str(tt))+" ÃÒ¡ÒÃ"
@ 12,35 say "CD :"+ltrim(str(tcd))+" ÃÒ¡ÒÃ"
inkey()
endif
sele 2
end
close all
inkey(0)
return
//=========================à¾ÔèÁÊÔ¹¤éÒãËÁè===================================
procedure sub16
set cursor on
set confirm on
set intensity on
set color to w/b
cls
set date to british
@ 2,5 say date()
@ 2,65 say time()
@ 2,35 say "à¾ÔèÁÊÔ¹¤éÒãËÁè"
@ 3,35 say "=========="
@ 6,25 say "¡´ F3 = ´Ù¢éÍÁÙÅÊÔ¹¤éÒ ¡´ Esc = ¡àÅÔ¡"
set color to w/r
@ 8,11 clear to 20,69
@ 8,10 to 20,70 double
_proid = 0
_proname = space(15)
_album = space(15)
_oprice = 0
_sprice = 0
ans =" "
an =" "
use product
sort on proid to temm
close
use temm
copy to product
close
do while upper(ans) != "Y" .and. lastkey() != 27
use product
@ 10,15 say "ÃËÑÊÊÔ¹¤éÒ : " get _proid pict '999999'
@ 12,15 say "ÈÔŻԹ : " get _proname
@ 14,15 say "ÍÑźÑéÁ : " get _album
@ 16,15 say "ÃÒ¤Ò«×éÍ : " get _oprice pict '999'
@ 18,15 say "ÃÒ¤Ò¢ÒÂ : " get _sprice pict '999'
set key -2 to hpro
read
@ 22,20 say "µéͧ¡ÒèѴà¡çº¢éÍÁÙÅäËÁ (Y/N) ? " get an
read
if upper(an) = 'Y'
append blank
replace proid with _proid,proname with _proname,album with _album,oprice with _oprice,sprice with _sprice,inven with 0
close
else
@ 24,20 say "µéͧ¡Ò÷ÓÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N)?" get ans
read
if upper(ans) ='Y'
do sub16
else
do writemenu
keyboard chr(27)
endif
endif
@ 24,20 say "µéͧ¡Ò÷ÓÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N)?" get ans
read
if upper(ans) = 'Y'
do sub16
else
do writemenu
keyboard chr(27)
endif
inkey(10)
enddo
//============================à¾ÔèÁÊÁÒªÔ¡ãËÁè==================================
procedure sub17
set cursor on
set confirm on
set intensity on
set color to w/b
cls
set date to british
@ 2,5 say date()
@ 2,65 say time()
@ 2,30 say "à¾ÔèÁÊÁÒªÔ¡ãËÁè"
@ 3,30 say "==========="
@ 23,25 say "¡´ F2 = ´Ù¢éÍÁÙÅÊÁÒªÔ¡ ¡´ Esc = ¡àÅÔ¡"
set color to w/r
@ 8,11 clear to 18,69
@ 8,10 to 18,70 double
i= 1
_memid = 0
_memname = space(20)
_memnick = space(10)
_exp = ctod(" ")
_dateapp = ctod(" ")
ans =" "
an =" "
use member
sort on memid to tem
close
use tem
copy to member
close
do while upper(ans) != "Y" .and. lastkey() != 27
do new
use member
@ 10,15 say "ÃËÑÊÊÁÒªÔ¡ : "+ltrim(str(_memid))
@ 12,15 say "ª×èÍ-Ê¡ØÅ : " get _memname
@ 14,15 say "ª×èÍàÅè¹ : " get _memnick
set key -1 to hmem
read
_exp = date()+365
_dateapp = date()
@ 16,15 say "ÇѹËÁ´ÍÒÂØ : "+dtoc(_exp)
@ 20,20 say "µéͧ¡ÒèѴà¡çº¢éÍÁÙÅäËÁ (Y/N) ? " get an
read
if upper(an) = 'Y'
append blank
replace memid with _memid,memname with _memname,memnick with _memnick,dateapp with _dateapp,exp with _exp,tscore with 0
close
else
@ 22,20 say "µéͧ¡Ò÷ÓÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N)?" get ans
read
if upper(ans) ='Y'
do sub17
else
do writemenu
keyboard chr(27)
endif
endif
@ 22,20 say "µéͧ¡Ò÷ÓÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N)?" get ans
read
if upper(ans) = 'Y'
do sub17
else
do writemenu
keyboard chr(27)
endif
inkey(10)
enddo
procedure new
use member
sort on memid to mm
use mm
goto bottom
_memid = memid + 1
close
return _memid
return
//====================µÃǨÃѺÊÔ¹¤éÒãËÁè==================================
procedure sub15
set cursor on
set color to w/b
cls
set confirm on
set date to british
_no =0
_amount = 0
_inven = 0
tt=0
tcd=0
total=0
money=0
mm =0
set color to w/r
@ 2,6 clear to 6,74
@ 2,5 to 6,75 double
@ 3,35 say "µÃǨÃѺÊÔ¹¤éÒ"
@ 4,35 say "=========="
@ 3,60 say date()
@ 5,6 say "àÅ¢·ÕèãºÊÑ觫×éÍ: "get _no pict '99999'
read
use getdate
locate for no = _no
if found()
@ 5,40 say "µÃǨÃѺÊÔ¹¤éÒáÅéÇ"
inkey(0)
close
else
use order
locate for no = _no
if found()
@ 5,50 say "Çѹ·ÕèÊÑ觫×éÍ : "+dtoc(ordate)
endif
close
set color to w/b
@ 7,1 clear to 7,80
@ 7,6 say "ÃËÑÊÊÔ¹¤éÒ"
@ 7,20 say "ÍÑźÑéÁ"
@ 7,40 say "¨Ó¹Ç¹ÊÑè§"
@ 7,50 say "ÃÒ¤Ò«×éÍ"
@ 7,60 say "¨Ó¹Ç¹ÃѺ"
@ 7,70 say "ÃÇÁ"
sele 1;use order
sele 2;use getdate
sele 3;use notget
sele 4;use product
sele 5;use suborder
i = 1
locate for no = _no
if found()
while !eof() .and. _no = no
@ 7+i,6 say ltrim(str(proid))
if left(str(proid),1) = "1"
tt = tt+1
endif
if left(str(proid),1) = "2"
tcd = tcd + 1
endif
_proid = proid
sele 4
locate for proid = _proid
if found()
@ 7+i,20 say album
endif
sele 3
locate for no = _no
if found()
delete
pack
endif
sele 5
@ 7+i,40 say ltrim(str(amount))
_proid = proid
sele 4
locate for proid = _proid
if found()
@ 7+i,50 say ltrim(str(oprice))
endif
@ 7+i,60 get _amount pict '9999'
read
total = total + _amount
money = _amount * oprice
mm = mm + money
@ 7+i,70 say ltrim(str(money))
sele 4
_inven = inven + _amount
replace inven with _inven
sele 2
append blank
replace getdate with date(),proid with _proid,amount with _amount,no with _no
_amount = 0
sele 5
i++
skip
end
inkey(0)
endif
set color to w/b
cls
set color to w/r
@ 2,6 clear to 12,74
@ 4,15 say "ÃѺ෻ : "+ltrim(str(tt))+" ÃÒ¡ÒÃ"
@ 6,15 say "ÃѺCD : "+ltrim(str(tcd))+" ÃÒ¡ÒÃ"
@ 8,15 say "ÃÇÁ·Ñé§ÊÔé¹ ÃѺÊÔ¹¤éÒ : "+ltrim(str(total))+" ªÔé¹"
@ 10,15 say "ªÓÃÐà§Ô¹·Ñé§ÊÔé¹ : "+ltrim(str(mm))+" ºÒ·"
inkey(0)
endif
close all
return
//========================¡àÅÔ¡«×éÍ===============================
procedure sub14
set intensity on
set cursor on
set confirm on
set color to w/b
cls
set date to british
set color to w/r
@ 2,6 clear to 7,74
@ 2,5 to 7,75 double
@ 3,6 say date()
@ 3,35 say "¡àÅÔ¡«×éÍ"
@ 4,35 say "======="
@ 3,60 say time()
inkey(0.2)
_no = 0
an = " "
ans = " "
_proid = 0
i = 1
sele 1;use product
sele 2;use notget
sele 3;use order
sele 4;use suborder
@ 5,10 say "àÅ¢·ÕèãºÊÑ觫×éÍ·Õèµéͧ¡ÒáàÅÔ¡ :" get _no pict '99999'
read
sele 3
locate for no = _no
if found()
@ 6,10 say "Çѹ·ÕèÊÑ觫×éÍ :"+dtoc(ordate)
set color to w/b
@ 8,1 clear to 8,80
@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"
@ 8,20 say "ÈÔŻԹ"
@ 8,40 say "ÍÑźÑéÁ"
@ 8,58 say "ÃÒ¤Ò«×éÍ"
@ 8,68 say "¨Ó¹Ç¹"
set color to w/r
@ 9,6 clear to 22,74
@ 9,5 to 22,75 double
sele 4
locate for no = _no
if found()
while !eof()
@ 9+i,6 say ltrim(str(proid))
@ 9+i,68 say ltrim(str(amount))
_proid = proid
sele 1
locate for proid = _proid
if found()
@ 9+i,20 say proname
@ 9+i,40 say album
@ 9+i,58 say ltrim(str(oprice))
endif
sele 4
i++
skip
end
endif
close all
@ 11+i,20 say "µéͧ¡ÒáàÅÔ¡ÊÑ觫×éÍÃÒ¡ÒùÕéËÃ×ÍäÁè (Y/N) ?" get ans
read
no = _no
if upper(ans) = "Y"
use order
locate for no = _no
if found()
delete
pack
endif
close
use suborder
locate for no = _no
if found()
while !eof()
delete
pack
end
endif
close
use notget
locate for no = _no
if found()
while !eof()
delete
pack
end
endif
close
@ 12+i,20 say "·Ó¡ÒáàÅÔ¡ÃÒ¡ÒùÕéàÃÕºÃéÍÂáÅéÇ"
endif
else
@ 6,10 say "äÁ辺ãºÊÑ觫×éÍÃËÑʹÕé"
@ 24,15 say "µéͧ¡ÒáàÅÔ¡ÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N) ?" get ans
read
if upper(ans) ="Y"
do sub14
else
keyboard chr(27)
inkey()
cls
do writemenu
endif
endif
inkey(0)
return
//=========================¡àÅÔ¡¢ÒÂ====================================
procedure sub13
set intensity on
set cursor on
set confirm on
set color to w/b
cls
set date to british
set color to w/r
@ 2,6 clear to 7,74
@ 2,5 to 7,75 double
@ 3,6 say date()
@ 3,35 say "¡àÅÔ¡¢ÒÂ"
@ 4,35 say "========"
@ 3,60 say time()
inkey(0.2)
_no = 0
_tscore = 0
_inven = 0
score = 0
an = " "
ans = " "
_proid = 0
i = 1
sele 1;use product
sele 2;use member
sele 3;use bigsale
sele 4;use subsale
@ 5,6 say "àÅ¢·ÕèãºàÊÃ稢Ò·Õèµéͧ¡ÒáàÅÔ¡ : " get _no pict '99999'
read
sele 3
locate for no = _no
if found()
@ 5,50 say "Çѹ·Õè¢Ò : "+dtoc(sdate)
@ 6,6 say "ÃËÑÊÊÁÒªÔ¡ : "+ltrim(str(memid))
_memid = memid
sele 2
locate for memid = _memid
if found()
@ 6,40 say "ª×èÍ-Ê¡ØÅ : "+memname
endif
set color to w/b
@ 8,1 clear to 8,80
@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"
@ 8,20 say "ÈÔŻԹ"
@ 8,40 say "ÍÑźÑéÁ"
@ 8,58 say "ÃÒ¤Ò¢ÒÂ"
@ 8,68 say "¨Ó¹Ç¹"
set color to w/r
@ 9,6 clear to 22,74
@ 9,5 to 22,75 double
sele 4
locate for no = _no
if found()
while !eof() .and. no = _no
@ 9+i,6 say ltrim(str(proid))
@ 9+i,68 say ltrim(str(samount))
_samount = samount
score = score +samount
delete
_proid = proid
sele 1
locate for proid = _proid
if found()
@ 9+i,20 say proname
@ 9+i,40 say album
@ 9+i,58 say ltrim(str(sprice))
_inven = inven + _samount
replace inven with _inven
endif
sele 4
i++
skip
end
endif
close all
@ 11+i,20 say "µéͧ¡ÒáàÅÔ¡ÊÑ觫×éÍÃÒ¡ÒùÕéËÃ×ÍäÁè (Y/N) ?" get ans
read
samount = _samount
no = _no
if upper(ans) = "Y"
use bigsale
locate for no = _no
if found()
delete
pack
endif
close
use member
locate for memid = _memid
if found()
_tscore = tscore - score
replace tscore with _tscore
endif
close
use subsale
locate for no = _no
if found()
pack
endif
@ 12+i,20 say "·Ó¡ÒáàÅÔ¡ÃÒ¡ÒùÕéàÃÕºÃéÍÂáÅéÇ"
close
endif
else
@ 6,10 say "äÁ辺ãºÊÑ觫×éÍÃËÑʹÕé"
@ 24,15 say "µéͧ¡ÒáàÅÔ¡ÃÒ¡ÒÃÍ×è¹ÍÕ¡ËÃ×ÍäÁè (Y/N) ?" get ans
read
if upper(ans) ="Y"
do sub14
else
keyboard chr(27)
inkey()
cls
do writemenu
endif
endif
return