*function cr_card

private lctmp_wind
lctmp_wind = sys(2015)
defi wind (lctmp_wind) from 0,0 to 18,100 FONT "MS Sans Serif",10 ;
	STYLE "B" ;
	NOFLOAT ;
	NOCLOSE ;
	SHADOW ;
	NOMINIMIZE ;
	FILL FILE LOCFILE("BOX.BMP","BMP|ICO|PCT|ICN", ;
				"Where is box?")
activate wind (lctmp_wind)
move wind (lctmp_wind) cent
@ 1,2 say "Bankers Name :" COLOR ,RGB(0,0,128,,,,)
@ 1,25 get lccrcard size 1,40 pict '@!' COLOR ,RGB(255,255,255,0,128,0) ;
valid get_ac(lccrcard,lccrbnkac,'bsoB')

@ 2,2 say "  Commission Rate : " COLOR ,RGB(0,0,128,,,,) 
@ 2,25 get lncccommrt size 1,5 pict '##.##' valid comm_amt() COLOR ,RGB(255,255,255,0,128,0)

@ 4,1 say "Commission Amount : " COLOR ,RGB(0,0,128,,,,) 
@ 4,25 get lncccommam size 1,11 pict '#####.##' valid chk_cc_amt() COLOR ,RGB(255,255,255,0,128,0)

@ 5,1 say "    Commision A/C : " COLOR ,RGB(0,0,128,,,,) 
@ 5,25 get lccc_acnm size 1,40 pict '@!' valid get_ac(lccc_acnm,lccc_ac,'') COLOR ,RGB(255,255,255,0,128,0)

@ 6,1 say "  Credit Card No. : " COLOR ,RGB(0,0,128,,,,) 
@ 6,25 get lccc_no size 1,25 COLOR ,RGB(255,255,255,0,128,0)

read
rele wind (lctmp_wind)
if empt(lccc_ac)
	do err_beep
	do alert with "!!! ERROR !!!;You haven't given complete detail for Credit Card Commission"
	retu .F.
endif

function comm_amt 

lncccommam = (m.bill_amt*lncccommrt)/100
show get lncccommam

do chk_cc_amt


function chk_cc_amt

lncccommam = (m.bill_amt*lncccommrt)/100
show get lncccommam

if empt(lncccommam)
	lccc_acnm = ' '
	lccc_ac = ' '
   show get lccc_ac disa
else
   show get lccc_ac enab
endif