Professional Documents
Culture Documents
4K CERACAS
TRADING”
Submitted by:
Ragine Oflas
Christine Pareño
Catherine Roman
Ruth Picardal
Submitted to:
Mr.Froilan Mazo
I. Objective…………………………………Page 1
II. Statement of the Problem……………….Page 1
V. Program Listing……………………….Page6-33
VI.Photo Gallery…………………………….Page 34
I. OBJECTIVE
Log – in Form:
Menu Form:
Inventory Form:
Search Form:
Purchasing Form:
Delivery Form:
Edit Order Form:
Timer1.Timer
thisform.visible = .f.
thisformset.form9.visible = .t.
thisformset.form1.timer1.enabled= .f.
Form1.Load
thisform.width = 353
thisform.left = 348
set defa to "E:\Appliances\tables"
use inventory
Log – in Form:
Enter.Click
with thisformset.form9
a = alltrim(upper(.text1.value))
if a = "CERACAS" then
thisform.visible = .f.
thisformset.form2.visible = .t.
endif
if a # "CERACAS" then
Messageb("Password incorrect.")
.text1.setfocus
.text1.value = ""
endif
endwith
Menu Form
Inventory.Click
thisform.hide
thisformset.form3.visible = .t.
close table
set defa to "E:\Appliances\tables"
use inventory
Inventory.Gotfocus
with thisformset.form2
.container1.backcolor = rgb(128,255,128)
Endwith
Inventory.Lostfocus
with thisformset.form2
.container1.backcolor = rgb(255,255,255)
Endwith
Purchasing.Click
thisform.hide
thisformset.form4.visible = .t.
close table
set defa to "E:\Appliances\tables"
use purchasing
delete all
pack
with thisformset.form4
.text1.value = ""
.text2.value = ""
.text3.value = ""
.text4.value = ""
.text5.value = ""
.text6.value = 0
.text7.value = 0
.text8.value = 0
.text9.value = 0
.refresh
endwith
with thisformset.form4
.grid1.recordsource = "purchasing"
.grid1.columncount = 7
.grid1.column1.controlsource = "purchasing.code"
.grid1.column2.controlsource = "purchasing.type"
.grid1.column3.controlsource = "purchasing.price"
.grid1.column4.controlsource = "purchasing.stocks"
.grid1.column5.controlsource = "purchasing.spec"
.grid1.column6.controlsource = "purchasing.quantity"
.grid1.column7.controlsource = "purchasing.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Spec"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 34
.grid1.column2.width = 71
.grid1.column3.width = 46
.grid1.column4.width = 44
.grid1.column5.width = 258
.grid1.column6.width = 50
.grid1.column7.width = 48
.grid1.column1.alignment = 2
.grid1.column2.alignment = 2
.grid1.column3.alignment = 2
.grid1.column4.alignment = 2
.grid1.column5.alignment = 2
.grid1.column6.alignment = 2
.grid1.column7.alignment = 2
endwith
Purchasing.Gotfocus
with thisformset.form2
.container2.backcolor = rgb(128,255,128)
Endwith
Purchasing.Lostfocus
with thisformset.form2
.container2.backcolor = rgb(255,255,255)
Endwith
Delivery.Click
thisform.visible = .f.
thisformset.form5.visible = .t.
with thisformset.form5
close table
use orders
delete all
pack
.grid1.recordsource = "orders"
.grid1.columncount = 7
.grid1.column1.controlsource = "orders.code"
.grid1.column2.controlsource = "orders.type"
.grid1.column3.controlsource = "orders.price"
.grid1.column4.controlsource = "orders.stocks"
.grid1.column5.controlsource = "orders.spec"
.grid1.column6.controlsource = "orders.quantity"
.grid1.column7.controlsource = "orders.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Specification"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.alignment = 2
.grid1.column2.alignment = 2
.grid1.column3.alignment = 2
.grid1.column4.alignment = 2
.grid1.column5.alignment = 2
.grid1.column6.alignment = 2
.grid1.column7.alignment = 2
.grid1.column1.width = 35
.grid1.column2.width = 159
.grid1.column3.width = 54
.grid1.column4.width = 42
.grid1.column5.width = 158
.grid1.column6.width = 48
.grid1.column7.width = 75
thisformset.form5.text7.value = thisformset.form4.text7.value
.refresh
Endwith
Delivery.Gotfocus
with thisformset.form2
.container3.backcolor = rgb(128,255,128)
Endwith
Delivery.Lostfocus
with thisformset.form2
.container3.backcolor = rgb(255,255,255)
Endwith
Exit.Click
thisform.release
Exit.Gotfocus
with thisformset.form2
.container4.backcolor = rgb(128,255,128)
Endwith
Exit.Lostfocus
with thisformset.form2
.container4.backcolor = rgb(255,255,255)
Endwith
Inventory Form:
Timer1.Timer
with thisformset.form3
ctime = time()
nhour = val(substr(ctime,1,2))
if nhour > 12 then
ctime = alltrim(str(nhour - 12)) + substr(ctime,3,6) + " pm"
else
ctime = ctime + " am"
endif
.text6.value = ctime
Endwith
Form3.Init
with thisformset.form3
.text7.value = cdow(date()) + " " + cmonth(date()) + " " + ;
alltrim(str(day(date()))) + ", " + alltrim(str(year(date())))
.refresh
.text1.controlsource = "inventory.code"
.text2.controlsource = "inventory.type"
.text3.controlsource = "inventory.price"
.text4.controlsource = "inventory.stocks"
.text5.controlsource = "inventory.spec"
Endwith
Top.Click
with thisformset.form3
go top
.refresh
Endwith
Previous.Click
with thisform
skip -1
.refresh
if bof() then
go top
.refresh
endif
endwith
Next.Click
with thisformset.form3
skip
.refresh
if eof() then
go bottom
.refresh
endif
endwith
Last.Click
with thisformset.form3
go bottom
.refresh
Endwith
New.Click
with thisformset.form3
reply = messagebox("Add new product?",32 + 1,"Add new product?")
if reply = 1 then
.text1.controlsource = ""
.text2.controlsource = ""
.text3.controlsource = ""
.text4.controlsource = ""
.text5.controlsource = ""
.command1.enabled = .f.
.command2.enabled = .f.
.command3.enabled = .f.
.command4.enabled = .f.
.command6.enabled = .f.
.command7.enabled = .f.
.command8.enabled = .f.
.command9.enabled = .f.
.command10.enabled = .f.
.command5.visible = .f.
.command11.visible = .t.
.text1.value = ""
.text2.value = ""
.text3.value = 0
.text4.value = 0
.text5.value = ""
.text1.enabled = .t.
.text2.enabled = .t.
.text3.enabled = .t.
.text4.enabled = .t.
.text5.enabled = .t.
.text1.setfocus
endif
if reply = 2 then
cancel
endif
.refresh
Endwith
Savenew.Click
with thisformset.form3
a = upper(.text1.value)
b = .text2.value
c = .text3.value
d = .text4.value
e = .text5.value
reply = messageb("Save new product?",32 + 1,"Save new?")
if reply = 1 then
.command1.enabled = .t.
.command2.enabled = .t.
.command3.enabled = .t.
.command4.enabled = .t.
.command6.enabled = .t.
.command7.enabled = .t.
.command8.enabled = .t.
.command9.enabled = .t.
.command10.enabled = .t.
.command5.visible = .t.
.command11.visible = .f.
.text1.enabled = .f.
.text2.enabled = .f.
.text3.enabled = .f.
.text4.enabled = .f.
.text5.enabled = .f.
go bottom
append blank
replace code with a
replace type with b
replace price with c
replace stocks with d
replace spec with e
.text1.controlsource = "inventory.code"
.text2.controlsource = "inventory.type"
.text3.controlsource = "inventory.price"
.text4.controlsource = "inventory.stocks"
.text5.controlsource = "inventory.spec"
.refresh
endif
if reply = 2 then
cancel
.command1.enabled = .t.
.command2.enabled = .t.
.command3.enabled = .t.
.command4.enabled = .t.
.command6.enabled = .t.
.command7.enabled = .t.
.command8.enabled = .t.
.command9.enabled = .t.
.command10.enabled = .t.
.command5.visible = .t.
.command11.visible = .f.
.text1.enabled = .f.
.text2.enabled = .f.
.text3.enabled = .f.
.text4.enabled = .f.
.text5.enabled = .f.
.text1.controlsource = "inventory.code"
.text2.controlsource = "inventory.type"
.text3.controlsource = "inventory.price"
.text4.controlsource = "inventory.stocks"
.text5.controlsource = "inventory.spec"
.refresh
endif
endwith
Edit.Click
with thisformset.form3
reply = messageb("Edit product?",32 + 1,"Edit")
if reply = 1 then
.text1.enabled = .t.
.text2.enabled = .t.
.text3.enabled = .t.
.text4.enabled = .t.
.text5.enabled = .t.
.command1.enabled = .f.
.command2.enabled = .f.
.command3.enabled = .f.
.command4.enabled = .f.
.command5.enabled = .f.
.command7.enabled = .f.
.command8.enabled = .f.
.command9.enabled = .f.
.command10.enabled = .f.
.command11.enabled = .f.
.command12.visible = .t.
.command6.visible = .f.
.text1.controlsource = ""
.text2.controlsource = ""
.text3.controlsource = ""
.text4.controlsource = ""
.text5.controlsource = ""
endif
if reply = 2 then
cancel
endif
endwith
Saveedit.Click
with thisformset.form3
a = .text1.value
b = .text2.value
c = .text3.value
d = .text4.value
e = .text5.value
reply = messageb("Save changes?",32 + 1,"Save")
if reply = 1 then
replace code with a
replace type with b
replace price with c
replace stocks with d
replace spec with e
.refresh
.text1.enabled = .f.
.text2.enabled = .f.
.text3.enabled = .f.
.text4.enabled = .f.
.text5.enabled = .f.
.command1.enabled = .t.
.command2.enabled = .t.
.command3.enabled = .t.
.command4.enabled = .t.
.command5.enabled = .t.
.command7.enabled = .t.
.command8.enabled = .t.
.command9.enabled = .t.
.command10.enabled = .t.
.command12.visible = .f.
.command6.visible = .t.
.text1.controlsource = "inventory.code"
.text2.controlsource = "inventory.type"
.text3.controlsource = "inventory.price"
.text4.controlsource = "inventory.stocks"
.text5.controlsource = "inventory.spec"
endif
if reply = 2 then
.text1.enabled = .f.
.text2.enabled = .f.
.text3.enabled = .f.
.text4.enabled = .f.
.text5.enabled = .f.
.command1.enabled = .t.
.command2.enabled = .t.
.command3.enabled = .t.
.command4.enabled = .t.
.command5.enabled = .t.
.command7.enabled = .t.
.command8.enabled = .t.
.command9.enabled = .t.
.command10.enabled = .t.
.command12.visible = .f.
.command6.visible = .t.
.text1.controlsource = "inventory.code"
.text2.controlsource = "inventory.type"
.text3.controlsource = "inventory.price"
.text4.controlsource = "inventory.stocks"
.text5.controlsource = "inventory.spec"
endif
.refresh
Endwith
Search.Click
thisformset.form6.visible = .t.
Delete.Click
with thisformset.form3
reply = messageb("Delete this record?",32 + 1,"Delete?")
if reply = 1 then
delete
pack
.refresh
endif
if reply = 2 then
cancel
endif
endwith
Browse.Click
with thisformset.form3
.grid1.visible = .t.
.command10.visible = .f.
.command13.visible = .t.
.height = 523
.command1.top = 445
.command2.top = 445
.command3.top = 445
.command4.top = 445
.command5.top = 445
.command6.top = 445
.command7.top = 445
.command8.top = 445
.command9.top = 445
.command10.top = 445
.command11.top = 445
.command12.top = 445
.command13.top = 445
.top = 53
endwith
with thisformset.form3.grid1
.recordsource = "inventory"
.column1.controlsource = "inventory.code"
.column2.controlsource = "inventory.type"
.column3.controlsource = "inventory.price"
.column4.controlsource = "inventory.stocks"
.column5.controlsource = "inventory.spec"
Endwith
thisform.visible = .f.
thisformset.form2.visible = .t.
with thisformset.form3
.grid1.visible = .f.
.command10.visible = .t.
.command13.visible = .f.
.height = 355
.command1.top = 288
.command2.top = 288
.command3.top = 288
.command4.top = 288
.command5.top = 288
.command6.top = 288
.command7.top = 288
.command8.top = 288
.command9.top = 288
.command10.top = 288
.command11.top = 288
.command12.top = 288
.command13.top = 288
Endwith
Hide.Click
with thisformset.form3
.grid1.visible = .f.
.command10.visible = .t.
.command13.visible = .f.
.height = 355
.command1.top = 288
.command2.top = 288
.command3.top = 288
.command4.top = 288
.command5.top = 288
.command6.top = 288
.command7.top = 288
.command8.top = 288
.command9.top = 288
.command10.top = 288
.command11.top = 288
.command12.top = 288
.command13.top = 288
.top = 152
endwith
Back.Click
thisform.visible = .f.
thisformset.form2.visible = .t.
with thisformset.form3
.grid1.visible = .f.
.command10.visible = .t.
.command13.visible = .f.
.height = 355
.command1.top = 288
.command2.top = 288
.command3.top = 288
.command4.top = 288
.command5.top = 288
.command6.top = 288
.command7.top = 288
.command8.top = 288
.command9.top = 288
.command10.top = 288
.command11.top = 288
.command12.top = 288
.command13.top = 288
Endwith
Search Form:
Search.Click
with thisformset
a = alltrim(upper(.form6.text1.value))
locate for code = a
if found() then
with thisformset.form3
.text1.value = code
.text2.value = type
.text3.value = price
.text4.value = stocks
.text5.value = spec
.refresh
thisformset.form6.visible = .f.
thisformset.form6.text1.value = ""
endwith
endif
if .not. found() then
reply = messageb("Record not found",48 + 5,"Retry")
if reply = 4 then
thisformset.form6.text1.value = ""
thisformset.form6.text1.setfocus
endif
if reply = 2 then
thisformset.form6.visible = .f.
endif
endif
endwith
Purchasing Form:
Text1.Lostfocus
with thisformset.form4
close table
use inventory
a = alltrim(upper(.text1.value))
locate for code = a
if .not. found() then
reply = messageb("Record not found.",32 + 1,"Sorry")
if reply = 1 then
.text1.value = ""
.text2.value = ""
.text3.value = 0
.text4.value = 0
.text5.value = ""
endif
if reply = 2 then
.text1.value = ""
.text2.value = ""
.text3.value = 0
.text4.value = 0
.text5.value = ""
endif
with thisformset.form4.grid1
.columncount = 7
.column1.header1.caption = "Code"
.column2.header1.caption = "Type"
.column3.header1.caption = "Price"
.column4.header1.caption = "Stocks"
.column5.header1.caption = "Spec"
.column6.header1.caption = "Quantity"
.column7.header1.caption = "Amount"
.column1.width = 34
.column2.width = 71
.column3.width = 46
.column4.width = 44
.column5.width = 258
.column6.width = 50
.column7.width = 48
.refresh
endwith
endif
if found() then
.text2.value = type
.text3.value = price
.text4.value = stocks
.text5.value = spec
close table
use purchasing
.grid1.recordsource = "purchasing"
.grid1.column1.controlsource = "purchasing.code"
.grid1.column2.controlsource = "purchasing.type"
.grid1.column3.controlsource = "purchasing.price"
.grid1.column4.controlsource = "purchasing.stocks"
.grid1.column5.controlsource = "purchasing.spec"
.grid1.column6.controlsource = "purchasing.quantity"
.grid1.column7.controlsource = "purchasing.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Spec"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 34
.grid1.column2.width = 71
.grid1.column3.width = 46
.grid1.column4.width = 44
.grid1.column5.width = 258
.grid1.column6.width = 50
.grid1.column7.width = 48
.refresh
endif
endwith
Text1.Gotfocus
with thisformset.form4.grid1
.columncount = 7
.column1.header1.caption = "Code"
.column2.header1.caption = "Type"
.column3.header1.caption = "Price"
.column4.header1.caption = "Stocks"
.column5.header1.caption = "Spec"
.column6.header1.caption = "Quantity"
.column7.header1.caption = "Amount"
.column1.width = 34
.column2.width = 71
.column3.width = 46
.column4.width = 44
.column5.width = 258
.column6.width = 50
.column7.width = 48
Endwith
Text6.Gotfocus
thisformset.form4.command4.enabled = .t.
Compute.Click
with thisformset.form4
if .text7.value < .text8.value then
.text9.value = .text8.value - .text7.value
.command1.enabled = .f.
.command4.enabled = .f.
endif
if .text7.value > .text8.value then
messagebox("Your money is not enough...")
endif
endwith
Purchaseitem.Click
with thisformset.form4
a = .text1.value
b = .text2.value
c = .text3.value
d = .text4.value
e = .text5.value
f = .text6.value
reply = messageb("Purchase item?",32 + 1,"Purchase")
if reply = 1 then
if d < f then
reply = messageb("Stock is not enough...",32 + 1,"Sorry")
if reply = 1 then
cancel
endif
if reply = 2 then
cancel
endif
endif
if d > f then
.text7.value = (.text6.value * .text3.value) + .text7.value
close table
use purchasing
append blank
replace code with a
replace type with b
replace price with c
replace stocks with d - f
replace spec with e
replace quantity with f
replace amount with quantity * price
.text4.value = d - f
.grid1.recordsource = "purchasing"
.grid1.columncount = 7
.grid1.column1.controlsource = "purchasing.code"
.grid1.column2.controlsource = "purchasing.type"
.grid1.column3.controlsource = "purchasing.price"
.grid1.column4.controlsource = "purchasing.stocks"
.grid1.column5.controlsource = "purchasing.spec"
.grid1.column6.controlsource = "purchasing.quantity"
.grid1.column7.controlsource = "purchasing.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Specification"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 34
.grid1.column2.width = 71
.grid1.column3.width = 46
.grid1.column4.width = 44
.grid1.column5.width = 258
.grid1.column6.width = 50
.grid1.column7.width = 48
.grid1.column1.alignment = 2
.grid1.column2.alignment = 2
.grid1.column3.alignment = 2
.grid1.column4.alignment = 2
.grid1.column5.alignment = 2
.grid1.column6.alignment = 2
.grid1.column7.alignment = 2
.refresh
close table
use inventory
replace stocks with stocks - f
close table
use purchasing
.grid1.recordsource = "purchasing"
.grid1.columncount = 7
.grid1.column1.controlsource = "purchasing.code"
.grid1.column2.controlsource = "purchasing.type"
.grid1.column3.controlsource = "purchasing.price"
.grid1.column4.controlsource = "purchasing.stocks"
.grid1.column5.controlsource = "purchasing.spec"
.grid1.column6.controlsource = "purchasing.quantity"
.grid1.column7.controlsource = "purchasing.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Specification"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 34
.grid1.column2.width = 71
.grid1.column3.width = 46
.grid1.column4.width = 44
.grid1.column5.width = 258
.grid1.column6.width = 50
.grid1.column7.width = 48
.grid1.column1.alignment = 2
.grid1.column2.alignment = 2
.grid1.column3.alignment = 2
.grid1.column4.alignment = 2
.grid1.column5.alignment = 2
.grid1.column6.alignment = 2
.grid1.column7.alignment = 2
.refresh
.command1.enabled = .t.
.command4.enabled = .f.
.command2.enabled = .t.
.command5.enabled = .t.
endif
endif
endwith
Cleartable.Click
delete all
pack
with thisformset.form4
.grid1.recordsource = "purchasing"
.grid1.columncount = 7
.grid1.column1.controlsource = "purchasing.code"
.grid1.column2.controlsource = "purchasing.type"
.grid1.column3.controlsource = "purchasing.price"
.grid1.column4.controlsource = "purchasing.stocks"
.grid1.column5.controlsource = "purchasing.spec"
.grid1.column6.controlsource = "purchasing.quantity"
.grid1.column7.controlsource = "purchasing.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Spec"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 34
.grid1.column2.width = 71
.grid1.column3.width = 46
.grid1.column4.width = 44
.grid1.column5.width = 258
.grid1.column6.width = 50
.grid1.column7.width = 48
.grid1.column1.alignment = 2
.grid1.column2.alignment = 2
.grid1.column3.alignment = 2
.grid1.column4.alignment = 2
.grid1.column5.alignment = 2
.grid1.column6.alignment = 2
.grid1.column7.alignment = 2
Endwith
Addtodelivery.Click
thisform.visible = .f.
thisformset.form5.visible = .t.
copy to orders
with thisformset.form5
close table
use orders
.grid1.recordsource = "orders"
.grid1.columncount = 7
.grid1.column1.controlsource = "orders.code"
.grid1.column2.controlsource = "orders.type"
.grid1.column3.controlsource = "orders.price"
.grid1.column4.controlsource = "orders.stocks"
.grid1.column5.controlsource = "orders.spec"
.grid1.column6.controlsource = "orders.quantity"
.grid1.column7.controlsource = "orders.amount"
.grid1.column1.header1.caption = "code"
.grid1.column2.header1.caption = "type"
.grid1.column3.header1.caption = "price"
.grid1.column4.header1.caption = "stocks"
.grid1.column5.header1.caption = "spec"
.grid1.column6.header1.caption = "quantity"
.grid1.column7.header1.caption = "amount"
thisformset.form5.text7.value = thisformset.form4.text7.value
.grid1.column1.width = 58
.grid1.column2.width = 125
.grid1.column3.width = 83
.grid1.column4.width = 44
.grid1.column5.width = 239
.grid1.column6.width = 75
.grid1.column7.width = 75
.refresh
Endwith
Back.Click
thisform.visible = .f.
thisformset.form2.visible = .t.
with thisformset.form4
delete all
pack
.text1.value = ""
.text2.value = ""
.text3.value = 0
.text4.value = 0
.text5.value = ""
.text6.value = 0
.text7.value = 0
.text8.value = 0
.text9.value = 0
Endwith
Delivery Form:
Savedelivery.Click
with thisformset.form5
a = .text1.value
b = .text2.value
c = .text3.value
d = .text4.value
e = .text5.value
f = .text6.value
g = .text7.value
close table
use delivery
append blank
replace cusnum with a
replace cusname with b
replace contact with c
replace address with d
replace tod with e
replace dod with f
replace amount with g
.refresh
close table
use orders
.grid1.recordsource = "orders"
.grid1.columncount = 7
.grid1.column1.controlsource = "orders.code"
.grid1.column2.controlsource = "orders.type"
.grid1.column3.controlsource = "orders.price"
.grid1.column4.controlsource = "orders.stocks"
.grid1.column5.controlsource = "orders.spec"
.grid1.column6.controlsource = "orders.quantity"
.grid1.column7.controlsource = "orders.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Specification"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 35
.grid1.column2.width = 159
.grid1.column3.width = 54
.grid1.column4.width = 42
.grid1.column5.width = 158
.grid1.column6.width = 48
.grid1.column7.width = 75
.refresh
Endwith
EditOrder.Click
thisformset.form7.visible = .t.
close table
use orders
with thisformset.form7.grid1
.columncount = 8
.column2.width = 58
.column3.width = 125
.column4.width = 83
.column5.width = 44
.column6.width = 239
.column7.width = 75
.column8.width = 75
.recordsource = "Orders"
.column1.controlsource = "orders.cusnum"
.column2.controlsource = "orders.code"
.column3.controlsource = "orders.type"
.column4.controlsource = "orders.price"
.column5.controlsource = "orders.stocks"
.column6.controlsource = "orders.spec"
.column7.controlsource = "orders.quantity"
.column8.controlsource = "orders.amount"
.column2.header1.caption = "Code"
.column3.header1.caption = "Type"
.column4.header1.caption = "Price"
.column5.header1.caption = "Stocks"
.column6.header1.caption = "Specification"
.column7.header1.caption = "Quantity"
.column8.header1.caption = "Amount"
.column1.width = 0
.allowheadersizing = .f.
.refresh
endwith
replace cusnum with thisformset.form5.text1.value while cusnum = ""
Editcustomer.Click
thisformset.form8.visible = .t.
with thisformset.form8.grid1
close table
use delivery
.columncount = 7
.recordsource = "delivery"
.column1.controlsource ="delivery.cusnum"
.column2.controlsource ="delivery.cusname"
.column3.controlsource ="delivery.contact"
.column4.controlsource ="delivery.address"
.column5.controlsource ="delivery.tod"
.column6.controlsource ="delivery.dod"
.column7.controlsource ="delivery.amount"
.column1.header1.caption = "Cusnum"
.column2.header1.caption = "Name"
.column3.header1.caption = "Contact"
.column4.header1.caption = "Address"
.column5.header1.caption = "Time of Delivery"
.column6.header1.caption = "Date of Delivery"
.column7.header1.caption = "Amount"
.column1.width = 51
.column2.width = 172
.column3.width = 68
.column4.width = 220
.column5.width = 90
.column6.width = 93
.column7.width = 75
Endwith
Back.Click
thisform.visible = .f.
thisformset.form2.visible = .t.
with thisformset.form5
close table
use orders
delete all
pack
.text1.value = "0"
.text2.value = ""
.text3.value = ""
.text4.value = ""
.text5.value = ""
.text6.value = ""
.text7.value = 0
.refresh
Endwith
Ok.Click
thisform.visible = .f.
with thisformset.form5
close table
use orders
.grid1.recordsource = "orders"
.grid1.columncount = 7
.grid1.column1.controlsource = "orders.code"
.grid1.column2.controlsource = "orders.type"
.grid1.column3.controlsource = "orders.price"
.grid1.column4.controlsource = "orders.stocks"
.grid1.column5.controlsource = "orders.spec"
.grid1.column6.controlsource = "orders.quantity"
.grid1.column7.controlsource = "orders.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Specification"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 35
.grid1.column2.width = 159
.grid1.column3.width = 54
.grid1.column4.width = 42
.grid1.column5.width = 158
.grid1.column6.width = 48
.grid1.column7.width = 75
thisformset.form5.text7.value = thisformset.form4.text7.value
.refresh
Endwith
Delete.Click
with thisformset.form5.grid1
use orders
.columncount = 8
.column2.width = 58
.column3.width = 125
.column4.width = 83
.column5.width = 44
.column6.width = 239
.column7.width = 75
.column8.width = 75
.recordsource = "Orders"
.column1.controlsource = "orders.cusnum"
.column2.controlsource = "orders.code"
.column3.controlsource = "orders.type"
.column4.controlsource = "orders.price"
.column5.controlsource = "orders.stocks"
.column6.controlsource = "orders.spec"
.column7.controlsource = "orders.quantity"
.column8.controlsource = "orders.amount"
.column2.header1.caption = "Code"
.column3.header1.caption = "Type"
.column4.header1.caption = "Price"
.column5.header1.caption = "Stocks"
.column6.header1.caption = "Specification"
.column7.header1.caption = "Quantity"
.column8.header1.caption = "Amount"
.column1.width = 0
pack
.refresh
endwith
with thisformset.form7.grid1
.columncount = 8
.column2.width = 58
.column3.width = 125
.column4.width = 83
.column5.width = 44
.column6.width = 239
.column7.width = 75
.column8.width = 75
.recordsource = "Orders"
.column1.controlsource = "orders.cusnum"
.column2.controlsource = "orders.code"
.column3.controlsource = "orders.type"
.column4.controlsource = "orders.price"
.column5.controlsource = "orders.stocks"
.column6.controlsource = "orders.spec"
.column7.controlsource = "orders.quantity"
.column8.controlsource = "orders.amount"
.column2.header1.caption = "Code"
.column3.header1.caption = "Type"
.column4.header1.caption = "Price"
.column5.header1.caption = "Stocks"
.column6.header1.caption = "Specification"
.column7.header1.caption = "Quantity"
.column8.header1.caption = "Amount"
.column1.width = 0
.allowheadersizing = .f.
.refresh
Endwith
Ok.Click
thisform.visible = .f.
with thisformset.form5
close table
use orders
.grid1.recordsource = "orders"
.grid1.columncount = 7
.grid1.column1.controlsource = "orders.code"
.grid1.column2.controlsource = "orders.type"
.grid1.column3.controlsource = "orders.price"
.grid1.column4.controlsource = "orders.stocks"
.grid1.column5.controlsource = "orders.spec"
.grid1.column6.controlsource = "orders.quantity"
.grid1.column7.controlsource = "orders.amount"
.grid1.column1.header1.caption = "Code"
.grid1.column2.header1.caption = "Type"
.grid1.column3.header1.caption = "Price"
.grid1.column4.header1.caption = "Stocks"
.grid1.column5.header1.caption = "Specification"
.grid1.column6.header1.caption = "Quantity"
.grid1.column7.header1.caption = "Amount"
.grid1.column1.width = 35
.grid1.column2.width = 159
.grid1.column3.width = 54
.grid1.column4.width = 42
.grid1.column5.width = 158
.grid1.column6.width = 48
.grid1.column7.width = 75
thisformset.form5.text7.value = thisformset.form4.text7.value
.refresh
Endwith
Delete.Click
with thisformset.form8.grid1
use delivery
.columncount = 7
.column1.width = 51
.column2.width = 172
.column3.width = 68
.column4.width = 220
.column5.width = 90
.column6.width = 93
.column7.width = 75
.recordsource = "delivery"
.column1.controlsource = "delivery.cusnum"
.column2.controlsource = "delivery.cusname"
.column3.controlsource = "delivery.contact"
.column4.controlsource = "delivery.address"
.column5.controlsource = "delivery.tod"
.column6.controlsource = "delivery.dod"
.column7.controlsource = "delivery.amount"
.column1.header1.caption = "Cusnum"
.column2.header1.caption = "Name"
.column3.header1.caption = "Contact"
.column4.header1.caption = "Address"
.column5.header1.caption = "Time of Delivery"
.column6.header1.caption = "Date of Delivery"
.column7.header1.caption = "Amount"
pack
.refresh
endwith
with thisformset.form8.grid1
.columncount = 7
.column1.width = 51
.column2.width = 172
.column3.width = 68
.column4.width = 220
.column5.width = 90
.column6.width = 93
.column7.width = 75
.recordsource = "delivery"
.column1.controlsource = "delivery.cusnum"
.column2.controlsource = "delivery.cusname"
.column3.controlsource = "delivery.contact"
.column4.controlsource = "delivery.address"
.column5.controlsource = "delivery.tod"
.column6.controlsource = "delivery.dod"
.column7.controlsource = "delivery.amount"
.column1.header1.caption = "Cusnum"
.column2.header1.caption = "Name"
.column3.header1.caption = "Contact"
.column4.header1.caption = "Address"
.column5.header1.caption = "Time of Delivery"
.column6.header1.caption = "Date of Delivery"
.column7.header1.caption = "Amount"
.refresh
endwith
PHOTO GALLERY