-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCAT_ADD.PRG
More file actions
executable file
·45 lines (44 loc) · 989 Bytes
/
Copy pathCAT_ADD.PRG
File metadata and controls
executable file
·45 lines (44 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
hide menu main
hide popup all
if .not. file('&data\catagory.dbf')
do file_error in looks
return .t.
endif
@ 0,1 say"Add Counter Pricing Catagory" color r/w
do disk with 1 in looks
define window cat from 1,10 to 7,60 double shadow title" New "
move window cat center
activate window cat
do while .t.
clear gets
store space(30) to cat_nm
store 0 to cat_cd,tool
@ 1,5 say"Name :"get cat_nm pict'@!' valid name()
@ 3,1 to 3,47 color w/b
@ 4,13 get tool function'*H Add;Cancel' size 1,10,4
read cycle
if tool=2 .or. tool=0
deacti window all
clear window all
close all
do ctop in looks
do disk with 0 in looks
return .t.
exit
endif
if tool=1
use &data\catagory shared
go bott
cat_cd=cat_code+1
append blank
replace cat_name with cat_nm
replace cat_code with cat_cd
use
loop
endif
enddo
proc name
if empty(cat_nm)
do error with "A name is required to start","the pricing catagory","Error"
return .f.
endif