//=======================ÃÒ§ҹ=======================================

 

//==ÃÒ§ҹ«×éÍ=========

procedure sub31

set cursor on

set intensity on

set confirm on

set date to british

 

set color to w/b

cls

se = alertnew("µéͧ¡ÒÃáÊ´§·Ò§",{'¨ÍÀÒ¾','à¤Ã×èͧ¾ÔÁ¾ì'})

? se

do case

case se =1;set device to screen

case se =2;set device to printer

endcase

 

set color to w/b

cls

rio = alertnew("ÃÒ§ҹ«×éÍÊÔ¹¤éÒ",{'ÊÃØ»ÂÍ´«×éÍàÅ×Í¡µÒÁÇѹ','ÊÃØ»ÂÍ´«×éÍàÅ×Í¡µÒÁà´×͹','ÊÃØ»ÂÍ´¢ÒÂàÅ×Í¡µÒÁ»Õ','àÅ×Í¡µÒÁãºÊÑ觫×éÍÊÔ¹¤éÒ','¡àÅÔ¡'})

? rio

do case

case rio =1;do riod

case rio =2;do riom

case rio =3;do rioy

case rio =4;do rion

case rio =5;do writemenu

endcase

return

 

//=======================procedure riod============================

procedure riod

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹÊÃØ»ÂÍ´«×é͵èÍÇѹàÅ×Í¡µÒÁÇѹ·Õè"

 

use suborder

sort on proid,no to tempf

use tempf

copy to suborder

_ordate = ctod(" ")

 

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,20 say "Çѹ·Õè·Õèµéͧ¡Òà : " get _ordate

read

 

sele 1;use product

sele 2;use order

sele 3;use suborder

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 3

_no = no

 

sele 2

_foundm=0

locate for no = _no

if found()

if ordate = _ordate

_foundm= 1

endif

 

endif

sele 3

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say oprice

endif

 

_oprice = oprice

sele 3

_proid = proid

chkline = 0

endif

tamount = tamount + amount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

@ 9+i,50 say ltrim(str(tamount))

total = _oprice * tamount

@ 9+i,60 say ltrim(str(total))

i++

tamount = 0

chkline = 1

endif

 

if i = 10

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

enddo

inkey(0)

close all

return

 

//=======================procedure riom============================

procedure riom

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹÊÃØ»ÂÍ´«×é͵èÍÇѹàÅ×Í¡µÒÁà´×͹"

 

use suborder

sort on proid,no to tempf

use tempf

copy to suborder

_month = 0

_year = 0

 

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,10 say "à´×͹·Õèµéͧ¡Òà : " get _month pict "99"

@ 6,40 say "»Õ : " get _year pict "9999"

read

 

sele 1;use product

sele 2;use order

sele 3;use suborder

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 3

_no = no

 

sele 2

_foundm=0

locate for no = _no

if found()

if month(ordate) = _month .and. year(ordate) = _year

_foundm= 1

endif

 

endif

sele 3

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say oprice

endif

 

_oprice = oprice

sele 3

_proid = proid

chkline = 0

endif

tamount = tamount + amount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

@ 9+i,50 say ltrim(str(tamount))

total = _oprice * tamount

@ 9+i,60 say ltrim(str(total))

i++

tamount = 0

chkline = 1

endif

 

if i = 10

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

enddo

inkey(0)

close all

return

//=======================procedure rioy============================

procedure rioy

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹÊÃØ»ÂÍ´«×é͵èÍÇѹàÅ×Í¡µÒÁ»Õ"

 

use suborder

sort on proid,no to tempf

use tempf

copy to suborder

_year = 0

 

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,20 say "»Õ·Õèµéͧ¡Òà : " get _year pict "9999"

read

 

sele 1;use product

sele 2;use order

sele 3;use suborder

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 3

_no = no

 

sele 2

_foundm=0

locate for no = _no

if found()

if year(ordate) = _year

_foundm= 1

endif

 

endif

sele 3

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say oprice

endif

 

_oprice = oprice

sele 3

_proid = proid

chkline = 0

endif

tamount = tamount + amount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

@ 9+i,50 say ltrim(str(tamount))

total = _oprice * tamount

@ 9+i,60 say ltrim(str(total))

i++

tamount = 0

chkline = 1

endif

 

if i = 10

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

enddo

inkey(0)

close all

return

//=======================procedure rion============================

procedure rion

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,59

@ 2,25 to 4,60 double

@ 3,27 say "ÃÒ§ҹ«×éÍàÅ×Í¡µÒÁàÅ¢·ÕèãºÊÑ觫×éÍ"

set color to w/b

_no = 0

sele 1;use order

sele 2;use suborder

sele 3;use product

 

@ 6,5 say "ãºÊÑ觫×éÍ·Õèµéͧ¡Òà :" get _no

read

sele 1

locate for no = _no

if found()

@ 6,45 say "Çѹ·ÕèÊÑ觫×éÍ : "+dtoc(ordate)

 

 

@ 8,1 clear to 6,80

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

 

total = 0

tt= 0

i = 1

_no = no

sele 2

locate for no = _no

if found()

while !eof()

set filter to no = _no

@ 9+i,6 say ltrim(str(proid))

 

_proid = proid

sele 3

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say ltrim(str(oprice))

endif

sprice = sprice

sele 2

@ 9+i,50 say ltrim(str(amount))

total = amount * oprice

@ 9+i,60 say ltrim(str(total))

tt = tt + total

i++

skip

sele 2

end

endif

@ 9+i,6 say "====================================================================="

@ 10+i,10 say "ÃÇÁà»ç¹à§Ô¹·Ñé§ÊÔé¹ : "+ltrim(str(tt))

@ 11+i,20 say "¡Ãسҡ´»ØèÁã´ æ à¾×èÍ¡ÅѺà¢éÒÊÙèàÁ¹ÙËÅÑ¡"

else

@ 6,45 say "äÁ辺ãºÊÑ觫×éÍàÅ¢·Õè¹Õé"

@ 11,20 say "¡Ãسҡ´»ØèÁã´ æ à¾×èÍ¡ÅѺà¢éÒÊÙèàÁ¹ÙËÅÑ¡"

endif

close all

inkey(20)

return

 

//=======ÃÒ§ҹ¢ÒÂ================

procedure sub32

set cursor on

set intensity on

set confirm on

set date to british

 

set color to w/b

cls

rese = alertnew("µéͧ¡ÒÃáÊ´§·Ò§",{'¨ÍÀÒ¾','à¤Ã×èͧ¾ÔÁ¾ì'})

? rese

do case

case rese =1;set device to screen

case rese =2;set device to printer

endcase

 

set color to w/b

cls

ris = alertnew("ÃÒ§ҹ¢ÒÂÊÔ¹¤éÒ",{'ÂÍ´¢ÒÂàÅ×Í¡µÒÁÇѹ','ÂÍ´¢ÒÂàÅ×Í¡µÒÁà´×͹','ÂÍ´¢ÒÂàÅ×Í¡µÒÁ»Õ','àÅ×Í¡µÒÁãºàÊÃ稢ÒÂÊÔ¹¤éÒ','ÊÔ¹¤éÒ¢ÒÂ´Õ 10Íѹ´Ñº','¡àÅÔ¡'})

? ris

do case

case ris =1;do risd

case ris =2;do rism

case ris =3;do risy

case ris =4;do risn

case ris =5;do topten

case ris =6;do writemenu

endcase

return

 

//=========================ÃÒ§ҹÊÃØ»ÂÍ¡¢ÒÂàÅ×Í¡µÒÁÇѹ===========

procedure risd

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹÊÃØ»ÂÍ´¢ÒµèÍÇѹàÅ×Í¡µÒÁÇѹ·Õè"

 

use subsale

sort on proid,no to tempf

use tempf

copy to subsale

_sdate = ctod(" ")

 

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,20 say "Çѹ·Õè·Õèµéͧ¡Òà : " get _sdate

read

 

sele 1;use product

sele 2;use bigsale

sele 3;use subsale

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 3

_no = no

 

sele 2

_foundm=0

locate for no = _no

if found()

if sdate = _sdate

_foundm= 1

endif

 

endif

sele 3

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say sprice

endif

 

_sprice = sprice

sele 3

_proid = proid

chkline = 0

endif

tamount = tamount + samount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

@ 9+i,50 say ltrim(str(tamount))

total = _sprice * tamount

@ 9+i,60 say ltrim(str(total))

i++

tamount = 0

chkline = 1

endif

 

if i = 10

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

enddo

inkey(0)

close all

return

 

//=========================ÃÒ§ҹÊÃØ»àÅ×Í¡µÒÁà´×͹===============

procedure rism

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹÊÃØ»ÂÍ´¢ÒÂàÅ×Í¡µÒÁà´×͹"

 

use subsale

sort on proid,no to tempf

use tempf

copy to subsale

_month = 0

_year = 0

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,10 say "à´×͹·Õèµéͧ¡Òà : " get _month pict "99"

@ 6,40 say "»Õ : " get _year pict "9999"

read

 

sele 1;use product

sele 2;use bigsale

sele 3;use subsale

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 3

_no = no

 

sele 2

_foundm=0

locate for no = _no

if found()

if month(sdate) = _month .and. year(sdate) = _year

_foundm= 1

endif

 

endif

sele 3

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say sprice

endif

 

_sprice = sprice

sele 3

_proid = proid

chkline = 0

endif

tamount = tamount + samount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

@ 9+i,50 say ltrim(str(tamount))

total = _sprice * tamount

@ 9+i,60 say ltrim(str(total))

i++

tamount = 0

chkline = 1

endif

 

if i = 10

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

enddo

inkey(0)

close all

return

 

//=========================ÃÒ§ҹÊÃØ»ÂÍ´¢ÒÂàÅ×Í¡µÒÁ»Õ============

procedure risy

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹÊÃØ»ÂÍ´¢ÒÂàÅ×Í¡µÒÁ»Õ"

 

use subsale

sort on proid,no to tempf

use tempf

copy to subsale

_year = 0

 

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,20 say "»Õ·Õèµéͧ¡Òà : " get _year pict "9999"

read

 

sele 1;use product

sele 2;use bigsale

sele 3;use subsale

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 3

_no = no

 

sele 2

_foundm=0

locate for no = _no

if found()

if year(sdate) = _year

_foundm= 1

endif

 

endif

sele 3

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say sprice

endif

 

_sprice = sprice

sele 3

_proid = proid

chkline = 0

endif

tamount = tamount + samount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

@ 9+i,50 say ltrim(str(tamount))

total = _sprice * tamount

@ 9+i,60 say ltrim(str(total))

i++

tamount = 0

chkline = 1

endif

 

if i = 10

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

enddo

inkey(0)

close all

 

return

//=========================ÃÒ§ҹ¢ÒÂàÅ×Í¡µÒÁãºàÊÃ稢ÒÂÊÔ¹¤éÒ======

procedure risn

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,59

@ 2,25 to 4,60 double

@ 3,28 say "ÃÒ§ҹ¢ÒÂàÅ×Í¡µÒÁàÅ¢·ÕèãºàÊÃ稢ÒÂ"

set color to w/b

_no = 0

sele 1;use bigsale

sele 2;use subsale

sele 3;use product

 

@ 6,5 say "ãºàÊÃ稢Ò·Õèµéͧ¡Òà :" get _no

read

sele 1

locate for no = _no

if found()

@ 6,45 say "Çѹ·Õè¢Ò : "+dtoc(sdate)

 

 

@ 8,1 clear to 6,80

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

 

total = 0

tt= 0

i = 1

_no = no

sele 2

locate for no = _no

if found()

while !eof()

set filter to no = _no

@ 9+i,6 say ltrim(str(proid))

 

_proid = proid

sele 3

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say ltrim(str(sprice))

endif

sprice = sprice

sele 2

@ 9+i,50 say ltrim(str(samount))

total = samount * sprice

@ 9+i,60 say ltrim(str(total))

tt = tt + total

i++

skip

sele 2

end

endif

@ 9+i,6 say "====================================================================="

@ 10+i,10 say "ÃÇÁà»ç¹à§Ô¹·Ñé§ÊÔé¹ : "+ltrim(str(tt))

@ 11+i,20 say "¡Ãسҡ´»ØèÁã´ æ à¾×èÍ¡ÅѺà¢éÒÊÙèàÁ¹ÙËÅÑ¡"

else

@ 6,45 say "äÁ辺ãºàÊÃ稢ÒÂ㺹Õé"

@ 11,20 say "¡Ãسҡ´»ØèÁã´ æ à¾×èÍ¡ÅѺà¢éÒÊÙèàÁ¹ÙËÅÑ¡"

endif

inkey(20)

return

 

//==============================ÃÒ§ҹÊÔ¹¤éÒ¢ÒÂ´Õ 10 Íѹ´Ñº===========

Procedure topten

set color to w/b

cls

set confirm on

set date to british

set intensity on

set cursor on

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,25 say "ÃÒ§ҹÊÔ¹¤éÒ¢ÒÂ´Õ 10 Íѹ´Ñº"

 

set color to w/b

@ 5,1 clear to 8,60

all =0

 

use subsale

sort on samount/d,proid to tempf

use tempf

copy to subsale

 

sele 1;use product index pro1

sele 2;use bigsale

index on no to bigsale1

sele 3;use subsale

 

set relation to no into bigsale,proid into product

_sdate1 := _sdate2 := ctod("")

@ 5,5 say "Çѹ·ÕèàÃÔèÁ¡ÒâÒ : " get _sdate1

@ 5,40 say "Çѹ·ÕèÊÔé¹ÊØ´¡ÒâÒ : " get _sdate2

read

set filter to bigsale->sdate >= _sdate1 .and. bigsale->sdate <= _sdate2

go top

 

@ 7,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 7,20 say "ÍÑźÑéÁ"

@ 7,40 say "ÈÔŻԹ"

@ 7,60 say "¨Ó¹Ç¹"

 

set color to w/r

@ 8,6 clear to 22,74

@ 8,5 to 22,75 double

i =1

_proid =0

do while !eof() .and. i < 11

if proid != _proid

@ 8+i,6 say ltrim(str(proid))

sele 1

@ 8+i,20 say album

@ 8+i,40 say proname

sele 3

_proid = proid

endif

 

all = all + samount

skip

if proid != _proid

@ 8+i,60 say ltrim(str(all))

i++

all = 0

endif

enddo

inkey(0)

close all

 

 

return

 

//=============ÃÒ§ҹÊÔ¹¤éÒ¤§¤Åѧ==============

procedure sub33

set cursor on

set intensity on

set confirm on

set date to british

 

set color to w/b

cls

se = alertnew("µéͧ¡ÒÃáÊ´§·Ò§",{'¨ÍÀÒ¾','à¤Ã×èͧ¾ÔÁ¾ì'})

? se

do case

case se =1;set device to screen

case se =2;set device to printer

endcase

 

set color to w/b

cls

rin = alertnew("ÃÒ§ҹÊÔ¹¤éÒ¤§¤Åѧ",{'ÊÔ¹¤éÒ¶Ö§¨Ø´ÊÑ觫×éÍ','¨¹.¤§¤ÅѧàÃÕ§µÒÁÃËÑÊÊÔ¹¤éÒ','ÊÔ¹¤éÒ¹éÍ¡ÇèҨشÊÑ觫×éÍ','ÊÔ¹¤éÒÁÒ¡¡ÇèҨشÊÑ觫×éÍ','ÃѺÊÔ¹¤éÒàÅ×Í¡µÒÁÇѹ·ÕèÃѺ','¡àÅÔ¡'})

? rin

do case

case rin =1;do rinor

case rin =2;do rinp

case rin =3;do rinl

case rin =4;do rinm

case rin =5;do ringet

case rin =6;do writemenu

endcase

return

 

//===================ÊÔ¹¤éÒ¶Ö§¨Ø´ÊÑ觫×éÍ====================================

procedure rinor

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,29 say "ÃÒ§ҹÊÔ¹¤éÒ¶Ö§¨Ø´ÊÑ觫×éÍ"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÈÔŻԹ"

@ 5,45 say "ÍÑźÑéÁ"

@ 5,60 say "¨Ó¹Ç¹ÊÔ¹¤éÒ¤§¤Åѧ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use product

sort on inven to ror

close

use ror

set filter to inven = 20

while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,45 say album

@ 7+i,65 say ltrim(str(inven))

i++

skip

end

 

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

//==============================ÊÔ¹¤éÒ¤§¤ÅѧàÃÕ§µÒÁÃËÑÊÊÔ¹¤éÒ==============

procedure rinp

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,30 say "ÃÒ§ҹàÃÕ§µÒÁÃËÑÊÊÔ¹¤éÒ"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÈÔŻԹ"

@ 5,45 say "ÍÑźÑéÁ"

@ 5,60 say "¨Ó¹Ç¹ÊÔ¹¤éÒ¤§¤Åѧ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use product

sort on proid to inp

close

use inp

do while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,45 say album

@ 7+i,65 say ltrim(str(inven))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

//========================ÃÒ§ҹÊÔ¹¤éÒ¹éÍ¡ÇèҨشÊÑ觫×éÍ====================

procedure rinl

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,59

@ 2,25 to 4,60 double

@ 3,29 say "ÃÒ§ҹÊÔ¹¤éÒ¹éÍ¡ÇèҨشÊÑ觫×éÍ"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÈÔŻԹ"

@ 5,45 say "ÍÑźÑéÁ"

@ 5,60 say "¨Ó¹Ç¹ÊÔ¹¤éÒ¤§¤Åѧ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use product

sort on inven to ror

close

use ror

set filter to inven < 20

while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,45 say album

@ 7+i,65 say ltrim(str(inven))

i++

skip

end

 

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

//=======================ÊÔ¹¤éÒÁÒ¡¡ÇèҨشÊÑ觫×éÍ==========================

procedure rinm

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,59

@ 2,25 to 4,60 double

@ 3,30 say "ÃÒ§ҹÊÔ¹¤éÒÁÒ¡¡ÇèҨشÊÑ觫×éÍ"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÈÔŻԹ"

@ 5,45 say "ÍÑźÑéÁ"

@ 5,60 say "¨Ó¹Ç¹ÊÔ¹¤éÒ¤§¤Åѧ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use product

set filter to inven > 20

while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,45 say album

@ 7+i,65 say ltrim(str(inven))

i++

skip

end

 

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

//====================ÃÒ§ҹ¡ÒÃÃѺÊÔ¹¤éÒàÅ×Í¡µÒÁÇѹ·ÕèÃѺÊÔ¹¤éÒ===============

procedure ringet

set color to w/b

cls

set intensity on

set confirm on

set date to british

_getdate = ctod(" ")

_proid = 0

set color to w/r

@ 2,26 clear to 4,59

@ 2,25 to 4,60 double

@ 3,30 say "ÃÒ§ҹÃѺÊÔ¹¤éÒµÒÁÇѹ·ÕèÃѺ"

sele 1;use product

sele 2;use getdate

set color to w/b

@ 5,20 say "Çѹ·ÕèÃѺÊÔ¹¤éÒ :" get _getdate

read

locate for getdate = _getdate

if found()

@ 6,1 clear to 6,80

@ 6,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 6,20 say "ÈÔŻԹ"

@ 6,45 say "ÍÑźÑéÁ"

@ 6,60 say "¨Ó¹Ç¹"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

 

i = 1

set filter to getdate = _getdate

if found()

while !eof()

@ 7+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 7+i,20 say proname

@ 7+i,45 say album

endif

sele 2

@ 7+i,65 say ltrim(str(amount))

i++

skip

end

endif

 

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

endif

return

//===============ÃÒ§ҹÊÁÒªÔ¡===================

procedure sub34

set cursor on

set intensity on

set confirm on

set date to british

 

set color to w/b

cls

se = alertnew("µéͧ¡ÒÃáÊ´§·Ò§",{'¨ÍÀÒ¾','à¤Ã×èͧ¾ÔÁ¾ì'})

? se

do case

case se =1;set device to screen

case se =2;set device to printer

endcase

 

set color to w/b

cls

rem = alertnew("ÃÒ§ҹÊÁÒªÔ¡",{'àÃÕ§µÒÁÃËÑÊÊÁÒªÔ¡','àÃÕ§µÒÁÍÑ¡Éê×èÍÊÁÒªÔ¡','àÅ×Í¡µÒÁÇѹËÁ´ÍÒÂØ','¤Ðá¹¹ÊÙ§ÊØ´10 Íѹ´Ñº','¡àÅÔ¡'})

? rem

do case

case rem =1;do mepro

case rem =2;do meal

case rem =3;do meexp

case rem =4;do mesc

endcase

return

 

//==========================àÃÕ§µÒÁÃËÑÊÊÁÒªÔ¡======================

procedure mepro

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,30 say "ÃÒ§ҹàÃÕ§µÒÁÃËÑÊÊÁÒªÔ¡"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÁÒªÔ¡"

@ 5,20 say "ª×èÍ-Ê¡ØÅ"

@ 5,45 say "ª×èÍàÅè¹"

@ 5,55 say "ÇѹËÁ´ÍÒÂØ"

@ 5,67 say "¤Ðá¹¹ÊÐÊÁ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use member

sort on memid to rm

close

use rm

do while !eof()

@ 7+i,6 say ltrim(str(memid))

@ 7+i,20 say memname

@ 7+i,45 say memnick

@ 7+i,55 say dtoc(exp)

@ 7+i,70 say ltrim(str(tscore))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

 

//===========================àÃÕ§µÒÁÍÑ¡ÉùӪ×èÍÍÑźÑéÁ========================

procedure meal

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,30 say "ÃÒ§ҹàÃÕ§µÒÁª×èÍÊÁÒªÔ¡"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÁÒªÔ¡"

@ 5,20 say "ª×èÍ-Ê¡ØÅ"

@ 5,45 say "ª×èÍàÅè¹"

@ 5,55 say "ÇѹËÁ´ÍÒÂØ"

@ 5,67 say "¤Ðá¹¹ÊÐÊÁ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use member

sort on memname to rme

close

use rme

do while !eof()

@ 7+i,6 say ltrim(str(memid))

@ 7+i,20 say memname

@ 7+i,45 say memnick

@ 7+i,55 say dtoc(exp)

@ 7+i,70 say ltrim(str(tscore))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

 

//============================àÅ×Í¡µÒÁÇѹ·ÕèËÁ´ÍÒÂØ======================

procedure meexp

set color to w/b

cls

use member

set color to w/r

@ 2,16 clear to 5,64

@ 2,15 to 5,65 double

@ 3,30 say "ÃÒ§ҹàÃÕ§µÒÁª×èÍÊÁÒªÔ¡"

_exp = ctod(" ")

@ 4,17 say "ÃкØÇѹ·Õèµéͧ¡Ò÷ÓÃÒ§ҹ : " get _exp

read

set color to w/b

@ 6,1 clear to 6,80

@ 6,6 say "ÃËÑÊÊÁÒªÔ¡"

@ 6,20 say "ª×èÍ-Ê¡ØÅ"

@ 6,45 say "ª×èÍàÅè¹"

@ 6,67 say "¤Ðá¹¹ÊÐÊÁ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

locate for exp = _exp

do while !eof()

if found()

@ 7+i,6 say ltrim(str(memid))

@ 7+i,20 say memname

@ 7+i,45 say memnick

@ 7+i,70 say ltrim(str(tscore))

else

@ 4,40 say "äÁèÁÕÊÁÒªÔ¡ËÁ´ÍÒÂØã¹Çѹ¹Õé"

endif

i++

skip

enddo

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

 

//==============================¤Ðá¹¹ÊÐÊÁÊÙ§ÊØ´10Íѹ´Ñº===================

 

procedure mesc

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,28 say "ÃÒ§ҹ¤Ðá¹¹ÊÙ§ÊØ´10 Íѹ´Ñº"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÁÒªÔ¡"

@ 5,20 say "ª×èÍ-Ê¡ØÅ"

@ 5,45 say "ª×èÍàÅè¹"

@ 5,55 say "ÇѹËÁ´ÍÒÂØ"

@ 5,67 say "¤Ðá¹¹ÊÐÊÁ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

use member

sort on tscore/d to rsc

close

use rsc

for i = 1 to 10

@ 7+i,6 say ltrim(str(memid))

@ 7+i,20 say memname

@ 7+i,45 say memnick

@ 7+i,55 say dtoc(exp)

@ 7+i,70 say ltrim(str(tscore))

skip

next

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

 

//==========================ÃÒ§ҹÊÔ¹¤éÒ==================================

procedure sub35

set cursor off

set intensity on

set confirm on

set date to british

 

set color to w/b

cls

se = alertnew("µéͧ¡ÒÃáÊ´§·Ò§",{'¨ÍÀÒ¾','à¤Ã×èͧ¾ÔÁ¾ì'})

? se

do case

case se =1;set device to screen

case se =2;set device to printer

endcase

 

set color to w/b

cls

rep = alertnew("ÃÒ§ҹÊÔ¹¤éÒ",{'àÃÕ§µÒÁÃËÑÊÊÔ¹¤éÒ','àÃÕ§µÒÁÍÑ¡Éê×èÍÍÑźÑéÁ','¡àÅÔ¡'})

? rep

do case

case rep =1;do repro

case rep =2;do real

case rep =3;do writemenu

endcase

return

 

procedure repro

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,30 say "ÃÒ§ҹàÃÕ§µÒÁÃËÑÊÊÔ¹¤éÒ"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÈÔŻԹ"

@ 5,40 say "ÍÑźÑéÁ"

@ 5,60 say "ÃÒ¤Ò«×éÍ"

@ 5,70 say "ÃÒ¤Ò¢ÒÂ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use product

sort on proid to rp

close

use rp

do while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,40 say album

@ 7+i,61 say ltrim(str(oprice))

@ 7+i,70 say ltrim(str(sprice))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

 

procedure real

set color to w/b

cls

set color to w/r

@ 2,26 clear to 4,54

@ 2,25 to 4,55 double

@ 3,30 say "ÃÒ§ҹàÃÕ§µÒÁÍÑ¡Éê×èÍÍÑźÑéÁ"

set color to w/b

@ 5,1 clear to 6,80

@ 5,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 5,20 say "ÈÔŻԹ"

@ 5,40 say "ÍÑźÑéÁ"

@ 5,60 say "ÃÒ¤Ò«×éÍ"

@ 5,70 say "ÃÒ¤Ò¢ÒÂ"

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

i = 1

use product

sort on album to ra

close

use ra

do while !eof()

@ 7+i,6 say ltrim(str(proid))

@ 7+i,20 say proname

@ 7+i,40 say album

@ 7+i,61 say ltrim(str(oprice))

@ 7+i,70 say ltrim(str(sprice))

i++

skip

if i = 14

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍáÊ´§Ë¹éÒµèÍä»...."

inkey(0)

i = 1

set color to w/r

@ 7,6 clear to 22,74

@ 7,5 to 22,75 double

endif

enddo

set color to w/b

@ 23,1 clear to 24,80

@ 23,20 say "¡´»ØèÁã´ æ à¾×èÍà¢éÒÊÙèàÁ¹ÙËÅÑ¡...."

inkey(20)

close all

return

 

 

 

 

//==========ÃÒ§ҹ¡ÒÃÃѺÊÔ¹¤éÒ===============

procedure sub36

set cursor on

set intensity on

set confirm on

set date to british

 

set color to w/b

cls

se = alertnew("µéͧ¡ÒÃáÊ´§·Ò§",{'¨ÍÀÒ¾','à¤Ã×èͧ¾ÔÁ¾ì'})

? se

do case

case se =1;set device to screen

case se =2;set device to printer

endcase

 

set color to w/b

cls

rio = alertnew("ÃÒ§ҹ¡ÒÃÃѺÊÔ¹¤éÒ",{'àÅ×Í¡µÒÁÇѹ·ÕèÃѺ','àÅ×Í¡µÒÁãºÊÑ觫×éÍÊÔ¹¤éÒ','¡àÅÔ¡'})

? rio

do case

case rio =1;do getd

case rio =2;do getn

case rio =3;do writemenu

endcase

return

 

//========procedure getd=============

procedure getd

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,22 say "ÃÒ§ҹ¡ÒÃÃѺÊÔ¹¤éÒàÅ×Í¡µÒÁÇѹ·Õè"

 

use getdate

sort on proid,no to te

use te

copy to getdate

_getdate = ctod(" ")

tg=0

tp=0

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,20 say "Çѹ·Õè·Õèµéͧ¡Òà : " get _getdate

read

 

sele 1;use product

sele 2;use getdate

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 2

_foundm=0

if getdate = _getdate

_foundm= 1

endif

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say oprice

endif

 

_oprice = oprice

sele 2

_proid = proid

chkline = 0

endif

tamount = tamount + amount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

 

@ 9+i,50 say ltrim(str(tamount))

tg= tg + tamount

total = _oprice * tamount

@ 9+i,60 say ltrim(str(total))

tp = tp + total

i++

tamount = 0

chkline = 1

endif

 

if i = 8

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

 

 

enddo

@ 10+i,10 say "ÃѺÊÔ¹¤éÒ·Ñé§ËÁ´ : "+ltrim(str(tg))+"ªÔé¹"

@ 11+i,10 say "à»ç¹à§Ô¹·Ñé§ÊÔé¹ : "+ltrim(str(tp))+"ºÒ·"

inkey(0)

close all

return

 

//==============procedure getn================

procedure getn

set date to british

set confirm on

set cursor on

set color to w/b

cls

set color to w/r

@ 2,16 clear to 4,59

@ 2,15 to 4,60 double

@ 3,19 say "ÃÒ§ҹ¡ÒÃÃѺÊÔ¹¤éÒàÅ×Í¡µÒÁàÅ¢·ÕèãºÊÑ觫×éÍ"

 

use getdate

sort on proid,no to te

use te

copy to getdate

_no = 0

tg=0

tp=0

set color to w/b

@ 5,1 clear to 8,60

 

@ 6,20 say "àÅ¢·ÕèãºÊÑ觫×éÍ·Õèµéͧ¡Òà : " get _no pict "99999"

read

 

sele 1;use product

sele 2;use getdate

 

@ 8,6 say "ÃËÑÊÊÔ¹¤éÒ"

@ 8,18 say "ÍÑźÑéÁ"

@ 8,40 say "ÃÒ¤Ò"

@ 8,50 say "¨Ó¹Ç¹"

@ 8,60 say "ÃÇÁ"

 

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

_proid = 0

tamount = 0

chkline = 1

total = 0

i = 1

do while !eof()

sele 2

_foundm=0

if no = _no

_foundm= 1

endif

 

if _foundm= 1

if proid != _proid

@ 9+i,6 say ltrim(str(proid))

_proid = proid

sele 1

locate for proid = _proid

if found()

@ 9+i,18 say album

@ 9+i,40 say oprice

endif

 

_oprice = oprice

sele 2

_proid = proid

chkline = 0

endif

tamount = tamount + amount

endif

skip

 

if (_proid != proid .or. eof()) .and. chkline = 0

 

@ 9+i,50 say ltrim(str(tamount))

tg= tg + tamount

total = _oprice * tamount

@ 9+i,60 say ltrim(str(total))

tp = tp + total

i++

tamount = 0

chkline = 1

endif

 

if i = 8

set color to w/b

@ 23,1 clear to 25,60

@ 24,20 say "¡´»ØèÁã´ æ à¾×èÍ´Ù˹éÒµèÍä»"

inkey(0)

set color to w/r

@ 9,6 clear to 22,74

@ 9,5 to 22,75 double

endif

 

 

enddo

 

@ 10+i,10 say "ÃѺÊÔ¹¤éÒ·Ñé§ËÁ´ : "+ltrim(str(tg))+"ªÔé¹"

@ 11+i,10 say "à»ç¹à§Ô¹·Ñé§ÊÔé¹ : "+ltrim(str(tp))+"ºÒ·"

inkey(0)

close all

return