GAMBAR IV.21 – FORM LOGIN
LAMPIRAN 1 – KODE FORM LOGIN
Private Sub cmdcancel_Click() End Sub
Private Sub cmdexit_Click() End
End Sub
Private Sub cmdlogin_Click() If password.Text = "THANIA" Then formmenu.Show
Unload Me Else
perhatian = MsgBox("Password Salah!", vbCritical + vbOKOnly, "Warning!") password.Text = ""
password.SetFocus End If
End Sub
Private Sub cmdok_Click() End Sub
GAMBAR IV.22 – FORM MENU
LAMPIRAN 2 – KODE FORM MENU
Private Sub customer_Click() formdtcust.Show
End Sub
Private Sub formulir_Click() formdtpesanan.Show
End Sub
Private Sub inventory_Click() formdtinventory.Show End Sub
Private Sub keluar_Click() End
End Sub
Private Sub pakaiinventory_Click() formpakaiinventory.Show
End Sub
Private Sub pegawai_Click() formdtpegawai.Show End Sub
Private Sub stmakanan_Click() formstandarisasimakanan.Show End Sub
GAMBAR IV.23 – FORM DATA CUSTOMER
GAMBAR IV.24 – FORM EXCEL DATA CUSTOMER
Katering IDA
Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575
No Customer Nama Customer Alamat Kota No Telepon
001 Freska Jl. Pamularsih Semarang 078963432
LAMPIRAN 3 – KODE FORM DATA CUSTOMER
Sub Cari()
On Error Resume Next
koneksi.RecordSource = "select * from dtcustomer where nama='" & txtcari.Text & "'"
koneksi.Refresh 'jika ada maka
If koneksi.Recordset.RecordCount > 0 Then txtnrc.Text = koneksi.Recordset("nrc") txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtkota.Text = koneksi.Recordset("kota") txtnotelp.Text = koneksi.Recordset("notelp") Else
perhatian = MsgBox("Nama Customer Belum Ada !", vbInformation + vbOKOnly, "Informasi !")
End If
txtcari.Text = "" End Sub
Sub bersih() txtnrc.Text = "" txtnama.Text = "" txtalamat.Text = "" txtkota.Text = "" txtnotelp.Text = "" End Sub
Sub tampilan()
tampil.RecordSource = "select * from dtcustomer" tampil.Refresh
End Sub
Private Sub cmdcari_Click() Cari
End Sub
Private Sub cmdcetak_Click() 'membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtcustomer.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh
' Column judul
excel_sheet.Cells(5, 1) = "No Customer" excel_sheet.Cells(5, 2) = "Nama Customer" excel_sheet.Cells(5, 3) = "Alamat"
While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 1) = koneksi.Recordset("nrc") excel_sheet.Cells(i, 2) = koneksi.Recordset("nama") excel_sheet.Cells(i, 3) = koneksi.Recordset("alamat") excel_sheet.Cells(i, 4) = koneksi.Recordset("kota") excel_sheet.Cells(i, 5) = koneksi.Recordset("notelp")
i = i + 1
koneksi.Recordset.MoveNext Wend
' membuat font judul tebal
excel_sheet.Rows(1).Font.Bold = True ' besar columns sesuai panjang data koneksi.Recordset.Close
End Sub
Private Sub cmdexit_Click() Unload Me
End Sub
Private Sub cmdhapus_Click()
tampil.RecordSource = "select * from dtcustomer"
tampil.Recordset.Delete tampil.Refresh
tampilan End Sub
Private Sub cmdsimpan_Click()
koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("nrc") = txtnrc.Text koneksi.Recordset("nama") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("kota") = txtkota.Text koneksi.Recordset("notelp") = txtnotelp.Text koneksi.Recordset.Update
koneksi.Recordset.Close koneksi.Refresh
bersih tampilan End Sub
Private Sub Form_Activate() tampilan
End Sub
Private Sub Form_Load()
koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
End Sub
Private Sub keluar_Click() End Sub
GAMBAR IV.25 – FORM DATA PEGAWAI
GAMBAR IV. 26 – FORM EXCEL DATA PEGAWAI
Katering IDA
Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575
No Pegawai Nama Pegawai Alamat Jabatan Gaji Pokok
001 Freska Jl. Pamularsih Semarang 78963432
LAMPIRAN 4 – KODE FORM DATA PEGAWAI
Sub Cari()
On Error Resume Next
koneksi.RecordSource = "select * from dtpegawai where nama=' " & txtcari.Text & "' "
koneksi.Refresh ' jika ada maka
If koneksi.Recordset.RecordCount > 0 Then txtnrp.Text = koneksi.Recordset("nrp") txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtjabatan.Text = koneksi.Recordset("jabatan") txtgp.Text = koneksi.Recordset("gp")
Else
perhatian = MsgBox("Nama Pegawai Belum Ada !", vbInformation + vbOKOnly, "Informasi !")
End If
txtcari.Text = "" End Sub
Sub bersih() txtnrp.Text = "" txtnama.Text = "" txtalamat.Text = "" txtjabatan.Text = "" txtgp.Text = "" End Sub Sub tampilan()
tampil.RecordSource = "select * from dtpegawai" tampil.Refresh
End Sub
Private Sub cmdcari_Click() Cari
End Sub
Private Sub cmdcetak_Click() ' membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtpegawai.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from dtpegawai" koneksi.Refresh
' Column judul
excel_sheet.Cells(5, 1) = "No Pegawai" excel_sheet.Cells(5, 2) = "Nama Pegawai" excel_sheet.Cells(5, 3) = "Alamat"
While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 1) = koneksi.Recordset("nrp") excel_sheet.Cells(i, 2) = koneksi.Recordset("nama") excel_sheet.Cells(i, 3) = koneksi.Recordset("alamat") excel_sheet.Cells(i, 4) = koneksi.Recordset("jabatan") excel_sheet.Cells(i, 5) = koneksi.Recordset("gp")
i = i + 1
koneksi.Recordset.MoveNext Wend
' membuat font judul tebal
excel_sheet.Rows(1).Font.Bold = True koneksi.Recordset.Close
End Sub
Private Sub cmdexit_Click() Unload Me
End Sub
Private Sub cmdhapus_Click()
tampil.RecordSource = "select * from dtpegawai" tampil.Recordset.Delete
tampil.Refresh tampilan End Sub
Private Sub cmdsimpan_Click()
koneksi.RecordSource = "select * from dtpegawai" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("nrp") = txtnrp.Text koneksi.Recordset("nama") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("jabatan") = txtjabatan.Text koneksi.Recordset("gp") = txtgp.Text
koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh
bersih tampilan End Sub
Private Sub Form_Activate() tampilan
End Sub
Private Sub Form_Load()
koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
End Sub
GAMBAR IV.27 – FORM DATA INVENTORY
GAMBAR IV.28 – FORM EXCEL DATA INVENTORY
Katering IDA
Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575
Kode Barang
Kode Bahan Baku
Jumlah Barang Awal
Jumlah Barang Akhir
Tanggal Pembelian Barang
Tanggal Pembelian Bahan Baku
B01 BRS 100 100 38995 38995
B02 GL 200 200 38995 38995
LAMPIRAN 5 – KODE FORM DATA INVENTORY
Sub Cari()
On Error Resume Next
koneksi.RecordSource = "select * from dtinventory where kodebarang='" & txtcari.Text & "' "
koneksi.Refresh ' jika ada maka
If koneksi.Recordset.RecordCount > 0 Then
txtkdbarang.Text = koneksi.Recordset("kodebarang") txtkdbaku.Text = koneksi.Recordset("kodebahanbaku") txtjmlbrgawal.Text = koneksi.Recordset("jmlawal") txtjmlbrgakhir.Text = koneksi.Recordset("jmlakhir") tglblbrg.Value = koneksi.Recordset("tglbelibarang") tglblbaku.Value = koneksi.Recordset("tglbelibahan") Else
perhatian = MsgBox("Kode Barang Belum Ada !", vbInformation + vbOKOnly, "Informasi !")
End If
txtcari.Text = "" End Sub
Sub bersih()
txtkdbarang.Text = "" txtkdbaku.Text = "" txtket.Text = ""
txtjmlbrgawal.Text = "" txtjmlbrgakhir.Text = "" End Sub
Sub tampilan()
tampil.RecordSource = "select * from dtinventory" tampil.Refresh
End Sub
Private Sub cmdcari_Click() Cari
End Sub
Private Sub cmdcetak_Click() ' membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtinventory.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh
' Column judul
excel_sheet.Cells(5, 1) = "Kode Barang" excel_sheet.Cells(5, 2) = "Kode Bahan Baku" excel_sheet.Cells(5, 3) = "Jumlah Barang Awal" excel_sheet.Cells(5, 4) = "Jumlah Barang Akhir" excel_sheet.Cells(5, 5) = "Tanggal Pembelian Barang" excel_sheet.Cells(5, 6) = "Tanggal Pembelian Bahan Baku" ' isi data ke excel
i = 6
While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 1) = koneksi.Recordset("kodebarang") excel_sheet.Cells(i, 2) = koneksi.Recordset("kodebahanbaku") excel_sheet.Cells(i, 3) = koneksi.Recordset("jmlawal")
excel_sheet.Cells(i, 4) = koneksi.Recordset("jmlakhir") excel_sheet.Cells(i, 5) = koneksi.Recordset("tglbelibarang") excel_sheet.Cells(i, 6) = koneksi.Recordset("tglbelibahan") i = i + 1
koneksi.Recordset.MoveNext Wend
'membuat font judul tebal
excel_sheet.Rows(1).Font.Bold = True ' besar columns sesuai panjang data
excel_sheet.Range(excel_sheet.Cells(1, 1), excel_sheet.Cells(i, 7)).Select excel_app.Selection.Columns.AutoFit
koneksi.Recordset.Close End Sub
Private Sub cmdexit_Click() Unload Me
End Sub
Private Sub cmdhapus_Click()
tampil.RecordSource = "select * from dtinventory" tampil.Recordset.Delete
tampil.Refresh tampilan End Sub
Private Sub cmdsimpan_Click()
koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("kodebarang") = txtkdbarang.Text koneksi.Recordset("kodebahanbaku") = txtkdbaku.Text koneksi.Recordset("keterangan") = txtket.Text
koneksi.Recordset("jmlawal") = txtjmlbrgawal.Text koneksi.Recordset("jmlakhir") = txtjmlbrgakhir.Text koneksi.Recordset("tglbelibarang") = tglblbrg.Value koneksi.Recordset("tglbelibahan") = tglblbaku.Value koneksi.Recordset.Update
koneksi.Recordset.Close koneksi.Refresh
bersih tampilan End Sub
Private Sub Form_Activate() tampilan
End Sub
Private Sub Form_Load()
koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
End Sub
GAMBAR IV.29 – FORM STANDARISASI MAKANAN
GAMBAR IV.30 – FORM EXCEL STANDARISASI MAKANAN
Katering IDA
Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575
Kode Menu Nama Menu Kode Bahan Baku Harga Bruto Tax Harga Netto
M01 Nasi Putih BRS 5000 3 5150
M02 Wedang Jahe GL 3000 5 3150
LAMPIRAN 6 – KODE FORM DATA STANDARISASI MAKANAN
Sub Cari()
On Error Resume Next
koneksi.RecordSource = "select * from dtstmakanan where kodemenu=' " & txtcari.Text & "' "
koneksi.Refresh ' jika ada maka
If koneksi.Recordset.RecordCount > 0 Then
txtkdmenu.Text = koneksi.Recordset("kodemenu") txtnamamenu.Text = koneksi.Recordset("namamenu") cbokdbaku.Text = koneksi.Recordset("kodebahanbaku") txtbruto.Text = koneksi.Recordset("hrgbruto")
txttax.Text = koneksi.Recordset("tax") txtnetto.Text = koneksi.Recordset("hrgnetto") Else
perhatian = MsgBox("Kode Menu Belum Ada !", vbInformation + vbOKOnly, "Informasi !")
End If
txtcari.Text = "" End Sub
Sub bersih()
txtkdmenu.Text = "" txtnamamenu.Text = "" cbokdbaku.Text = "" txtbruto.Text = "" txttax.Text = "" txtnetto.Text = "" txtket.Text = "" End Sub Sub tampilan()
tampil.RecordSource = "select * from dtstmakanan" tampil.Refresh
End Sub
Private Sub cbokdbaku_Click()
koneksi.RecordSource = "select * from dtinventory where kodebahanbaku=' " & Trim(cbokdbaku.Text) & "' "
koneksi.Refresh
txtket.Text = koneksi.Recordset("keterangan") End Sub
Private Sub cmdcari_Click() Cari
End Sub
Private Sub cmdcetak_Click() ' membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkstmakanan.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh
While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 1) = koneksi.Recordset("kodemenu") excel_sheet.Cells(i, 2) = koneksi.Recordset("namamenu") excel_sheet.Cells(i, 3) = koneksi.Recordset("kodebahanbaku") excel_sheet.Cells(i, 4) = koneksi.Recordset("hrgbruto") excel_sheet.Cells(i, 5) = koneksi.Recordset("tax") excel_sheet.Cells(i, 6) = koneksi.Recordset("hrgnetto") i = i + 1
koneksi.Recordset.MoveNext Wend
' membuat font judul tebal
excel_sheet.Rows(1).Font.Bold = True
koneksi.Recordset.Close End Sub
Private Sub cmdexit_Click() Unload Me
End Sub
Private Sub cmdhapus_Click()
tampil.RecordSource = "select * from dtstmakanan" tampil.Recordset.Delete
tampil.Refresh tampilan End Sub
Private Sub cmdsimpan_Click()
koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("kodemenu") = txtkdmenu.Text koneksi.Recordset("namamenu") = txtnamamenu.Text koneksi.Recordset("kodebahanbaku") = cbokdbaku.Text koneksi.Recordset("hrgbruto") = txtbruto.Text
koneksi.Recordset("tax") = txttax.Text koneksi.Recordset("hrgnetto") = txtnetto.Text koneksi.Recordset.Update
koneksi.Recordset.Close koneksi.Refresh
bersih tampilan End Sub
Private Sub Form_Activate() tampilan
End Sub
Private Sub Form_Load()
koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
With cbokdbaku
koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh
While Not koneksi.Recordset.EOF
.AddItem (koneksi.Recordset("kodebahanbaku")) koneksi.Recordset.MoveNext
Wend End With End Sub
Private Sub txtnetto_GotFocus() tax = (txttax.Text / 100) * txtbruto.Text txtnetto.Text = Val(txtbruto.Text) + Val(tax) End Sub
GAMBAR IV.31 – FORM DATA PEMAKAIAN INVENTORY
GAMBAR IV.32 – FORM EXCEL DATA PEMAKAIAN INVENTORY
Katering IDA
Jl. Agung VII - 3 Gajah Mungkur, Candi baru, Semarang - 50232 ( 024-8316637 - 8414625 Fax. 8447575
Nama Customer Alamat
Jenis Pesanan
Tanggal Acara
Tempat
Acara Biaya
Nama Pegawai
Freska
Jl.
Pamularsih Prasmanan 38995 Jl. Mugas 1345000 Freska
LAMPIRAN 7 – KODE FORM DATA PEMAKAIAN INVENTORY
Sub bersih()
cbokdcust.Text = "" txtnama.Text = "" txtalamat.Text = "" txtnotelp.Text = "" cbonrp.Text = "" cbokdpesanan.Text = "" txtjenispesanan.Text = "" txttempatacara.Text = "" txtbiaya.Text = "" cbokdbarang.Text = "" txtketbarang.Text = "" cbokdbaku.Text = "" txtketbaku.Text = "" End Sub
Sub tampilan()
tampil.RecordSource = "select * from dtpakaiinventory" tampil.Refresh
End Sub
Private Sub cbokdbaku_Click()
koneksi.RecordSource = "select * from dtinventory where kodebahanbaku=' " & Trim(cbokdbaku.Text) & "' "
koneksi.Refresh
txtketbaku.Text = koneksi.Recordset("keterangan") End Sub
Private Sub cbokdcust_Click()
koneksi.RecordSource = "select * from dtcustomer where nrc=' " & Trim(cbokdcust.Text) & "' "
koneksi.Refresh
txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtnotelp.Text = koneksi.Recordset("notelp") End Sub
Private Sub cbokdpesanan_Click()
koneksi.RecordSource = "select * from dtpesanan where kdpesanan='" & Trim(cbokdpesanan.Text) & "' "
koneksi.Refresh
txtjenispesanan.Text = koneksi.Recordset("jenispesanan") txttglacara.Value = koneksi.Recordset("tglacara")
txttempatacara.Text = koneksi.Recordset("tempatacara")
txtbiaya.Text = koneksi.Recordset("totalbayar") End Sub
Private Sub cbonrp_Click()
koneksi.RecordSource = "select * from dtpegawai where nrp=' " & Trim(cbonrp.Text) & "' "
koneksi.Refresh
txtnamapegawai.Text = koneksi.Recordset("nama") End Sub
Private Sub cmdcetak_Click() ' membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkpakaiinventory.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from dtpakaiinventory" koneksi.Refresh
' Column judul
excel_sheet.Cells(5, 1) = "Nama Customer" excel_sheet.Cells(5, 2) = "Alamat"
excel_sheet.Cells(5, 3) = "Jenis Pesanan" excel_sheet.Cells(5, 4) = "Tanggal Acara" excel_sheet.Cells(5, 5) = "Tempat Acara" excel_sheet.Cells(5, 6) = "Biaya"
excel_sheet.Cells(5, 7) = "Nama Pegawai" ' isi data ke excel
i = 6
While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 1) = koneksi.Recordset("namacust") excel_sheet.Cells(i, 2) = koneksi.Recordset("alamat") excel_sheet.Cells(i, 3) = koneksi.Recordset("jenispesanan")
excel_sheet.Cells(i, 4) = koneksi.Recordset("tglacara") excel_sheet.Cells(i, 5) = koneksi.Recordset("tempatacara") excel_sheet.Cells(i, 6) = koneksi.Recordset("biaya")
excel_sheet.Cells(i, 7) = koneksi.Recordset("namapegawai") i = i + 1
koneksi.Recordset.MoveNext Wend
' membuat font judul tebal
excel_sheet.Rows(1).Font.Bold = True ' besar columns sesuai panjang data
excel_sheet.Range(excel_sheet.Cells(1, 1), excel_sheet.Cells(i, 7)).Select excel_app.Selection.Columns.AutoFit
koneksi.Recordset.Close End Sub
Private Sub cmdexit_Click() Unload Me
End Sub
Private Sub cmdhapus_Click()
tampil.RecordSource = "select * from dtpakaiinventory" tampil.Recordset.Delete
tampil.Refresh tampilan End Sub
Private Sub cmdsimpan_Click()
koneksi.RecordSource = "select * from dtpakaiinventory" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("namacust") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text
koneksi.Recordset("namapegawai") = txtnamapegawai.Text koneksi.Recordset("kodepesanan") = cbokdpesanan.Text koneksi.Recordset("jenispesanan") = txtjenispesanan.Text koneksi.Recordset("tglacara") = txttglacara.Value
koneksi.Recordset("tempatacara") = txttempatacara.Text koneksi.Recordset("biaya") = txtbiaya.Text
koneksi.Recordset("kodebarang") = cbokdbarang.Text koneksi.Recordset("kodebahanbaku") = cbokdbaku.Text koneksi.Recordset.Update
koneksi.Recordset.Close koneksi.Refresh
bersih
tampilan End Sub
Private Sub Form_Activate() tampilan
End Sub
Private Sub Form_Load()
koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
With cbokdcust
koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh
While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("nrc")) koneksi.Recordset.MoveNext
Wend End With
With cbokdbarang
koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh
While Not koneksi.Recordset.EOF
.AddItem (koneksi.Recordset("kodebarang")) koneksi.Recordset.MoveNext
Wend End With With cbonrp
koneksi.RecordSource = "select * from dtpegawai" koneksi.Refresh
While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("nrp")) koneksi.Recordset.MoveNext
Wend End With
With cbokdpesanan
koneksi.RecordSource = "select * from dtpesanan" koneksi.Refresh
While Not koneksi.Recordset.EOF
.AddItem (koneksi.Recordset("kdpesanan")) koneksi.Recordset.MoveNext
Wend End With With cbokdbaku
koneksi.RecordSource = "select * from dtinventory" koneksi.Refresh
While Not koneksi.Recordset.EOF
.AddItem (koneksi.Recordset("kodebahanbaku")) koneksi.Recordset.MoveNext
Wend End With End Sub
Private Sub txtnetto_GotFocus()
txtnetto.Text = Val(txtbruto.Text) + Val(txttax.Text) End Sub
GAMBAR IV.33 – FORM DATA PESANAN
GAMBAR IV.34 – FORM NOTA PESANAN
GAMBAR IV.35 – FORM EXCEL NOTA PESANAN
LAMPIRAN 8 – KODE FORM DATA PESANAN
Sub Cari()
On Error Resume Next
koneksi.RecordSource = "select * from dtcustomer where nama=' " & txtcari.Text & "' "
koneksi.Refresh ' jika ada maka
If koneksi.Recordset.RecordCount > 0 Then cbokdcust.Text = koneksi.Recordset("nrc") txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtkota.Text = koneksi.Recordset("kota") txtnotelp.Text = koneksi.Recordset("notelp") cust = koneksi.Recordset("nrc")
koneksi.Recordset.Close
koneksi1.RecordSource = "select * from dtpesanan where nrc=' " & cust & "' " koneksi1.Refresh
If koneksi1.Recordset.RecordCount > 0 Then
txtkdpesanan.Text = koneksi1.Recordset("kdpesanan") txtjenispesanan.Text = koneksi1.Recordset("jenispesanan") txtjenisacara.Text = koneksi1.Recordset("jenisacara") txttempatacara.Text = koneksi1.Recordset("tempatacara")
txtjenisbayar.Text = koneksi1.Recordset("jenisbayar") txtjumlahbayar.Text = koneksi1.Recordset("jumlahbayar") txttglacara.Value = koneksi1.Recordset("tglacara")
txttglpesan.Value = koneksi1.Recordset("tglpesan") End If
Else
perhatian = MsgBox("Nama Customer Belum Ada !", vbInformation + vbOKOnly, "Informasi !")
End If
txtcari.Text = "" End Sub
Sub bersih()
cbokdcust.Text = "" txtnama.Text = "" txtalamat.Text = "" txtnotelp.Text = "" txtkdpesanan.Text = "" txtjenispesanan.Text = "" txttempatacara.Text = "" txtjenisbayar.Text = "" txtjmlbayar.Text = "" txtjenisacara.Text = "" End Sub
Sub bersihitem() cbokdmenu.Text = "" txtnamamenu.Text = "" txtharga.Text = "" txtjmlorang.Text = "" End Sub
Sub tampilan()
tampil.RecordSource = "select kdpesanan,kdmenu,jmlorang,subtotal from dtpesanitem, dtstmakanan where dtpesanitem.kdmenu=dtstmakanan.kodemenu and dtpesanitem.kdpesanan=' " & txtkdpesanan.Text & "' "
tampil.Refresh End Sub
Private Sub cbokdcust_Click()
koneksi.RecordSource = "select * from dtcustomer where nrc=' " & Trim(cbokdcust.Text) & "' "
koneksi.Refresh
txtnama.Text = koneksi.Recordset("nama") txtalamat.Text = koneksi.Recordset("alamat") txtnotelp.Text = koneksi.Recordset("notelp") txtkdpesanan.SetFocus
End Sub
Private Sub cbokdmenu_Click()
koneksi.RecordSource = "select * from dtstmakanan where kodemenu=' " & Trim(cbokdmenu.Text) & "' "
koneksi.Refresh
txtnamamenu.Text = koneksi.Recordset("namamenu") txtharga.Text = koneksi.Recordset("hrgnetto")
End Sub
Private Sub cmdcetak_Click() ' membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkstmakanan.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh
While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 1) = koneksi.Recordset("kodemenu") excel_sheet.Cells(i, 2) = koneksi.Recordset("namamenu") excel_sheet.Cells(i, 3) = koneksi.Recordset("kodebahanbaku") excel_sheet.Cells(i, 4) = koneksi.Recordset("hrgbruto") excel_sheet.Cells(i, 5) = koneksi.Recordset("tax")
excel_sheet.Cells(i, 6) = koneksi.Recordset("hrgnetto") i = i + 1
koneksi.Recordset.MoveNext Wend
' membuat font judul tebal
excel_sheet.Rows(1).Font.Bold = True ' besar columns sesuai panjang data
excel_sheet.Range(excel_sheet.Cells(1, 1), excel_sheet.Cells(i, 7)).Select excel_app.Selection.Columns.AutoFit
koneksi.Recordset.Close End Sub
Private Sub cmdcari_Click() Cari
End Sub
Private Sub cmdexit_Click() Unload Me
End Sub
Private Sub cmdhapus_Click()
tampil.RecordSource = "select * from dtstmakanan" tampil.Recordset.Delete
tampil.Refresh tampilan End Sub
Private Sub cmdpreview_Click() Unload Me
formcetak.Show End Sub
Private Sub cmdproses_Click() ST = txttotal.Text
' simpan ke pesan item
koneksi.RecordSource = "select * from dtpesanitem" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("kdpesanan") = txtkdpesanan.Text koneksi.Recordset("kdmenu") = cbokdmenu.Text koneksi.Recordset("jmlorang") = txtjmlorang.Text koneksi.Recordset("subtotal") = txtsubtotal.Text koneksi.Recordset.Update
koneksi.Recordset.Close
koneksi.Refresh
subtot = Val(ST) + Val(txtsubtotal) txttotal.Text = subtot
' simpan ke cetaknota
koneksi.RecordSource = "select * from ctknota" koneksi.Refresh
koneksi.Recordset.AddNew
koneksi.Recordset("namacust") = txtnama.Text koneksi.Recordset("alamat") = txtalamat.Text koneksi.Recordset("notelp") = txtnotelp.Text
koneksi.Recordset("jenispesanan") = txtjenispesanan.Text koneksi.Recordset("tglacara") = txttglacara.Value
koneksi.Recordset("jenisacara") = txtjenisacara.Text koneksi.Recordset("tempatacara") = txttempatacara.Text koneksi.Recordset("jmlorang") = txtjmlorang.Text koneksi.Recordset("namamenu") = txtnamamenu.Text koneksi.Recordset("Harga") = txtharga.Text
koneksi.Recordset("Total") = txtsubtotal.Text koneksi.Recordset("jmlbayar") = txtjmlbayar.Text koneksi.Recordset.Update
koneksi.Recordset.Close koneksi.Refresh
Private Sub cmdsimpan_Click()
koneksi.RecordSource = "select * from dtpesanan" koneksi.Refresh
tanggal = Date n = 0
tg = n + Mid(tanggal, 4, 1)
th = Right(tanggal, 4) If bl = 1 Then
bln = "Januari" ElseIf bl = 2 Then bln = "Februari" ElseIf bl = 3 Then bln = "Maret" ElseIf bl = 4 Then bln = "April" ElseIf bl = 5 Then bln = "Agustus" ElseIf bl = 9 Then bln = "September" ElseIf bl = 10 Then bln = "Oktober" ElseIf bl = 11 Then bln = "November" Else
bln = "Desember" End If
koneksi.Recordset.AddNew
koneksi.Recordset("nrc") = cbokdcust.Text
koneksi.Recordset("kdpesanan") = txtkdpesanan.Text koneksi.Recordset("jenispesanan") = txtjenispesanan.Text koneksi.Recordset("tglpesan") = txttglpesan.Value
koneksi.Recordset("tglacara") = txttglacara.Value koneksi.Recordset("jenisacara") = txtjenisacara.Text koneksi.Recordset("tempatacara") = txttempatacara.Text koneksi.Recordset("jenisbayar") = txtjenisbayar.Text
koneksi.Recordset("jumlahbayar") = txtjmlbayar.Text koneksi.Recordset("totalbayar") = txttotal.Text koneksi.Recordset("bulan") = bln
koneksi.Recordset("tahun") = th koneksi.Recordset.Update koneksi.Recordset.Close koneksi.Refresh
bersih
' Mencetak Invoice ' membuat aplikasi excell
Set excel_app = CreateObject("Excel.Application") ' memperlihatkan excell
excel_app.Visible = True ' membuka file excell
excel_app.Workbooks.Open FileName:=App.Path & "\ctkdtpesanan.xls"
' cek versi excell
If Val(excel_app.Application.Version) >= 8 Then Set excel_sheet = excel_app.ActiveSheet
koneksi.RecordSource = "select * from ctknota" koneksi.Refresh
' Column judul
excel_sheet.Cells(7, 2) = koneksi.Recordset("namacust") excel_sheet.Cells(8, 2) = koneksi.Recordset("alamat") excel_sheet.Cells(9, 2) = koneksi.Recordset("notelp") excel_sheet.Cells(7, 4) = koneksi.Recordset("tglacara") excel_sheet.Cells(8, 4) = koneksi.Recordset("tempatacara")
' besar columns sesuai panjang data i = 12
ST = koneksi.Recordset("total")
jmlbayar = koneksi.Recordset("jmlbayar") While Not koneksi.Recordset.EOF
excel_sheet.Cells(i, 2) = koneksi.Recordset("namamenu") excel_sheet.Cells(i, 3) = koneksi.Recordset("jmlorang") excel_sheet.Cells(i, 4) = koneksi.Recordset("harga") subtot = Val(ST) + Val(koneksi.Recordset("total"))
tot = subtot i = i + 1
koneksi.Recordset.MoveNext Wend
i = i + 1
If tot > jmlbayar Then kurang = jmlbayar - tot
excel_sheet.Cells(i, 3) = "Total Bayar" excel_sheet.Cells(i, 4) = tot
excel_sheet.Cells(i, 3) = "Total Bayar" excel_sheet.Cells(i, 4) = tot koneksi.Recordset.Close
koneksi.Refresh
End Sub
Private Sub Form_Activate() tampilan
End Sub
Private Sub Form_Load()
koneksi.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
tampil.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
koneksi1.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\IDA.mdb"
With cbokdcust
koneksi.RecordSource = "select * from dtcustomer" koneksi.Refresh
While Not koneksi.Recordset.EOF .AddItem (koneksi.Recordset("nrc")) koneksi.Recordset.MoveNext
Wend End With
With txtjenispesanan .AddItem ("Prasmanan") .AddItem ("Foodstal") .AddItem ("Lunch Box") .AddItem ("Snack Box") .AddItem ("Round Table") End With .AddItem ("Tedak Siten") .AddItem ("Selamatan") .AddItem ("Resepsi") .AddItem ("Akad Nikah") .AddItem ("Lainnya") End With
With cbokdmenu
koneksi.RecordSource = "select * from dtstmakanan" koneksi.Refresh
While Not koneksi.Recordset.EOF
.AddItem (koneksi.Recordset("kodemenu")) koneksi.Recordset.MoveNext
Wend End With End Sub
Private Sub txtnetto_GotFocus()
txtnetto.Text = Val(txtbruto.Text) + Val(txttax.Text) End Sub
Private Sub txtjmlorang_lostfocus()
txtsubtotal.Text = txtjmlorang.Text * txtharga.Text End Sub
LAMPIRAN 9 – CONTOH KWITANSI PEMBAYARAN
LAMPIRAN 10 – CONTOH MEMO PESANAN
LAMPIRAN 11 – BROSUR MENU IDA KATERING
LAMPIRAN 12 – CONTOH FORMULIR PESANAN
GAMBAR IV.11 – DEKOMPOSISI SISTEM
Top level
Level 0
Sambung di halaman selanjutnya
Level 1 0